/* Lighthouse Adventures — IBF Honolulu
   Navy #1e3a5f · Gold #c9a227 · Teal #0d9488 · Cream #f8f1e3
   Type sized for 4 kids around one ~14-inch laptop (~1280x800).
*/
:root {
  --navy: #1e3a5f;
  --navy-deep: #12263f;
  --navy-ink: #0b1a2d;
  --gold: #c9a227;
  --gold-soft: #e8d089;
  --teal: #0d9488;
  --teal-deep: #0b7a71;
  --ocean: #2a6f97;
  --cream: #f8f1e3;
  --cream-dark: #efe4cd;
  --sand: #e4d3ae;
  --paper: #fffaf0;
  --ink: #1a2a3a;
  --muted: #5a6a7a;
  --danger: #9a3b32;
  --ok: #0d9488;
  --shadow: 0 10px 30px rgba(18, 38, 63, .18);
  --radius: 18px;
  --font: "Inter", system-ui, "Segoe UI", sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --tap: 72px;
  --focus: 0 0 0 3px var(--cream), 0 0 0 6px var(--gold);
  --prompt: 2rem;
  --verse: 1.7rem;
  --turn: 2.2rem;
  --seat-name: 1.6rem;
  --btn-type: 1.4rem;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--navy-ink); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.2rem;
  line-height: 1.35;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201, 162, 39, .18), transparent 55%),
    radial-gradient(900px 400px at -10% 110%, rgba(13, 148, 136, .16), transparent 50%),
    var(--cream);
  min-height: 100dvh;
}

img { max-width: 100%; height: auto; }
button, input { font: inherit; }
button { cursor: pointer; }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--navy); padding: .6rem 1rem; z-index: 20;
}
.skip:focus { left: 8px; top: 8px; }

#app { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 2px 0 rgba(201, 162, 39, .55);
  flex: 0 0 auto;
  flex-wrap: wrap;
  position: relative;
  z-index: 50;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; min-width: 0;
}
.topbar .brand img { height: 44px; width: auto; display: block; }
.brand-text { min-width: 0; }
.brand-text h1 {
  font-family: var(--display); font-size: 1.35rem; margin: 0;
  font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.brand-text p { margin: 0; font-size: .78rem; color: var(--gold-soft); letter-spacing: .08em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.icon-btn {
  min-width: 56px; min-height: 56px;
  border: 2px solid rgba(248, 241, 227, .25);
  background: transparent; color: var(--cream);
  border-radius: 14px; display: grid; place-items: center;
}
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--gold); outline: none; box-shadow: var(--focus); }
.icon-btn[aria-pressed="true"] { background: rgba(201, 162, 39, .2); }

.ibf-home,
.start-over,
.topbar-nav {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; min-width: 7.5rem; padding: 0 14px;
  border-radius: 14px;
  font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap; flex: 0 0 auto;
}
.ibf-home,
.start-over {
  border: 2px solid var(--gold); background: var(--gold);
  color: var(--navy);
}
.ibf-home:hover, .ibf-home:focus-visible,
.start-over:hover, .start-over:focus-visible {
  filter: brightness(1.06); outline: none; box-shadow: var(--focus);
}
.topbar-nav {
  border: 2px solid rgba(248, 241, 227, .45);
  background: transparent; color: var(--cream);
}
.topbar-nav:hover, .topbar-nav:focus-visible {
  border-color: var(--gold); color: var(--gold-soft); outline: none; box-shadow: var(--focus);
}

