/* ==========================================================================
   Under the Sea — shared styles
   Palette sampled from the poster: sky teal, sub yellow, beanie red, cream frame.
   ========================================================================== */

:root {
  --sky-top: #145d78;
  --sky-mid: #2c7891;
  --sky-low: #5f98a3;
  --haze: #8aa9a8;
  --surface: #4a8a99;
  --sea-0: #357b8e;
  --sea-1: #24636e;
  --sea-2: #1a4f58;
  --sea-3: #123b47;
  --sea-4: #0a2633;
  --sea-5: #04121b;

  --sun: #eecf58;
  --hull: #f0b540;
  --beanie: #d3221c;
  --beanie-dk: #a51b15;
  --cream: #f7e8c6;
  --paper: #fbf2dc;
  --paper-line: #e2d1a9;
  --powder: #a9cbd3;
  --coral: #ea6a3f;
  --ink: #12262e;
  --ink-soft: #4b5b5d;
  --plaque: #1b3a32;
  --brass: #c9973f;
  --brass-dk: #6e4f1c;
  --glow: #ffe9a3;
  --sonar: #8dffd2;

  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --type: "Courier Prime", "Courier New", ui-monospace, monospace;
  --script: "Homemade Apple", "Bradley Hand", cursive;

  --frame: 10px;
  --gutter: clamp(16px, 4vw, 48px);
}

