/* Fredoka with the Turkish letters it lacks (ğ Ğ ş Ş İ), served from the game itself: Google's Fredoka has none of
   them, so a phone drew them in another font (tools/font/fredoka_tr.py makes these files; OFL, art/fonts/OFL.txt) */
@font-face { font-family: "Fredoka"; src: url("assets/fonts/FredokaTR-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("assets/fonts/FredokaTR-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --paper: #fdf6e3;
  --ink: #1f1b24;
  --panel: #ffffff;
  --line: #1f1b24;
  --blue: #e2603f;  /* accent (buttons): the heroes' coral */
  --title: #f2b84b;  /* big title fill: ochre, the spiral patch */
  --green: #2f9e44;
  --red: #e2574c;
  --gold: #f5b622;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 18px;
}
/* page = header, game, status; the game takes all the room that is left (16:9) */
.wrap { height: 100vh; display: flex; flex-direction: column; padding: 8px 12px; }
.top { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 8px; }
.stage-box { flex: 1 1 auto; min-height: 0; container-type: size; display: flex; justify-content: center; }
h1 { font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-size: 34px; margin: 0; color: var(--title); -webkit-text-stroke: 1.5px var(--ink); }
/* Ata7 Games label: logo + name in the header (a "◀ all games" link inside the catalogue),
   "presents" on the title card, "a game by" at the end */
.brand { display: flex; align-items: center; gap: 8px; margin-right: -10px; font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 18px; color: #1d5fae; text-decoration: none; }
.brand img { width: 40px; height: auto; display: block; }
.brand[href] { padding: 2px 12px 2px 8px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; }
.brand[href]:hover { background: #e9f5ff; }
.brand .back { font-size: 14px; }
.brand.solo .back { display: none; }
.presents { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 2px; font-family: "Fredoka", system-ui, sans-serif; font-weight: 700; font-size: 17px; color: #1d5fae; }
.presents img { width: 34px; height: auto; }
.presents.madeby { margin: 12px 0 0; font-size: 15px; opacity: 0.85; }
.presents.madeby img { width: 28px; }
.sub { margin: 0; font-size: 17px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sub .gap { width: 12px; }
.keys { display: inline-flex; gap: 4px; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: 8px;
  border: 3px solid var(--line);
  border-bottom-width: 6px;
  background: #fff;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
}
kbd.wide { padding: 0 12px; font-size: 17px; }
kbd.act { background: #ffd23f; }
.stage { position: relative; width: min(100cqw, 100cqh * 16 / 9); align-self: flex-start; }
.stage:fullscreen {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f1b24;
}
.stage:fullscreen canvas { width: min(100vw, calc(100vh * 16 / 9)); border: 0; border-radius: 0; }
.stage:fullscreen .overlay { border-radius: 0; }
canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 4px solid var(--line);
  background: #fdf6e3;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 27, 36, 0.35);
  border-radius: 14px;
}
.overlay.hidden { display: none; }
.card {
  background: var(--panel);
  border: 4px solid var(--line);
  border-radius: 24px;
  padding: 20px 28px;
  max-width: 900px;
  margin: 0 16px;
  text-align: center;
}
.card h2 { font-family: "Fredoka", system-ui, sans-serif; font-size: 50px; margin: 0 0 6px; color: var(--title); -webkit-text-stroke: 2px var(--ink); }
.card p { margin: 0 0 14px; font-size: 21px; }
.card p.small { margin: 16px 0 8px; font-size: 17px; font-weight: 700; opacity: 0.7; }
.card em { font-style: normal; opacity: 0.6; }
.card .stats { font-size: 30px; font-weight: 700; }
.card .row { display: flex; gap: 12px; justify-content: center; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: flex-end; margin: 6px 0 18px; }
.legend div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; line-height: 1.15; }
/* the rocket flies nose-up: turning it makes it taller than its box, so the margins keep it off the words */
.legend img.tilt { transform: rotate(-35deg); margin: 34px 0 30px; }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.pick { margin-top: 6px; font-size: 16px; font-weight: 700; opacity: 0.75; }
.pick[open] { opacity: 1; }
.pick summary { cursor: pointer; list-style: none; }
.pick summary::before { content: "▸ "; }
.pick[open] summary::before { content: "▾ "; }
.btn {
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 10px 24px;
  cursor: pointer;
  color: #fff;
}
.btn.green { background: var(--green); }
.btn.night { background: #5b4fb3; } /* 🚀 free flight */
.btn.big { font-size: 28px; padding: 14px 46px; }
.btn.mini { font-size: 16px; padding: 6px 14px; background: var(--blue); }
.btn.chap { font-size: 17px; padding: 8px 16px; background: #fff; color: var(--ink); }
.btn.chap .ic { margin-right: 6px; }
.btn:focus-visible { outline: 4px solid #ffb703; outline-offset: 2px; }
.status { flex: none; font-size: 17px; font-weight: 700; margin: 6px 0 0; min-height: 1.4em; }
/* touch screens: ◀ ▶ bottom-left, big jump button bottom-right and the yellow 👐 "open / use"
   button next to it (it glows when there is something to open); hidden on book pages and menus */
.touch {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
@media (pointer: coarse) { .touch { display: block; } }
body.touch-mode .touch { display: block; }
.touch.off { display: none !important; }
.tbtn {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 4px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.tbtn.pressed { transform: scale(0.9); filter: brightness(0.92); }
.tbtn[hidden] { display: none; }
.dpad { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 14px; width: 150px; height: 70px; }
.tbtn.arrow { width: 66px; height: 66px; border-radius: 16px; font-size: 26px; }
.tbtn.a-left { left: 0; top: 0; }
.tbtn.a-right { right: 0; top: 0; }
.tbtn.jump { right: max(14px, env(safe-area-inset-right)); bottom: 18px; width: 84px; height: 84px; background: rgba(47, 158, 68, 0.85); color: #fff; font-size: 42px; }
.tbtn.act { right: calc(max(14px, env(safe-area-inset-right)) + 98px); bottom: 26px; width: 72px; height: 72px; background: rgba(255, 210, 63, 0.6); font-size: 34px; flex-direction: column; gap: 1px; }
.tbtn.act.ready { background: #ffd23f; animation: actpulse 0.8s ease-in-out infinite alternate; }
@keyframes actpulse { from { transform: scale(1); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .tbtn.act.ready { animation: none; } }
.tbtn small { font-size: 13px; line-height: 1; }
/* the phone is held upright: "⛶ Tam ekran" (script in index.html) turns the game sideways. Android: real full
   screen + the screen locked sideways. iPhone (web pages can't go full screen or rotate the screen there):
   body.turned draws the page turned 90°, upright when the phone is held sideways, even with rotation lock on. */
.rotate { display: none; }
@media (orientation: portrait) and (pointer: coarse) and (max-width: 600px) {
  .rotate {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--blue);
    color: #fff;
    font-family: "Fredoka", system-ui, sans-serif;
    font-size: 28px;
    text-align: center;
  }
  .rotate p { margin: 0; }
  .rotate .rot-icon { font-size: 80px; }
  body.turned .rotate, body.turned #fullBtn { display: none; } /* drawn turned = full screen isn't possible here */
  body.turned .wrap {
    position: fixed; top: 0; left: 100vw;
    width: 100vh; width: 100dvh; height: 100vw;
    transform: rotate(90deg); transform-origin: top left;
  }
}
/* the walking hint only while the children can walk (main.js sets body.walking) */
body:not(.walking) .keyhelp > span:first-child { visibility: hidden; }
/* phones and tablets have no keyboard: hide the key help, no double-tap zoom */
@media (pointer: coarse) {
  .keyhelp, .status { display: none; }
  body { touch-action: manipulation; }
}
/* short screens (a phone held sideways): small header, compact cards */
@media (max-height: 520px), (orientation: portrait) and (pointer: coarse) and (max-width: 600px) {
  .wrap { padding: 4px max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left)); }
  .top { margin: 0 0 4px; gap: 4px 12px; }
  h1 { font-size: 20px; -webkit-text-stroke-width: 1px; }
  .brand { font-size: 14px; gap: 5px; margin-right: -4px; }
  .brand img { width: 26px; }
  .presents { font-size: 13px; gap: 5px; }
  .presents img { width: 22px; }
  .presents.madeby { margin-top: 6px; }
  .btn.mini { font-size: 13px; padding: 4px 10px; }
  .status { display: none; }
  .card { padding: 8px 16px; border-radius: 18px; }
  .card h2 { font-size: 26px; margin: 0 0 4px; }
  .card p { font-size: 15px; margin: 0 0 6px; }
  .card p.small { margin: 6px 0 4px; font-size: 13px; }
  .card .stats { font-size: 20px; }
  .legend { gap: 8px; margin: 2px 0 8px; }
  .legend div { font-size: 12px; gap: 2px; }
  .legend img { height: 40px; width: auto; }
  .legend img.tilt { margin: 16px 0 14px; }
  .btn.big { font-size: 20px; padding: 8px 28px; }
  .btn.chap { font-size: 13px; padding: 5px 10px; }
  .chapters { gap: 5px; margin-top: 4px; }
  canvas { border-width: 3px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Aceleciler: one view = the 3D canvas, with the 2D canvas (mini-games, fact moments) on top ---------- */
/* (isolation: a video put under the 3D canvas with z-index -1, the train's window films, stays inside the view) */
.view { position: relative; width: 100%; isolation: isolate; }
.stage:fullscreen .view { width: min(100vw, calc(100vh * 16 / 9)); }
.stage:fullscreen .view canvas { width: 100%; }
#c3d { touch-action: none; background: #f2d9bf; }
#c2d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: transparent; border-color: transparent; pointer-events: none; touch-action: none;
}
#c2d.active { pointer-events: auto; }
/* the view's corner buttons (main.js syncLeave): ⌂ back to the main menu while anything plays, and, for a game played
   from the games room, ◀ back to its levels beside it */
.leave {
  position: absolute; left: 1cqw; top: 1cqw; z-index: 5; width: max(44px, 4.4cqw); height: max(44px, 4.4cqw);
  display: grid; place-items: center; padding: 0 0.3cqw 0 0; border-radius: 50%; cursor: pointer;
  border: max(2px, 0.25cqw) solid #e9b866; background: rgba(43, 26, 16, 0.82); color: #ffd25a;
  font: 700 max(18px, 2.1cqw) "Fredoka", system-ui, sans-serif; box-shadow: 0 0.3cqw 0.8cqw rgba(0, 0, 0, 0.35);
}
.leave.home { padding: 0; }
.home:not(.hidden) ~ .leave { left: calc(2cqw + max(44px, 4.4cqw)); }
.leave:active { transform: scale(0.92); }
.leave.hidden { display: none; }
/* the build's version, tiny, in the main menu's corner (main.js, from package.json and the build time) */
.menu .version { position: absolute; right: 0.8cqw; bottom: 0.3cqw; z-index: 2; pointer-events: none;
  font: 600 max(8px, 0.72cqw)/1 "Nunito", system-ui, sans-serif; color: rgba(255, 246, 230, 0.55); }
.card .tagline { font-family: "Fredoka", system-ui, sans-serif; font-size: 26px; margin: -4px 0 12px; opacity: 0.8; }
.loading { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font: 700 18px "Nunito", system-ui; opacity: 0.75; }
.fade { position: absolute; inset: 0; background: #1f1b24; opacity: 0; pointer-events: none; transition: opacity 0.35s; border-radius: 14px; }
.fade.on { opacity: 1; }
.fade span { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; color: #f5e6cc; font: 700 1.6cqw "Fredoka", system-ui, sans-serif; }
.stage:fullscreen .fade { border-radius: 0; }

/* ---------- Aceleciler screens: title, menu, journeys, album, end (full-bleed over the 16:9 stage) ---------- */
.stage { container-type: inline-size; }
.screen { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; background: #2a1d17; font-family: "Fredoka", system-ui, sans-serif; color: #fff; }
/* Full screen: the stage fills a screen of any shape (a phone sideways is ~2.2:1) while the game picture stays a
   centred 16:9 box. The screens and the fade take that same box and measure their sizes (cqw) from it, not from
   the whole screen's width: otherwise a wide, short screen pushed the menu's logo and last buttons off the edges. */
.stage:fullscreen { --sx: max(0px, (100vw - 100vh * 16 / 9) / 2); --sy: max(0px, (100vh - 100vw * 9 / 16) / 2); }
.stage:fullscreen > .screen, .stage:fullscreen > .fade { inset: var(--sy) var(--sx); border-radius: 0; container-type: inline-size; }
.screen.hidden { display: none; }
.screen .keyart { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen .keyart.blur { filter: blur(6px) brightness(0.55) saturate(1.1); transform: scale(1.06); }
.chip { position: absolute; display: flex; align-items: center; gap: 0.6cqw; padding: 0.5cqw 1.2cqw 0.5cqw 0.6cqw; margin: 0;
  background: rgba(255, 255, 255, 0.88); border-radius: 99px; font-size: max(11px, 1.35cqw); color: #1d5fae; box-shadow: 0 0.3cqw 1cqw rgba(0, 0, 0, 0.18); }
.chip img { width: 2.4cqw; height: auto; }
.title .chip { top: 1.6cqw; left: 1.6cqw; }
.menu .chip.madeby { right: 1.6cqw; bottom: 2.3cqw; font-size: max(10px, 1.15cqw); }   /* (above the version) */
/* the logo bobs a little, like a balloon */
.title .logo { position: absolute; top: 0.6cqw; left: 50%; width: 46cqw; margin: 0; transform: translateX(-50%); animation: bob 3.2s ease-in-out infinite; }
.logoImg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0.5cqw 0.8cqw rgba(60, 25, 0, 0.35)); }
@keyframes bob { 50% { transform: translate(-50%, -0.6cqw) rotate(-0.6deg); } }
/* the heroes' name plates: a round face and a name, each near its child */
.hero { position: absolute; bottom: 2.2cqw; display: flex; align-items: center; gap: 0.9cqw; padding: 0.5cqw 1.6cqw 0.5cqw 0.5cqw;
  background: linear-gradient(#fffaf0, #ffe9c4); border: 0.3cqw solid #3b2416; border-radius: 99px; color: #3b2416;
  font-size: 2.6cqw; font-weight: 700; box-shadow: 0 0.5cqw 1.2cqw rgba(0, 0, 0, 0.3); }
.hero img { width: 5.4cqw; height: 5.4cqw; border-radius: 50%; border: 0.3cqw solid #3b2416; object-fit: cover; background: #f6d7a8; }
.hero-a { left: 3cqw; }
.hero-e { right: 3cqw; padding: 0.5cqw 0.5cqw 0.5cqw 1.6cqw; }
/* the big Play button */
.btn.play { background: linear-gradient(#ffd25a, #f39a1e); color: #3b2416; border: 0.35cqw solid #3b2416; border-radius: 99px;
  font-size: 3.4cqw; padding: 0.8cqw 4.2cqw; box-shadow: 0 0.6cqw 0 #8a4b12, 0 1cqw 2cqw rgba(0, 0, 0, 0.3); cursor: pointer; }
.btn.play:active { transform: translateY(0.4cqw); box-shadow: 0 0.2cqw 0 #8a4b12; }
.title .btn.play { position: absolute; left: 50%; bottom: 2.4cqw; transform: translateX(-50%); animation: pulse 1.6s ease-in-out infinite; }
.title .btn.play:active { transform: translateX(-50%) translateY(0.4cqw); }
@keyframes pulse { 50% { box-shadow: 0 0.6cqw 0 #8a4b12, 0 0 0 1.2cqw rgba(255, 210, 90, 0.35); } }
.btn.play.small { font-size: 2cqw; padding: 0.6cqw 2.4cqw; animation: none; }
.screen .loading { bottom: 9cqw; color: #fff; font-size: 1.6cqw; text-shadow: 0 0.2cqw 0.6cqw #000; }
/* the main menu: a column on the left, over a darkened edge of the picture */
.menu::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(30, 16, 8, 0.86) 0%, rgba(30, 16, 8, 0.7) 30%, rgba(30, 16, 8, 0) 52%); }
.menu > :not(.keyart) { z-index: 2; }
.menu-col { position: absolute; left: 3.4cqw; top: 2.4cqw; bottom: 2.4cqw; width: 34cqw; display: flex; flex-direction: column; justify-content: center; gap: 0.9cqw; }
.menu-col .logoImg.small { width: auto; height: 10.5cqw; max-width: 30cqw; object-fit: contain; object-position: left center; margin: 0 0 1.2cqw -0.6cqw; }   /* by height: the English logo is a taller picture */
.mi { display: grid; grid-template-columns: 4.6cqw 1fr; grid-template-rows: auto auto; column-gap: 1cqw; align-items: center; text-align: left;
  background: rgba(255, 248, 235, 0.08); border: 0.2cqw solid rgba(255, 220, 160, 0.35); border-radius: 1.4cqw; padding: 0.8cqw 1.2cqw;
  color: #fff6e6; font-family: inherit; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.mi:hover, .mi:focus-visible { background: rgba(255, 210, 120, 0.22); transform: translateX(0.5cqw); outline: none; }
.mi i { grid-row: 1 / 3; font-style: normal; font-size: 2.8cqw; text-align: center; }
.mi b { font-size: 2.3cqw; letter-spacing: 0.02em; }
.mi small { font-family: "Nunito", system-ui, sans-serif; font-weight: 700; font-size: max(10px, 1.2cqw); opacity: 0.75; }
.mi.big { background: linear-gradient(#ffd25a, #f39a1e); border-color: #3b2416; color: #3b2416; box-shadow: 0 0.5cqw 0 #8a4b12; }
.mi.big b { font-size: 2.8cqw; }
.mi.big small { opacity: 0.85; }
/* a small stage (a phone): the grey second lines go (the big button keeps its chapter), so all six buttons fit */
@container (max-width: 760px) {
  .mi:not(.big) { grid-template-rows: auto; padding-block: 0.9cqw; }
  .mi:not(.big) small { display: none; }
  .mi:not(.big) i { grid-row: auto; }
  .menu-col .logoImg.small { height: 8.5cqw; margin-bottom: 0.6cqw; }
}
/* journeys and album: one framed panel */
.panel { position: absolute; inset: 3cqw 5cqw; display: flex; flex-direction: column; padding: 1.6cqw 2.2cqw;
  background: linear-gradient(rgba(58, 34, 20, 0.92), rgba(40, 22, 12, 0.94)); border: 0.3cqw solid #e9b866; border-radius: 1.6cqw;
  box-shadow: inset 0 0 0 0.5cqw rgba(233, 184, 102, 0.18), 0 1.2cqw 3cqw rgba(0, 0, 0, 0.5); }
.panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8cqw; }
.panel-top h3 { margin: 0; font-size: 3cqw; color: #ffd98a; }
.btn.back { font-size: max(12px, 1.6cqw); padding: 0.5cqw 1.6cqw; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0.2cqw solid #e9b866; border-radius: 99px; }
.story { margin: 0 0 1.2cqw; padding: 0.9cqw 1.4cqw; font: 700 max(12px, 1.45cqw)/1.4 "Nunito", system-ui, sans-serif; color: #f5e6cc;
  background: rgba(255, 255, 255, 0.06); border-left: 0.4cqw solid #e9b866; border-radius: 0.6cqw; }
.story:empty { display: none; }
.cards { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4cqw; align-content: center; }
.cards.places { grid-template-columns: repeat(2, 32cqw); justify-content: center; gap: 2.4cqw; }
.cards.places .jc b { font-size: 2.4cqw; }
.cards.places .jc small { font-size: max(11px, 1.4cqw); }
.jc { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left; cursor: pointer;
  background: #2b1a10; border: 0.25cqw solid #e9b866; border-radius: 1.2cqw; color: #fff; font-family: inherit;
  box-shadow: 0 0.5cqw 1.2cqw rgba(0, 0, 0, 0.4); transition: transform 0.15s; }
.jc:hover:not(.locked), .jc:focus-visible { transform: translateY(-0.5cqw) scale(1.02); outline: none; }
.jc img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.jc .num { position: absolute; top: 0.6cqw; left: 0.6cqw; width: 3cqw; height: 3cqw; display: grid; place-items: center; border-radius: 50%;
  background: #ffd25a; color: #3b2416; border: 0.2cqw solid #3b2416; font-size: 1.6cqw; font-weight: 700; }
.jc .done { position: absolute; top: 0.6cqw; right: 0.6cqw; font-size: 2.2cqw; }
.jc b { display: block; padding: 0.8cqw 1cqw 0.2cqw; font-size: 1.9cqw; color: #ffd98a; }
.jc small { display: block; padding: 0 1cqw 1cqw; font: 700 max(11px, 1.2cqw)/1.3 "Nunito", system-ui, sans-serif; color: #f1e1c7; opacity: 0.85; }
.jc.locked { cursor: default; }
.jc.locked img { filter: grayscale(0.85) brightness(0.55); }
.jc.locked::after { content: "🔒"; position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 4cqw; filter: drop-shadow(0 0.3cqw 0.5cqw #000); }
.jc.held { border-color: #ffd25a; box-shadow: 0 0 2.4cqw #ffd25a; }     /* the parent's key: held 3 s, let go (main.js parentKey) */
.jc .soon { position: absolute; top: 1.2cqw; right: -3.2cqw; transform: rotate(35deg); padding: 0.2cqw 4cqw; background: #e2603f; color: #fff; font-size: max(10px, 1.1cqw); font-weight: 700; }
.slots { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.2cqw; align-content: center; }
.slot { aspect-ratio: 1; border-radius: 1.2cqw; border: 0.25cqw dashed rgba(233, 184, 102, 0.55); display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.05); font-size: 3.5cqw; color: rgba(255, 230, 190, 0.35); overflow: hidden; }
.slot.got { border: 0.3cqw solid #ffd25a; transform: rotate(-2deg); box-shadow: 0 0.5cqw 1cqw rgba(0, 0, 0, 0.4); }
.slot.got:nth-child(even) { transform: rotate(2deg); }
.slot img { width: 100%; height: 100%; object-fit: cover; }
/* more cards or stickers than the panel holds (a phone held sideways): they scroll inside the panel, finger or wheel,
   with room for the hover lift, a thin gold scroll bar and a soft fade at the edges that says there is more */
.cards, .slots { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0.8cqw 0.6cqw 1.6cqw; margin: -0.8cqw -0.6cqw 0; scrollbar-width: thin; scrollbar-color: #e9b866 transparent;
  -webkit-mask-image: linear-gradient(transparent, #000 0.9cqw, #000 calc(100% - 2.2cqw), transparent);
          mask-image: linear-gradient(transparent, #000 0.9cqw, #000 calc(100% - 2.2cqw), transparent); }
.cards::-webkit-scrollbar, .slots::-webkit-scrollbar { width: 0.6cqw; }
.cards::-webkit-scrollbar-thumb, .slots::-webkit-scrollbar-thumb { background: #e9b866; border-radius: 99px; }
.cards, .slots { align-content: start; grid-auto-rows: max-content; }   /* rows keep their height: the panel scrolls */
.cards > *, .slots > * { min-height: max-content; }
.panel.next { inset: 6cqw 20cqw; align-items: center; justify-content: center; text-align: center; gap: 1.6cqw; }
.next-line { margin: 0; font: 700 2cqw/1.35 "Nunito", system-ui, sans-serif; color: #f5e6cc; }
.next-card { position: relative; width: 34cqw; border: 0.3cqw solid #ffd25a; border-radius: 1.4cqw; overflow: hidden; background: #2b1a10;
  box-shadow: 0 0.8cqw 2cqw rgba(0, 0, 0, 0.5); animation: nextIn 0.6s cubic-bezier(.2,1.4,.4,1) both; }
.next-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.next-card .num { position: absolute; top: 0.8cqw; left: 0.8cqw; width: 3.6cqw; height: 3.6cqw; display: grid; place-items: center; border-radius: 50%;
  background: #ffd25a; color: #3b2416; border: 0.2cqw solid #3b2416; font: 700 2cqw "Fredoka", system-ui, sans-serif; }
.next-card b { display: block; padding: 0.9cqw 1.2cqw; font: 700 2.6cqw "Fredoka", system-ui, sans-serif; color: #ffd98a; }
@keyframes nextIn { from { transform: scale(0.6) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.panel.end { inset: 7cqw 22cqw; align-items: center; justify-content: center; text-align: center; gap: 1cqw; }
.panel.end .logoImg.small { width: 28cqw; }
.panel.end h3 { margin: 0; font-size: 3.6cqw; color: #ffd98a; }
.panel.end p { margin: 0; font: 700 1.7cqw/1.4 "Nunito", system-ui, sans-serif; color: #f5e6cc; }
.panel.end .row { display: flex; gap: 1.4cqw; margin-top: 1cqw; }
.panel.end .btn:not(.play) { font-size: 2cqw; padding: 0.6cqw 2.2cqw; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0.2cqw solid #e9b866; border-radius: 99px; }

/* a Unity part of the story (src/unity.js): its frame fills the view, under the 2D layer */
.unity-part { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 14px; background: #1c1410; }
.stage:fullscreen .unity-part { border-radius: 0; }
.story-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; background: #1c1410; }
.stage:fullscreen .story-clip { border-radius: 0; }

/* a talking portrait (src/scenes/talkbubble.js): the speaker's clip, muted, pops in on their side and shrinks away */
.talk-bubble { position: absolute; top: 5cqw; width: 15cqw; aspect-ratio: 4 / 5; overflow: hidden; z-index: 4;
  border: 0.45cqw solid #fff6e6; border-radius: 3cqw; background: #1c1410; pointer-events: none;
  box-shadow: 0 0 1.8cqw rgba(255, 200, 80, 0.7), 0 0.6cqw 1.6cqw rgba(30, 15, 5, 0.5);
  opacity: 0; transform: scale(0.3); transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.2s ease; }
.talk-bubble.left { left: 3cqw; transform-origin: 20% 100%; }
.talk-bubble.right { right: 3cqw; top: 9cqw; transform-origin: 80% 100%; }   /* under the album's badge */
.talk-bubble.on { opacity: 1; transform: none; }
.talk-bubble.off { opacity: 0; transform: scale(0.2); transition: transform 0.35s ease-in, opacity 0.35s ease-in; }
.talk-bubble img, .talk-bubble video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.talk-bubble video { opacity: 0; }
.talk-bubble.playing video { opacity: 1; }
.talk-bubble.bob img { animation: talkBob 0.8s ease-in-out infinite alternate; }
@keyframes talkBob { from { transform: scale(1.05) translateY(1.5%) rotate(-1deg); } to { transform: scale(1.07) translateY(-1.5%) rotate(1deg); } }

/* the drawn mouse cursor (src/cursor.js): mouse only; the page's own cursor hides where it shows */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor { position: fixed; left: 0; top: 0; z-index: 2147483647; pointer-events: none; will-change: transform; }
.cursor.off { display: none; }
.cursor-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cursor-in img { position: absolute; max-width: none; display: none; user-select: none; }
.cursor[data-k="point"] .k-point, .cursor[data-k="hand"] .k-hand, .cursor[data-k="grab"] .k-grab, .cursor[data-k="pick"] .k-pick { display: block; }
/* pivots in the 48-unit pictures: the hand's wrist (17, 40), the pick's handle end (40, 42) */
.cursor .k-hand { transform-origin: 35.4% 83.3%; animation: cursor-tap 0.9s ease-in-out infinite; }
.cursor .k-pick { transform-origin: 83.3% 87.5%; }
@keyframes cursor-tap { 0%, 100% { transform: translate(0, -2px); } 45%, 60% { transform: translate(0, 2px) scale(0.94, 0.9); } }
.cursor .dust b { position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; opacity: 0;
  background: #f1dcb8; box-shadow: 0 0 0 2px rgba(31, 27, 36, 0.6); }