.light-meter {
  display: flex; align-items: center; gap: 6px;
  background: var(--navy-deep); padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, .35);
}
.light-meter span.label { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-soft); }
.lantern {
  width: 16px; height: 22px; border-radius: 4px 4px 2px 2px;
  background: #2a4570; border: 1px solid #c9a22755; position: relative;
}
.lantern.on { background: var(--gold); box-shadow: 0 0 10px #f4d56a; }
.lantern::after {
  content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 8px;
  background: rgba(255,255,255,.25); border-radius: 2px;
}

.stage {
  flex: 1; padding: 10px 18px 8px; width: 100%; max-width: 1280px; margin: 0 auto;
  overflow-y: auto; min-height: 0;
}
.site-footer {
  padding: 6px 18px 10px; text-align: center;
  font-size: .78rem; color: var(--muted); flex: 0 0 auto;
}
.site-footer a { color: var(--navy); }

.hub-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
  margin-bottom: 8px;
}
.hub-hero .keeper { width: 72px; }
.hub-copy h2 {
  font-family: var(--display); font-size: 1.85rem; margin: 0 0 .15rem; color: var(--navy);
}
.hub-copy p { margin: 0; color: var(--navy); font-size: 1.15rem; font-weight: 600; }

.mode-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 4px 0 12px;
}
.mode-note { color: var(--navy); font-weight: 700; font-size: 1.15rem; }
.seg {
  display: inline-flex; background: var(--navy); padding: 4px; border-radius: 999px; gap: 4px;
}
.seg button {
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px;
  background: transparent; color: var(--cream); font-weight: 700; font-size: 1.2rem;
}
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--navy); }
.seg button:focus-visible { outline: none; box-shadow: var(--focus); }

.seats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px; margin-bottom: 12px;
}
.seat, .add-seat {
  appearance: none; border: 3px solid transparent; background: var(--paper);
  border-radius: var(--radius); padding: 8px 8px 10px; text-align: center;
  box-shadow: var(--shadow); min-height: 148px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: inherit;
}
.seat svg { width: 72px; height: 72px; }
.seat .name { font-weight: 800; font-size: var(--seat-name); color: var(--navy); }
.seat .path { font-size: 1rem; color: var(--muted); font-weight: 600; }
.seat[data-tone="gold"] { border-color: var(--gold); }
.seat[data-tone="teal"] { border-color: var(--teal); }
.seat[data-tone="navy"] { border-color: var(--navy); }
.seat[data-tone="ocean"] { border-color: var(--ocean); }
.seat.selected, .seat:focus-visible {
  outline: none;
  box-shadow: var(--shadow), 0 0 0 4px var(--gold);
  transform: translateY(-2px);
}
.seat.out {
  opacity: .48;
  filter: grayscale(.12);
}
.seat .round-mark {
  font-size: .78rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; border-radius: 999px;
  padding: 2px 10px; margin-top: 4px; line-height: 1.3;
}
.seat.selected .round-mark { background: var(--gold); color: var(--navy); }
.seat.out .round-mark { background: var(--sand); color: var(--muted); }
.seat.current-turn { animation: glow 1.6s ease-in-out infinite; }
.playing-line { color: var(--navy); font-weight: 800; font-size: 1.2rem; }
.seat-hint { margin: 0 0 8px; color: var(--muted); font-weight: 700; font-size: 1rem; }
.add-seat {
  border: 3px dashed var(--sand); background: transparent; box-shadow: none;
  color: var(--navy); font-weight: 700; justify-content: center; min-width: 100px;
  font-size: 1.15rem;
}
.add-seat:hover, .add-seat:focus-visible { border-color: var(--gold); outline: none; }
.plus { font-size: 2rem; line-height: 1; color: var(--gold); }
.seat-wrap { display: flex; flex-direction: column; min-width: 0; }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.game-card {
  background: var(--paper); border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow); border: 2px solid transparent;
  display: flex; flex-direction: column; gap: 6px; min-height: 0;
  position: relative; overflow: hidden;
}
.game-card.locked { opacity: .92; }
.game-card h3 {
  font-family: var(--display); font-size: 1.7rem; margin: 0; color: var(--navy);
}
.eyebrow {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); font-weight: 800;
}
.game-card p {
  margin: 0; color: var(--navy); font-weight: 600; font-size: 1.05rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.game-card .art-strip { height: 56px; border-radius: 10px; overflow: hidden; }
.game-card .art-strip svg { width: 100%; height: 100%; display: block; }
.lock-badge {
  position: absolute; top: 12px; right: 12px; width: 48px; height: 48px;
  background: var(--cream); border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--gold);
}
.lock-badge svg { width: 28px; height: 28px; }

