:root {
  --ink: #111111;
  --paper: #f3f0e9;
  --acid: #eaff37;
  --pink: #ff4da8;
  --blue: #2c55ff;
  --orange: #ff6b35;
  --radius: 2rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; }
a { color: inherit; }
button { color: inherit; touch-action: manipulation; }
::selection { background: var(--pink); color: white; }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
  mix-blend-mode: difference;
  opacity: .75;
}
.grain {
  position: fixed;
  inset: 0;
  opacity: .08;
  pointer-events: none;
  z-index: 30;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.topbar {
  position: fixed;
  z-index: 15;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: .65rem .8rem;
  border: 2px solid var(--ink);
  border-radius: 100px;
  background: rgba(243, 240, 233, .82);
  backdrop-filter: blur(12px);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.wordmark { text-decoration: none; font-size: 1rem; letter-spacing: -.06em; }
.wordmark span { color: var(--blue); margin-left: .25rem; }
.status { display: flex; align-items: center; gap: .5rem; border: 0; padding: .25rem .5rem; background: transparent; font-size: inherit; font-weight: inherit; letter-spacing: inherit; cursor: pointer; }
.status:hover { color: var(--blue); }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #31d158; box-shadow: 0 0 0 .25rem rgba(49,209,88,.18); animation: blink 1.7s steps(2) infinite; }
.clock { text-align: right; font-variant-numeric: tabular-nums; }

main { position: relative; z-index: 1; }
.hero {
  min-height: 100svh;
  padding: 8rem 2vw 2rem;
  display: flex;
  flex-direction: column;
  background: var(--acid);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.eyebrow, .kicker { margin: 0; font-size: clamp(.68rem, 1vw, .85rem); letter-spacing: .15em; font-weight: 900; }
.hero h1 {
  margin: auto 0;
  font-size: clamp(5.4rem, 16vw, 16.5rem);
  letter-spacing: -.09em;
  line-height: .69;
  font-weight: 950;
  text-align: center;
}
.name-line { display: block; transition: transform .2s ease-out; }
.name-line.outline { color: transparent; -webkit-text-stroke: 3px var(--ink); transform: translateX(3vw); }
.hero-bottom { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-top: 2rem; }
.intro { max-width: 26rem; margin: 0; font-size: clamp(1.2rem, 2.2vw, 2rem); line-height: 1.05; letter-spacing: -.04em; }
.round-link {
  width: 8rem;
  height: 8rem;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--pink);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 900;
  transition: transform .25s ease, border-radius .25s ease;
}
.round-link b { align-self: flex-end; font-size: 2.3rem; line-height: 1; }
.round-link:hover { transform: rotate(9deg) scale(1.06); border-radius: 38%; }
.crawler { display: flex; width: calc(100% + 4vw); margin: 1.5rem -2vw -2rem; padding: .7rem 0; border-top: 2px solid var(--ink); background: var(--ink); color: white; overflow: hidden; font-size: .72rem; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.crawler span { animation: crawl 15s linear infinite; }

.terrarium { background: var(--paper); padding: 1.5rem; scroll-margin-top: 5.5rem; }
.section-label { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; font-size: .68rem; font-weight: 900; letter-spacing: .13em; }
.section-label.dark { color: var(--acid); }
.tank {
  position: relative;
  min-height: 82svh;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--blue);
  color: white;
  isolation: isolate;
}
.tank::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background: radial-gradient(circle at 20% 20%, white 0 2px, transparent 3px), radial-gradient(circle at 75% 65%, white 0 2px, transparent 3px);
  background-size: 43px 43px, 67px 67px;
}
.tank-copy { position: relative; z-index: 4; max-width: 48rem; padding: clamp(2rem, 6vw, 6rem); }
.tank h2, .control-heading h2 {
  margin: 1rem 0 2rem;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: .75;
  letter-spacing: -.08em;
}
.tank-copy > p:last-child { max-width: 30rem; font-size: clamp(1rem, 1.7vw, 1.35rem); line-height: 1.25; }
.orb { position: absolute; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; color: var(--ink); font-weight: 950; box-shadow: .6rem .6rem 0 rgba(0,0,0,.35); cursor: grab; user-select: none; touch-action: none; z-index: 6; }
.orb span { pointer-events: none; }
.orb-a { width: clamp(8rem, 18vw, 15rem); aspect-ratio: 1; right: 9%; top: 10%; background: var(--orange); font-size: 6rem; animation: float 5s ease-in-out infinite; }
.orb-b { width: clamp(7rem, 14vw, 12rem); aspect-ratio: 1; right: 31%; bottom: 8%; background: var(--acid); font-size: 2.6rem; animation: float 6s ease-in-out -2s infinite reverse; }
.orb-c { width: clamp(5rem, 10vw, 9rem); aspect-ratio: 1; right: 6%; bottom: 10%; background: var(--pink); font-size: 3.5rem; animation: float 4.5s ease-in-out -1s infinite; }
.worm { position: absolute; left: 6%; bottom: 8%; display: flex; transform: rotate(-8deg); }
.worm i { width: clamp(2.8rem, 5vw, 5.3rem); aspect-ratio: 1; margin-left: -12%; border: 2px solid var(--ink); border-radius: 50%; background: var(--pink); }
.worm i:nth-child(even) { background: var(--acid); }
.specimen-label { position: absolute; z-index: 5; right: 2rem; bottom: 2rem; padding: .6rem .75rem; border: 1px solid white; font-size: .62rem; line-height: 1.45; letter-spacing: .1em; }

.control-room { padding: 1.5rem; background: var(--ink); color: white; }
.control-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 5vw; padding: 6vw 1vw; }
.control-heading h2 { color: var(--acid); }
.buttons { border-top: 1px solid #777; }
.buttons button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #777;
  background: transparent;
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem .4rem;
  color: white;
  text-align: left;
  font-size: clamp(1.2rem, 2.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -.04em;
  cursor: pointer;
  transition: color .2s ease, padding .2s ease, background .2s ease;
}
.buttons button span { font-size: .65rem; color: #999; letter-spacing: .08em; }
.buttons button b { font-size: 1.6rem; }
.buttons button:hover, .buttons button:focus-visible { color: var(--ink); background: var(--acid); padding-left: 1rem; padding-right: 1rem; outline: none; }
.readout { display: grid; grid-template-columns: 10rem 1fr; gap: 2rem; align-items: start; padding: 1.5rem; border: 1px solid #777; border-radius: 1rem; }
.readout span { color: var(--acid); font-size: .65rem; font-weight: 900; letter-spacing: .13em; }
.readout p { margin: 0; font-family: Georgia, serif; font-size: clamp(1.3rem, 2.4vw, 2.2rem); font-style: italic; }

.bureau { padding: 1.5rem; scroll-margin-top: 5.5rem; background: var(--paper); }
.bureau-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(24rem, 1.1fr); min-height: 82svh; overflow: hidden; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--acid); }
.bureau-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(2rem, 5vw, 5rem); border-right: 2px solid var(--ink); }
.bureau-copy h2 { margin: 1rem 0 2rem; font-size: clamp(3.5rem, 7vw, 7rem); line-height: .77; letter-spacing: -.08em; }
.bureau-copy > p:not(.kicker) { max-width: 31rem; margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.25; }
.decision-questions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: auto; padding-top: 3rem; }
.decision-questions button { border: 2px solid var(--ink); border-radius: 100px; background: transparent; padding: .7rem .9rem; font-size: .66rem; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.decision-questions button:hover, .decision-questions button:focus-visible, .decision-questions button.is-selected { background: var(--ink); color: var(--acid); outline: none; transform: rotate(-2deg); }
.decision-machine { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.2rem, 3vw, 2.5rem); background: var(--blue); color: white; }
.machine-topline { display: flex; justify-content: space-between; gap: 1rem; font-size: .6rem; font-weight: 900; letter-spacing: .11em; }
.machine-topline b { color: var(--acid); }
.decision-screen { position: relative; min-height: 22rem; overflow: hidden; padding: clamp(2rem, 5vw, 4rem); border: 2px solid white; border-radius: 1.2rem; background: var(--ink); box-shadow: inset 0 0 0 1rem rgba(255,255,255,.04); }
.decision-screen::after { content: ""; position: absolute; inset: 0; opacity: .15; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 6px, white 7px); }
.decision-prompt { position: relative; z-index: 1; color: #999; font-size: .65rem; font-weight: 900; letter-spacing: .12em; }
.decision-screen p { position: relative; z-index: 1; max-width: 33rem; margin: 2rem 0 5rem; font-family: Georgia, serif; font-size: clamp(1.7rem, 3.5vw, 3.6rem); font-style: italic; line-height: .98; }
.official-stamp { position: absolute; z-index: 2; right: 2rem; bottom: 2rem; width: 7rem; aspect-ratio: 1; display: grid; place-items: center; border: 4px double var(--pink); border-radius: 50%; color: var(--pink); text-align: center; white-space: pre-line; font-size: .7rem; font-weight: 950; line-height: 1.1; letter-spacing: .08em; transform: rotate(-12deg); opacity: .75; transition: transform .25s cubic-bezier(.2,1.8,.5,1), opacity .25s; }
.official-stamp.is-stamped { transform: rotate(8deg) scale(1.35); opacity: 1; }
.urgency-label { display: flex; justify-content: space-between; gap: 1rem; color: #aaa; font-size: .6rem; font-weight: 900; letter-spacing: .1em; }
.urgency-label output { color: var(--acid); }
.urgency { width: 100%; accent-color: var(--acid); cursor: ew-resize; }
.machine-actions { display: grid; grid-template-columns: 1fr auto; gap: .75rem; margin-top: auto; }
.machine-actions button { display: flex; justify-content: space-between; gap: 2rem; border: 1px solid white; border-radius: 100px; background: transparent; color: white; padding: 1rem 1.2rem; font-size: .68rem; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.machine-actions button:hover, .machine-actions button:focus-visible { background: var(--acid); color: var(--ink); border-color: var(--ink); outline: none; }

.lost-found { padding: 7vw 1.5rem 1.5rem; scroll-margin-top: 5.5rem; background: var(--ink); color: white; }
.lost-heading { display: flex; justify-content: space-between; align-items: end; gap: 3rem; padding: 2vw 1vw 4vw; }
.lost-heading h2 { margin: 1rem 0 0; color: var(--pink); font-size: clamp(3.4rem, 7.6vw, 8rem); line-height: .78; letter-spacing: -.08em; }
.release-object { min-width: 13rem; display: flex; justify-content: space-between; gap: 2rem; align-items: center; border: 2px solid white; border-radius: 100px; background: var(--acid); padding: 1rem 1.2rem; font-size: .66rem; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.release-object span { font-size: 1.4rem; }
.release-object:hover, .release-object:focus-visible { background: var(--pink); transform: rotate(2deg); outline: none; }
.conveyor-window { position: relative; min-height: 25rem; overflow: hidden; border: 2px solid white; border-radius: var(--radius); background: var(--orange); color: var(--ink); }
.conveyor-sign { position: absolute; z-index: 5; top: 1rem; left: 1rem; right: 1rem; display: flex; justify-content: space-between; gap: 1rem; font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.conveyor-sign b { color: rgba(17,17,17,.55); }
.object-belt { position: absolute; inset: 3.2rem 0 3.5rem; display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem); padding: 0 4vw; overflow: hidden; }
.found-object { position: relative; flex: 0 0 auto; width: clamp(8rem, 12vw, 11rem); aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50% 35% 45% 30%; background: var(--paper); box-shadow: .6rem .6rem 0 rgba(0,0,0,.3); cursor: pointer; animation: objectArrive .55s cubic-bezier(.2,1.5,.5,1) both; transition: transform .2s ease, opacity .2s ease; }
.found-object:nth-child(even) { border-radius: 25% 55% 30% 50%; background: var(--acid); transform: rotate(5deg); }
.found-object:nth-child(3n) { background: var(--pink); transform: rotate(-7deg); }
.found-object:hover, .found-object:focus-visible { transform: translateY(-1rem) rotate(8deg); outline: 3px solid white; }
.found-object.is-adopted { transform: translateY(-12rem) rotate(45deg) scale(.3); opacity: 0; }
.found-object b { font-size: clamp(2.8rem, 5vw, 5rem); }
.found-object span { position: absolute; left: 50%; bottom: 1rem; width: 85%; transform: translateX(-50%); text-align: center; font-size: .53rem; font-weight: 900; letter-spacing: .08em; }
.belt-teeth { position: absolute; left: 0; right: 0; bottom: 0; height: 3.3rem; border-top: 2px solid var(--ink); background: repeating-linear-gradient(90deg, var(--ink) 0 2rem, #555 2rem 4rem); animation: beltMove 1.2s linear infinite; }
.adoption-counter { padding: 1rem .5rem 0; color: #aaa; font-size: .61rem; font-weight: 900; letter-spacing: .1em; text-align: right; }
.adoption-counter b { color: var(--acid); font-size: .85rem; }

.game-lab { padding: 1.5rem; scroll-margin-top: 5.5rem; background: var(--paper); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.game-grid {
  display: grid;
  grid-template-columns: minmax(20rem, .9fr) minmax(0, 1.35fr);
  min-height: 82svh;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--orange);
}
.game-copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(2rem, 5vw, 5rem); border-right: 2px solid var(--ink); }
.game-copy h2 { width: 100%; margin: 1rem 0 2rem; font-size: clamp(3rem, 4.1vw, 5.5rem); line-height: .82; letter-spacing: -.075em; }
.game-copy > p:not(.kicker) { max-width: 28rem; margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.25; }
.game-start {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 100px;
  background: var(--acid);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.game-start span { font-size: 1.6rem; line-height: .7; }
.game-start:hover, .game-start:focus-visible { transform: rotate(-1deg) scale(1.02); background: white; outline: none; }
.game-console { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; padding: 1rem; background: var(--ink); color: white; }
.scoreboard { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem .2rem 1rem; color: #aaa; font-size: .62rem; font-weight: 900; letter-spacing: .1em; }
.scoreboard b { color: var(--acid); margin-left: .45rem; font-size: .8rem; }
.game-arena {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid white;
  border-radius: 1rem;
  background: var(--blue);
  touch-action: none;
  outline: none;
}
.game-arena:focus-visible { box-shadow: inset 0 0 0 4px var(--acid); }
.game-gridlines { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(white 1px, transparent 1px), linear-gradient(90deg, white 1px, transparent 1px); background-size: 42px 42px; }
.game-arena::after { content: "GAMEPLAY MAY VOID THE MOON"; position: absolute; left: .8rem; bottom: .6rem; color: rgba(255,255,255,.5); font-size: .55rem; font-weight: 900; letter-spacing: .1em; }
.bean, .moon, .paperclip { position: absolute; z-index: 3; transform: translate(-50%, -50%); user-select: none; }
.bean { width: 3.5rem; height: 4.5rem; left: 13%; top: 55%; border: 2px solid var(--ink); border-radius: 55% 45% 50% 50% / 62% 42% 58% 38%; background: var(--acid); box-shadow: .4rem .45rem 0 rgba(0,0,0,.35); rotate: -12deg; }
.bean i { position: absolute; top: 35%; width: .35rem; height: .55rem; border-radius: 50%; background: var(--ink); }
.bean i:first-child { left: 31%; }
.bean i:last-child { right: 28%; }
.moon { width: 5.6rem; aspect-ratio: 1; left: 82%; top: 28%; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: #e9e9df; color: var(--ink); box-shadow: .5rem .5rem 0 rgba(0,0,0,.35); font-family: monospace; font-weight: 900; }
.moon::before { content: "AUDITOR"; position: absolute; top: -1rem; font: 900 .48rem Arial, sans-serif; letter-spacing: .12em; color: white; }
.paperclip { left: 57%; top: 62%; color: var(--pink); font-size: 5rem; line-height: 1; font-weight: 900; text-shadow: 3px 3px 0 var(--ink); animation: clipSpin 1.2s steps(5) infinite; }
.game-verdict { position: absolute; z-index: 6; left: 50%; top: 50%; width: min(82%, 34rem); margin: 0; transform: translate(-50%, -50%) rotate(-2deg); padding: .8rem 1rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); text-align: center; font-size: clamp(.8rem, 1.5vw, 1.1rem); font-weight: 950; letter-spacing: .08em; box-shadow: .5rem .5rem 0 rgba(0,0,0,.35); transition: opacity .2s ease, transform .2s ease; }
.game-verdict.is-hidden { opacity: 0; transform: translate(-50%, -50%) rotate(4deg) scale(.8); pointer-events: none; }
.game-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; }
.game-tip { color: #999; font-size: .57rem; font-weight: 900; letter-spacing: .1em; }
.dpad { display: flex; gap: .35rem; }
.dpad button { width: 2.5rem; height: 2.5rem; border: 1px solid #777; border-radius: .55rem; background: #222; color: white; font-weight: 900; cursor: pointer; touch-action: none; }
.dpad button:hover, .dpad button:focus-visible, .dpad button.is-pressed { border-color: var(--acid); background: var(--acid); color: var(--ink); outline: none; }
body.bean-audited .game-arena { animation: audited .25s steps(2) 3; }

.switchboard { padding: 7vw 1.5rem 1.5rem; scroll-margin-top: 5.5rem; background: var(--ink); color: white; }
.switchboard-grid { display: grid; grid-template-columns: minmax(17rem, .75fr) minmax(19rem, .8fr) minmax(20rem, 1fr); gap: 1rem; }
.phone-copy, .phone, .transmission { min-width: 0; border: 1px solid #777; border-radius: var(--radius); }
.phone-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 4vw, 4rem); background: var(--pink); color: var(--ink); }
.phone-copy h2 { margin: 1rem 0 2rem; font-size: clamp(3rem, 5vw, 5.8rem); line-height: .78; letter-spacing: -.08em; }
.phone-copy > p:last-child { max-width: 24rem; margin: 0; font-size: 1.05rem; line-height: 1.25; }
.phone { padding: 1rem; background: var(--paper); color: var(--ink); }
.receiver { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem; border: 2px solid var(--ink); border-radius: 3rem 3rem 1.5rem 1.5rem; background: var(--blue); color: white; box-shadow: .35rem .4rem 0 var(--ink); transform: rotate(-2deg); }
.receiver i { width: 3.3rem; height: 3.5rem; border: 2px solid var(--ink); border-radius: 40%; background: var(--acid); }
.receiver span { font-size: .55rem; font-weight: 900; letter-spacing: .1em; text-align: center; }
.phone-display { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 1.5rem 0 1rem; padding: 1rem; border: 2px solid var(--ink); background: var(--acid); }
.phone-display span { font-size: .55rem; font-weight: 900; letter-spacing: .1em; }
.phone-display b { font-family: monospace; font-size: clamp(1.4rem, 3vw, 2.4rem); letter-spacing: .14em; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.keypad button { aspect-ratio: 1.35; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--ink); border-radius: 1rem; background: white; font-size: 1.35rem; font-weight: 950; cursor: pointer; box-shadow: .2rem .25rem 0 var(--ink); }
.keypad small { margin-top: .15rem; font-size: .42rem; letter-spacing: .1em; }
.keypad button:hover, .keypad button:focus-visible { background: var(--pink); transform: translate(.12rem, .12rem); box-shadow: .08rem .1rem 0 var(--ink); outline: none; }
.keypad .call-key { background: var(--acid); }
.transmission { position: relative; min-height: 35rem; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: clamp(2rem, 4vw, 4rem); background: var(--blue); }
.transmission::before { content: ""; position: absolute; inset: 0; opacity: .16; background: radial-gradient(circle, white 0 2px, transparent 3px); background-size: 35px 35px; }
.signal-meter { position: relative; z-index: 1; height: 5rem; display: flex; align-items: end; gap: .4rem; margin-bottom: 3rem; }
.signal-meter i { width: .8rem; height: 20%; background: var(--acid); animation: meter 1s steps(3) infinite alternate; }
.signal-meter i:nth-child(2) { height: 45%; animation-delay: -.2s; }
.signal-meter i:nth-child(3) { height: 75%; animation-delay: -.45s; }
.signal-meter i:nth-child(4) { height: 55%; animation-delay: -.65s; }
.signal-meter i:nth-child(5) { height: 95%; animation-delay: -.8s; }
.transmission-label, .caller-id { position: relative; z-index: 1; font-size: .58rem; font-weight: 900; letter-spacing: .12em; }
.transmission > p { position: relative; z-index: 1; margin: 1.5rem 0 4rem; font-family: Georgia, serif; font-size: clamp(1.7rem, 3vw, 3.2rem); font-style: italic; line-height: 1; }
.caller-id { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.5); }
.caller-id b { color: var(--acid); text-align: right; }
.switchboard.is-calling .receiver { animation: ring .18s steps(2) 6; }
.switchboard.is-calling .transmission { animation: connect .8s steps(2); }

.signal { min-height: 90svh; padding: 8vw 2vw 2vw; display: flex; flex-direction: column; justify-content: space-between; background: var(--pink); overflow: hidden; }
.signal h2 { width: 100%; margin: 3rem 0; font-size: clamp(4rem, 10vw, 11rem); line-height: .78; letter-spacing: -.085em; }
.signal h2 span { display: block; max-width: 100%; color: var(--pink); -webkit-text-stroke: 3px var(--ink); white-space: nowrap; }
.signal-footer { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.signal-footer p { max-width: 33rem; margin: 0; font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.1; }
.restart { border: 2px solid var(--ink); border-radius: 100px; background: var(--paper); padding: 1rem 1.25rem; font-size: .75rem; font-weight: 900; cursor: pointer; }
.restart:hover { background: var(--acid); transform: rotate(-2deg); }

footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 2rem; padding: 1rem 1.5rem; background: var(--paper); border-top: 2px solid var(--ink); font-size: .64rem; font-weight: 900; letter-spacing: .1em; }

body[data-weather="sunset"] { --acid: #ff8b61; --pink: #ffd23f; --blue: #6b32ff; }
body[data-weather="swamp"] { --acid: #c7ff9d; --pink: #ff776d; --blue: #164a41; }
body[data-weather="ultraviolet"] { --acid: #ff55f5; --pink: #6cfae2; --blue: #24105f; }
body.gravity-off .orb, body.gravity-off .worm { animation-duration: 1.4s; filter: hue-rotate(80deg); }
body.gravity-off .tank-copy { transform: rotate(180deg); transition: transform .8s cubic-bezier(.7,-.5,.3,1.5); }
.crumb { position: fixed; z-index: 25; width: .75rem; height: .75rem; border: 2px solid white; border-radius: 50%; background: var(--pink); pointer-events: none; animation: pop 1.8s ease-out forwards; }
.secret-toast { position: fixed; z-index: 40; left: 50%; bottom: 2rem; transform: translateX(-50%) rotate(-2deg); padding: 1rem 1.3rem; border: 2px solid var(--ink); border-radius: 100px; background: var(--acid); color: var(--ink); box-shadow: .4rem .45rem 0 var(--ink); font-size: .7rem; font-weight: 950; letter-spacing: .1em; animation: toastIn 2.4s ease both; }

@keyframes crawl { to { transform: translateX(-100%); } }
@keyframes float { 50% { transform: translate(1rem, -1.5rem) rotate(8deg); } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes pop { to { transform: translateY(-80px) scale(0); opacity: 0; } }
@keyframes clipSpin { 50% { rotate: 18deg; scale: 1.15; } }
@keyframes audited { 50% { filter: invert(1) hue-rotate(90deg); transform: translateX(.4rem); } }
@keyframes objectArrive { from { opacity: 0; transform: translateX(8rem) rotate(30deg) scale(.4); } }
@keyframes beltMove { to { background-position: 4rem 0; } }
@keyframes meter { to { height: 100%; background: var(--pink); } }
@keyframes ring { 50% { transform: rotate(3deg) translateX(.35rem); } }
@keyframes connect { 50% { filter: invert(1); } }
@keyframes toastIn { 0%, 100% { opacity: 0; transform: translate(-50%, 2rem) rotate(-2deg); } 15%, 80% { opacity: 1; transform: translate(-50%, 0) rotate(2deg); } }

@media (max-width: 1050px) {
  .bureau-grid { grid-template-columns: 1fr; }
  .bureau-copy { min-height: 620px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .switchboard-grid { grid-template-columns: 1fr 1fr; }
  .phone-copy { grid-column: 1 / -1; min-height: 32rem; }
  .phone-copy h2 { font-size: clamp(4rem, 12vw, 7rem); }
  .game-grid { grid-template-columns: 1fr; }
  .game-copy { min-height: 500px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .game-copy h2 { font-size: clamp(4rem, 14vw, 7rem); }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr auto; }
  .status { display: none; }
  .hero { padding-top: 7rem; }
  .hero h1 { font-size: clamp(4.7rem, 25vw, 8rem); line-height: .78; }
  .hero-bottom { align-items: center; }
  .round-link { width: 6.5rem; height: 6.5rem; padding: 1rem; }
  .tank { min-height: 720px; }
  .tank-copy { padding: 2rem; }
  .tank h2, .control-heading h2 { font-size: clamp(3.4rem, 18vw, 6rem); }
  .orb-a { top: 48%; right: 12%; }
  .orb-b { right: 51%; bottom: 9%; }
  .orb-c { right: 7%; bottom: 5%; }
  .worm { bottom: 22%; }
  .control-grid { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr; gap: .7rem; }
  .buttons button { grid-template-columns: 2rem 1fr auto; font-size: 1.25rem; }
  .bureau-copy { min-height: 540px; }
  .bureau-copy h2 { font-size: clamp(3.8rem, 18vw, 6rem); }
  .decision-screen { min-height: 20rem; padding: 2rem; }
  .decision-screen p { font-size: clamp(1.8rem, 8vw, 3rem); }
  .machine-actions { grid-template-columns: 1fr; }
  .lost-heading { align-items: flex-start; flex-direction: column; }
  .lost-heading h2 { font-size: clamp(3.2rem, 16vw, 6rem); }
  .release-object { width: 100%; }
  .conveyor-window { min-height: 21rem; }
  .object-belt { overflow-x: auto; }
  .conveyor-sign b { display: none; }
  .game-copy { min-height: 500px; }
  .game-copy h2 { font-size: clamp(2.75rem, 13vw, 4.5rem); }
  .game-arena { min-height: 340px; }
  .game-controls { align-items: stretch; flex-direction: column; }
  .game-tip { max-width: none; }
  .dpad { width: 100%; }
  .dpad button { flex: 1; min-width: 0; min-height: 3rem; }
  .switchboard-grid { grid-template-columns: 1fr; }
  .phone-copy { grid-column: auto; min-height: 34rem; }
  .phone-copy h2 { font-size: clamp(3.5rem, 17vw, 6rem); }
  .transmission { min-height: 30rem; }
  .signal { min-height: 75svh; }
  .signal h2 { font-size: clamp(3.5rem, 19vw, 7rem); }
  .signal h2 span { white-space: normal; overflow-wrap: anywhere; }
  .signal-footer { align-items: start; flex-direction: column; }
  footer { flex-direction: column; gap: .5rem; }
}

@media (max-width: 520px) {
  :root { --radius: 1.25rem; }
  .topbar { top: calc(env(safe-area-inset-top) + .65rem); left: .65rem; right: .65rem; padding: .6rem .75rem; font-size: .66rem; }
  .clock { font-size: .66rem; }
  .hero { min-height: 100svh; padding: calc(6.5rem + env(safe-area-inset-top)) 4vw max(1rem, env(safe-area-inset-bottom)); }
  .hero h1 { margin: auto -1vw; font-size: clamp(4.15rem, 23vw, 7rem); line-height: .8; }
  .hero-bottom { gap: 1rem; margin-top: 1.5rem; }
  .intro { font-size: 1.08rem; }
  .round-link { width: 5.5rem; height: 5.5rem; padding: .8rem; }
  .round-link b { font-size: 1.8rem; }
  .crawler { margin-top: 1rem; }

  .terrarium, .control-room, .bureau, .game-lab { padding: .75rem; }
  .lost-found, .switchboard { padding: 5rem .75rem .75rem; }
  .section-label { flex-direction: column; gap: .35rem; margin-bottom: .75rem; font-size: .58rem; line-height: 1.25; }
  .section-label span:last-child { color: #777; }
  .section-label.dark span:last-child { color: #aaa; }

  .tank { min-height: 680px; }
  .tank-copy { padding: 1.5rem; }
  .tank h2, .control-heading h2 { font-size: clamp(3.1rem, 17vw, 5.2rem); }
  .orb-a { top: 49%; right: 8%; }
  .orb-b { right: 48%; }
  .specimen-label { right: 1rem; bottom: 1rem; }

  .control-grid { gap: 2rem; padding: 4rem .25rem; }
  .buttons button { min-height: 4.25rem; padding: 1rem .55rem; }
  .readout { padding: 1.1rem; }

  .bureau-copy { min-height: 480px; padding: 1.5rem; }
  .bureau-copy h2 { font-size: clamp(3.25rem, 16vw, 5rem); }
  .decision-questions button { min-height: 2.75rem; }
  .decision-machine { gap: .85rem; padding: .75rem; }
  .machine-topline { align-items: flex-start; flex-direction: column; gap: .3rem; padding: .25rem; }
  .decision-screen { min-height: 22rem; padding: 1.25rem; }
  .decision-screen p { margin: 1.5rem 0 6.5rem; font-size: clamp(1.7rem, 8vw, 2.5rem); }
  .official-stamp { right: 1.1rem; bottom: 1.1rem; width: 5.25rem; font-size: .58rem; }
  .urgency-label { line-height: 1.35; }
  .urgency { min-height: 2.75rem; }
  .machine-actions button { min-height: 3rem; }

  .lost-heading { gap: 1.75rem; padding: 1.5rem .25rem 2.5rem; }
  .lost-heading h2 { font-size: clamp(3rem, 15vw, 5rem); }
  .release-object { min-height: 3.2rem; }
  .conveyor-window { min-height: 19rem; }
  .object-belt { inset: 3.2rem 0 3.5rem; gap: 1rem; padding: 0 1.25rem; overscroll-behavior-x: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .object-belt::-webkit-scrollbar { display: none; }
  .found-object { width: 7.6rem; scroll-snap-align: center; }
  .conveyor-sign { font-size: .52rem; }
  .adoption-counter { text-align: left; line-height: 1.4; }

  .game-copy { min-height: 450px; padding: 1.5rem; }
  .game-copy h2 { font-size: clamp(2.65rem, 12.5vw, 4rem); }
  .game-console { padding: .65rem; }
  .scoreboard { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .game-arena { min-height: 360px; }
  .game-verdict { width: 88%; font-size: .72rem; }
  .game-controls { padding-top: .75rem; }
  .dpad { gap: .25rem; }

  .phone-copy { min-height: 29rem; padding: 1.5rem; }
  .phone-copy h2 { font-size: clamp(3.25rem, 16vw, 5rem); }
  .phone { padding: .75rem; }
  .receiver { min-height: 4.5rem; }
  .receiver i { width: 2.7rem; height: 3rem; }
  .phone-display { align-items: flex-start; flex-direction: column; gap: .4rem; padding: .8rem; }
  .keypad button { min-height: 3.75rem; aspect-ratio: 1.25; }
  .transmission { min-height: 27rem; padding: 1.5rem; }
  .transmission > p { margin-bottom: 3rem; font-size: clamp(1.6rem, 8vw, 2.5rem); }
  .caller-id { align-items: flex-start; flex-direction: column; }
  .caller-id b { text-align: left; }

  .signal { min-height: 82svh; padding: 6rem 4vw max(1rem, env(safe-area-inset-bottom)); }
  .signal h2 { margin: 2rem 0; font-size: clamp(3rem, 16vw, 5.5rem); line-height: .82; }
  .signal-footer { gap: 1.5rem; }
  .restart { min-height: 3rem; }
  footer { padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
  .secret-toast { width: calc(100% - 2rem); bottom: max(1rem, env(safe-area-inset-bottom)); text-align: center; }
}

@media (pointer: coarse) {
  #field { display: none; }
  .buttons button:hover, .release-object:hover, .restart:hover, .round-link:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  #field { display: none; }
}
