/* ATOM City prototype 0.2 (17 Nov 2026; 0.2 on 18 Nov 2026): the page and the plain UI over the 3D city.
   The plaza's flat look carried over (solid colours, square corners, hard offset shadows). Plain on purpose: the UI/UX
   design comes later. Full screen on phones and computers; nothing scrolls sideways.
   0.3.6 colours (docs/city/changes-0.3.6/colours.md and brand.md): only the colours of ATOM's Brand Book 2026 (PDF 34 to
   36, exact HEX), by the book's names: Deep Blue --navy (also --ink, the hard shadows), Pure White --snow, Dark Blue
   --dark, Game Blue --royal, Social Blue --social, CYAN --cyan; Highlight Green --lime (the one main action), Casual
   Green --lime-deep (pressed), Tasty Peach --peach, Sweet Pink --sweet (errors), Simple Pink --simple, Hyper Turquoise
   --turq (right answers), Breeze Blue --ice, Bright Slate --off (disabled, with Dark Blue words), Chirpy Purple --purple
   (only the stage, the Live and New Year: the everyday UI is blue). Peach is written once here (--peach; colours.test.mjs
   checks that each file names it once). Words on a light fill, peach and pink included, are Deep Blue; on Deep Blue,
   Dark Blue, Game Blue or purple they are white. --red, --red-dark and --yellow are the seasonal accents kept (the gift
   card's head, the sound-off cross, the banner's gold, chinlone's "perfect"). */
