/* ONE WORLD (Project CLEO games, 2026-11-07 night): what every place and game shares on top of its own styles.
   Ellie's Map (/play/), the place pages, the back-to-the-place button on each game, the grown-ups door. */

/* the back button on a game: a little round window of its place (no words for the kids; the label is for grown-ups) */
.ctl--place { padding: 0 14px 0 4px !important; gap: 8px; }
.ctl--place img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(46, 50, 83, .25); }
.ctl--map svg { fill: none; stroke: #2E3253; stroke-width: 2.2; stroke-linejoin: round; }

/* ---------- the grown-ups door (moved from the old games menu) ---------- */
.games {
  position: absolute; inset: 0; z-index: 10; box-sizing: border-box;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(11, 160, 206, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: games-in 0.6s ease both;
  cursor: default;
}
.games[hidden] { display: none; }
@keyframes games-in { from { opacity: 0; } to { opacity: 1; } }
.games__panel {
  position: relative; box-sizing: border-box; width: min(560px, 100%);
  padding: 28px 18px 18px; border-radius: 32px;
  background: rgba(255, 252, 240, 0.92);
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 50px rgba(2, 80, 120, 0.25);
}
.games__close { position: absolute; top: -18px; right: -6px; }
.games[hidden] { display: none; }
.games__panel[hidden], .gu-step[hidden] { display: none; }
.games { overflow-y: auto; overscroll-behavior: contain; }
.games__panel { margin: auto; }
.grownups { width: min(440px, 100%); padding: 30px 22px 22px; text-align: center; }
.grownups, .grownups input { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.grownups__title { margin: 0 0 14px; font: 600 1.45rem/1.15 "Fredoka", system-ui, sans-serif; color: var(--navy); }
.grownups__title:focus { outline: none; }
.grownups__title:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 8px; }

.gu-step { display: grid; gap: 14px; justify-items: center; margin: 0; }
.gu-label, .gu-lead { margin: 0; font: 500 1.12rem/1.3 "Fredoka", system-ui, sans-serif; color: var(--navy); }
.gu-input {
  box-sizing: border-box; width: 100%; min-height: 50px; padding: 0 14px;
  border-radius: 16px; border: 2px solid rgba(14, 192, 219, 0.35); background: #FFFFFF;
  color: var(--navy); font: 400 1.05rem "Fredoka", system-ui, sans-serif; /* 16px+ so iPhones don't zoom in */
}
.gu-input:focus { outline: none; border-color: var(--deep); box-shadow: 0 0 0 4px rgba(14, 192, 219, 0.25); }
.gu-input--year { width: 150px; text-align: center; font-size: 1.6rem; letter-spacing: 0.12em; }
.gu-field { display: grid; gap: 6px; width: 100%; text-align: left; font: 500 0.95rem/1.2 "Fredoka", system-ui, sans-serif; color: var(--navy); }
.gu-field small { font-size: 0.85rem; font-weight: 400; color: #474B6B; }
.gu-interests { border: 0; margin: 0; padding: 0; width: 100%; display: flex; flex-wrap: wrap; gap: 8px; text-align: left; }
.gu-interests legend { padding: 0; margin-bottom: 8px; font: 500 0.95rem/1.2 "Fredoka", system-ui, sans-serif; color: var(--navy); }
.gu-check {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 2px solid #EBD9B9; background: #FFFCF0; cursor: pointer;
  font: 400 0.95rem/1.2 "Fredoka", system-ui, sans-serif; color: var(--navy);
}
.gu-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--deep); }
.gu-check:has(input:checked) { background: #E3F6FA; border-color: rgba(14, 192, 219, 0.7); }
.gu-check:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }
.gu-btn {
  min-height: 50px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--coral); color: #232744;
  font: 600 1.1rem/1 "Fredoka", system-ui, sans-serif;
  box-shadow: 0 10px 20px -12px rgba(245, 111, 86, 0.95), inset 0 -3px 0 rgba(46, 50, 83, 0.12);
  transition: background-color 0.3s ease;
}
.gu-btn:hover { background: #F77D66; }
.gu-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.gu-btn[disabled] { opacity: 0.6; cursor: default; }
.gu-error { margin: 0; min-height: 0; font: 500 0.95rem/1.35 "Fredoka", system-ui, sans-serif; color: #A33A26; }
.gu-error:empty { display: none; }
.gu-fine { margin: 0; font: 400 0.85rem/1.45 "Fredoka", system-ui, sans-serif; color: #474B6B; }
.gu-fine a { color: #00759E; text-underline-offset: 2px; }
.gu-note { padding: 6px 0 4px; }
.gu-note__big { margin: 0; font: 600 1.6rem/1.15 "Fredoka", system-ui, sans-serif; color: var(--navy); }
.gu-note__text { margin: 0; max-width: 32ch; font: 400 1rem/1.45 "Fredoka", system-ui, sans-serif; color: #474B6B; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gu-links { display: grid; gap: 10px; width: 100%; margin-top: 18px; padding-top: 16px; border-top: 2px dashed rgba(46, 50, 83, .15); }
.gu-links a { color: #00759E; font: 500 1rem/1.3 "Fredoka", system-ui, sans-serif; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .gu-btn { transition: none; } .games { animation: none; } }

/* ---------- the shared kit's pieces (moved from studio.css, 11/7 night): Sea Journal, the pearly clam, stickers, sparkles, confetti ---------- */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}
:root {
  --navy: #2E3253;
  --sun: #FDF2C5;
  --coral: #F56F56;
  --lagoon: #0EC0DB;
  --deep: #0293C6;
  --pink: #F7C9D4;
  --pinkdeep: #E58FA6;
  --cream: #FFF9EE;
  --gold: #E8B84A;
  --mint: #CFE9D8;
  --leaf: #1F6B45;
}


/* the journal button: a little painted book cover */
.jbtn { width: 58px; height: 58px; padding: 0; justify-content: center; border-radius: 18px; }
.jbtn svg { width: 34px; height: 34px; }
.jbtn.is-new { animation: jglow 2.6s ease-in-out 3; }
@keyframes jglow { 50% { box-shadow: 0 0 0 6px rgba(232, 184, 74, .45), 0 0 26px rgba(232, 184, 74, .6); } }

/* sparkles */
.spk-dot {
  position: fixed; z-index: 60; width: 14px; height: 14px; pointer-events: none;
  background: radial-gradient(circle, #fff 0 18%, #FBE39A 38%, rgba(232, 184, 74, 0) 70%);
  border-radius: 50%; transform: translate(-50%, -50%);
}

/* stickers */
.stk { position: relative; display: inline-grid; place-items: center; width: 100%; aspect-ratio: 1; }
.stk img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(80, 50, 30, .22)); }
.stk b { position: absolute; left: 50%; top: 57%; transform: translate(-50%, -50%); font: 600 clamp(1.1rem, 4.2vmin, 2.4rem)/1 "Fredoka", system-ui, sans-serif; color: var(--navy); text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.stk--poses img { border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-sizing: border-box; background: #F6E8DA; }
.stk.is-shadow img { filter: brightness(0) opacity(.13); }
.stk--poses.is-shadow img { filter: grayscale(1) contrast(.75) brightness(1.08) blur(1.2px) opacity(.32); border-color: rgba(255,255,255,.5); }
.stk.is-shadow b { opacity: 0; }

/* ---------- the unbox ---------- */
.unbox {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 52%, rgba(255, 246, 226, .82), rgba(46, 50, 83, .55));
  opacity: 0; transition: opacity .5s ease;
}
.unbox.is-in { opacity: 1; }
.unbox__glow { position: absolute; left: 50%; top: 50%; width: min(70vmin, 520px); aspect-ratio: 1; transform: translate(-50%, -54%) scale(.6);
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 246, 200, .95), rgba(255, 236, 170, 0) 66%); opacity: 0; transition: opacity 1s ease, transform 1.2s ease; }
.unbox.is-open .unbox__glow { opacity: 1; transform: translate(-50%, -54%) scale(1); }
.unbox__clam { position: relative; width: min(56vmin, 440px); aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; }
.unbox__clam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transition: opacity .7s ease; filter: drop-shadow(0 10px 18px rgba(60, 40, 30, .28)); }
.unbox__open { opacity: 0; }
.unbox.is-open .unbox__open { opacity: 1; }
.unbox.is-open .unbox__closed { opacity: 0; }
.unbox__clam.is-rocking { animation: rock 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes rock { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.2deg); } 75% { transform: rotate(2.2deg); } }
.unbox__prize { position: absolute; left: 50%; top: 50%; width: min(30vmin, 220px); transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.unbox.is-open .unbox__prize { animation: rise 1.6s .5s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, -20%) scale(.5); } to { opacity: 1; transform: translate(-50%, -78%) scale(1); } }
.unbox__clam:focus-visible { outline: 4px solid #fff; outline-offset: 6px; border-radius: 30px; }

/* ---------- Ellie's Sea Journal ---------- */
.journal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(46, 50, 83, .45); opacity: 0; transition: opacity .4s ease; }
.journal.is-in { opacity: 1; }