.btn {
  min-height: var(--tap); padding: 0 22px; border-radius: 14px;
  border: 2px solid transparent; font-weight: 800; font-size: var(--btn-type);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
a.btn { color: inherit; }
a.btn.btn-gold { color: var(--navy); }
a.btn.btn-navy { color: var(--cream); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-teal { background: var(--teal); color: white; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.turn-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px; border-radius: 14px; color: var(--cream);
  background: var(--navy); margin-bottom: 0;
}
.turn-banner[data-tone="gold"] { background: #8a7018; }
.turn-banner[data-tone="teal"] { background: var(--teal-deep); }
.turn-banner[data-tone="navy"] { background: var(--navy); }
.turn-banner[data-tone="ocean"] { background: var(--ocean); }
.turn-banner .who { font-family: var(--display); font-size: 1.45rem; margin: 0; line-height: 1.1; }
.turn-banner .meta { margin: 0; opacity: .95; font-size: 1rem; font-weight: 700; }
.turn-banner .avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--cream);
  overflow: hidden; border: 3px solid var(--gold); flex: 0 0 auto;
}
.turn-banner .avatar svg { width: 100%; height: 100%; }

.week {
  display: flex; gap: 6px; justify-content: center; margin: 0 0 8px; flex-wrap: wrap;
}
.week .dot {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--navy); background: var(--paper);
  font-weight: 800; color: var(--navy); display: grid; place-items: center; font-size: 1.1rem;
}
.week .dot.done { background: var(--gold); border-color: var(--gold); }
.week .dot.now { background: var(--navy); color: var(--cream); box-shadow: 0 0 0 3px var(--gold); }

.story-card, .challenge-card, .panel {
  background: var(--paper); border-radius: 18px; padding: 12px 16px 14px;
  box-shadow: var(--shadow);
}
.story-card .day-scene, .finish .day-scene, .panel .day-scene {
  width: 100%; height: auto; max-height: 88px; border-radius: 12px; display: block; object-fit: cover;
}
.kicker { color: var(--teal); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; margin: 0 0 4px; }
.story-card h2, .panel h2, .challenge-card h2 {
  font-family: var(--display); color: var(--navy); margin: 0 0 6px; font-size: 1.55rem;
  line-height: 1.15;
}
.keeper-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.keeper-row .art-keeper { width: 56px; height: auto; max-height: 70px; display: block; }
.keeper-line {
  margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; color: var(--navy);
}

.play-wrap { display: flex; flex-direction: column; min-height: 0; gap: 6px; }

/* Creation-week order: slim rail beside the Reward scene (and checks) */
.play-with-days { flex: 1 1 auto; }
.play-body {
  display: grid;
  grid-template-columns: 16.25rem minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
}
.play-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}
.days-rail {
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--navy);
  color: var(--cream);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  border: 2px solid rgba(201, 162, 39, .45);
}
.days-rail-item {
  display: grid;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 4px 7px;
  border-radius: 10px;
  flex: 1 1 0;
  min-height: 2.1rem;
}
.days-rail-n {
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.1;
  text-align: center;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}
.days-rail-event {
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.18;
  color: var(--cream);
  min-width: 0;
  overflow-wrap: anywhere;
}
.days-rail-item.locked {
  opacity: .42;
}
.days-rail-item.locked .days-rail-n {
  color: var(--gold-soft);
}
.days-rail-item.reached {
  opacity: 1;
}
.days-rail-item.reached .days-rail-n {
  color: var(--gold);
}
.days-rail-item.current {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 0 0 2px var(--cream);
  opacity: 1;
}
.days-rail-item.current .days-rail-n,
.days-rail-item.current .days-rail-event {
  color: var(--navy);
}
.days-rail-item.current .days-rail-event {
  font-size: 1.14rem;
}
.play-with-days .toy-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 180px;
}