@media (max-width: 640px) {
  :root { --frame: 6px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream);
  background: var(--sea-5);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
/* Typesetting: no one-word last lines (typeset.js adds non-breaking spaces as a fallback). */
p, li, dd, figcaption, label { text-wrap: pretty; }
h2, h3 { text-wrap: balance; }
a { color: inherit; }
button { font: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* The poster's cream border, fixed around the viewport */
.frame {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  border: var(--frame) solid var(--cream);
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; z-index: 50;
  top: var(--frame); left: var(--frame); right: var(--frame);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter);
  transition: background .35s, box-shadow .35s;
}
.topbar.scrolled {
  background: rgba(4, 18, 27, .74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(247, 232, 198, .12);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: .76rem;
  letter-spacing: .24em; text-transform: uppercase; white-space: nowrap;
}
.brand svg { width: 26px; height: 24px; color: var(--sun); flex: none; }
.depth-readout {
  font-family: var(--type); font-size: .8rem; letter-spacing: .04em;
  color: var(--powder); white-space: nowrap;
  opacity: 0; transition: opacity .35s;
}
.topbar.scrolled .depth-readout { opacity: 1; }
@media (max-width: 520px) {
  .brand span { display: none; }
  .depth-readout .zone-name { display: none; }
  .hide-sm { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--font); font-weight: 600; font-size: .92rem;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  border: 0; border-radius: 999px; padding: .95em 1.7em; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s, background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sun {
  background: var(--sun); color: var(--ink);
  box-shadow: 0 0 0 3px rgba(238, 207, 88, .25), 0 12px 30px -12px rgba(238, 207, 88, .7);
}
.btn-sun:hover { background: #f6dc76; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(247, 232, 198, .55); }
.btn-ghost:hover { background: rgba(247, 232, 198, .07); box-shadow: inset 0 0 0 1.5px var(--cream); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #1d3a44; }
.btn-red { background: var(--beanie); color: var(--cream); box-shadow: 0 10px 24px -12px rgba(211, 34, 28, .8); }
.btn-red:hover { background: #e1342d; transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: rgba(18, 38, 46, .06); }
.btn-sm { padding: .7em 1.25em; font-size: .74rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Inline title lettering (poster's "UNDER THE SEA") ----------
   Stacked text-shadows: a thin ring in the background colour hugs each
   glyph (the "channel"), then a wider yellow ring sits behind it. Shadows
   are fills, so the variable font's overlapping contours never show. */
.inline-title {
  margin: 0; font-weight: 600; text-transform: uppercase;
  line-height: 1.02; letter-spacing: .07em; color: var(--sun);
  --c: var(--channel, var(--sky-top)); --t: .026em; --r: .062em; --y: var(--sun);
}
.inline-title .w {
  display: inline-block;
  text-shadow:
    var(--t) 0 var(--c), calc(var(--t) * -1) 0 var(--c), 0 var(--t) var(--c), 0 calc(var(--t) * -1) var(--c),
    calc(var(--t) * .71) calc(var(--t) * .71) var(--c), calc(var(--t) * -.71) calc(var(--t) * .71) var(--c),
    calc(var(--t) * .71) calc(var(--t) * -.71) var(--c), calc(var(--t) * -.71) calc(var(--t) * -.71) var(--c),
    var(--r) 0 var(--y), calc(var(--r) * -1) 0 var(--y), 0 var(--r) var(--y), 0 calc(var(--r) * -1) var(--y),
    calc(var(--r) * .71) calc(var(--r) * .71) var(--y), calc(var(--r) * -.71) calc(var(--r) * .71) var(--y),
    calc(var(--r) * .71) calc(var(--r) * -.71) var(--y), calc(var(--r) * -.71) calc(var(--r) * -.71) var(--y),
    calc(var(--r) * .92) calc(var(--r) * .38) var(--y), calc(var(--r) * -.92) calc(var(--r) * .38) var(--y),
    calc(var(--r) * .92) calc(var(--r) * -.38) var(--y), calc(var(--r) * -.92) calc(var(--r) * -.38) var(--y),
    calc(var(--r) * .38) calc(var(--r) * .92) var(--y), calc(var(--r) * -.38) calc(var(--r) * .92) var(--y),
    calc(var(--r) * .38) calc(var(--r) * -.92) var(--y), calc(var(--r) * -.38) calc(var(--r) * -.92) var(--y);
}
.inline-title .w.small { font-size: .64em; vertical-align: .2em; margin: 0 .04em; }
.inline-title .grp { display: inline-block; white-space: nowrap; }

/* ---------- Hero: sky, boat on the horizon, waterline ---------- */
.hero { position: relative; text-align: center; overflow-x: clip; }
.sky {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 60%, var(--sky-low) 100%);
  padding: calc(var(--frame) + 92px) var(--gutter) 8px;
}
.kicker {
  margin: 0 0 14px; font-weight: 500; font-size: clamp(.82rem, 2.2vw, 1.15rem);
  letter-spacing: .34em; text-transform: uppercase; color: var(--cream);
}
.hero h1 { font-size: clamp(3.2rem, 10.2vw, 8.6rem); --channel: #1f6b85; }
@media (max-width: 640px) { .hero h1 { font-size: clamp(3rem, 17vw, 5rem); } }
.subtitle {
  margin: 16px 0 0; font-weight: 500; font-size: clamp(.9rem, 2.6vw, 1.45rem);
  letter-spacing: .3em; text-transform: uppercase; color: var(--cream);
}

.horizon {
  position: relative; overflow: hidden;
  /* sky above the far shore, open water below — lines up with the boat art */
  background: linear-gradient(180deg,
    var(--sky-low) 0%, var(--haze) 53.6%,
    #4c8b98 53.6%, #3f8294 78%, var(--sea-0) 100%);
  padding-top: 18px;
}
.horizon img {
  width: min(100%, 940px); margin: 0 auto;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 16%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 16%, #000 90%, transparent 100%);
  mask-composite: intersect;
  animation: bob 7s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-.35deg); }
}
@media (max-width: 640px) {
  .horizon img { width: 132%; max-width: none; margin-left: -16%; }
}

.waterline {
  position: relative; height: 34px; margin-top: -20px; z-index: 2;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='34'%3E%3Cpath d='M0 14 Q40 2 80 14 T160 14 V34 H0Z' fill='%2324636e'/%3E%3Cpath d='M0 14 Q40 2 80 14 T160 14' fill='none' stroke='%23e9f6f2' stroke-opacity='.55' stroke-width='2'/%3E%3C/svg%3E") repeat-x 0 0 / 160px 34px;
  animation: drift 9s linear infinite;
}
.waterline::before {
  content: ""; position: absolute; inset: 0; top: 6px; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='34'%3E%3Cpath d='M0 16 Q55 6 110 16 T220 16 V34 H0Z' fill='%23357b8e'/%3E%3C/svg%3E") repeat-x 0 0 / 220px 34px;
  animation: drift-back 13s linear infinite;
  z-index: -1;
}
@keyframes drift { to { background-position: 160px 0; } }
@keyframes drift-back { to { background-position: -220px 0; } }

/* ---------- Underwater ---------- */
.deep {
  position: relative; overflow-x: clip;
  background: linear-gradient(180deg,
    var(--sea-1) 0%, var(--sea-2) 14%, var(--sea-3) 34%,
    var(--sea-4) 60%, var(--sea-5) 88%, #020a10 100%);
}
.deep > * { position: relative; z-index: 2; }

.dateblock { text-align: center; padding: 40px var(--gutter) 70px; }
.date-big {
  margin: 0; font-weight: 600; color: var(--sun); line-height: 1;
  font-size: clamp(2.8rem, 9.5vw, 6rem); letter-spacing: .04em; text-transform: uppercase;
}
.date-big sup { font-size: .4em; vertical-align: 1.05em; margin-left: .04em; }
.rule { display: block; width: 92px; height: 2px; margin: 20px auto 18px; background: var(--cream); opacity: .75; }
.date-sub {
  margin: 0; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
  font-size: clamp(.8rem, 2.4vw, 1.02rem);
}
.dress {
  max-width: 520px; margin: 18px auto 0; font-size: clamp(.95rem, 2.6vw, 1.1rem);
  color: rgba(247, 232, 198, .88); letter-spacing: .02em;
}
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

.countdown { display: flex; justify-content: center; gap: clamp(20px, 4vw, 26px); margin-top: 44px; }
.gauge {
  width: clamp(70px, 19vw, 92px); aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #1f5d66 0%, #0c2e37 72%);
  box-shadow:
    0 0 0 5px var(--brass), 0 0 0 7px var(--brass-dk),
    inset 0 4px 14px rgba(0, 0, 0, .55), 0 12px 22px -8px rgba(0, 0, 0, .6);
}
.gauge b { font-family: var(--type); font-size: clamp(1.3rem, 5vw, 1.7rem); line-height: 1; color: var(--glow); }
.gauge span { margin-top: 4px; font-size: .58rem; font-weight: 600; letter-spacing: .22em; color: var(--powder); text-transform: uppercase; }
.countdown-cap {
  margin: 14px 0 0; font-family: var(--type); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--powder);
}

/* ---------- Sections ---------- */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(60px, 8vw, 100px) var(--gutter); }
.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0; font-family: var(--type); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--powder); text-align: center;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .6; flex: none; }
@media (max-width: 520px) {
  .eyebrow { font-size: .68rem; letter-spacing: .06em; gap: 8px; white-space: nowrap; }
  .eyebrow::before, .eyebrow::after { width: 16px; }
}
.h2 {
  margin: 12px 0 14px; text-align: center; color: var(--sun); font-weight: 600;
  font-size: clamp(2.05rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: .07em; text-transform: uppercase;
}
.lede { max-width: 640px; margin: 0 auto; text-align: center; color: rgba(247, 232, 198, .88); font-size: clamp(1rem, 2.6vw, 1.12rem); }

/* Briefing cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 58px; }
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; gap: 34px; } }
.card {
  position: relative; text-align: center;
  background: var(--paper); color: var(--ink);
  border-radius: 4px; padding: 40px 26px 30px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .65);
}
.card::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--paper-line); border-radius: 2px; pointer-events: none; }
.tab {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--sun); color: var(--ink); white-space: nowrap;
  font-weight: 600; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 2px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4);
}
.card .icon { width: 50px; height: 50px; margin: 0 auto 14px; color: var(--sea-1); }
.card h3 { margin: 0 0 8px; font-size: 1.32rem; line-height: 1.22; letter-spacing: .02em; font-weight: 600; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.text-link {
  display: inline-block; margin-top: 12px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--type); font-size: .85rem; color: var(--sea-1);
  text-decoration: underline; text-underline-offset: 3px;
}

/* DJ booth */
.porthole-wide {
  position: relative; max-width: 1000px; margin: 50px auto 0;
  border-radius: 28px; overflow: hidden;
  box-shadow:
    0 0 0 8px var(--brass), 0 0 0 11px var(--brass-dk),
    0 34px 70px -24px rgba(0, 0, 0, .8);
}
.porthole-wide::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 70px rgba(0, 0, 0, .5); pointer-events: none; }
.porthole-wide img { width: 100%; }
@media (max-width: 640px) {
  .porthole-wide { border-radius: 18px; }
  .porthole-wide img { width: 150%; max-width: none; margin-left: -25%; }
}
.nameplates { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 820px; margin: 44px auto 0; }
@media (max-width: 680px) { .nameplates { grid-template-columns: 1fr; } }
.nameplate {
  text-align: center; padding: 22px 22px 20px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(247, 232, 198, .07), rgba(247, 232, 198, .02));
  box-shadow: inset 0 0 0 1px rgba(201, 151, 63, .55);
}
.nameplate h3 { margin: 0 0 6px; color: var(--sun); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 1.25rem; }
.nameplate p { margin: 0; color: rgba(247, 232, 198, .82); font-size: .98rem; }
.decks-note { text-align: center; margin: 26px 0 0; font-family: var(--type); color: var(--powder); font-size: .9rem; }

/* Golden clam trophies */
.plaques {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px;
  margin-top: 26px; align-items: stretch;
}
@media (max-width: 1000px) { .plaques { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin-inline: auto; } }
@media (max-width: 520px) { .plaques { grid-template-columns: 1fr; max-width: 400px; } }
.plaque {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px 22px 28px; border-radius: 6px;
  background: linear-gradient(180deg, #21463c, var(--plaque));
  border: 2px solid var(--brass);
  box-shadow: inset 0 0 0 5px var(--plaque), inset 0 0 0 6px rgba(201, 151, 63, .55), 0 22px 44px -22px rgba(0, 0, 0, .7);
}
.plaque .laurel { width: 112px; height: 62px; margin: 0 auto; color: var(--brass); }
.plaque h3 { margin: 8px 0 10px; color: var(--cream); font-weight: 600; letter-spacing: .15em; text-transform: uppercase; font-size: 1.12rem; line-height: 1.35; }
.plaque p { margin: 0; color: rgba(247, 232, 198, .78); font-size: .94rem; }
.plaque .shell { width: 22px; height: 20px; margin: 14px auto 0; color: var(--brass); }
.plaque.wildcard {
  background: transparent; border: 2px dashed rgba(201, 151, 63, .75);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .5);
}
.wild-mark {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 2px auto 4px; border-radius: 50%;
  border: 2px solid var(--brass); color: var(--sun); font-weight: 600; font-size: 1.9rem; line-height: 1;
}
.clam { position: relative; width: min(100%, 380px); margin: 34px auto 0; }
.clam::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 110, .45), transparent 66%);
  filter: blur(18px); animation: shimmer 5s ease-in-out infinite;
}
.clam img {
  position: relative; width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
}
@keyframes shimmer { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.fineprint { max-width: 560px; margin: 34px auto 0; text-align: center; font-family: var(--type); font-size: .84rem; color: var(--powder); }

/* Costume sonar */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 34px; }
.chip {
  border: 0; cursor: pointer; border-radius: 999px; padding: 8px 14px;
  font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  background: rgba(141, 255, 210, .08); color: var(--powder);
  box-shadow: inset 0 0 0 1px rgba(141, 255, 210, .3);
}
.chip[aria-pressed="true"] { background: var(--sonar); color: var(--ink); box-shadow: none; }
.sonar-grid {
  display: grid; grid-template-columns: minmax(260px, 380px) 1fr;
  gap: clamp(28px, 5vw, 56px); align-items: center; margin-top: 40px;
}
@media (max-width: 880px) { .sonar-grid { grid-template-columns: 1fr; justify-items: center; } }
.scope-col { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.scope {
  position: relative; width: min(78vw, 360px); aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, #0e3a36 0%, #06201f 72%);
  box-shadow:
    0 0 0 8px var(--brass), 0 0 0 11px var(--brass-dk),
    inset 0 0 50px rgba(0, 0, 0, .65), 0 0 80px rgba(141, 255, 210, .08);
}
.scope svg.grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 290deg, rgba(141, 255, 210, .5) 360deg);
  animation: sweep 4.5s linear infinite;
}
.scope.pinging .sweep { animation-duration: .9s; }
@keyframes sweep { to { transform: rotate(360deg); } }
.blip {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--sonar); box-shadow: 0 0 14px var(--sonar);
  transform: translate(-50%, -50%) scale(0); opacity: 0;
}
.blip.on { animation: blip 1.4s ease-out forwards; }
.blip.lock { animation: lock 1.6s ease-out infinite; opacity: 1; transform: translate(-50%, -50%) scale(1); background: var(--sun); box-shadow: 0 0 18px var(--sun); }
@keyframes blip { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.8); } }
@keyframes lock { 0% { box-shadow: 0 0 0 0 rgba(238, 207, 88, .8); } 100% { box-shadow: 0 0 0 26px rgba(238, 207, 88, 0); } }
.ping-btn { min-width: 200px; }