/* ---------- 11/7: livelier games ---------- */
.spk-ring { position: fixed; z-index: 60; width: 90px; height: 90px; border-radius: 50%; pointer-events: none;
  border: 4px solid rgba(255, 240, 180, .95); box-shadow: 0 0 18px rgba(255, 230, 150, .8); transform: translate(-50%, -50%); }
.cf { position: fixed; z-index: 58; top: 0; pointer-events: none; font-style: normal; line-height: 1; }
.cf--heart, .cf--star { font-size: clamp(18px, 3.4vmin, 34px); text-shadow: 0 1px 3px rgba(46, 50, 83, .25); }
.cf--ribbon { width: clamp(8px, 1.2vmin, 12px); height: clamp(16px, 2.6vmin, 26px); border-radius: 3px; }
.cf--dot { width: clamp(9px, 1.4vmin, 14px); height: clamp(9px, 1.4vmin, 14px); border-radius: 50%; }

/* her own song as a sticker: a pearly card with its first shells in a little wave */
.stk--mine { aspect-ratio: 4 / 3; }
.mine { position: relative; width: 100%; height: 100%; box-sizing: border-box; border-radius: 22%; padding: 8% 6%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 100% at 30% 20%, #FFFDF6, #F6E6F0 60%, #E9DDF3); border: 3px solid #fff;
  box-shadow: 0 3px 8px rgba(80, 50, 30, .2); }