.toy-prompt {
  font-family: var(--display); font-size: 1.45rem; color: var(--navy);
  margin: 0; font-weight: 700; text-align: center; line-height: 1.15;
}
.toy-wrap {
  position: relative; flex: 0 0 auto; height: min(240px, 32vh);
  min-height: 180px; display: flex; flex-direction: column;
}
.toy-next { box-shadow: var(--shadow); }
.toy-next[hidden] { display: none !important; }

.toy-stage {
  flex: 1; height: 100%; min-height: 0; border-radius: 18px; position: relative;
  overflow: hidden; touch-action: none; user-select: none;
  box-shadow: var(--shadow); cursor: pointer;
}

.toy-dark {
  background: #070d18;
  --lit: 0;
}
.toy-dark.lit-partial {
  background: radial-gradient(800px 400px at 70% 40%, #f4d56a 0%, #1e3a5f 55%, #070d18 100%);
}
.toy-dark.lit {
  background: radial-gradient(circle at 60% 40%, #fff6c2, #f4d56a 30%, #f8f1e3 70%);
}
.toy-dark .toy-caption {
  position: absolute; left: 24px; top: 18px; margin: 0;
  color: #c9a227; font-family: var(--display); font-size: 1.6rem; pointer-events: none;
}
.burst {
  position: absolute; width: 160px; height: 160px; margin: -80px 0 0 -80px;
  border-radius: 50%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle, #fff 0%, #fff6c2 25%, #c9a227 55%, transparent 70%);
  animation: burst .85s ease-out forwards;
}
.glow-dot {
  position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; background: #f4d56a; box-shadow: 0 0 24px 10px #f4d56a;
  pointer-events: none;
}
.burst.hold {
  animation: none;
  transform: scale(1.15);
  opacity: .95;
}
@keyframes burst {
  from { transform: scale(.2); opacity: 1; }
  to { transform: scale(2.4); opacity: 0; }
}

.toy-hint {
  text-align: center; font-weight: 800; font-size: 1.05rem;
  color: var(--navy); background: var(--gold);
  margin: 0 auto; padding: 6px 16px; border-radius: 999px;
  width: fit-content; max-width: 100%; line-height: 1.2;
}
.creation-grow {
  display: flex; gap: 4px; height: 28px; margin: 0;
}
.creation-grow .cell {
  flex: 1; border-radius: 6px; overflow: hidden;
  background: rgba(30, 58, 95, .12);
  border: 1px solid rgba(30, 58, 95, .22);
  opacity: .35;
}
.creation-grow .cell.on { opacity: 1; border-color: var(--gold); }
.creation-grow .cell.now { opacity: .9; box-shadow: 0 0 0 2px var(--gold); }
.creation-grow .cell svg { width: 100%; height: 100%; display: block; object-fit: cover; }

/* Day 2: start SKY + WATER only; LAND appears and grows in the middle */
.toy-waters {
  background: #4ecdc8;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.toy-sky {
  position: relative; inset: auto;
  flex: 1 1 0; min-height: 0;
  background: #b8e4f2;
  transform: none;
  display: grid; place-items: center; z-index: 1;
  padding: 8px 12px;
}
.toy-land {
  position: relative; left: auto; right: auto; top: auto;
  flex: 0 0 0%;
  height: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(#e8d089, #c9a227);
  border-radius: 0;
  display: grid; place-items: center; z-index: 2; pointer-events: none;
  opacity: 1; transform: none;
  padding: 0 10px;
}
.toy-land .zone-label { opacity: 0; }
.toy-land.show-label .zone-label { opacity: 1; }
.toy-waters.is-split .toy-land, .toy-waters.sky-pulse .toy-land { opacity: 1; transform: none; }
.toy-handle { display: none !important; }
.toy-water {
  position: relative; left: auto; right: auto; bottom: auto; height: auto;
  flex: 1 1 0; min-height: 0;
  display: grid; place-items: center;
  z-index: 3;
  background: #4ecdc8;
  padding: 8px 12px;
}
.toy-water i { display: none; }

.toy-ground {
  background: linear-gradient(#87c5e0 0%, #f8f1e3 55%, #c9a227 100%);
}
.ground-band {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28%;
  background: #3d7a32; border-radius: 40% 40% 0 0;
  pointer-events: none;
}
.sprout {
  position: absolute; width: 90px; height: 130px; margin-left: -45px;
  transform-origin: 50% 100%;
  animation: grow .5s ease-out both;
  pointer-events: none; z-index: 2;
}
.sprout svg { width: 100%; height: 100%; }
@keyframes grow {
  from { transform: scaleY(.1); opacity: .4; }
  to { transform: scaleY(1); opacity: 1; }
}

.toy-skyplace {
  background: linear-gradient(90deg, #1e3a5f 0%, #1e3a5f 48%, #c45c4a 52%, #f4d56a 100%);
  cursor: default;
}
.sky-halves {
  position: absolute; inset: 0 0 52px 0;
  display: grid; grid-template-columns: 1fr 1fr;
}
.sky-half {
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.sky-half .sky-slot { pointer-events: auto; }
.sky-slot {
  width: 88px; height: 88px;
  min-width: 88px; min-height: 88px;
  max-width: 88px; max-height: 88px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 4px dashed #f8f1e3;
  background: rgba(248,241,227,.14);
  padding: 0; margin: 0;
  flex: 0 0 88px;
  display: grid; place-items: center;
  overflow: hidden;
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
}
.sky-slot.filled { border-style: solid; border-color: var(--gold); background: rgba(248,241,227,.28); }
.slot-label {
  font-weight: 800; font-size: 1.05rem; letter-spacing: .12em;
  color: #f8f1e3; pointer-events: none;
}
.sky-slot.filled .slot-label { display: none; }
.orb-row {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 32px;
  z-index: 5;
}
.orb {
  width: 72px; height: 72px;
  min-width: 72px; min-height: 72px;
  max-width: 72px; max-height: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 0; padding: 0; margin: 0;
  font-size: 1.8rem; line-height: 72px;
  flex: 0 0 72px;
  z-index: 4;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  appearance: none;
  overflow: hidden;
  box-sizing: border-box;
}
.orb.sun { background: #f4d56a; color: #8a7018; }
.orb.moon { background: #f8f1e3; color: #1e3a5f; }
.orb.dragging { cursor: grabbing; z-index: 6; }
.orb.seated {
  width: 72px; height: 72px;
  min-width: 72px; min-height: 72px;
  max-width: 72px; max-height: 72px;
  position: static;
  box-shadow: none;
  font-size: 1.6rem;
  line-height: 72px;
}
.sky-star {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: #f8f1e3; box-shadow: 0 0 8px #fff; pointer-events: none; z-index: 3;
}

.toy-swarm { display: flex; flex-direction: column; cursor: pointer; }
.swarm-sky {
  flex: 1; background: linear-gradient(#9ad4ea, #2a6f97);
  display: grid; place-items: center;
}
.swarm-sea {
  flex: 1; background: linear-gradient(#2a6f97, #0b3a4a);
  display: grid; place-items: center;
}
.swarm-sky span, .swarm-sea span, .zone-label {
  font-size: 1.7rem; font-weight: 800; color: var(--cream);
  pointer-events: none; text-shadow: 0 2px 8px rgba(0,0,0,.45);
  letter-spacing: .08em; font-family: var(--display);
}
.toy-waters .zone-label {
  font-size: clamp(1.7rem, 4.2vh, 2.5rem); letter-spacing: .16em; line-height: 1.1;
  padding: 4px 10px; max-width: 100%;
  text-shadow: none; color: var(--navy);
  font-weight: 800;
}
.toy-sky .zone-label { color: var(--navy); text-shadow: none; }
.toy-land .zone-label { color: var(--navy); text-shadow: none; }
.toy-water .zone-label {
  color: var(--navy); text-shadow: none;
  background: none; border-radius: 0;
}
.ground-band { display: grid; place-items: center; }
.ground-band .zone-label { color: #f8f1e3; }
.flock-bird, .swim-fish {
  position: absolute; width: 88px; height: 40px; pointer-events: none; z-index: 2;
}
.flock-bird { animation: fly 2.6s ease-in-out infinite alternate; }
.swim-fish { animation: swim 2.8s ease-in-out infinite alternate; }
@keyframes fly {
  from { transform: translate(0, 0) rotate(-6deg); }
  to { transform: translate(90px, -16px) rotate(8deg); }
}
@keyframes swim {
  from { transform: translate(0, 0) rotate(4deg); }
  to { transform: translate(-80px, 10px) rotate(-6deg); }
}

.toy-garden {
  background: linear-gradient(#b5dce8, #e7f0d8);
  cursor: default;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 12px;
}
.image-ribbon {
  font-family: var(--display); font-size: 1.8rem; color: var(--navy);
  font-weight: 700; margin: 8px 0; background: var(--cream);
  padding: 8px 18px; border-radius: 999px; border: 3px solid var(--gold);
}
.pads { display: flex; gap: 28px; margin-bottom: 8px; }
.pad {
  width: 110px; height: 150px; border-radius: 18px;
  border: 4px dashed var(--navy); background: rgba(248,241,227,.55);
  min-height: 150px; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.pad.filled { border-style: solid; border-color: var(--gold); background: var(--paper); }
.pad svg { width: 90px; height: 140px; }
.pad-label { font-weight: 800; color: var(--navy); font-size: 1.2rem; }

.toy-still {
  background: linear-gradient(#f4d56a, #e8b86a 40%, #1e3a5f);
  display: grid; place-items: center;
}
.lh-hit { width: min(180px, 36%); height: auto; }
.lh-beam { fill: #fff1a8; opacity: 0; transition: opacity .35s; }
.lh-beam.on { opacity: .75; }
.lh-beam.pulse { animation: beamPulse .55s ease-out; }
@keyframes beamPulse {
  0% { opacity: 1; }
  100% { opacity: .65; }
}
.toy-still.resting { filter: saturate(1.05); }

.toy-complete .toy-prompt { color: var(--teal-deep); }

.choices {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0;
}
.choice {
  border: 4px solid var(--sand); background: white; border-radius: 18px;
  padding: 8px; min-height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--navy); font-weight: 800; font-size: 1.35rem;
}
.choice svg { width: 100%; max-width: 88px; height: auto; }
.choice:hover, .choice:focus-visible { border-color: var(--gold); outline: none; box-shadow: var(--focus); }
.choice.picked { border-color: var(--navy); }
.choice.good { border-color: var(--teal); background: #e7f8f5; }
.choice.miss { animation: shake .4s; border-color: var(--danger); }

.order-pool, .order-slots {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px;
}
.chip {
  min-height: var(--tap); padding: 8px 14px; border-radius: 14px;
  border: 3px solid var(--sand); background: white;
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; color: var(--navy); font-size: var(--btn-type);
}
.chip svg { width: 48px; height: 48px; flex: 0 0 auto; }
.chip:focus-visible { outline: none; box-shadow: var(--focus); }
.chip.on { border-color: var(--gold); background: #fff6dc; }
.chip.miss { border-color: var(--danger); }
.slot {
  min-width: 140px; min-height: var(--tap); border: 3px dashed var(--navy);
  border-radius: 14px; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--navy); font-size: 1.3rem;
}

.match-board {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 8px 0;
}
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match-item {
  min-height: var(--tap); border-radius: 14px; border: 3px solid var(--sand);
  background: white; font-weight: 800; color: var(--navy); font-size: var(--btn-type);
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; text-align: left;
}
.match-item svg { width: 44px; height: 44px; }
.match-item.sel { border-color: var(--gold); box-shadow: 0 0 0 3px #c9a22755; }
.match-item.paired { border-color: var(--teal); background: #e7f8f5; }

.verse-block {
  background: var(--navy); color: var(--cream); border-radius: 16px;
  padding: 10px 14px; margin: 4px 0 8px;
}
.verse-block blockquote {
  font-family: var(--display); font-style: italic; font-size: 1.35rem;
  margin: 0 0 4px; line-height: 1.25; color: var(--cream);
}
.verse-block cite { color: var(--gold-soft); font-style: normal; font-weight: 800; display: block; font-size: 1.15rem; }
.q { font-weight: 800; color: var(--navy); font-size: 1.45rem; margin: 4px 0 8px; line-height: 1.2; }
.mc { display: flex; flex-direction: column; gap: 10px; }
.mc button {
  text-align: left; min-height: var(--tap); padding: 12px 16px;
  border-radius: 14px; border: 3px solid var(--sand); background: white;
  font-weight: 800; color: var(--navy); font-size: var(--btn-type);
}
.mc button:hover, .mc button:focus-visible { border-color: var(--gold); outline: none; }
.mc button.good { border-color: var(--teal); background: #e7f8f5; }
.mc button.miss { border-color: var(--danger); }

.feedback {
  margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 800; font-size: 1.35rem;
}
.feedback.ok { background: #e7f8f5; color: var(--teal-deep); }
.feedback.try { background: #fff1e6; color: #7a3e18; }

.finish { text-align: center; max-width: 1040px; margin: 0 auto; }
.finish h2 { font-family: var(--display); font-size: 2.2rem; color: var(--navy); margin: 2px 0 8px; }
.week-plaque {
  list-style: none;
  margin: 6px 0 10px;
  padding: 10px 12px;
  background: var(--navy-ink);
  color: var(--cream);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 4px var(--navy), 0 0 0 7px var(--gold);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, minmax(0, auto));
  grid-auto-flow: column;
  gap: 6px 14px;
  text-align: left;
}
.week-plaque-day {
  display: grid;
  grid-template-columns: 2.35rem 2.5rem minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 3.1rem;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(30, 58, 95, .55);
}
.week-plaque-day:nth-child(7) {
  background: rgba(201, 162, 39, .2);
}
.week-plaque-n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.05rem;
  line-height: 1;
  color: var(--gold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.week-plaque-icon svg {
  width: 42px;
  height: 42px;
  display: block;
}
.week-plaque-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.week-plaque-word {
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.12;
  color: var(--cream);
}
.week-plaque-event {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--gold-soft);
}
.finish-significance {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
  max-width: 62ch;
  margin: 8px auto 10px;
  line-height: 1.35;
}
.gospel {
  font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 6px 0;
}
.unlock-banner {
  background: var(--navy); color: var(--cream); border-radius: 16px;
  padding: 10px 14px; margin: 8px 0; font-size: 1.25rem; font-weight: 700;
}
.unlock-banner strong { color: var(--gold); font-size: 1.45rem; }

.teaser { max-width: 720px; margin: 0 auto; }
.teaser .lock-big { width: 64px; margin: 0 auto 8px; }

.modal-back {
  position: fixed; inset: 0; background: rgba(11, 26, 45, .55);
  display: grid; place-items: center; padding: 20px; z-index: 40;
}
.modal {
  background: var(--paper); border-radius: 22px; padding: 24px;
  width: min(520px, 100%); box-shadow: var(--shadow);
}
.modal h2 { font-family: var(--display); color: var(--navy); margin: 0 0 12px; font-size: 1.8rem; }
.modal label { display: block; font-weight: 800; margin: 10px 0 6px; font-size: 1.2rem; }
.modal input[type="text"] {
  width: 100%; min-height: var(--tap); padding: 8px 12px;
  border-radius: 12px; border: 2px solid var(--sand); background: white;
  font-size: 1.3rem;
}
.modal input:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus); }
.path-picks { display: grid; gap: 8px; }
.path-picks button { text-align: left; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: var(--cream); padding: 14px 20px;
  border-radius: 12px; z-index: 50; box-shadow: var(--shadow);
  border: 1px solid var(--gold); font-size: 1.3rem; font-weight: 700;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
@keyframes glow {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 3px var(--gold); }
  50% { box-shadow: var(--shadow), 0 0 0 7px rgba(201, 162, 39, .45); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 800px) {
  .topbar .brand img { height: 36px; }
  .brand-text h1 { font-size: 1.1rem; }
  .hub-hero { grid-template-columns: 1fr; }
  .seats { grid-template-columns: 1fr 1fr; }
  .games { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .match-board { grid-template-columns: 1fr; }
  .keeper-row { grid-template-columns: 1fr; }
  .light-meter .label { display: none; }
  .turn-banner .who { font-size: 1.8rem; }
  .ibf-home, .start-over, .topbar-nav { min-width: 6.4rem; min-height: 48px; font-size: .95rem; padding: 0 10px; }
  .week-plaque {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; }

/* Compact play screens (~1280x800 / 14-inch laptop) */
#app.playing .site-footer { display: none; }
#app.playing .topbar { padding: 4px 12px; }
#app.playing .topbar .brand img { height: 32px; }
#app.playing .brand-text h1 { font-size: 1.1rem; }
#app.playing .brand-text p { display: none; }
#app.playing .icon-btn { min-width: 44px; min-height: 44px; }
#app.playing .ibf-home,
#app.playing .start-over,
#app.playing .topbar-nav {
  min-height: 48px; min-width: 6.8rem; padding: 0 12px; font-size: 1.05rem;
}
#app.playing .light-meter { padding: 4px 10px; }
#app.playing .stage { padding: 6px 14px 8px; overflow-y: auto; }
#app.playing .intro-panel { padding: 10px 14px; }
#app.playing .intro-panel h2 { font-size: 1.45rem; margin: 0 0 4px; }
#app.screen-finish .stage { overflow-y: auto; }
#app.screen-finish .finish { padding: 8px 14px 10px; }
#app.screen-finish .week-plaque { margin: 4px 0 8px; }
#app.screen-finish .finish-significance { font-size: 1.22rem; margin: 6px auto 8px; }
#app.screen-finish .verse-block { padding: 8px 12px; margin: 4px 0 6px; }
#app.screen-finish .verse-block blockquote { font-size: 1.2rem; }
#app.screen-finish .finish-nav .btn { min-height: 56px; }
.play-nav { margin-top: 2px; }
.play-nav .btn { min-height: 56px; }
.card-ctas { margin-top: 8px; }
.finish-nav { justify-content: center; }
a.btn { text-decoration: none; }
.try-again { width: 100%; margin-top: 8px; min-height: 64px; font-size: 1.55rem; }
.mouse-hint { text-align: center; font-weight: 800; color: var(--navy); margin: 0; font-size: 1.05rem; }
.challenge-card { padding: 8px 12px 10px; }
#app.playing .mc button { min-height: 56px; font-size: 1.2rem; padding: 8px 12px; }
#app.playing .creation-grow { height: 24px; }
#app.playing .days-rail-n { font-size: 1.4rem; }
#app.playing .days-rail-event { font-size: 1.12rem; }
#app.playing .days-rail-item.current .days-rail-event { font-size: 1.2rem; }
#app.playing .play-body { grid-template-columns: 15.75rem minmax(0, 1fr); }
#app.screen-challenge .choice { min-height: 118px; }
#app.screen-challenge .challenge-card h2 { font-size: 1.35rem; }
#app.playing .toy-hint { font-size: .95rem; padding: 4px 12px; }
.image-ribbon { font-size: 1.3rem; padding: 4px 12px; margin: 4px 0; }
.pad svg { width: 70px; height: 100px; }
.sprout { width: 70px; height: 100px; margin-left: -35px; }

@media (max-height: 820px) {
  .toy-wrap { height: min(220px, 30vh); min-height: 160px; }
  .play-with-days .toy-wrap { height: auto; min-height: 160px; }
  .choice { min-height: 120px; }
}