.specimen {
  position: relative; width: 100%; max-width: 560px; min-height: 290px;
  background: var(--paper); color: var(--ink); border-radius: 4px;
  padding: 30px 30px 26px; box-shadow: 0 26px 54px -26px rgba(0, 0, 0, .8);
}
.specimen::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--paper-line); border-radius: 2px; pointer-events: none; }
.specimen .no { font-family: var(--type); font-size: .78rem; letter-spacing: .1em; color: var(--ink-soft); text-transform: uppercase; }
.specimen h3 { margin: 6px 0 2px; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.08; font-weight: 600; letter-spacing: .01em; }
.specimen .latin { margin: 0 0 14px; font-family: var(--type); font-style: italic; color: #2a6168; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  font-size: .64rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: #eadcb7; color: var(--ink);
}
.tag.z-sunlight { background: #bfe3e4; }
.tag.z-twilight { background: #4f8f9a; color: #fff; }
.tag.z-midnight { background: #173f4d; color: var(--cream); }
.tag.z-abyss { background: #071820; color: var(--cream); }
.tag.z-surface { background: var(--sun); }
.specimen .tip { margin: 0 0 22px; font-size: 1.04rem; }
.plate { margin: 12px 0 18px; }
.plate-img {
  display: flex; align-items: center; justify-content: center;
  height: clamp(190px, 34vw, 270px); padding: 12px; border-radius: 3px;
  background: #fffaf0; box-shadow: inset 0 0 0 1px var(--paper-line), inset 0 0 0 6px #fffaf0, inset 0 0 0 7px var(--paper-line);
}
.plate-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.plate figcaption { margin-top: 8px; font-family: var(--type); font-size: .78rem; line-height: 1.45; color: var(--ink-soft); }
.plate figcaption b { color: var(--ink); }
.plate .credit { display: block; margin-top: 3px; font-size: .7rem; color: #7a7a6a; text-decoration: none; }
.plate .credit:hover { text-decoration: underline; }
.plate.pending .plate-img { background: repeating-linear-gradient(135deg, #fffaf0 0 12px, #f6ecd2 12px 24px); }
.plate.pending .plate-img span {
  font-family: var(--type); font-weight: 700; font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; text-align: center;
  color: var(--beanie); border: 3px double var(--beanie); padding: 10px 16px; transform: rotate(-6deg); opacity: .85;
}
.specimen .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.specimen.idle h3 { color: var(--ink-soft); }
.specimen.reveal { animation: reveal .5s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* The abyss: anglerfish lure CTA */
.abyss { text-align: center; padding-top: 10px; }
.lure { position: relative; height: 230px; max-width: 300px; margin: 0 auto; }
.lure svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orb {
  position: absolute; left: 50%; bottom: 0; width: 26px; height: 26px; border-radius: 50%;
  transform: translate(-50%, 50%);
  background: radial-gradient(circle at 40% 35%, #fff 0%, var(--glow) 38%, #f2b53f 78%);
  box-shadow: 0 0 22px 8px rgba(255, 233, 163, .65), 0 0 90px 40px rgba(255, 214, 120, .2);
  animation: lure 3.2s ease-in-out infinite;
}
@keyframes lure { 0%, 100% { box-shadow: 0 0 22px 8px rgba(255, 233, 163, .65), 0 0 90px 40px rgba(255, 214, 120, .18); } 50% { box-shadow: 0 0 30px 12px rgba(255, 233, 163, .85), 0 0 120px 56px rgba(255, 214, 120, .28); } }
.abyss .h2 { margin-top: 18px; }
.abyss .lure { margin-bottom: 46px; }
.abyss .btn { margin-top: 30px; font-size: 1rem; padding: 1.1em 2em; }
.respond-by { margin: 18px 0 0; font-family: var(--type); font-size: .86rem; color: var(--powder); letter-spacing: .06em; }

/* Depth rail (wide screens) */
.depth-rail {
  position: fixed; z-index: 40; display: none;
  right: calc(var(--frame) + 16px); top: 50%; height: 44vh; width: 120px;
  transform: translateY(-50%); pointer-events: none;
  opacity: 0; transition: opacity .4s;
}
.depth-rail.on { opacity: 1; }
@media (min-width: 1180px) { .depth-rail { display: block; } }
.depth-rail .track {
  position: absolute; right: 0; top: 0; bottom: 0; width: 10px;
  background: repeating-linear-gradient(180deg, rgba(247, 232, 198, .5) 0 1px, transparent 1px 10%);
  border-right: 1px solid rgba(247, 232, 198, .45);
}
.depth-rail .mark { position: absolute; right: 0; display: flex; align-items: center; gap: 8px; transform: translateY(-50%); }
.depth-rail .mark i { display: block; width: 22px; height: 2px; background: var(--sun); order: 2; }
.depth-rail .mark span { font-family: var(--type); font-size: .72rem; color: var(--sun); white-space: nowrap; text-align: right; line-height: 1.25; }
.depth-rail .mark small { display: block; color: var(--powder); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }

/* Bubbles */
.bubbles { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 1.2s; }
.bubbles.on { opacity: 1; }
.bubble {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 1px solid rgba(220, 250, 255, .45);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .6), rgba(255, 255, 255, .06) 45%, transparent 62%);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: .9; }
  50% { transform: translate(14px, -55vh); }
  100% { transform: translate(-10px, -118vh); opacity: 0; }
}

/* Footer */
.footer {
  text-align: center; padding: 30px var(--gutter) calc(var(--frame) + 40px);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(247, 232, 198, .55);
}
.footer p { margin: 6px 0; }
.footer .shell { width: 26px; height: 24px; margin: 0 auto 14px; color: rgba(238, 207, 88, .7); }
.footer button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: underline; text-underline-offset: 4px; padding: 0; }

/* Poster lightbox */
.poster-dialog { padding: 0; border: 0; background: transparent; max-width: min(92vw, 640px); max-height: 92vh; }
.poster-dialog::backdrop { background: rgba(2, 10, 16, .86); }
.poster-dialog img { width: 100%; height: auto; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.poster-dialog .close {
  display: block; margin: 12px auto 0; background: none; border: 0; color: var(--cream); cursor: pointer;
  font-weight: 600; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
}

/* ==========================================================================
   RSVP page — the crew manifest
   ========================================================================== */
.page-rsvp .deep { min-height: 100vh; padding: calc(var(--frame) + 96px) 0 0; }
.rsvp-head { text-align: center; padding: 0 var(--gutter) 38px; }
.rsvp-head .inline-title { font-size: clamp(2.6rem, 10vw, 5.2rem); --channel: var(--sea-1); }
@media (max-width: 640px) { .rsvp-head .inline-title { font-size: 8.4vw; white-space: nowrap; } }
.rsvp-head .sub { margin: 16px auto 0; max-width: 560px; letter-spacing: .2em; text-transform: uppercase; font-size: clamp(.74rem, 2.3vw, .9rem); color: var(--cream); }

.preview-banner {
  max-width: 760px; margin: 0 auto 18px; padding: 10px 16px; border-radius: 6px;
  background: rgba(238, 207, 88, .14); box-shadow: inset 0 0 0 1px rgba(238, 207, 88, .5);
  font-family: var(--type); font-size: .82rem; color: var(--sun); text-align: center;
}
.returning {
  max-width: 760px; margin: 0 auto 18px; padding: 12px 16px; border-radius: 6px;
  background: rgba(141, 255, 210, .08); box-shadow: inset 0 0 0 1px rgba(141, 255, 210, .35);
  font-family: var(--type); font-size: .85rem; color: var(--powder); text-align: center;
}
.paper-wrap { padding: 0 var(--gutter); }

.manifest {
  position: relative; max-width: 760px; margin: 0 auto;
  background-color: var(--paper); color: var(--ink);
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(18, 38, 46, .035) 31px 32px);
  border-radius: 4px; padding: clamp(26px, 5.5vw, 54px);
  box-shadow: 0 34px 80px -30px rgba(0, 0, 0, .85);
  counter-reset: q;
  transition: transform .8s cubic-bezier(.6, 0, .4, 1), opacity .8s;
}
.manifest::before { content: ""; position: absolute; inset: 9px; border: 1px solid var(--paper-line); border-radius: 2px; pointer-events: none; }
.manifest.sinking { transform: translateY(60px) rotate(-1.5deg); opacity: 0; }

.form-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px;
  margin-bottom: 30px; padding-bottom: 12px; border-bottom: 2px solid var(--ink);
  font-family: var(--type); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
}
.form-meta b { color: var(--ink); font-weight: 700; }

.q { margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
.q.hide { display: none; }
.qtitle { display: block; padding: 0; margin: 0 0 10px; font-weight: 600; font-size: 1.1rem; letter-spacing: .01em; line-height: 1.3; }
.q:not(.sub-q) > .qtitle::before {
  counter-increment: q; content: counter(q) ".";
  font-family: var(--type); font-weight: 700; color: var(--beanie); margin-right: 8px;
}
.hint { margin: -4px 0 12px; font-family: var(--type); font-size: .82rem; color: var(--ink-soft); }
.hint a { color: var(--sea-1); }
.optional { font-family: var(--type); font-weight: 400; font-size: .78rem; color: var(--ink-soft); margin-left: 6px; }

.manifest input[type="text"],
.manifest input[type="email"],
.manifest input[type="tel"],
.manifest textarea {
  width: 100%; font-family: var(--type); font-size: 1.06rem; color: var(--ink);
  background: transparent; border: 0; border-radius: 0;
  border-bottom: 2px dashed rgba(18, 38, 46, .42); padding: 8px 2px;
  transition: background .2s, border-color .2s;
}
.manifest textarea { min-height: 84px; resize: vertical; border: 2px dashed rgba(18, 38, 46, .3); padding: 10px 12px; border-radius: 4px; }
.manifest input::placeholder, .manifest textarea::placeholder { color: rgba(18, 38, 46, .38); }
.manifest input:focus, .manifest textarea:focus { outline: none; border-color: var(--ink); border-bottom-style: solid; background: rgba(238, 207, 88, .16); }
.field + .field { margin-top: 18px; }
.field label { display: block; font-family: var(--type); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.two .field + .field { margin-top: 0; }
@media (max-width: 620px) { .two { grid-template-columns: 1fr; gap: 18px; } }
.invalid input, .invalid textarea { border-bottom-color: var(--beanie) !important; }
.invalid .tile .face { border-color: rgba(211, 34, 28, .6); }
.err { display: none; margin: 8px 0 0; font-family: var(--type); font-size: .82rem; color: var(--beanie); }
.invalid .err { display: block; }

/* Attendance tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 620px) { .tiles { grid-template-columns: 1fr; } }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tile .face {
  height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 18px 12px 16px; border-radius: 10px; background: #fffaf0;
  border: 2px solid rgba(18, 38, 46, .22);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.tile svg { width: 74px; height: 44px; flex: none; }
.tile .copy { display: flex; flex-direction: column; gap: 3px; }
.tile .t1 { font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.tile .t2 { font-family: var(--type); font-size: .8rem; color: var(--ink-soft); }
.tile:hover .face { border-color: rgba(18, 38, 46, .5); }
.tile input:checked + .face { background: var(--sun); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.tile input:focus-visible + .face { outline: 3px solid var(--beanie); outline-offset: 2px; }
@media (max-width: 620px) {
  .tile .face { flex-direction: row; text-align: left; gap: 14px; padding: 12px 14px; }
  .tile svg { width: 58px; height: 36px; }
}

/* Crew size stepper */
.crew-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fffaf0; }
.stepper button { width: 46px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--ink); }
.stepper button:hover { background: rgba(238, 207, 88, .4); }
.stepper button:disabled { opacity: .3; cursor: default; background: transparent; }
.stepper output { min-width: 40px; text-align: center; font-family: var(--type); font-weight: 700; font-size: 1.2rem; }
.beanies { display: flex; flex-wrap: wrap; gap: 4px; min-height: 30px; align-items: flex-end; }
.beanies svg { width: 34px; height: 30px; animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.2) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.crew-label { font-family: var(--type); font-size: .85rem; color: var(--ink-soft); }
.sub-q { margin-top: 18px; }

/* Depth chart */
.zones { border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.zone { position: relative; display: block; cursor: pointer; }
.zone input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.zone .row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px;
  padding: 13px 16px 13px 22px; color: #fff; transition: box-shadow .15s, padding .15s;
}
.zone:nth-child(1) .row { background: #6fb3bd; color: var(--ink); }
.zone:nth-child(2) .row { background: #2f7685; }
.zone:nth-child(3) .row { background: #153f4d; }
.zone:nth-child(4) .row { background: #05141c; }
.zone + .zone .row { border-top: 1px solid rgba(255, 255, 255, .14); }
.zone .zn { font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .9rem; }
.zone .zd { font-family: var(--type); font-size: .78rem; opacity: .85; text-align: right; }
.zone .zt { grid-column: 1 / -1; font-family: var(--type); font-size: .86rem; opacity: .92; }
.zone input:checked + .row { box-shadow: inset 8px 0 0 var(--sun); padding-left: 30px; }
@media (max-width: 480px) {
  .zone .row { grid-template-columns: 1fr; gap: 2px; }
  .zone .zd { text-align: left; }
}
.zone input:checked + .row .zt::after { content: "◀ you are here"; display: inline-block; margin-left: 8px; color: var(--sun); white-space: nowrap; }
.zone:nth-child(1) input:checked + .row .zt::after { color: var(--beanie-dk); }
.zone input:focus-visible + .row { outline: 3px solid var(--sun); outline-offset: -3px; }

/* Signature + submit */
.sign-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-top: 8px; padding-top: 24px; border-top: 2px solid var(--ink);
}
.signature { flex: 1 1 260px; min-width: 0; }
.signature .line {
  min-height: 52px; border-bottom: 1.5px solid var(--ink);
  font-family: var(--script); font-size: 1.35rem; line-height: 2.2; color: #1d3c8f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
}
.signature .cap { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--type); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.form-error { margin: 14px 0 0; font-family: var(--type); font-size: .88rem; color: var(--beanie); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Rubber stamp */
.stamp {
  position: absolute; top: 24px; right: 22px; z-index: 5; pointer-events: none;
  font-family: var(--font); font-weight: 700; font-size: clamp(1.1rem, 4vw, 1.6rem); letter-spacing: .16em;
  text-transform: uppercase; white-space: nowrap; color: var(--beanie); border: 4px double var(--beanie); border-radius: 6px; padding: 6px 14px;
  opacity: 0; transform: rotate(-12deg) scale(2.6); mix-blend-mode: multiply;
}
.stamp.slam { animation: slam .42s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.stamp.static { opacity: .88; transform: rotate(-12deg); }
@keyframes slam {
  0% { opacity: 0; transform: rotate(-12deg) scale(2.6); }
  60% { opacity: .95; transform: rotate(-12deg) scale(.92); }
  100% { opacity: .88; transform: rotate(-12deg) scale(1); }
}

/* Result: crew card */
.result { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.result.rise { animation: risein .8s cubic-bezier(.2, .8, .3, 1); }
@keyframes risein { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }
.crew-card {
  position: relative; width: min(100%, 520px); margin: 0 auto; text-align: left;
  background: var(--paper); color: var(--ink); border-radius: 14px; overflow: hidden;
  box-shadow: 0 34px 70px -26px rgba(0, 0, 0, .85);
}
.cc-band {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--sun); padding: 12px 18px;
  font-weight: 600; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
}
.cc-band svg { width: 22px; height: 20px; color: var(--ink); flex: none; }
.cc-body { display: grid; grid-template-columns: 118px 1fr; gap: 20px; padding: 22px 22px 16px; }
@media (max-width: 420px) { .cc-body { grid-template-columns: 92px 1fr; gap: 14px; } }
.cc-photo {
  align-self: start; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--ink); background: linear-gradient(180deg, var(--sky-low), var(--sea-0));
  display: flex; align-items: flex-end; justify-content: center;
}
.cc-photo svg { width: 92%; height: auto; }
.cc-fields { margin: 0; }
.cc-fields dt { font-family: var(--type); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.cc-fields dd { margin: 0 0 9px; font-weight: 600; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.cc-fields dd i { font-family: var(--type); font-weight: 400; font-size: .86rem; color: #2a6168; }
.cc-foot {
  display: flex; justify-content: space-between; gap: 10px; padding: 10px 18px 12px;
  border-top: 2px dashed rgba(18, 38, 46, .28);
  font-family: var(--type); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}
.crew-card .stamp { top: auto; bottom: 50px; right: 8px; font-size: .9rem; padding: 5px 10px; }
.bottle-art { width: 180px; height: 110px; margin: 0 auto; }
.result h2 { margin: 34px 0 10px; color: var(--sun); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: clamp(1.6rem, 5.5vw, 2.3rem); line-height: 1.12; }
.result p { margin: 0 auto; max-width: 500px; color: rgba(247, 232, 198, .88); }
.result .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.result .again { margin-top: 18px; font-family: var(--type); font-size: .82rem; color: var(--powder); }
.result .again button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .bubbles { display: none; }
}