.mine img { width: 24%; margin: 0 -3.5%; height: auto; filter: drop-shadow(0 2px 2px rgba(80, 50, 30, .25)); }
.stk--mine.is-shadow .mine { background: rgba(255, 255, 255, .35); border-style: dashed; border-color: rgba(46, 50, 83, .25); box-shadow: none; }
.stk--mine.is-shadow img { filter: brightness(0) opacity(.12); }
.unbox__prize .stk--mine { width: 130%; margin-left: -15%; }

/* ---------- Squish Sea (11/7): her slime jars + the journal's squish page ---------- */
.stk--slimes { aspect-ratio: 4 / 5; }
.jar { position: relative; display: block; width: 100%; height: 100%; }
.jar__lid { position: absolute; left: 15%; right: 15%; top: 0; height: 17%; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #FFE1EC, #F2B8CC); border: 2px solid rgba(150, 70, 100, .35); box-sizing: border-box; z-index: 2; }
.jar__body { position: absolute; left: 4%; right: 4%; top: 13%; bottom: 0; border-radius: 28% 28% 34% 34%; overflow: hidden; background: rgba(255, 255, 255, .5); border: 3px solid rgba(255, 255, 255, .95); box-shadow: inset 0 0 0 1px rgba(110, 80, 50, .18), 0 6px 14px rgba(80, 50, 20, .25); box-sizing: border-box; }
.jar__slime { position: absolute; left: 7%; right: 7%; bottom: 6%; top: 16%; width: 86%; height: 78%; border-radius: 42% 42% 30% 30%; }
.jar__glass { position: absolute; left: 13%; top: 9%; width: 15%; height: 50%; border-radius: 40%; background: rgba(255, 255, 255, .6); }
.stk--slimes.is-shadow .jar__body { background: rgba(255, 255, 255, .3); border-style: dashed; border-color: rgba(46, 50, 83, .25); box-shadow: none; }
.stk--slimes.is-shadow .jar__lid { opacity: .35; }
.stk--slimes.is-shadow .jar__slime { display: none; }
.stk--squishies img { filter: drop-shadow(0 4px 6px rgba(80, 50, 30, .22)); }
.unbox__prize .stk--slimes { width: 80%; margin-left: 10%; }

/* ---------- Ellie's Sea Journal, ONE WORLD (11/7 night): one page per place, a tab for each ---------- */
.journal__book {
  position: relative; box-sizing: border-box; width: min(94vw, 1060px); height: min(86vh, 660px);
  display: flex; padding: 26px 96px 26px 34px; border-radius: 28px;
  background: radial-gradient(120% 100% at 50% 0%, #FFFDF6, #FBF1DF);
  border: 10px solid #9FCFDA; box-shadow: 0 18px 50px rgba(30, 30, 60, .35), inset 0 0 0 2px rgba(255,255,255,.7);
}
.journal__pages { position: relative; flex: 1; min-width: 0; }
.journal__page { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center; gap: 3.2%; padding: 0 1%; }
.journal__page.is-on { display: flex; }
/* each page's picture of its place, a little round window at the top */
.journal__place { width: clamp(54px, 11vmin, 96px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(46,50,83,.18); flex: none; }
.journal__place img { width: 100%; height: 100%; object-fit: cover; }
.journal__row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 2.5%; width: 100%; }
.journal__row--letters .journal__slot { width: 10.5%; }
.journal__row--songs .journal__slot { width: 15%; }
.journal__row--mine .journal__slot { width: 19%; }
.journal__row--friends { gap: 18px 3%; }
.journal__row--friends .journal__slot { width: 21%; }
.journal__row--glass .journal__slot { width: 12%; }
.journal__row--poses .journal__slot { width: 17%; }
.journal__row--squishies .journal__slot { width: 12.5%; }
.journal__row--slimes .journal__slot { width: 9%; }
.journal__slot { border: 0; padding: 0; background: none; cursor: pointer; display: block; }
.journal__slot:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 16px; }
.stk--friends { aspect-ratio: 4 / 3; }
.stk--friends img { filter: drop-shadow(0 4px 6px rgba(80, 50, 30, .22)); }
.stk--friends.is-shadow img { filter: brightness(0) opacity(.13); }
/* sea glass: a soft, frosted, rounded pebble */
.glass { display: block; width: 100%; aspect-ratio: 1.15; border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.85), rgba(255,255,255,0) 32%), var(--g, #8FDCCB);
  border: 3px solid rgba(255,255,255,.9); box-shadow: inset 0 -6px 10px rgba(0,0,0,.08), 0 3px 8px rgba(80,50,30,.2); box-sizing: border-box; }