:root {
  --navy: #070952;
  --ink: #070952;
  --snow: #ffffff;
  --lime: #acff35;
  --red: #d8412f;
  --red-dark: #a82b20;
  --yellow: #ffd23f;
  --royal: #2449fb;
  --dark: #1229b3;
  --social: #00aaff;
  --cyan: #00c8ff;
  --purple: #8900f2;
  --peach: #ff6b6b;
  --sweet: #ff4d6d;
  --simple: #ffccd5;
  --turq: #03fcba;
  --lime-deep: #88e308;
  --ice: #91e5f6;
  --off: #cfdbd5;
  --off-text: #1229b3;
  --f-ui: 'Noto Sans Myanmar', 'Myanmar Text', 'Myanmar Sangam MN', Padauk, system-ui, sans-serif;
  --f-head: 'Montserrat', 'Noto Sans Myanmar', 'Trebuchet MS', system-ui, sans-serif;
  --f-num: 'Montserrat', 'Trebuchet MS', Verdana, 'Noto Sans Myanmar', system-ui, sans-serif;
  --safe-t: 0px; --safe-b: 0px; --safe-l: 0px; --safe-r: 0px;
}
@supports (top: env(safe-area-inset-top)) {
  :root { --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--ink); color: var(--navy); font-family: var(--f-ui);
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
[hidden] { display: none !important; }
button { -webkit-appearance: none; appearance: none; font-family: inherit; }

.frame { position: fixed; inset: 0; overflow: hidden; background: var(--navy); touch-action: none; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #131a72; touch-action: none; }

/* ---------------------------------------------------------------- HUD */
.hud { position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; z-index: 2; }
.top { position: absolute; top: calc(10px + var(--safe-t)); left: calc(10px + var(--safe-l)); right: calc(13px + var(--safe-r)); display: flex; gap: 7px; align-items: center; }
.spacer { flex: 1; }
.chip {
  pointer-events: auto; display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 9px; margin: 0;
  background: var(--snow); color: var(--navy); border: 2px solid var(--navy); border-radius: 0; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--f-num); font-weight: 800; font-size: 15px; line-height: 1; white-space: nowrap; cursor: pointer;
}
.chip-online { background: var(--lime); cursor: default; }
.chip-online small { font-size: 10.5px; font-weight: 700; letter-spacing: .2px; }
.chip-points .chip-word { font-family: var(--f-ui); font-size: 11.5px; font-weight: 700; line-height: 1.7; }
.chip-points.samples { background: var(--off); color: var(--off-text); }
.points-add { margin-left: 2px; padding: 1px 5px; background: var(--lime); color: var(--navy); font-size: 12.5px; animation: popin .25s steps(3); }
@keyframes popin { from { transform: translateY(6px); } to { transform: none; } }
.chip-sound { width: 40px; padding: 0; justify-content: center; }
.chip-sound .ico-on { display: none; }
.chip-sound[aria-pressed="true"] { background: var(--peach); }
.chip-sound[aria-pressed="true"] .ico-on { display: block; }
.chip-sound[aria-pressed="true"] .ico-off { display: none; }
.ico { width: 18px; height: 18px; flex: none; display: block; }
.chip-tasks { gap: 4px; padding: 0 8px; }
.chip-tasks b { font-variant-numeric: tabular-nums; }
.chip-tasks.done { background: var(--lime); }
.chip.bump { animation: bump .3s steps(3); }
@keyframes bump { 50% { transform: translateY(-4px); } }

.live {
  position: absolute; top: calc(52px + var(--safe-t)); left: calc(10px + var(--safe-l)); right: calc(13px + var(--safe-r)); height: 30px;
  display: flex; align-items: stretch; background: var(--dark); box-shadow: 3px 3px 0 rgba(7, 9, 82, .55);
}
@media (min-width: 700px) { .live { right: auto; width: min(620px, calc(100% - 23px)); } }
.live-tag { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; padding: 0 4px; background: var(--lime); color: var(--navy); font-family: var(--f-num); line-height: 1; }
.live-tag b { font-size: 11px; font-weight: 800; letter-spacing: .6px; }
.live-tag small { margin-top: 2px; font-size: 8.5px; font-weight: 700; }
.live-text { flex: 1; min-width: 0; margin: 0; padding: 0 8px; color: var(--snow); font-size: 12.5px; font-weight: 600; line-height: 30px; white-space: nowrap; overflow: hidden; }
.live-text.in { animation: livein .3s steps(4); }
@keyframes livein { from { transform: translateY(8px); opacity: .35; } to { transform: none; opacity: 1; } }

.row3 { position: absolute; top: calc(88px + var(--safe-t)); left: calc(10px + var(--safe-l)); right: calc(13px + var(--safe-r)); display: flex; flex-wrap: wrap; gap: 5px 7px; align-items: flex-start; }
.zone, .info { margin: 0; padding: 0 8px; background: var(--royal); color: var(--snow); font-size: 11.5px; font-weight: 700; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.info { margin-left: auto; background: var(--dark); }

.run-chip {
  position: absolute; top: calc(124px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: baseline; gap: 8px;
  padding: 4px 14px; background: var(--lime); color: var(--navy); border: 3px solid var(--navy); box-shadow: 4px 4px 0 var(--ink); font-family: var(--f-num);
}
.run-chip span { font-size: 14px; font-weight: 900; }
.run-chip b { font-size: 26px; font-weight: 900; min-width: 3.2ch; text-align: right; font-variant-numeric: tabular-nums; }

.toast {
  position: absolute; top: calc(172px + var(--safe-t)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 28px); margin: 0; padding: 4px 14px;
  background: var(--peach); color: var(--navy); box-shadow: 3px 3px 0 var(--ink);
  font-size: 13.5px; font-weight: 700; line-height: 1.75; text-align: center; animation: toast 2.4s steps(12) forwards;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 6px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
.banner {
  position: absolute; top: 30vh; top: 30dvh; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: max-content; max-width: calc(100% - 28px); padding: 12px 22px; background: linear-gradient(180deg, rgba(137, 0, 242, .92), rgba(7, 9, 82, .92)); color: var(--snow); border: 3px solid var(--yellow); box-shadow: 5px 5px 0 var(--ink);
  text-align: center; animation: bannerin .5s steps(5);
}
/* the midnight banner: lower down, between the fireworks (the middle of the sky) and the cat */
.banner.low { top: 62vh; top: 62dvh; }
.banner b { font-family: var(--f-head); font-size: 26px; font-weight: 900; color: var(--yellow); line-height: 1.2; }
.banner span { font-size: 15px; font-weight: 700; line-height: 1.8; }
@keyframes bannerin { from { transform: translate(-50%, 18px) scale(.8); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* ---------------------------------------------------------------- joystick */
.stick { position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; border: 3px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); pointer-events: none; z-index: 2; }
.stick i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; background: var(--snow); border: 3px solid var(--navy); box-shadow: 3px 3px 0 var(--ink); }

/* ---------------------------------------------------------------- controls */
.pad { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 2; }
.emotes { position: absolute; left: calc(12px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); display: grid; grid-template-columns: repeat(2, 46px); gap: 8px; }
.emote {
  width: 46px; height: 46px; padding: 8px; margin: 0;
  background: var(--snow); border: 3px solid var(--navy); border-radius: 0; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; touch-action: none;
}
.emote svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.emote.off { opacity: .5; }
.emote.down, .action.down, .say.down { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
/* 0.3.6 colours: pressed, lime goes Casual Green and white goes Breeze Blue (the book's colours only: peach has no deeper
   shade in the book, so a pressed peach button keeps its colour and shows the press); a dim action button stays slate */
.emote.down { background: var(--ice); }
.action.down { background: var(--lime-deep); }
/* 0.2: the phrases button, on top of the emotes and as wide as all of them */
.say {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 10px; margin: 0;
  background: var(--peach); color: var(--navy); border: 3px solid var(--navy); border-radius: 0; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--f-ui); font-size: 13.5px; font-weight: 800; line-height: 1.6; cursor: pointer; touch-action: none; white-space: nowrap;
}
.say svg { width: 20px; height: 20px; flex: none; display: block; pointer-events: none; }
.say span { pointer-events: none; }
.action {
  position: absolute; right: calc(16px + var(--safe-r)); bottom: calc(18px + var(--safe-b)); min-height: 58px; min-width: 136px; max-width: calc(100% - 150px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 16px 5px;
  background: var(--lime); color: var(--navy); border: 3px solid var(--navy); border-radius: 0; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--f-ui); cursor: pointer; touch-action: none;
}
.action small { font-size: 11px; font-weight: 700; line-height: 1.6; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.action small:empty { display: none; }
.action span { font-size: 17px; font-weight: 800; line-height: 1.55; white-space: nowrap; }
.action.dim { background: var(--off); }
@media (max-width: 379px) { .action span { font-size: 15px; } .action { min-width: 122px; padding: 3px 11px 5px; } }

/* ---------------------------------------------------------------- the panel */
.panel {
  position: absolute; left: calc(10px + var(--safe-l)); right: calc(14px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); z-index: 4;
  max-height: calc(100% - 150px - var(--safe-t)); display: flex; flex-direction: column;
  background: var(--snow); color: var(--navy); border: 3px solid var(--navy); box-shadow: 5px 5px 0 var(--ink);
}
@media (min-width: 640px) { .panel { left: 50%; right: auto; width: 460px; transform: translateX(-50%); } }
.panel-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 0 12px; }
.panel-who { margin: 0; font-size: 15px; font-weight: 800; color: var(--dark); line-height: 1.7; }
.panel-live .panel-who { color: var(--purple); } /* 0.3.6 brand: purple stays for the ATOM Live panel (the stage) */
.btn-close {
  flex: none; margin-left: 10px; min-height: 44px; min-width: 84px; padding: 4px 14px; border: 2px solid var(--navy); border-radius: 0; background: var(--snow);
  font-family: var(--f-ui); font-weight: 700; font-size: 14px; line-height: 1.7; color: var(--navy); cursor: pointer;
}
.panel-body { overflow-y: auto; padding: 2px 12px 12px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.panel-text { margin: 4px 0 6px; font-size: 14.5px; font-weight: 600; line-height: 1.8; }
.panel-more { display: block; margin: 0 0 6px; font-size: 13px; color: var(--dark); overflow-wrap: anywhere; }
.panel-note { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--dark); line-height: 1.7; }
.nw { white-space: nowrap; }
.rows { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
/* 0.3.6 brand (the review: "Use only these colour codes", PDF 33): a row's light edge Bright Slate; a chosen row (the
   outfit worn, a task done, the tea served) Breeze Blue, the book's colour for pressed white buttons */
.row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; background: #fff; border: 2px solid var(--off); }
.row.worn { border-color: var(--navy); background: var(--ice); }
.swatch { flex: none; width: 34px; height: 34px; border: 2px solid var(--navy); display: grid; place-items: center; font-family: var(--f-num); font-weight: 900; font-size: 12px; color: var(--navy); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-name { font-size: 14px; font-weight: 800; line-height: 1.6; }
.row-sub { font-size: 12px; font-weight: 600; color: var(--dark); line-height: 1.5; }
.row .btn { flex: none; min-height: 40px; min-width: 76px; padding: 2px 12px; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none;
  min-height: 46px; padding: 4px 16px; border: 3px solid var(--navy); border-radius: 0; box-shadow: 3px 3px 0 var(--ink);
  background: var(--lime); color: var(--navy); font-family: var(--f-ui); font-weight: 800; font-size: 15px; line-height: 1.6; cursor: pointer;
}
.btn:disabled { background: var(--off); color: var(--off-text); box-shadow: none; cursor: default; }
.btn-ghost { background: var(--snow); }
.btn-wear { background: var(--peach); }
/* 0.3.6 colours: pressed (a mouse or a click-only button: :active; a button that answers on touch-down: .down, set by
   city.js tap()): lime goes Casual Green, white goes Breeze Blue, peach keeps its colour (the press shows it; rooms.css
   does its own buttons) */
.btn:active:not(:disabled), .btn.down:not(:disabled) { background: var(--lime-deep); transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost:active:not(:disabled), .btn-ghost.down:not(:disabled) { background: var(--ice); }
.btn-wear:active:not(:disabled), .btn-wear.down:not(:disabled) { background: var(--peach); }
.choices { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.choices .btn { width: 100%; }
.map-canvas { display: block; width: 100%; max-width: 420px; margin: 4px auto 0; border: 2px solid var(--navy); background: #e7eedf; image-rendering: auto; }

/* ---------------------------------------------------------------- 0.2 panels */
/* the tea shop's menu: six buttons in two (three on wider screens) columns, each with a small English line */
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 4px; }
@media (min-width: 440px) { .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.btn-menu { flex-direction: column; min-height: 58px; padding: 4px 8px; font-size: 14px; line-height: 1.5; }
.btn-menu small { display: block; font-family: var(--f-num); font-size: 10.5px; font-weight: 700; color: var(--dark); line-height: 1.3; }
.btn-menu.on { background: var(--ice); }
/* the phrases: two columns of short lines */
.say-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 4px; }
.btn-say { min-height: 44px; padding: 3px 8px; font-size: 13.5px; font-weight: 700; line-height: 1.55; }
/* today's tasks: a tick box and the task */
.row.task .tick { flex: none; position: relative; width: 26px; height: 26px; border: 3px solid var(--navy); background: #fff; }
.row.task.done { border-color: var(--navy); background: var(--ice); }
.row.task.done .tick { background: var(--lime); }
.row.task.done .tick::after { content: ''; position: absolute; left: 6px; top: 1px; width: 7px; height: 13px; border: solid var(--navy); border-width: 0 4px 4px 0; transform: rotate(45deg); }
/* the ATOM counter: a product, its Burmese line, its English line */
.row.product { align-items: flex-start; }
.row-en { font-family: var(--f-num); font-size: 11px; font-weight: 700; color: var(--dark); line-height: 1.4; }
.row-names { font-family: var(--f-num); font-size: 12.5px; line-height: 1.55; }
/* the ATOM 5G video: Facebook's player, made only while the panel is open */
.video-wrap { display: flex; justify-content: center; margin: 4px 0 2px; }
.video-wrap iframe { display: block; border: 3px solid var(--navy); background: #000; max-width: 100%; }
/* 0.3.5 stage: Facebook's player laid over the music stage's big screen (city/screenvideo.js): over the 3D picture,
   under the top bar, the buttons and the panels (z-index 2 and up); only the player itself takes taps. Its box is
   moved onto the screen's corners by a CSS matrix3d, again every frame. */
.scr-video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.scr-video-box { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #000; pointer-events: auto; will-change: transform; }
.scr-video-box iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.btn-link { width: 100%; margin-top: 6px; }
/* 0.3.3 points: the 5G quiz (city/quiz.js): which question, the question, its answers as buttons marked က ခ ဂ ဃ in the
   colours of the stand's buttons (a wrong one goes grey, the right one lime), a line under them, and at the end the
   server's points. Plain, like the other panels; it fits a 360 px phone (the answers wrap between words). */
.quiz-intro { margin: 2px 0 0; }
.quiz-step { margin: 4px 0 0; font-size: 12.5px; font-weight: 800; color: var(--royal); line-height: 1.6; }
.quiz-q { margin: 2px 0 4px; }
.quiz-answers { margin-top: 2px; }
.quiz-answers .btn { justify-content: flex-start; gap: 10px; min-height: 48px; padding: 4px 12px 4px 7px; text-align: left; font-weight: 700; }
.quiz-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--navy); background: #fff; font-size: 14px; font-weight: 800; line-height: 1; }
.quiz-m0 { background: var(--cyan); }
.quiz-m1 { background: var(--lime); }
.quiz-m2 { background: var(--simple); }
.quiz-m3 { background: var(--peach); }
.quiz-answers .btn:disabled { background: var(--snow); color: var(--navy); box-shadow: 3px 3px 0 var(--ink); } /* while the right answer shows, the others keep their look */
/* 0.3.6 brand: the right answer Hyper Turquoise, a wrong one Simple Pink (its mark slate), the line under them on the same
   colours; Deep Blue words on all of them */
.quiz-answers .btn.quiz-right, .quiz-answers .btn.quiz-right:disabled { background: var(--turq); color: var(--navy); box-shadow: 3px 3px 0 var(--ink); }
.quiz-answers .btn.quiz-wrong:disabled { background: var(--simple); color: var(--navy); box-shadow: none; }
.quiz-answers .btn.quiz-wrong .quiz-mark { background: var(--off); border-color: var(--dark); color: var(--dark); }
.quiz-say { min-height: 1.7em; margin: 6px 0 0; font-size: 14px; font-weight: 800; line-height: 1.7; }
.quiz-say-right, .quiz-say-wrong { display: inline-block; max-width: 100%; padding: 0 8px; color: var(--navy); }
.quiz-say-right { background: var(--turq); }
.quiz-say-wrong { background: var(--simple); }
.quiz-all { margin: 6px 0 0; font-size: 17px; font-weight: 800; line-height: 1.7; }
.quiz-points { margin: 2px 0 0; display: flex; align-items: baseline; gap: 4px; }
.quiz-big { font-family: var(--f-num); font-size: 40px; font-weight: 900; color: var(--royal); line-height: 1.15; }
.quiz-word { font-size: 16px; font-weight: 800; }
.quiz-line { margin: 4px 0 2px; }
.quiz-sample { font-family: var(--f-num); color: var(--dark); }

/* ---------------------------------------------------------------- screens */
.screen { position: absolute; inset: 0; z-index: 6; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.screen-title { background: linear-gradient(180deg, rgba(7, 9, 82, 0) 0%, rgba(7, 9, 82, .25) 18%, rgba(7, 9, 82, .9) 42%, rgba(7, 9, 82, .96) 100%); }
.back {
  position: absolute; left: calc(10px + var(--safe-l)); top: calc(10px + var(--safe-t)); z-index: 2; padding: 10px 13px;
  border: 2px solid rgba(255, 255, 255, .55); background: rgba(7, 9, 82, .88); color: #fff; font: 700 13px/1 var(--f-num); text-decoration: none;
}
/* 0.3.6 brand: ATOM's logo, top right on a white plate (PDF 12: a corner with M of open space; the back link is top left):
   120 px wide (M 19 px on every side), so the plate is 157 x 75 px with 10 px corners. Inline SVG of ATOM's own paths
   (logo-p1, the full-colour logo; the h1 stays text). The title card starts under it (100 px, was 56). */
.logo-tab {
  position: absolute; right: calc(10px + var(--safe-r)); top: calc(10px + var(--safe-t)); z-index: 2; box-sizing: border-box;
  width: 157px; height: 75px; padding: 18.86px 18.5px; background: #fff; border-radius: 10px; pointer-events: none;
}
.logo-tab svg { display: block; width: 120px; height: 37.27px; }
.title-card {
  position: relative; width: min(100%, 920px); margin: 0 auto; padding: calc(100px + var(--safe-t)) 14px calc(22px + var(--safe-b));
  display: flex; flex-direction: column; align-items: stretch; color: var(--snow); text-align: center;
}
.kicker { align-self: center; margin: 0; padding: 3px 12px; background: var(--lime); color: var(--navy); font-family: var(--f-num); font-weight: 800; font-size: 12px; letter-spacing: .4px; }
.title-card h1 { margin: 6px 0 0; font-family: var(--f-head); font-weight: 900; font-size: 34px; line-height: 1.1; letter-spacing: -.5px; text-shadow: 3px 3px 0 var(--ink); }
.sub { margin: 4px auto 0; max-width: 34em; font-size: 13px; font-weight: 600; line-height: 1.7; color: var(--snow); }
.choose { display: block; margin: 10px 0 6px; font-size: 15px; font-weight: 800; line-height: 1.7; }
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 760px) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cat {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 6px 6px 8px; margin: 0;
  background: rgba(255, 255, 255, .1); color: var(--snow); border: 3px solid rgba(255, 255, 255, .35); border-radius: 0; cursor: pointer; text-align: center;
}
.cat[aria-pressed="true"] { background: var(--snow); color: var(--navy); border-color: var(--lime); box-shadow: 4px 4px 0 var(--lime); }
.cat img { width: 100%; max-width: 92px; aspect-ratio: 1 / 1; object-fit: contain; display: block; pointer-events: none; }
@media (min-width: 760px) and (min-height: 700px) { .cat img { max-width: 128px; } }
.cat-name { font-family: var(--f-head); font-weight: 900; font-size: 15px; line-height: 1.25; }
.cat-line { font-size: 11.5px; font-weight: 600; line-height: 1.65; }
.cat-en { font-family: var(--f-num); font-size: 10px; font-weight: 700; line-height: 1.35; opacity: .8; margin-top: 1px; }
.cat-sample { position: absolute; top: 6px; right: 6px; padding: 1px 6px; background: var(--peach); color: var(--navy); font-family: var(--f-num); font-size: 9.5px; font-weight: 800; letter-spacing: .3px; }
.sample-note { margin: 6px 0 0; font-family: var(--f-num); font-size: 11px; font-weight: 700; color: var(--peach); }
.nick-label { margin-top: 10px; }
.nick {
  width: 100%; max-width: 420px; align-self: center; height: 50px; padding: 0 14px; margin: 0;
  border: 3px solid var(--navy); border-radius: 0; background: var(--snow); color: var(--navy); box-shadow: 4px 4px 0 var(--lime);
  font-family: var(--f-ui); font-size: 18px; font-weight: 700; text-align: center; outline: none; user-select: text; -webkit-user-select: text;
}
.nick:focus { border-color: var(--lime); }
.nick-hint { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--ice); line-height: 1.7; }
.nick-error { align-self: center; margin: 6px 0 0; padding: 2px 10px; background: var(--sweet); color: var(--navy); font-size: 13px; font-weight: 700; line-height: 1.75; }
.btn-go { align-self: center; width: 100%; max-width: 420px; margin-top: 12px; min-height: 54px; font-size: 17px; }
/* on a phone the cards push Start below the screen's edge: it stays at the bottom while the page scrolls */
.screen-title .btn-go { position: -webkit-sticky; position: sticky; bottom: calc(10px + var(--safe-b)); z-index: 1; }
.proto { margin: 14px 0 0; font-family: var(--f-num); font-size: 11px; font-weight: 700; color: var(--ice); }
.proto-2 { margin-top: 2px; }

.screen-photo { background: rgba(7, 9, 82, .94); display: flex; }
.photo-card { margin: auto; width: min(100%, 460px); padding: calc(16px + var(--safe-t)) 16px calc(18px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--snow); }
.photo-h { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.7; }
.photo-img { width: 100%; max-width: 360px; max-height: 58vh; object-fit: contain; border: 3px solid var(--snow); box-shadow: 5px 5px 0 var(--lime); background: var(--navy); user-select: auto; -webkit-user-select: auto; -webkit-touch-callout: default; }
.hint { margin: 0; font-size: 13px; font-weight: 600; color: var(--ice); }
.photo-actions { display: flex; flex-direction: column; gap: 9px; width: 100%; max-width: 360px; }
.photo-actions .btn { width: 100%; }

.screen-nogl { background: var(--navy); }
.nogl-text { margin: 16px 0 0; font-size: 15px; font-weight: 600; line-height: 1.8; }
.nogl-en { margin: 6px 0 16px; font-family: var(--f-num); font-size: 12px; color: var(--ice); }

.flash { position: absolute; inset: 0; z-index: 7; background: #fff; pointer-events: none; animation: flash .45s ease-out forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }

/* narrow phones */
@media (max-width: 379px) {
  .top { gap: 5px; }
  .chip { padding: 0 6px; font-size: 14px; gap: 4px; }
  .chip-points .chip-word { display: none; }
  .title-card h1 { font-size: 32px; }
  .cat-line { font-size: 11.5px; }
}
/* low screens (small phones held upright, phones held sideways): the controls sit lower and smaller */
@media (max-height: 660px) {
  .emotes { grid-template-columns: repeat(4, 40px); gap: 6px; bottom: calc(12px + var(--safe-b)); }
  .emote { width: 40px; height: 40px; padding: 6px; }
  .say { height: 36px; }
  .action { bottom: calc(12px + var(--safe-b)); min-height: 52px; }
  .title-card { padding-top: calc(96px + var(--safe-t)); }
  .cat img { max-width: 96px; }
}
@media (max-height: 660px) and (max-width: 420px) {
  .emotes { grid-template-columns: repeat(2, 40px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .banner, .live-text.in, .chip.bump, .points-add, .flash { animation: none; }
}

/* ---------------------------------------------------------------- 0.3: the daily gift's reward card (city/gift.js) */
/* Over the game for about 4 s, or until a tap: the opened gift, the points in big numbers, the line that today's gift is
   taken, the new total, light confetti falling over it (8 pieces on 'low', none for less motion). In the upper middle,
   between the HUD and the cat; at most 300 px wide, so it fits a 360 px phone with room on both sides. */
.gift-card {
  position: absolute; z-index: 5; left: 50%; top: 24vh; top: 24dvh; transform: translateX(-50%);
  width: min(300px, calc(100% - 32px - var(--safe-l) - var(--safe-r))); padding: 8px 14px 12px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--snow); color: var(--navy); border: 3px solid var(--navy); box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer; touch-action: none; animation: giftin .35s steps(4);
}
@keyframes giftin { from { transform: translate(-50%, 16px) scale(.86); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.gift-pic { position: relative; width: 64px; height: 64px; flex: none; display: block; animation: giftpic .6s steps(6); }
@keyframes giftpic { 0% { transform: scale(.55); } 60% { transform: scale(1.12); } 100% { transform: none; } }
.gift-head { position: relative; margin: 0; font-size: 14px; font-weight: 800; color: var(--red-dark); line-height: 1.7; }
.gift-add { position: relative; margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 6px; line-height: 1.05; }
.gift-add b { font-family: var(--f-num); font-size: 46px; font-weight: 900; color: var(--royal); text-shadow: 3px 3px 0 var(--lime); font-variant-numeric: tabular-nums; }
.gift-add span { font-size: 16px; font-weight: 800; }
.gift-line { position: relative; margin: 6px 0 0; font-size: 13.5px; font-weight: 700; line-height: 1.75; }
.gift-total { position: relative; margin: 2px 0 0; font-size: 12.5px; font-weight: 600; color: var(--dark); line-height: 1.7; }
.gift-total:empty { display: none; }
.gift-card[data-kind="taken"] .gift-add { display: none; }
.gift-card[data-kind="wait"] .gift-add b { animation: giftwait 1s steps(2) infinite; }
@keyframes giftwait { 50% { opacity: .35; } }
.gift-card[data-kind="offline"] .gift-add b { color: var(--dark); text-shadow: 3px 3px 0 var(--off); }
.gift-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gift-confetti i { position: absolute; top: -14px; width: 7px; height: 11px; opacity: 0; animation: giftbit 1.8s steps(24) forwards; }
.gift-card.low .gift-confetti i:nth-child(n+9) { display: none; }
@keyframes giftbit { 0% { opacity: 1; transform: translateY(0) rotate(var(--turn, 0deg)); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(280px) rotate(calc(var(--turn, 0deg) + 540deg)); } }
/* low screens (phones held sideways): higher up, so the cat stays in view */
@media (max-height: 520px) { .gift-card { top: calc(10px + var(--safe-t)); padding-top: 4px; } .gift-pic { width: 52px; height: 52px; } .gift-add b { font-size: 40px; } }
@media (prefers-reduced-motion: reduce) {
  .gift-card, .gift-pic, .gift-card[data-kind="wait"] .gift-add b { animation: none; }
  .gift-confetti { display: none; }
}

/* ---------------------------------------------------------------- 0.3.1: the chinlone mini-game (city/chinlone.js) */
/* While the player plays in the townsfolk's ring: a small box under the HUD (the kicks in a row in big numbers, today's
   best, the leave button; above the toasts' line) and the timing cue round the ball's landing point in front of the cat:
   a white target ring and a lime ring that shrinks onto it as the ball comes down (its size is --k, set each frame),
   with the verdict over it for a moment. Both are made by chinlone.js; only the leave button takes a tap (a tap
   anywhere else is the kick). */
.chin-box {
  position: absolute; z-index: 2; top: calc(118px + var(--safe-t)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px; max-width: calc(100% - 24px - var(--safe-l) - var(--safe-r)); padding: 2px 3px 2px 11px;
  background: var(--snow); color: var(--navy); border: 3px solid var(--navy); box-shadow: 4px 4px 0 var(--ink); pointer-events: none;
}
.chin-n { flex: none; min-width: 1.3ch; font-family: var(--f-num); font-size: 30px; font-weight: 900; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.chin-n.bump { animation: bump .3s steps(3); }
.chin-txt { display: flex; flex-direction: column; min-width: 0; }
.chin-row { font-size: 12px; font-weight: 800; line-height: 1.6; white-space: nowrap; }
.chin-best { font-size: 11px; font-weight: 700; line-height: 1.6; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chin-leave {
  pointer-events: auto; flex: none; min-height: 40px; min-width: 70px; margin: 0; padding: 2px 11px;
  background: var(--peach); color: var(--navy); border: 2px solid var(--navy); border-radius: 0;
  font-family: var(--f-ui); font-size: 14px; font-weight: 800; line-height: 1.6; cursor: pointer; touch-action: none;
}
.chin-cue {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; --k: 3;
  border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--navy), inset 0 0 0 2px var(--navy); pointer-events: none;
}
.chin-cue::after { content: ''; position: absolute; inset: -6px; border: 4px solid var(--lime); border-radius: 50%; box-shadow: 0 0 0 2px var(--navy); transform: scale(var(--k)); }
.chin-cue::before {
  content: attr(data-say); position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); padding: 0 9px;
  background: var(--peach); color: var(--navy); box-shadow: 3px 3px 0 var(--ink); font-size: 14px; font-weight: 800; line-height: 1.75; white-space: nowrap;
}
.chin-cue[data-say=""]::before, .chin-cue:not([data-say])::before { display: none; }
.chin-cue[data-state="perfect"], .chin-cue[data-state="perfect"]::after { border-color: var(--yellow); }
.chin-cue[data-state="good"] { border-color: var(--lime); }
.chin-cue[data-state="miss"] { border-color: var(--sweet); opacity: .85; }
.chin-cue[data-state="miss"]::after { display: none; }
.chin-cue[data-state="miss"]::before { background: var(--sweet); color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .chin-n.bump { animation: none; } }
