:root {
  color-scheme: dark;
  --ink: #0b1020;
  --panel: #121a2d;
  --panel-light: #17223a;
  --line: rgba(176, 195, 229, .17);
  --muted: #8f9cb5;
  --text: #f5f4f0;
  --accent: #ff735b;
  --lime: #c6ff8c;
  --mono: 'DM Mono', Consolas, monospace;
  --sans: 'Space Grotesk', 'Trebuchet MS', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 5px;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 46% 36% at 87% 31%, rgba(87, 54, 91, .18), transparent 76%),
    radial-gradient(ellipse 48% 30% at 2% 62%, rgba(28, 70, 95, .12), transparent 72%),
    var(--ink);
}

.page-shell::before {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: radial-gradient(rgba(204, 224, 255, .35) .7px, transparent .7px);
  background-size: 17px 17px;
  mask-image: linear-gradient(to bottom, #000, transparent 60%);
}

.site-header, main, .site-footer {
  position: relative;
  z-index: 1;
}

.site-header, .site-footer {
  width: min(1260px, calc(100% - 96px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Keep the original header height even when the branding grows. */
  height: 99px;
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .11em;
}

.brand-logo {
  display: block;
  width: 224px;
  height: auto;
  flex-shrink: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.live-status, .text-button, .eyebrow, .toolbar-title, .toolbar-id, .readout-label, .metric, .incident-link, .safety-note, .fine-print, .site-footer, .arena-corner, .arena-prompt, .dialog-eyebrow, .dialog-action, .tab-button, .crash-code, .crash-recover, .footer-reset {
  font-family: var(--mono);
}

.live-status {
  color: #b4bfd2;
  font-size: 10px;
  letter-spacing: .075em;
  white-space: nowrap;
}

.live-dot {
  display: inline-block;
  height: 7px;
  width: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(198,255,140,.6);
}

.text-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  letter-spacing: .05em;
}

.text-button:hover, .footer-reset:hover, .incident-link:hover {
  color: var(--lime);
}

main {
  width: min(1080px, calc(100% - 80px));
  margin: 0 auto;
}

.intro {
  text-align: center;
  padding: 76px 0 37px;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 23px;
  color: var(--lime);
  font-size: 10px;
  letter-spacing: .15em;
}

.eyebrow-line {
  width: 25px;
  height: 1px;
  background: var(--lime);
}

.eyebrow-index {
  color: #75849f;
  margin-left: 16px;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 8.15vw, 108px);
  font-weight: 700;
  line-height: .94;
  letter-spacing: -.084em;
}

h1 .probably {
  color: var(--accent);
}

.title-period {
  color: var(--lime);
}

.intro-copy {
  max-width: 530px;
  margin: 28px auto 0;
  color: #a8b3c7;
  font-size: 16px;
  line-height: 1.7;
}

.intro-copy strong {
  color: var(--text);
  font-weight: 500;
}

.experiment {
  overflow: hidden;
  border: 1px solid #35405b;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 24px 95px rgba(0, 0, 0, .26), 0 0 0 5px rgba(255,255,255,.015);
}

.experiment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 23px;
  min-height: 51px;
  border-bottom: 1px solid var(--line);
  background: #172037;
}

.toolbar-title, .toolbar-id {
  color: #e6eaf2;
  font-size: 10px;
  letter-spacing: .08em;
}

.toolbar-icon {
  color: var(--lime);
  margin-right: 9px;
  font-size: 16px;
  vertical-align: middle;
}

.toolbar-muted {
  color: #8292b0;
}

.toolbar-id {
  color: #8c9bb3;
}

.toolbar-id span {
  margin-left: 8px;
  color: var(--lime);
}

.arena {
  position: relative;
  height: 365px;
  overflow: hidden;
  isolation: isolate;
  background: #10192d;
  transition: background .35s, filter .35s;
}

.arena::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  background-image: linear-gradient(rgba(125,151,190,.085) 1px, transparent 1px), linear-gradient(90deg,rgba(125,151,190,.085) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 95% at center,#000,transparent);
}

.arena::after {
  position: absolute;
  inset: 19px;
  pointer-events: none;
  border: 1px dashed rgba(151,174,211,.15);
  border-radius: 3px;
  content: '';
}

.arena-glow {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 45%;
  width: 440px;
  height: 280px;
  transform: translate(-50%,-50%);
  background: radial-gradient(ellipse, rgba(255,115,91,.12),transparent 67%);
}

.arena-corner {
  z-index: 2;
  position: absolute;
  color: #6e7c97;
  font-size: 9px;
  letter-spacing: .1em;
  pointer-events: none;
}

.arena-corner--tl {
  top: 36px;
  left: 37px;
}

.arena-corner--tr {
  top: 36px;
  right: 37px;
}

.arena-corner--bl {
  bottom: 30px;
  left: 37px;
}

.arena-corner--br {
  bottom: 30px;
  right: 37px;
  font-size: 17px;
}

.button-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.game-button {
  position: absolute;
  left: 50%;
  top: 49%;
  transform: translate(-50%,-50%) scale(var(--button-scale, 1));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-width: 218px;
  max-width: 280px;
  min-height: 80px;
  padding: 16px 28px;
  border: 1px solid #ffb19a;
  border-radius: 11px;
  box-shadow: 0 9px 0 #a93c38, 0 18px 38px rgba(255,100,79,.24), inset 0 1px 0 rgba(255,255,255,.35);
  background: linear-gradient(160deg,#ffab86 0%,#ff735b 45%,#f65752 100%);
  color: #29111b;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-align: center;
  line-height: 1.04;
  transition: top .45s cubic-bezier(.2,.8,.2,1), left .45s cubic-bezier(.2,.8,.2,1), transform .35s, filter .25s, background .3s;
  user-select: none;
}

.game-button:hover {
  filter: brightness(1.08);
}

.game-button:active {
  box-shadow: 0 3px 0 #a93c38, 0 10px 20px rgba(255,100,79,.2);
  transform: translate(-50%,calc(-50% + 6px)) scale(var(--button-scale, 1));
}

.game-button .button-arrow {
  font-size: 21px;
  font-weight: 500;
}

.game-button.is-bitten {
  -webkit-mask-image: radial-gradient(circle at 93% 9%, transparent 0 var(--bite-size, 20px), #000 calc(var(--bite-size, 20px) + 1px));
  mask-image: radial-gradient(circle at 93% 9%, transparent 0 var(--bite-size, 20px), #000 calc(var(--bite-size, 20px) + 1px));
}

.game-button.is-nervous {
  animation: jitter .17s linear infinite alternate;
}

.game-button.is-sleeping {
  filter: saturate(.4);
}

.game-button.is-clone {
  background: linear-gradient(145deg,#b9ffb0,#78daca);
  border-color: #c7ffdd;
  box-shadow: 0 9px 0 #338d83, 0 18px 38px rgba(91,222,187,.2);
}

.game-button.is-clone:active {
  box-shadow: 0 3px 0 #338d83;
}

/* Relationship indicators are deliberately understated until the drama starts. */
.button-trait {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #3b506f;
  border-radius: 5px;
  background: #111b30;
  color: #d4e2f7;
  padding: 4px 7px;
  font: 9px/1 var(--mono);
  letter-spacing: .06em;
  white-space: nowrap;
  pointer-events: none;
}

.game-button.is-jealous { outline: 3px solid #ffc46c; outline-offset: 4px; }
.game-button.is-friendly { outline: 3px solid #9ae8ae; outline-offset: 4px; }
.game-button.is-showoff { animation: show-off .65s ease-in-out infinite alternate; }
.game-button.is-shy { opacity: .78; }

@keyframes show-off {
  from { filter: brightness(1); }
  to { filter: brightness(1.32) saturate(1.15); }
}

.game-button.is-hidden-temporarily {
  display: none;
}

.arena-prompt {
  position: absolute;
  z-index: 1;
  bottom: 54px;
  width: 100%;
  text-align: center;
  margin: 0;
  color: #8291ac;
  font-size: 10px;
  letter-spacing: .14em;
  pointer-events: none;
}

.arena.is-inverted {
  background: #eaf4db;
}

.arena.is-inverted .arena-corner, .arena.is-inverted .arena-prompt {
  color: #536058;
}

.arena.is-inverted .arena-glow {
  background: radial-gradient(ellipse,rgba(98,148,102,.19),transparent 67%);
}

.arena.is-shaking {
  animation: shake .46s linear;
}

.arena.is-dim {
  filter: brightness(.6);
}

.particle-layer {
  z-index: 5;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 2px;
  animation: burst .75s ease-out forwards;
}

.particle:nth-child(3n) {
  background: #ff9b86;
}

.particle:nth-child(4n) {
  background: #92caff;
}

.experiment-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 105px;
  padding: 20px 26px;
  border-top: 1px solid var(--line);
  background: #172037;
}

.readout-label {
  display: block;
  color: #899ab5;
  font-size: 10px;
  letter-spacing: .12em;
}

.signal-star {
  color: var(--lime);
  margin-right: 8px;
}

.readout-result {
  min-width: 0;
  flex: 1;
  padding-right: 20px;
}

.readout-result p {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.readout-count {
  padding-left: 25px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.readout-count strong {
  display: block;
  margin-top: 7px;
  color: var(--lime);
  font-size: 33px;
  letter-spacing: -.07em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.under-console {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 19px 0 0;
}

.metric {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7c8ba5;
  font-size: 9px;
  letter-spacing: .04em;
}

.metric strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 500;
}

.incident-link {
  background: transparent;
  border: 0;
  padding: 4px;
  color: var(--lime);
  font-size: 10px;
  letter-spacing: .03em;
}

.safety-note {
  margin: 0 0 0 auto;
  color: #8798b1;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .025em;
}

.safety-note span {
  color: var(--lime);
}

.fine-print {
  display: flex;
  align-items: start;
  gap: 22px;
  padding: 39px 0 54px;
  margin-top: 33px;
  border-top: 1px solid var(--line);
}

.fine-print span {
  white-space: nowrap;
  color: #71809b;
  font-size: 10px;
  letter-spacing: .08em;
}

.fine-print p {
  max-width: 680px;
  margin: -3px 0 0;
  color: #74849e;
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .015em;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  color: #6f809d;
  font-size: 10px;
  letter-spacing: .07em;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.footer-quirkport-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 4px;
}

.footer-quirkport-logo {
  display: block;
  width: 124px;
  height: auto;
}

.footer-quirkport-link:hover .footer-quirkport-logo {
  opacity: .85;
}

.footer-version {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--mono);
  color: #8495b0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 9px;
  white-space: nowrap;
  letter-spacing: .06em;
}

.site-footer a {
  color: #b9c4d7;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--lime);
}

a.footer-version:hover {
  border-color: rgba(198,255,140,.8);
  background: rgba(198,255,140,.07);
  color: var(--lime);
}

.footer-reset {
  border: 0;
  background: transparent;
  color: #8493ae;
  font-size: 10px;
  letter-spacing: .06em;
}

.footer-reset span {
  font-size: 16px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Native dialogs intentionally use a small, consistent visual system. */
.info-dialog {
  width: min(510px, calc(100% - 28px));
  max-height: 85vh;
  overflow-y: auto;
  padding: 37px;
  border: 1px solid #546582;
  border-radius: 17px;
  background: #17223a;
  color: var(--text);
  box-shadow: 0 35px 100px rgba(0,0,0,.5);
}

.info-dialog::backdrop {
  background: rgba(3,8,17,.78);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 22px;
  border: 0;
  background: transparent;
  color: #b4bdd0;
  font-size: 28px;
}

.dialog-eyebrow {
  color: var(--lime);
  font-size: 10px;
  letter-spacing: .1em;
}

.info-dialog h2 {
  font-size: clamp(28px,5vw,38px);
  letter-spacing: -.05em;
  margin: 19px 0;
}

.info-dialog p:not(.dialog-eyebrow) {
  color: #afbad0;
  line-height: 1.65;
  font-size: 14px;
}

.dialog-action {
  margin-top: 16px;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
}

.incident-lead {
  margin-bottom: 25px;
}

.incident-tabs {
  display: flex;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  margin: 28px 0 14px;
}

.tab-button {
  padding: 12px 3px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #8596b4;
  font-size: 10px;
  letter-spacing: .07em;
}

.tab-button.is-active {
  color: var(--lime);
  border-color: var(--lime);
}

.record-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.record-icon {
  display: grid;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  place-items: center;
  background: #273650;
  border-radius: 8px;
  font-size: 17px;
}

.record-icon.is-locked {
  opacity: .45;
}

.record-description {
  flex: 1;
}

.record-description strong {
  display: block;
  font-size: 13px;
}

.record-description span {
  display: block;
  padding-top: 4px;
  color: #899ab2;
  font-size: 12px;
  line-height: 1.3;
}

.record-state {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 10px;
}

.record-state.is-locked {
  color: #7788a1;
}

.empty-records {
  padding: 12px 0;
  color: #8c9cb6;
  font-size: 13px;
}

.crash-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #1743aa;
  color: white;
}

.crash-panel {
  max-width: 630px;
}

.crash-icon {
  font-size: 70px;
  line-height: 1;
}

.crash-panel h2 {
  font-size: clamp(35px, 6vw, 65px);
  line-height: 1;
  letter-spacing: -.07em;
}

.crash-panel p {
  max-width: 520px;
  line-height: 1.7;
}

.crash-code {
  margin-top: 38px;
  font-size: 12px;
}

.crash-recover {
  padding: 16px 22px;
  margin-top: 25px;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 12px;
}

.crash-recover:hover {
  background: #fff;
  color: #1743aa;
}

.achievement-toast {
  position: fixed;
  z-index: 30;
  bottom: 20px;
  right: 20px;
  width: min(330px,calc(100% - 40px));
  background: #c6ff8c;
  color: #10192d;
  padding: 17px 19px;
  border-radius: 9px;
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.achievement-toast span {
  display: block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
}

@keyframes shake {
  0%,100% {
    transform: translateX(0);
  }

  20%,60% {
    transform: translateX(-9px);
  }

  40%,80% {
    transform: translateX(9px);
  }

}

@keyframes jitter {
  to {
    rotate: 1.5deg;
  }

}

@keyframes burst {
  to {
    transform: translate(var(--dx),var(--dy)) rotate(220deg);
    opacity: 0;
  }

}

@media (max-width: 760px) {
  .site-header, .site-footer {
    width: calc(100% - 40px);
  }

  main {
    width: calc(100% - 36px);
  }

  .site-header {
    height: 73px;
  }

  .brand {
    font-size: 11px;
    gap: 8px;
  }

  .brand-logo {
    width: 180px;
  }

  .live-status {
    display: none;
  }

  .intro {
    padding: 63px 0 33px;
  }

  .eyebrow {
    font-size: 8px;
    gap: 8px;
  }

  .eyebrow-index {
    display: none;
  }

  h1 {
    font-size: clamp(43px, 9.3vw, 72px);
  }

  .intro-copy {
    margin: 23px auto 0;
    font-size: 14px;
  }

  .toolbar-id, .toolbar-muted {
    display: none;
  }

  .arena {
    height: 330px;
  }

  .game-button {
    min-width: 155px;
    max-width: 195px;
    min-height: 70px;
    padding: 14px 17px;
    font-size: 17px;
    gap: 10px;
  }

  .arena-corner--tl, .arena-corner--tr {
    top: 32px;
  }

  .arena-corner--tl, .arena-corner--bl {
    left: 27px;
  }

  .arena-corner--tr, .arena-corner--br {
    right: 27px;
  }

  .arena-corner--br, .arena-corner--bl {
    bottom: 27px;
  }

  .experiment-readout {
    padding: 19px 17px;
  }

  .readout-result p {
    font-size: 14px;
  }

  .readout-label {
    font-size: 8px;
  }

  .readout-count strong {
    font-size: 26px;
  }

  .under-console {
    gap: 13px;
  }

  .safety-note {
    flex-basis: 100%;
    margin-left: 0;
  }

  .fine-print {
    display: block;
    padding: 29px 0 36px;
  }

  .fine-print p {
    margin: 10px 0 0;
  }

  .site-footer {
    flex-wrap: wrap;
    font-size: 9px;
  }

}

@media (max-width: 420px) {
  .brand-logo {
    width: clamp(154px, 52vw, 174px);
  }

  .brand-subtitle {
    display: none;
  }

  .text-button {
    font-size: 9px;
  }

  .eyebrow {
    letter-spacing: .04em;
  }

  h1 {
    font-size: 12.3vw;
  }

  .arena {
    height: 300px;
  }

  .arena-corner--tr {
    display: none;
  }

  .game-button {
    min-width: 144px;
    max-width: 168px;
    font-size: 15px;
  }

  .arena-prompt {
    bottom: 51px;
    font-size: 8px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

}

/* Escaped buttons are rendered outside the clipped arena, above the page. */
.viewport-button-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.viewport-button-layer .game-button {
  pointer-events: auto;
}

/* The rare screen takeover is a joke, not a permanent navigation trap. */
.game-button.is-takeover {
  position: fixed;
  inset: 12px;
  left: 12px !important;
  top: 12px !important;
  width: calc(100vw - 24px);
  max-width: none;
  height: calc(100dvh - 24px);
  padding: 40px;
  transform: none;
  z-index: 15;
  border-radius: 22px;
  font-size: clamp(36px, 9vw, 124px);
  letter-spacing: -.075em;
  flex-direction: column;
  gap: 22px;
  animation: takeover-appear .28s ease-out;
}

.game-button.is-takeover .button-trait {
  top: 24px;
  font-size: 11px;
}

.game-button.is-takeover .button-arrow {
  font-size: clamp(28px, 5vw, 65px);
}

.game-button.is-takeover::after {
  content: 'SCREEN OCCUPIED · TEMPORARILY';
  position: absolute;
  bottom: 30px;
  left: 20px;
  right: 20px;
  font: 11px var(--mono);
  letter-spacing: .15em;
}

.game-button.is-takeover:active {
  transform: translateY(4px);
}

@keyframes takeover-appear {
  from { opacity: .55; scale: .94; }
  to { opacity: 1; scale: 1; }
}

@media (max-width: 760px) {
  .game-button.is-takeover {
    inset: 8px;
    left: 8px !important;
    top: 8px !important;
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    font-size: clamp(32px, 11vw, 65px);
  }
}

/* Penguin visitors can cross the entire page without clipping or blocking the UI. */
.penguin-layer {
  position: fixed;
  inset: 0;
  z-index: 16;
  pointer-events: none;
  overflow: hidden;
}

.penguin-visitor {
  position: absolute;
  display: grid;
  place-items: center;
  width: 96px;
  height: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 11px 8px rgba(0, 0, 0, .35));
}

.penguin-figure {
  display: block;
  font-size: 68px;
  line-height: 1;
  user-select: none;
}

.penguin-speech {
  position: absolute;
  left: 50%;
  bottom: 100%;
  padding: 8px 10px;
  border: 1px solid #bed3e7;
  border-radius: 8px 8px 8px 2px;
  background: #f2f7fc;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .22);
  color: #102238;
  font: 10px var(--mono);
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.penguin-visitor.is-pop,
.penguin-visitor.is-dance {
  animation: penguin-pop-in .62s cubic-bezier(.18, 1.6, .35, 1) both;
}

.penguin-visitor.is-dance .penguin-figure {
  animation: penguin-dance .55s ease-in-out 5 alternate;
}

.penguin-visitor.is-waddle,
.penguin-visitor.is-parade {
  animation: penguin-cross var(--travel-time) linear both;
}

.penguin-visitor.is-waddle .penguin-figure,
.penguin-visitor.is-parade .penguin-figure {
  animation: penguin-waddle .26s ease-in-out infinite alternate;
}

.penguin-visitor.is-drop {
  animation: penguin-drop 2.6s cubic-bezier(.3, .04, .38, 1.02) both;
}

.penguin-visitor.is-drop .penguin-figure {
  animation: penguin-waddle .6s ease-in-out 4 alternate;
}

.penguin-visitor.is-peek {
  animation: penguin-peek 3.7s ease-in-out both;
}

.penguin-visitor.is-popping {
  animation: penguin-pop-out .3s ease-in forwards !important;
  pointer-events: none;
}

.penguin-confetti {
  position: absolute;
  color: var(--lime);
  font-size: 17px;
  pointer-events: none;
  animation: penguin-confetti-burst .86s ease-out forwards;
}
.penguin-confetti:nth-child(3n) { color: var(--accent); }
.penguin-confetti:nth-child(4n) { color: #99d6ff; }

@keyframes penguin-pop-in {
  0% { transform: translate(-50%, -50%) scale(.05) rotate(-30deg); opacity: 0; }
  72% { transform: translate(-50%, -50%) scale(1.3) rotate(12deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0); }
}
@keyframes penguin-dance {
  from { transform: rotate(-17deg) translateY(5px); }
  to { transform: rotate(17deg) translateY(-12px); }
}
@keyframes penguin-cross {
  from { transform: translate(var(--from-x), -50%); }
  to { transform: translate(var(--to-x), -50%); }
}
@keyframes penguin-waddle {
  from { transform: rotate(-11deg) translateY(2px); }
  to { transform: rotate(11deg) translateY(-5px); }
}
@keyframes penguin-drop {
  from { transform: translate(-50%, calc(-1 * var(--drop-distance))) rotate(-20deg); opacity: 0; }
  80% { opacity: 1; }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}
@keyframes penguin-peek {
  0%, 100% { transform: translate(calc(-50% + var(--peek-offset)), -50%); }
  22%, 70% { transform: translate(-50%, -50%); }
}
@keyframes penguin-pop-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.6) rotate(24deg); }
}
@keyframes penguin-confetti-burst {
  from { opacity: 1; transform: translate(-50%, -50%) scale(.5) rotate(0deg); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25) rotate(var(--spin)); }
}

@media (max-width: 760px) {
  .penguin-visitor { width: 76px; height: 88px; }
  .penguin-figure { font-size: 54px; }
  .penguin-speech { font-size: 8px; max-width: 175px; white-space: normal; }
}

.game-guide {
  border-top: 1px solid var(--line);
  margin: 2rem 0;
  padding-top: 1.5rem;
}

.game-guide h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.game-guide p {
  max-width: 65ch;
  margin: 0 0 .75rem;
  line-height: 1.6;
}

.game-guide a {
  display: inline-block;
  padding: .5rem 0;
  color: var(--lime);
  text-underline-offset: .2em;
}

/* Spoiler-light, opt-in incident sharing. Hidden until a qualifying event. */
.share-incident {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 16px 18px;
  border: 1px solid rgba(198, 255, 140, .28);
  border-radius: 12px;
  background: linear-gradient(115deg, rgba(198, 255, 140, .055), rgba(23, 34, 58, .55));
}
.share-incident-copy {
  display: flex;
  flex: 1 1 250px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.share-incident-label {
  color: var(--lime);
  font: 10px var(--mono);
  letter-spacing: .075em;
}
.share-incident-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.share-incident-button {
  flex-shrink: 0;
  min-height: 44px;
  border: 1px solid var(--lime);
  border-radius: 8px;
  padding: 11px 15px;
  background: var(--lime);
  color: var(--ink);
  font: 700 11px var(--mono);
  letter-spacing: .045em;
  white-space: nowrap;
}
.share-incident-button:hover { filter: brightness(1.07); }
.share-incident-button span { padding-left: 5px; }
.share-incident-feedback {
  flex-basis: 100%;
  color: var(--lime);
  font: 11px/1.5 var(--mono);
}
.share-incident-feedback:empty { display: none; }
.share-incident-manual {
  flex-basis: 100%;
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b1020;
  color: var(--text);
  font: 12px/1.5 var(--mono);
}
@media (max-width: 420px) {
  .share-incident-button { width: 100%; }
}

/* The 6–7 counter Easter egg: the two palms rise in a see-saw rhythm.
   Only the current count animates; no layout shifting or gameplay blocking. */
.readout-count {
  position: relative;
  isolation: isolate;
}
.readout-count #clickCount {
  position: relative;
  transform-origin: 50% 70%;
  will-change: auto;
}
.readout-count #clickCount.is-six-seven {
  color: #fff0ab;
  animation: six-seven-count-bloom 2.15s ease-in-out both;
}
.six-seven-hands {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% - 8px);
  width: 124px;
  height: 75px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  filter: drop-shadow(0 5px 10px #0007);
}
.six-seven-hands[hidden] { display: none; }
.six-seven-hand {
  display: block;
  font-size: clamp(30px, 4vw, 41px);
  line-height: 1;
  transform-origin: 50% 70%;
  animation-duration: 1.78s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 1;
  animation-fill-mode: both;
}
.six-seven-hand--left { animation-name: six-seven-hand-left; }
.six-seven-hand--right { animation-name: six-seven-hand-right; }
.six-seven-hand--left > span {
  display: block;
  transform: scaleX(-1);
}
.six-seven-whisper {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #fff0ab;
  text-shadow: 0 2px 10px #000b;
  font: 500 9px var(--mono);
  letter-spacing: .12em;
  animation: six-seven-label 2.15s ease-in-out both;
}
@keyframes six-seven-count-bloom {
  0%, 100% { transform: scale(1); }
  14%, 74% { transform: scale(1.2); }
  86% { transform: scale(1.07); }
}
@keyframes six-seven-hand-left {
  0%, 100% { transform: translateY(9px) rotate(-7deg); opacity: 0; }
  12%, 37%, 64% { transform: translateY(-11px) rotate(-14deg); opacity: 1; }
  25%, 50%, 76% { transform: translateY(11px) rotate(8deg); opacity: 1; }
  88% { opacity: .75; }
}
@keyframes six-seven-hand-right {
  0%, 100% { transform: translateY(-8px) rotate(8deg); opacity: 0; }
  12%, 37%, 64% { transform: translateY(10px) rotate(14deg); opacity: 1; }
  25%, 50%, 76% { transform: translateY(-12px) rotate(-8deg); opacity: 1; }
  88% { opacity: .75; }
}
@keyframes six-seven-label {
  0%, 10%, 90%, 100% { opacity: 0; }
  21%, 79% { opacity: 1; }
}
@media (max-width: 760px) {
  .six-seven-hands {
    width: 101px;
    height: 67px;
  }
  .six-seven-hand { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .readout-count #clickCount.is-six-seven {
    animation: none !important;
    transform: none;
    color: #fff0ab;
  }
  .six-seven-hand, .six-seven-whisper {
    animation: none !important;
    opacity: 1;
  }
  .six-seven-hand--left { transform: translateY(-5px); }
  .six-seven-hand--right { transform: translateY(6px); }
}