.stk--glass { aspect-ratio: 1.15; }
.stk--glass.is-shadow .glass { background: rgba(46, 50, 83, .08); border-style: dashed; border-color: rgba(46,50,83,.2); box-shadow: none; }
.journal__tabs { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.journal__tab { width: 58px; height: 58px; border-radius: 16px; border: 3px solid #fff; background: #F6E8DA; padding: 5px; cursor: pointer; box-shadow: 0 4px 12px rgba(46,50,83,.2); display: grid; place-items: center; box-sizing: border-box; }
.journal__tab img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.journal__tab .glass { width: 74%; border-width: 2px; }
.journal__tab.is-on { background: var(--sun); outline: 3px solid var(--gold); }
.journal__close { position: absolute; top: -18px; left: -18px; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .unbox.is-open .unbox__prize { animation: none; opacity: 1; transform: translate(-50%, -78%); }
  .unbox__glow { transition: opacity .6s ease; }
}
@media (max-height: 560px) { .journal__tab { width: 44px; height: 44px; padding: 3px; border-radius: 12px; } .journal__tabs { gap: 5px; } .journal__place { display: none; } }
/* held upright: the tabs along the bottom, the stickers bigger */
@media (max-aspect-ratio: 1/1) {
  .journal__book { width: 92vw; height: min(80vh, 760px); padding: 24px 16px 54px; }
  .journal__tabs { top: auto; bottom: -24px; right: 50%; transform: translateX(50%); flex-direction: row; gap: 6px; }
  .journal__tab { width: min(11vw, 52px); height: min(11vw, 52px); padding: 3px; border-radius: 12px; }
  .journal__close { top: -14px; left: -8px; }
  .journal__row--letters .journal__slot { width: 21%; }
  .journal__row--songs .journal__slot { width: 27%; }
  .journal__row--mine .journal__slot { width: 40%; }
  .journal__row--friends .journal__slot { width: 40%; }
  .journal__row--glass .journal__slot { width: 26%; }
  .journal__row--poses .journal__slot { width: 28%; }
  .journal__row--squishies .journal__slot { width: 21%; }
  .journal__row--slimes .journal__slot { width: 18%; }
}

/* the journal on the October games: the bottom-right corner (their top-right holds each game's own little row) */
.jbtn--corner { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30; }
/* the October games' bottom sentences: still read to screen readers, never shown (Claude says them now; 11/7 night) */
.caption.sr-only, .note.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.jbtn--corner.jbtn--left { right: auto; left: max(12px, env(safe-area-inset-left)); } /* Kind Distance: its watch buttons hold the right corner */
