/* Kira-Kira: counting game. Same design family as kasih4u.my / Mewarna (tokens first). */
@font-face { font-family: "Fredoka"; src: url("/assets/fonts/fredoka-latin.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/nunito-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  --paper: #fff7ec; --card: #ffffff; --line: rgba(31,35,71,.12); --line-strong: rgba(31,35,71,.24);
  --ink: #1f2347;            /* on paper 14.6:1 */
  --muted: #4a4f78;          /* 7.3:1 */
  --blue: #4361ee; --yellow: #ffb703; --red: #e63946; --green: #2a9d8f; --pink: #f15bb5; --purple: #9b5de5;
  --ok-bg: #e3f6ec; --ok-fg: #11613a; --bad-bg: #fde8e6; --bad-fg: #a1231b;
  --shadow-1: 0 1px 2px rgba(31,35,71,.06), 0 3px 8px rgba(31,35,71,.06);
  --shadow-2: 0 2px 4px rgba(31,35,71,.06), 0 10px 24px rgba(31,35,71,.10);
  --shadow-3: 0 4px 8px rgba(31,35,71,.08), 0 24px 48px rgba(31,35,71,.14);
  --font-display: "Fredoka", ui-rounded, system-ui, sans-serif; --font-body: "Nunito", ui-rounded, system-ui, sans-serif;
  --r-card: 28px; --r-inner: 20px; --r-chip: 12px;
  --ease: cubic-bezier(.16,1,.3,1); --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);
}
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.5; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
h1, h2 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -.02em; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 10px; }

.top { display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 16px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.brand b { color: var(--blue); }
.spacer { flex: 1; }
.icon-btn { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); transition: transform 150ms var(--ease); }
.icon-btn:active { transform: scale(.94); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 28px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; box-shadow: 0 3px 0 var(--ink); transition: transform 150ms var(--ease), box-shadow 150ms var(--ease); }
.btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-xl { min-height: 60px; font-size: 1.25rem; padding: 14px 34px; }
.chip { min-height: 48px; padding: 8px 22px; border-radius: 999px; border: 2px solid var(--line-strong); background: #fff; font-family: var(--font-display); font-weight: 600; transition: transform 150ms var(--ease); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

#app { height: calc(100% - 73px - var(--safe-t)); overflow-y: auto; }
.view { max-width: 920px; margin: 0 auto; padding: 24px 20px calc(32px + var(--safe-b)); display: grid; gap: 22px; justify-items: center; text-align: center; }
.view > h1 { font-size: clamp(2rem, 6vw, 3rem); }
.sub { color: var(--muted); font-size: 1.15rem; }

.profiles { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.pcard, .game-card { border: 2px solid var(--line); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-2); transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.pcard { width: 170px; padding: 20px 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.pcard .av { display: block; font-size: 64px; line-height: 1.1; }
.pcard:active, .game-card:active { transform: scale(.97); }
.pcard.add { border-style: dashed; color: var(--muted); }
.add-form { display: flex; gap: 10px; width: min(100%, 420px); }
.add-form input { flex: 1; min-width: 0; font: inherit; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--line-strong); -webkit-user-select: text; user-select: text; }

.levels { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; width: 100%; }
.game-card { display: grid; justify-items: center; gap: 6px; padding: 24px 16px; }
.game-card b { font-family: var(--font-display); font-size: 1.4rem; }
.game-card small { color: var(--muted); font-size: 1rem; }
.g1 { background: #ffe9ec; } .g2 { background: #e3f6ec; } .g3 { background: #e8edff; }
.plus { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; font-size: 48px; line-height: 1; border: 3px solid var(--ink); }
.it { width: 52px; height: 52px; }
.it.big { width: 76px; height: 76px; }

.game-top { display: flex; align-items: center; gap: 14px; width: 100%; }
.progress { flex: 1; height: 16px; border-radius: 999px; background: #fff; border: 2px solid var(--line-strong); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--pink)); border-radius: 999px; transition: width 400ms var(--ease); }
.score { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.question { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 200px; padding: 20px; border-radius: var(--r-card); background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow-1); }
.group { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 380px; padding: 8px; border-radius: var(--r-inner); border: 3px solid transparent; background: transparent; }
.group .it { transform: rotate(var(--r, 0deg)); transition: transform 250ms var(--ease); }
.group.pick { cursor: pointer; background: #f6f7ff; border-color: var(--line-strong); }
.group.pick:active { transform: scale(.97); }
.group.right { border-color: var(--green); background: var(--ok-bg); }
.group.wrong { border-color: var(--red); background: var(--bad-bg); animation: shake 380ms; }
.it.hl { transform: scale(1.35) rotate(0deg); filter: drop-shadow(0 4px 0 rgba(31,35,71,.25)); }
.num-badge { position: relative; }
.op { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; color: var(--muted); }
.qmark { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; border: 3px dashed var(--line-strong); font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--blue); }
.options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; }
.opt { min-height: 88px; border-radius: var(--r-inner); border: 3px solid var(--ink); background: #fff; font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; font-variant-numeric: tabular-nums; box-shadow: 0 5px 0 var(--ink); transition: transform 150ms var(--ease), box-shadow 150ms var(--ease), background-color 150ms; }
.opt:nth-child(1) { background: #ffe9ec; } .opt:nth-child(2) { background: #fff3c9; } .opt:nth-child(3) { background: #e3f6ec; } .opt:nth-child(4) { background: #e8edff; }
.opt:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.opt.right { background: var(--ok-bg); border-color: var(--ok-fg); box-shadow: 0 5px 0 var(--ok-fg); }
.opt.wrong { background: var(--bad-bg); border-color: var(--bad-fg); box-shadow: 0 5px 0 var(--bad-fg); animation: shake 380ms; }

.view#v-end { position: relative; min-height: 100%; align-content: center; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.end-card { position: relative; display: grid; gap: 14px; justify-items: center; padding: 28px 24px; width: min(100%, 520px); border-radius: var(--r-card); background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow-3); animation: pop 500ms cubic-bezier(.34,1.56,.64,1); }
.stars { display: flex; gap: 8px; }
.stars .it { width: 84px; height: 84px; animation: pop 600ms cubic-bezier(.34,1.56,.64,1) backwards; }
.stars .it.off { filter: grayscale(1); opacity: .3; }
.reward { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 18px; background: #fff7d6; border: 3px dashed var(--yellow); }
.reward span { font-size: 54px; line-height: 1; }
.end-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.dlg { width: min(92vw, 420px); padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: #fff; color: var(--ink); box-shadow: var(--shadow-3); }
.dlg::backdrop { background: rgba(31,35,71,.55); }
.dlg h2 { font-size: 1.7rem; margin-bottom: 8px; }
.lock-q { font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; text-align: center; margin: 12px 0; }
.lock-a { width: 100%; font: inherit; font-size: 1.8rem; text-align: center; padding: 12px; border-radius: 16px; border: 3px solid var(--line-strong); -webkit-user-select: text; user-select: text; }
.err { color: var(--bad-fg); font-weight: 800; }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.break { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: linear-gradient(160deg, #2b2d42, #4361ee); }
.break-card { text-align: center; color: #fff; padding: 28px; max-width: 520px; }
.break-card h2 { font-size: 2.4rem; margin: 6px 0; } .break-card p { font-size: 1.2rem; opacity: .9; margin: 0 0 24px; }
.break-emoji { font-size: 90px; } .break .btn { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; z-index: 120; max-width: 92vw; text-align: center; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 640px) { .options { grid-template-columns: repeat(2, 1fr); } .it { width: 44px; height: 44px; } .opt { min-height: 76px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

.g4 { background: #fff0d6; } .g5 { background: #f1e6ff; }
.plus.minus { background: var(--red); }
.game-card .pat { display: flex; gap: 2px; }
.game-card .pat .it { width: 40px; height: 40px; }
.it.gone { opacity: .22; filter: grayscale(1); transform: rotate(var(--r, 0deg)) scale(.85); }
.opt .it { width: 58px; height: 58px; vertical-align: middle; }
.opt.pic { display: grid; place-items: center; background: #fff !important; }
.seq { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.seq .it { width: 62px; height: 62px; }
.update-bar { position: fixed; z-index: 150; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: 94vw; }
.update-bar .btn { min-height: 44px; padding: 8px 20px; box-shadow: none; }

/* ---------- Main-Main additions ---------- */
.brand b { color: var(--purple); }
.g1 { background: #ffe9ec; } .g2 { background: #fff3c9; } .g3 { background: #e3f6ec; } .g4 { background: #f1e6ff; }
.ico-card { display: flex; gap: 4px; align-items: center; justify-content: center; min-height: 76px; }
.ico-card.big { font-size: 48px; line-height: 1; }
.pz { display: block; width: 36px; height: 36px; border-radius: 10px; border: 3px solid var(--ink); }
.pz.a { background: var(--red); } .pz.b { background: var(--yellow); margin-top: 10px; } .pz.c { background: var(--green); } .pz.d { background: var(--blue); margin-top: 10px; }
.lt { display: grid; place-items: center; width: 44px; height: 54px; border-radius: 10px; border: 3px solid var(--ink); background: #fff; font-family: var(--font-display); font-weight: 700; font-style: normal; font-size: 1.7rem; }
.bar { display: block; width: 26px; border-radius: 8px; border: 3px solid var(--ink); } .bar.r { height: 70px; background: var(--red); } .bar.y { height: 60px; background: var(--yellow); } .bar.g { height: 50px; background: var(--green); } .bar.b { height: 40px; background: var(--blue); }
.game-title { flex: 1; font-size: clamp(1.2rem, 4vw, 1.8rem); text-align: left; }
.stage-wrap { width: 100%; display: grid; gap: 18px; justify-items: center; }
.sub-title { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* puzzle picker + board */
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; width: 100%; }
.pic { padding: 6px; border: 3px solid var(--line-strong); border-radius: 20px; background: #fff; box-shadow: var(--shadow-1); transition: transform 150ms var(--ease); }
.pic:active { transform: scale(.96); }
.pic img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.note-card { padding: 14px 18px; border-radius: 18px; background: #e8edff; border: 2px solid #cfd8ff; font-weight: 800; max-width: 560px; }
.board { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; width: min(100%, 640px); aspect-ratio: var(--ar, 4 / 3); padding: 6px; border-radius: 22px; background: var(--ink); box-shadow: var(--shadow-3); touch-action: none; }
.tile { position: relative; overflow: hidden; border-radius: 8px; background: #fff; cursor: grab; touch-action: none; transition: transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.tile canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.tile.sel { box-shadow: 0 0 0 5px var(--yellow); transform: scale(.96); }
.tile.ok::after { content: ""; position: absolute; inset: 0; border: 4px solid var(--green); border-radius: 8px; pointer-events: none; }
.tile.drag { z-index: 5; opacity: .55; }
.peek { width: min(100%, 220px); border-radius: 14px; border: 3px solid var(--line-strong); }

/* memory */
.deck { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; width: min(100%, 640px); }
.card3d { position: relative; aspect-ratio: 1; perspective: 700px; border: 0; background: none; padding: 0; }
.card3d .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 380ms var(--ease); }
.card3d.up .in, .card3d.done .in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-size: clamp(2rem, 9vw, 3.6rem); }
.face.front { background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; font-family: var(--font-display); font-weight: 700; }
.face.back { background: #fff; transform: rotateY(180deg); }
.card3d.done .face.back { background: var(--ok-bg); border-color: var(--ok-fg); box-shadow: 0 4px 0 var(--ok-fg); }

/* spelling */
.word-pic { font-size: clamp(5rem, 22vw, 9rem); line-height: 1; }
.slots, .letters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.slot { display: grid; place-items: center; width: 64px; height: 76px; border-radius: 16px; border: 3px dashed var(--line-strong); background: #fff; font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; }
.slot.fill { border-style: solid; border-color: var(--ok-fg); background: var(--ok-bg); animation: pop 300ms cubic-bezier(.34,1.56,.64,1); }
.ltr { width: 68px; height: 80px; border-radius: 16px; border: 3px solid var(--ink); background: #fff; font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; box-shadow: 0 5px 0 var(--ink); transition: transform 150ms var(--ease); }
.ltr:nth-child(4n+1) { background: #ffe9ec; } .ltr:nth-child(4n+2) { background: #fff3c9; } .ltr:nth-child(4n+3) { background: #e3f6ec; } .ltr:nth-child(4n) { background: #e8edff; }
.ltr:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.ltr.used { visibility: hidden; }
.ltr.wrong { animation: shake 380ms; background: var(--bad-bg); }

/* xylophone */
.xylo { display: flex; align-items: flex-end; justify-content: center; gap: 8px; width: 100%; max-width: 720px; padding: 18px 14px 22px; border-radius: 28px; background: #8d5524; box-shadow: var(--shadow-3); }
.key { position: relative; flex: 1; min-width: 0; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform 90ms, filter 90ms; display: grid; align-content: end; justify-items: center; padding-bottom: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.key:nth-child(1) { height: 250px; background: #e63946; } .key:nth-child(2) { height: 232px; background: #ff7a59; } .key:nth-child(3) { height: 214px; background: #ffd23f; } .key:nth-child(4) { height: 196px; background: #b7e34b; }
.key:nth-child(5) { height: 178px; background: #52b788; } .key:nth-child(6) { height: 160px; background: #4cc9f0; } .key:nth-child(7) { height: 142px; background: #7b8cff; } .key:nth-child(8) { height: 124px; background: #c77dff; }
.key:active, .key.hit { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); filter: brightness(1.12); }
.key.glow { animation: glow 800ms ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 0 var(--ink), 0 0 0 0 rgba(255,255,255,0); } 50% { box-shadow: 0 6px 0 var(--ink), 0 0 0 12px rgba(255,255,255,.85); } }
.songs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) { .xylo { gap: 5px; padding: 12px 8px 16px; } .key { font-size: .9rem; } .slot { width: 52px; height: 64px; font-size: 2rem; } .ltr { width: 56px; height: 68px; font-size: 2rem; } }
.stars .star { font-size: 64px; line-height: 1; animation: pop 600ms cubic-bezier(.34,1.56,.64,1) backwards; }
.stars .star.off { filter: grayscale(1); opacity: .3; }

.chip-block { display: grid; gap: 8px; justify-items: center; width: 100%; }
.chip-block .sub-title { font-size: 1.1rem; color: var(--muted); }
.songs .chip { min-height: 46px; }

/* cat run */
.runner { display: block; width: 100%; max-width: 820px; aspect-ratio: 8 / 3; border-radius: var(--r-card); border: 3px solid var(--ink); box-shadow: var(--shadow-2); background: #dff1ff; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.run-help { color: var(--muted); text-align: center; }
@media (max-width: 640px) { .runner { aspect-ratio: 4 / 3; } }
.game-card.g5 { background: #e0f2ff; }

/* maze, sorting, clock, hijaiyah, doa */
.game-card.g6 { background: #e3f6ec; } .game-card.g7 { background: #fff3c9; } .game-card.g8 { background: #ffe9ec; } .game-card.g9 { background: #e0f2ff; } .game-card.g10 { background: #f1e6ff; }
.q-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; max-width: 760px; }
.q-opt { flex: 1 1 130px; max-width: 240px; min-height: 92px; display: grid; place-items: center; padding: 12px; border: 3px solid var(--ink); border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--ink); cursor: pointer; }
.q-opt.right { background: #cdf0df; }
.q-opt.wrong { animation: shake .35s; background: #ffe0e3; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.big-text { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.maze { width: min(100%, 460px, 56vh); aspect-ratio: 1; border: 4px solid var(--ink); border-radius: 14px; touch-action: none; }
.pad { display: grid; grid-template-columns: repeat(3, 68px); grid-auto-rows: 60px; gap: 8px; }
.pad-btn { border: 3px solid var(--ink); border-radius: 18px; background: var(--card); font-size: 1.6rem; box-shadow: 0 4px 0 var(--ink); touch-action: manipulation; }
.pad .d0 { grid-area: 1 / 2; } .pad .d3 { grid-area: 2 / 1; } .pad .d2 { grid-area: 2 / 2; } .pad .d1 { grid-area: 2 / 3; }
.sort-item .shape { width: 130px; height: 130px; }
.basket { display: grid; justify-items: center; gap: 6px; }
.basket .shape, .swatch { width: 62px; height: 62px; }
.swatch { display: block; border-radius: 50%; border: 3px solid var(--ink); }
.basket-name { font-weight: 700; }
.clock { width: min(100%, 270px); height: auto; }
.ar { font-family: "Amiri", "Noto Naskh Arabic", "Geeza Pro", serif; direction: rtl; }
.hj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; width: 100%; max-width: 720px; }
.hj { display: grid; justify-items: center; padding: 6px 4px 10px; border: 2px solid var(--line-strong); border-radius: 18px; background: var(--card); color: var(--ink); cursor: pointer; }
.hj-ch { font-size: 2.8rem; line-height: 1.5; }
.hj-name { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; }
.trace { width: min(100%, 420px, 55vh); aspect-ratio: 1; background: #fff; border: 4px solid var(--ink); border-radius: 24px; touch-action: none; }
.doa-list { display: grid; gap: 14px; width: 100%; max-width: 640px; }
.doa-card { padding: 16px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow-1); text-align: center; }
.doa-ar { display: block; font-size: 1.9rem; line-height: 2.1; }
.doa-rumi { display: block; font-weight: 700; }
.doa-mean { color: var(--muted); margin-top: 6px; }
.doa-choice { display: grid; gap: 4px; text-align: center; }
.q-opt:has(.doa-choice) { flex-basis: 100%; max-width: 640px; }
.stage-wrap { grid-template-columns: minmax(0, 1fr); }
.big-text { font-size: clamp(1.1rem, 5vw, 1.5rem); text-align: center; overflow-wrap: anywhere; }
.q-opt { min-width: 0; }
.maze { width: min(100%, 460px, 44vh); }
@media (max-width: 640px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .game-card { padding: 16px 8px; } .game-card b { font-size: 1.1rem; } }

/* warung saya */
.game-card.g11 { background: #ffe8c7; }
.cust { width: 108px; height: 108px; animation: hop .6s var(--ease); }
@keyframes hop { from { transform: translateX(-60px); opacity: 0; } }
.bubble, .bill { padding: 12px 22px; border: 3px solid var(--ink); border-radius: 22px; background: var(--card); text-align: center; }
.order-line { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 4px 0; }
.plate-holder { width: min(100%, 300px, 34vh); }
.plate { display: block; width: 100%; height: auto; }
.tick { padding: 4px 12px; border-radius: 99px; border: 2px dashed var(--line-strong); font-weight: 700; }
.tick.got { background: #cdf0df; border-style: solid; }
.tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 640px; }
.ing { display: grid; justify-items: center; align-content: center; gap: 2px; width: 96px; min-height: 88px; padding: 6px; border: 3px solid var(--ink); border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--ink); font-weight: 700; touch-action: manipulation; }
.ing-icon { font-size: 1.9rem; }
.ing.used { opacity: .35; box-shadow: none; }
.ing.wrong, .coin.wrong, .glass.wrong { animation: shake .35s; }
.jug { width: 40px; height: 52px; border: 3px solid var(--ink); border-radius: 8px 8px 14px 14px; }
.board-wood { display: grid; place-items: center; width: min(100%, 320px); height: 230px; border: 4px solid var(--ink); border-radius: 28px; background: #d9a066; }
.dough { width: 100px; height: 100px; border: 3px solid #b8935a; border-radius: 50%; background: #fbe7bd; transform: scale(var(--s, 1)); transition: transform 150ms var(--ease); cursor: pointer; touch-action: manipulation; }
.meter { width: min(100%, 320px); height: 18px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; background: var(--green); transition: width 180ms linear; }
.pan { display: grid; place-items: center; width: 230px; height: 230px; border-radius: 50%; background: #3a3d52; box-shadow: inset 0 0 0 12px #55596f, var(--shadow-2); }
.roti { width: 165px; height: 165px; border-radius: 46% 54% 50% 50%; background: #fbe7bd; transition: transform 300ms var(--ease), background 300ms; }
.roti.flipped { transform: rotate(180deg); }
.roti.golden { background: radial-gradient(circle at 35% 35%, #b9732c 0 9%, transparent 11%), radial-gradient(circle at 68% 62%, #b9732c 0 12%, transparent 14%), radial-gradient(circle at 40% 72%, #c98a3d 0 7%, transparent 9%), #eeb558; }
.glass { position: relative; width: 150px; height: 220px; border: 5px solid var(--ink); border-top-width: 0; border-radius: 0 0 34px 34px; background: #fff; overflow: hidden; }
.glass i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; }
.glass b { position: absolute; left: 0; right: 0; border-top: 4px dashed var(--ink); }
.pour { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.served { font-size: 3.6rem; margin: 0; }
.hearts { font-size: 2rem; }
.money-sum { font-family: var(--font-display); font-weight: 700; font-size: 2rem; margin: 0; }
.jar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 46px; }
.coin { display: grid; place-items: center; width: 88px; height: 88px; border: 4px solid var(--ink); border-radius: 50%; background: #ffd23f; color: var(--ink); box-shadow: 0 4px 0 var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; touch-action: manipulation; }
.coin.v2 { background: #bfe3ff; } .coin.v5 { background: #c9f0b8; }
.coin.small { width: 44px; height: 44px; border-width: 3px; box-shadow: none; font-size: 1.1rem; }

/* more warung dishes */
.grill { display: flex; justify-content: center; align-items: center; gap: 14px; width: min(100%, 340px); min-height: 190px; border-radius: 22px; border: 4px solid var(--ink); background: repeating-linear-gradient(0deg, #3a3d52 0 14px, #6b6f86 14px 18px); }
.stick { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 34px; padding-bottom: 36px; background: linear-gradient(#d9a066, #d9a066) center / 6px 100% no-repeat; }
.stick i { width: 30px; height: 34px; border-radius: 10px; background: #e79a7b; border: 2px solid var(--ink); }
.grill.half .stick i { background: #c46f3c; } .grill.done .stick i { background: #8a4318; }
.kuih-box { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 8px; width: min(100%, 320px); min-height: 130px; padding: 12px; border: 6px solid #c46f3c; border-radius: 18px; background: #fff6df; }
.kuih { font-size: 2.2rem; }
.bowl { display: flex; flex-direction: column-reverse; width: 190px; height: 150px; border: 5px solid var(--ink); border-radius: 14px 14px 90px 90px; background: #fff; overflow: hidden; }
.bowl i { height: 25%; flex: none; }
.ing[data-k]:disabled { opacity: .4; }
.game-card.g12 { background: #ffe9ec; } .game-card.g13 { background: #e3f6ec; } .game-card.g14 { background: #fff3c9; } .game-card.g15 { background: #e0f2ff; }
/* coding cat */
.code-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; width: min(100%, 400px, 42vh); padding: 8px; border: 4px solid var(--ink); border-radius: 18px; background: #bfe8a8; }
.code-grid.wrong { animation: shake .35s; }
.code-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: #fffdf5; font-size: min(7vw, 2.2rem); }
.code-cell.wall { background: #e9c79c; }
.code-hero { position: absolute; transform: scale(1.1); }
.code-cell:has(.code-hero) { position: relative; }
.code-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; width: 100%; max-width: 560px; min-height: 48px; }
.code-chip { padding: 4px 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); font-size: 1.3rem; font-weight: 700; }
.code-chip.now { background: var(--yellow); }
.tray .pad-btn { width: 64px; height: 58px; }
/* music studio */
.beats { display: grid; grid-template-columns: 44px repeat(8, minmax(0, 1fr)); gap: 5px; width: 100%; max-width: 640px; }
.beat-name { border: 0; background: none; font-size: 1.6rem; padding: 0; }
.beat { aspect-ratio: 1; min-width: 0; padding: 0; border: 2px solid var(--line-strong); border-radius: 10px; background: #fff; touch-action: manipulation; }
.beat.now { box-shadow: 0 0 0 3px var(--ink); }
.beat.on.r0 { background: var(--red); } .beat.on.r1 { background: var(--yellow); } .beat.on.r2 { background: var(--blue); } .beat.on.r3 { background: var(--pink); } .beat.on.r4 { background: var(--green); }
/* my village */
.village { position: relative; width: 100%; max-width: 760px; aspect-ratio: 4 / 3; border: 4px solid var(--ink); border-radius: 22px; overflow: hidden; background: linear-gradient(#bfe6ff 0 38%, #8fd16a 38% 100%); touch-action: none; }
.village.night { background: linear-gradient(#1f2760 0 38%, #3f7a48 38% 100%); }
.sky-light { position: absolute; top: 4%; right: 6%; width: 52px; height: 52px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 24px #ffd23f; }
.village.night .sky-light { background: #f4f1ff; box-shadow: inset -14px 0 0 #b9b5d6, 0 0 18px #f4f1ff; }
.river { position: absolute; left: -5%; right: -5%; bottom: 8%; height: 12%; background: #6cc4ee; transform: rotate(-3deg); }
.thing { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1; touch-action: none; cursor: grab; }
.thing.boing { animation: boing .45s; }
@keyframes boing { 40% { transform: translate(-50%, -80%) scale(1.15); } }
.palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; max-width: 760px; }
.pal { width: 50px; height: 50px; padding: 0; border: 2px solid var(--line-strong); border-radius: 14px; background: #fff; font-size: 1.7rem; }
.pal.on { border-color: var(--ink); background: var(--yellow); }
.report-tip { font-weight: 700; }
#stage [hidden] { display: none !important; }
@media (max-width: 640px) { .code-grid { width: min(100%, 330px, 36vh); } .tray .pad-btn { width: 54px; height: 50px; } .code-chip { font-size: 1.05rem; } .code-run { min-height: 54px; } }

/* warung: menu book and cooking tools */
.stall { font-size: clamp(1.8rem, 7.5vw, 3rem); text-align: center; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; width: 100%; max-width: 720px; }
.ing.dish { width: auto; min-height: 104px; text-align: center; line-height: 1.2; }
.vessel { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 6px; width: min(100%, 280px); min-height: 150px; padding: 18px; border: 5px solid var(--ink); border-radius: 22px 22px 110px 110px; font-size: 2.2rem; line-height: 1.1; }
.vessel.wok { background: radial-gradient(#6b6f89, #33364a); }
.vessel.soup { background: #fff4d6; box-shadow: inset 0 14px 0 #fff; }
.vessel.ice { border-radius: 110px 110px 34px 34px; background: linear-gradient(#fff, #d6f0ff); }
.vessel.apam { width: 220px; height: 220px; padding: 26px; border-radius: 50%; background: #eeb558; transition: height 300ms var(--ease), border-radius 300ms var(--ease); }
.vessel.apam.folded { height: 112px; padding: 8px 20px; overflow: hidden; border-radius: 120px 120px 16px 16px; }
.bit { animation: pop 300ms cubic-bezier(.34,1.56,.64,1); }
.jiggle { animation: jiggle 300ms; }
@keyframes jiggle { 25% { transform: translateY(-10px) rotate(-4deg); } 70% { transform: translateY(3px) rotate(4deg); } }
.board-wood, .food-row, .lekor, .shaver, .vessel { cursor: pointer; touch-action: manipulation; }
.food-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: min(100%, 320px); padding: 12px; border: 4px dashed var(--line-strong); border-radius: 22px; background: #fffdf5; font-size: 2.5rem; }
.food-row span { border-radius: 50%; transition: transform 200ms var(--ease), background-color 200ms; }
.food-row span.dipped { background: #ffe58a; transform: scale(1.12) rotate(-8deg); }
.fry-food { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; width: 170px; height: 170px; font-size: 2.8rem; line-height: 1.15; transition: transform 300ms var(--ease), filter 300ms; }
.fry-food.flipped { transform: rotate(180deg); }
.fry-food.golden { filter: sepia(.65) saturate(2) drop-shadow(0 0 9px #ffd23f); }
.lekor { display: flex; justify-content: center; align-items: center; min-height: 100px; max-width: 100%; }
.lekor i { width: min(30px, 7.4vw); height: 62px; border-block: 4px solid var(--ink); background: #9aa0ab; transition: margin 200ms var(--ease); }
.lekor i:first-child { border-left: 4px solid var(--ink); border-radius: 34px 0 0 34px; }
.lekor i:last-child { border-right: 4px solid var(--ink); border-radius: 0 34px 34px 0; }
.lekor i.cut { margin: 0 3px; border: 4px solid var(--ink); border-radius: 14px; background: #c3c8d1; }
.shaver { display: grid; justify-items: center; gap: 4px; font-size: 3rem; }
.shaver b { width: 220px; height: 120px; border: 4px solid var(--ink); border-radius: 110px 110px 20px 20px; background: radial-gradient(circle at 40% 35%, #fff 40%, #cdeeff); transform: scale(var(--s, .1)); transform-origin: bottom; transition: transform 200ms var(--ease); }
.burger, .cone { display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; }
.burger { width: min(100%, 250px); min-height: 200px; padding-bottom: 4px; border-bottom: 6px solid var(--ink); }
.burger i, .cone i { display: block; flex: none; border: 3px solid var(--ink); animation: pop 300ms cubic-bezier(.34,1.56,.64,1); }
.burger i { width: 190px; height: 24px; margin-top: 2px; border-radius: 12px; }
.burger .l-bunb { height: 30px; border-radius: 8px 8px 24px 24px; }
.burger .l-bunt { height: 46px; border-radius: 95px 95px 10px 10px; }
.burger .l-keju { width: 206px; height: 15px; border-radius: 4px; }
.burger .l-salad { width: 216px; height: 18px; border-radius: 99px; }
.cone { min-height: 270px; }
.cone-tip { flex: none; width: 0; height: 0; border-left: 46px solid transparent; border-right: 46px solid transparent; border-top: 92px solid #e0a458; }
.cone i { width: 92px; height: 66px; margin-bottom: -18px; border-radius: 50% 50% 40% 40%; }
.glass.pot { width: 240px; height: 160px; border-radius: 0 0 120px 120px; }
.fry-food.slices { gap: 8px; align-content: center; }
.fry-food.slices span { width: 40px; height: 46px; border: 3px solid var(--ink); border-radius: 50%; background: #b9b3aa; }
@media (max-width: 640px) { .tick { padding: 2px 8px; font-size: .85rem; } .tray .ing { width: 76px; min-height: 74px; } .tray .ing-icon { font-size: 1.6rem; } .burger { min-height: 190px; } }

/* number path: party board game */
.p-face { display: block; }
.party-counts, .party-boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 380px; }
.party-counts .chip { padding: 4px; font-size: 1.5rem; }
.party-boards { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 460px; }
.party-boards .chip { padding: 8px 4px; }
.buddies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 560px; }
.buddy { display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; padding: 10px 4px; border: 3px solid var(--line-strong); border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); transition: transform 150ms var(--ease); touch-action: manipulation; }
.buddy .p-face { width: min(100%, 76px); height: auto; aspect-ratio: 1; }
.buddy b { font-family: var(--font-display); font-size: 1.05rem; }
.buddy small { min-height: 1.4em; font-weight: 800; font-size: .74rem; white-space: nowrap; }
.buddy.on { border-color: var(--ink); background: #fff3c9; box-shadow: 0 5px 0 var(--ink); transform: translateY(-3px); }
.party { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: center; width: 100%; }
.party-hud { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; width: 100%; max-width: 760px; }
.pl { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 4px; border: 3px solid var(--c); border-radius: 18px; background: var(--card); transition: transform 200ms var(--ease); }
.pl .p-face { flex: none; width: 38px; height: 38px; }
.pl.now { border-color: var(--ink); background: #fff3c9; box-shadow: 0 5px 0 var(--c); transform: translateY(-3px); }
.pl-nums { display: grid; text-align: left; line-height: 1.2; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pl .bot { position: absolute; top: -10px; right: -2px; font-size: .85rem; }
.coin-dot { display: inline-block; width: .9em; height: .9em; margin-right: 4px; border: 2px solid var(--ink); border-radius: 50%; background: #ffd23f; vertical-align: -.08em; }
.party-board { position: relative; width: min(100%, 920px, max(250px, calc((100vh - 344px) * var(--ar)))); }
@supports (height: 100dvh) { .party-board { width: min(100%, 920px, max(250px, calc((100dvh - 344px) * var(--ar)))); } }
.map { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); border: 4px solid var(--ink); border-radius: 24px; box-shadow: var(--shadow-3); }
.map .num { font-family: var(--font-display); font-weight: 700; fill: var(--ink); }
.map .space { cursor: pointer; }
.map .space.next .dot { stroke: #7b2cbf; stroke-width: 10; animation: blink 600ms ease-in-out infinite alternate; }
@keyframes blink { to { stroke: #fff; } }
.map .star-ring { animation: blink-ring 700ms ease-in-out infinite alternate; }
@keyframes blink-ring { to { stroke: #fff; } }
.map .bob { animation: bob 900ms ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-10px) scale(1.1); } }
.map .float-text { font-family: var(--font-display); font-weight: 700; stroke: #fff; stroke-width: 9px; paint-order: stroke; animation: floatup 1.2s ease-out forwards; }
@keyframes floatup { to { transform: translateY(-70px); opacity: 0; } }
.party-over { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.party-over > * { pointer-events: auto; }
.p-banner { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 92%; padding: 12px 20px; border: 4px solid var(--ink); border-radius: 24px; background: #fff; box-shadow: 0 6px 0 var(--ink); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 4.8vw, 1.7rem); line-height: 1.25; text-align: center; animation: pop 400ms cubic-bezier(.34,1.56,.64,1); }
.p-banner .p-face { flex: none; width: 56px; height: 56px; }
.qblock { position: absolute; translate: -50% -50%; width: clamp(80px, 21vw, 118px); aspect-ratio: 1; padding: 0; border: 5px solid var(--ink); border-radius: 22px; background: linear-gradient(145deg, #ffe566, #ff9f00); box-shadow: 0 8px 0 #a86500; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.8rem, 12vw, 4.4rem); line-height: 1; text-shadow: 0 4px 0 var(--ink); animation: hover 700ms ease-in-out infinite alternate; touch-action: manipulation; }
@keyframes hover { from { transform: rotate(-5deg); } to { transform: translateY(8px) rotate(5deg); } }
.qblock.hit { background: linear-gradient(145deg, #ff8fd0, #9b5de5); animation: bonk 500ms ease-out; }
@keyframes bonk { 30% { transform: translateY(-14px) scale(1.35); } 65% { transform: translateY(4px) scale(.94); } }
.party-over > .p-count { align-self: end; pointer-events: none; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 17vw, 7rem); line-height: 1.2; text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 0 8px var(--ink); animation: pop 300ms cubic-bezier(.34,1.56,.64,1); }
.party-over > .big-star { pointer-events: none; font-size: clamp(6rem, 30vw, 11rem); line-height: 1; filter: drop-shadow(0 0 18px #fff); animation: spinpop 800ms cubic-bezier(.34,1.56,.64,1); }
@keyframes spinpop { from { transform: scale(.1) rotate(-360deg); } }
.p-card { display: grid; gap: 8px; justify-items: center; width: min(94%, 440px); max-height: 100%; overflow: auto; padding: 12px; border: 4px solid var(--ink); border-radius: 24px; background: #fff; box-shadow: var(--shadow-3); text-align: center; animation: pop 400ms cubic-bezier(.34,1.56,.64,1); }
.p-card-title { font-family: var(--font-display); font-size: clamp(1.15rem, 4.8vw, 1.7rem); line-height: 1.2; }
.p-art { font-size: clamp(1.3rem, 5.4vw, 2rem); line-height: 1.35; overflow-wrap: anywhere; }
.p-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.p-opt { min-width: 54px; min-height: 56px; padding: 2px 8px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--ink); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; touch-action: manipulation; }
.p-opt.right { background: #8fe3b0; }
.p-opt.wrong { background: #ffc9ce; animation: shake .35s; }
.party-says { min-height: 1.5em; margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; text-align: center; }
.party-act { min-width: min(100%, 260px); }
.party-act.off, .mini .btn.off, .party .btn.off { visibility: hidden; }

/* party mini-games */
.mini { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: center; width: 100%; max-width: 760px; }
.mini-field { position: relative; display: grid; place-items: center; width: 100%; height: max(220px, min(42vh, 380px)); overflow: hidden; border: 4px solid var(--ink); border-radius: 24px; background: linear-gradient(#aee2ff, #effaff); font-family: var(--font-display); font-weight: 700; font-size: 5.5rem; line-height: 1.1; }
.mini-field.sky { display: block; touch-action: none; }
.balloon { position: absolute; top: 100%; width: 66px; height: 80px; padding: 0; border: 3px solid var(--ink); border-radius: 50% 50% 48% 48% / 46% 46% 54% 54%; background: var(--c); box-shadow: inset -8px -10px 0 rgba(0,0,0,.16); font-size: 2.2rem; line-height: 1; animation: rise 3.8s linear forwards; touch-action: none; }
.balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 18px; background: var(--ink); }
.balloon.wobble { animation: rise 3.8s linear forwards, wob 350ms; }
.balloon.popped { animation-play-state: paused; scale: 1.6; opacity: 0; transition: scale 200ms, opacity 200ms; }
@keyframes rise { from { top: 100%; } to { top: -110px; } }
@keyframes wob { 30% { rotate: -16deg; } 70% { rotate: 16deg; } }
/* the balloons must keep floating even with reduced motion, or there is no game */
@media (prefers-reduced-motion: reduce) { .balloon { animation-duration: 3.8s !important; } }
.mini-field.track { align-content: space-evenly; gap: 8px; height: auto; min-height: 240px; padding: 10px; background: #a9e07a; font-size: 1.7rem; }
.lane { position: relative; width: 100%; height: 60px; border: 4px solid var(--c); border-radius: 99px; background: repeating-linear-gradient(90deg, #f6d199 0 22px, #eec283 22px 44px); }
.sprinter { position: absolute; top: 1px; left: calc(var(--p, 0) * (100% - 92px) + 4px); width: 50px; height: 50px; transition: left 150ms ease-out; }
.sprinter .p-face { width: 50px; height: 50px; }
.lane .flag { position: absolute; right: 12px; top: 10px; line-height: 1; }
.mini-field.heap { height: max(170px, min(32vh, 320px)); min-height: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; padding: 12px; font-size: clamp(2rem, 9vw, 3.2rem); }
.mini-field .answer { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); font-size: 8rem; animation: pop 300ms cubic-bezier(.34,1.56,.64,1); }
.mini-field.cloud { font-size: 7rem; }
.mini-field.cloud.lit { background: radial-gradient(#fff 15%, #ffe566); }
.mini-pads { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.mini-pads:empty { display: none; }
.mini-pad { display: grid; flex: 1 1 0; justify-items: center; align-content: center; gap: 2px; min-width: 68px; max-width: 180px; min-height: 108px; padding: 4px; border: 4px solid var(--ink); border-radius: 26px; background: var(--c); box-shadow: 0 6px 0 var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; text-shadow: 0 2px 0 var(--ink); touch-action: none; }
.mini-pad:active { translate: 0 4px; box-shadow: 0 2px 0 var(--ink); }
.mini-pad .p-face { width: 56px; height: 56px; pointer-events: none; }
.mini-pad.cpu { opacity: .6; box-shadow: none; cursor: default; }
.mini-pad.tally { min-height: 96px; cursor: default; }
.mini-pad.locked { opacity: .35; }
.mini-pad.won { outline: 6px solid #ffb703; outline-offset: 3px; }
.count-row { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; border: 4px solid var(--c); border-radius: 24px; background: #fff; }
.count-row .p-face { width: 40px; height: 40px; }
.count-row .p-opt { min-width: 50px; min-height: 46px; font-size: 1.45rem; touch-action: none; }
.count-row.wrong { background: #ffe0e3; animation: shake .35s; }
.count-row.won { background: #fff3c9; box-shadow: 0 0 0 5px #ffb703; }
.think { font-family: var(--font-display); }
.results { display: grid; gap: 8px; width: min(100%, 420px); }
.result { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border: 3px solid var(--c); border-radius: 20px; background: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; animation: pop 400ms cubic-bezier(.34,1.56,.64,1); }
.result .p-face { width: 46px; height: 46px; }
.result .who { flex: 1; text-align: left; }
.result.first { border-width: 5px; background: #fff3c9; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; width: 100%; max-width: 520px; padding-top: 10px; }
.place { display: grid; flex: 1 1 0; justify-items: center; max-width: 130px; animation: pop 600ms cubic-bezier(.34,1.56,.64,1) backwards; }
.place.n0 { animation-delay: 700ms; } .place.n1 { animation-delay: 350ms; }
.place .p-face { width: min(100%, 76px); height: auto; aspect-ratio: 1; }
.place .crown { min-height: 1.2em; font-size: 2.4rem; line-height: 1.2; }
.place .block { display: grid; justify-items: center; align-content: start; gap: 4px; width: 100%; padding-top: 8px; border: 4px solid var(--ink); border-radius: 16px 16px 0 0; background: var(--c); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-shadow: 0 2px 0 var(--ink); }
.place .block b { font-size: 2.2rem; line-height: 1; }
.place.n0 .block { height: 150px; } .place.n1 .block { height: 115px; } .place.n2 .block { height: 92px; } .place.n3 .block { height: 74px; }
/* the party gets more of the screen, and still fits on small phones */
#v-game:has(.party), #v-game:has(.buddies) { gap: 8px; padding: 10px 12px 10px; }
#stage:has(.buddies) { gap: 12px; }
@media (max-height: 760px) {
  #stage:has(.buddies) { gap: 7px; }
  #stage:has(.buddies) .sub-title { font-size: 1.2rem; }
  #stage:has(.buddies) .run-help { margin: 0; font-size: .95rem; }
  .party-counts .chip, .party-boards .chip { min-height: 42px; padding-block: 2px; }
  .buddy { padding-block: 5px; }
  .buddy .p-face { width: min(100%, 58px); }
  .party { gap: 6px; }
  .party-board { width: min(100%, 920px, max(240px, calc((100vh - 316px) * var(--ar)))); }
  .party-says { font-size: 1rem; }
  .party-act { min-height: 50px; }
  .mini { gap: 7px; }
  .mini .sub-title { font-size: 1.25rem; }
  .mini .run-help { margin: 0; }
  .mini-pads { gap: 6px; }
  .mini-pad { min-height: 84px; }
  .mini-pad .p-face { width: 44px; height: 44px; }
  .mini-field.track { gap: 5px; min-height: 0; padding: 6px 10px; }
  .lane { height: 54px; }
  .sprinter, .sprinter .p-face { width: 44px; height: 44px; }
  .mini-field.heap { height: 140px; font-size: 1.7rem; }
  .mini-field.heap .answer { font-size: 6rem; }
  .count-row { padding: 1px 8px; border-width: 3px; }
  .count-row .p-face { width: 32px; height: 32px; }
  .count-row .p-opt { min-height: 40px; font-size: 1.25rem; box-shadow: 0 3px 0 var(--ink); }
  .result { padding-block: 3px; }
}
/* warung on short phones: ingredients stay on the same screen as the pot */
@media (max-height: 760px) {
  #v-game:has(.ing), #v-game:has(.coin) { gap: 6px; padding-block: 8px; }
  #stage:has(.ing), #stage:has(.coin) { gap: 7px; }
  #stage:has(.ing) .sub-title, #stage:has(.coin) .sub-title { font-size: 1.15rem; }
  #stage:has(.tick) .songs { gap: 4px; }
  .tick { padding: 0 6px; font-size: .74rem; }
  .tray { gap: 6px; }
  .tray .ing { width: 64px; min-height: 56px; gap: 0; padding: 2px; border-radius: 14px; box-shadow: 0 3px 0 var(--ink); font-size: .72rem; line-height: 1.15; }
  .tray .ing-icon { font-size: 1.3rem; line-height: 1.25; }
  .tray .jug { width: 24px; height: 30px; }
  .vessel { width: min(100%, 220px); min-height: 92px; padding: 8px 14px; gap: 3px; font-size: 1.45rem; }
  .vessel.apam { width: 130px; height: 130px; padding: 14px; }
  .vessel.apam.folded { height: 72px; padding: 4px 14px; }
  .plate-holder { width: min(100%, 190px); }
  .burger { width: 180px; min-height: 124px; }
  .burger i { width: 128px; height: 13px; margin-top: 1px; border-width: 2px; }
  .burger .l-bunb { height: 16px; } .burger .l-bunt { height: 24px; } .burger .l-keju { width: 140px; height: 9px; } .burger .l-salad { width: 148px; height: 11px; }
  .cone { min-height: 150px; }
  .cone i { width: 56px; height: 38px; margin-bottom: -10px; border-width: 2px; }
  .cone-tip { border-left-width: 28px; border-right-width: 28px; border-top-width: 52px; }
  .bowl { width: 130px; height: 92px; }
  .kuih-box { min-height: 64px; padding: 4px; }
  .kuih { font-size: 1.4rem; line-height: 1.3; }
  #stage:has(.coin) .cust { width: 72px; height: 72px; }
  #stage:has(.coin) .order-line { margin: 0; font-size: 1rem; }
  #stage:has(.coin) .bill { padding: 6px 16px; }
  .money-sum { font-size: 1.5rem; }
  .coin { width: 72px; height: 72px; }
  .coin.small { width: 30px; height: 30px; font-size: .9rem; }
  .jar { min-height: 32px; }
}


/* animal clinic */
.game-card.g16 { background: #dff5ff; }
.patient { position: relative; flex: none; width: min(100%, 250px, 30vh); aspect-ratio: 1; }
.patient > .cust { width: 100%; height: 100%; }
.waiting .cust { width: 70px; height: 70px; }
.exam { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; }
.ing.hint { animation: hint 1s ease-in-out infinite; background: #fff3c9; }
@keyframes hint { 50% { transform: scale(1.08); } }
.ing.right { background: #cdf0df; }
.ing.wrong, .bone.wrong, .spoons.wrong, .tray.wrong { animation: shake .35s; }
.spot { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 0; border: 0; background: none; font-size: 1.9rem; line-height: 1; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.spot.gone { visibility: hidden; }
.rubbable { touch-action: none; user-select: none; -webkit-user-select: none; }
.spot.dirt::before { content: ''; width: 30px; height: 24px; border-radius: 52% 48% 44% 56%; background: #d6455d; border: 3px dotted #8e1f35; }
.spot.mud::before { content: ''; width: 40px; height: 34px; border-radius: 46% 54% 60% 40%; background: #7a5230; box-shadow: 8px 6px 0 -9px #7a5230, -4px -6px 0 -11px #7a5230; }
.spot.thorn::before { content: ''; width: 12px; height: 34px; background: #3f6b2f; clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 2px #fff); }
.spot.towel { width: 90px; height: 54px; margin: -27px 0 0 -45px; border: 3px solid var(--ink); border-radius: 16px; background: #d5f1ff; }
.flush { position: absolute; inset: 24% 12% 6%; border-radius: 50%; background: rgba(255, 70, 70, .55); pointer-events: none; filter: blur(10px); }
.sore { position: absolute; width: 28px; height: 20px; margin: -10px 0 0 -14px; border-radius: 50%; background: #e0475e; border: 3px dotted #8e1f35; }
.spot.target { width: 58px; height: 58px; margin: -29px 0 0 -29px; border: 3px dashed var(--ink); border-radius: 50%; font-size: 2.3rem; }
.spot.target.stuck { border: 0; }
.mouth { position: relative; display: flex; flex-direction: column; justify-content: space-between; flex: none; width: min(100%, 340px); height: min(250px, 38vh); padding: 14px 18px; border: 6px solid var(--ink); border-radius: 44% 44% 50% 50%; background: #a8324a; }
.teeth { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.teeth b { height: 62px; border: 3px solid var(--ink); border-radius: 6px 6px 18px 18px; background: #fffdf3; }
.teeth.low b { border-radius: 18px 18px 6px 6px; }
.thermo { display: flex; gap: 8px; height: min(220px, 30vh); }
.tube { position: relative; width: 30px; border: 4px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.tube i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--red); }
.marks { display: flex; flex-direction: column; justify-content: space-between; font-weight: 700; line-height: 1; }
.marks span { flex: 1; display: flex; align-items: center; }
.spoons { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 44px; font-size: 1.9rem; }
.foam { position: absolute; inset: 0; pointer-events: none; }
.foam i { position: absolute; width: 52px; height: 52px; margin: -26px 0 0 -26px; border: 2px solid #9fd6f5; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 35%, #e2f5ff 70%); }
.patient.wet { filter: saturate(.85); }
.film { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: min(100%, 380px); padding: 14px; border: 6px solid var(--ink); border-radius: 18px; background: #14213d; }
.bone { min-height: 74px; padding: 8px; border: 2px solid #4d6391; border-radius: 14px; background: #1d2f55; cursor: pointer; touch-action: manipulation; }
.bone svg { display: block; width: 100%; height: auto; }
.bone.found { border: 4px solid var(--yellow); }
.arm { position: relative; flex: none; width: min(100%, 330px); height: 110px; padding: 0; border: 4px solid var(--ink); border-radius: 60px 36px 36px 60px; background: #f2b880; overflow: hidden; cursor: pointer; touch-action: manipulation; }
.arm i { position: absolute; top: -12px; bottom: -12px; width: 17%; background: #fff; border: 3px solid #b9bfd6; transform: rotate(9deg); }
.plate-food { display: flex; justify-content: center; align-items: center; gap: 8px; width: min(100%, 280px); min-height: 64px; border: 4px solid var(--ink); border-radius: 50%; background: #fff; font-size: 2rem; }
#stage:has(.patient) .hearts { margin: 0; }
#stage:has(.hearts) .patient { width: min(100%, 205px, 25vh); }
#stage:has(.patient) .ing { width: 102px; padding: 6px 2px; }
#stage:has(.patient) .ing small { font-size: .8rem; line-height: 1.15; }
.gift { position: absolute; right: -6%; bottom: 2%; font-size: 3.6rem; animation: hop .6s var(--ease); }
@media (max-height: 760px) {
  #stage:has(.patient), #stage:has(.mouth), #stage:has(.film), #stage:has(.arm) { gap: 7px; }
  #stage:has(.patient) .sub-title, #stage:has(.mouth) .sub-title { font-size: 1.1rem; }
  #stage:has(.patient) .bubble { padding: 5px 14px; }
  #stage:has(.patient) .order-line { margin: 0; font-size: 1rem; }
  #stage:has(.patient) .ing { width: 90px; min-height: 68px; }
  #stage:has(.patient) .ing-icon { font-size: 1.4rem; }
  #stage:has(.patient) .tray { gap: 6px; }
  #stage:has(.patient) .hearts { margin: 0; font-size: 1.4rem; }
  .patient { width: min(100%, 170px, 25vh); }
  #stage:has(.plate-food) .patient { width: min(100%, 140px, 21vh); }
  .plate-food { min-height: 52px; }
  .waiting .cust { width: 56px; height: 56px; }
  #stage:has(.spoons) .money-sum { margin: 0; }
  #stage:has(.spoons) .spoons { min-height: 34px; font-size: 1.4rem; }
  .teeth b { height: 46px; }
}

/* 3D mall */
.game-card.g17 { background: #f3e3ff; }
.mall { position: relative; width: 100%; max-width: 1000px; height: 70vh; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; background: #cfe9ff; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mall-view { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.mall-hud { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; pointer-events: none; }
.mall-pill { pointer-events: auto; min-width: 48px; min-height: 44px; display: grid; place-items: center; padding: 4px 12px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
span.mall-pill { margin-right: auto; background: #fff3c9; }
.mall-pill.home.ready { background: #ffd23f; animation: hint 1s ease-in-out infinite; }
.mall-list { position: absolute; top: 60px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .8rem; pointer-events: none; }
.mall-list b { padding: 2px 8px; border-radius: 99px; background: var(--ink); color: #fff; }
.mall-list .tick { padding: 1px 8px; background: #fff; }
.mall-list .tick.got { background: #cdf0df; }
.mall-strip { position: absolute; left: 6px; right: 6px; bottom: 6px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mall-shop { display: grid; justify-items: center; gap: 0; min-width: 0; min-height: 52px; padding: 3px 0; border: 2px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); touch-action: manipulation; }
.mall-shop span { font-size: 1.35rem; line-height: 1.3; }
.mall-shop small { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .62rem; font-weight: 700; }
.mall-shop.till { background: #cdf0df; }
.mall-stick { position: absolute; left: 12px; bottom: 70px; width: 104px; height: 104px; border: 3px solid rgba(31,35,71,.55); border-radius: 50%; background: rgba(255,255,255,.45); touch-action: none; }
.mall-stick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border: 3px solid var(--ink); border-radius: 50%; background: #fff; pointer-events: none; }
.mall-action { position: absolute; right: 12px; bottom: 84px; max-width: calc(100% - 144px); min-height: 60px; }
.mall-action.hidden, .mall-panel.hidden { display: none; }
.mall-panel { position: absolute; left: 6px; right: 6px; bottom: 6px; max-height: calc(100% - 66px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 10px 14px; border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-2); }
.mall-panel > * { flex: none; }
.mall-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.mall-head h3 { flex: 1; margin: 0; text-align: center; font-size: 1.15rem; }
.mall-panel .tray { gap: 8px; }
.mall-item { position: relative; width: 94px; min-height: 90px; }
.mall-item small { font-size: .74rem; line-height: 1.1; text-align: center; }
.mall-item strong { font-family: var(--font-display); font-size: .9rem; }
.mall-item.on { background: #cdf0df; }
.mall-item .dot { position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 50%; }
.mall-item .count { position: absolute; top: -6px; right: -4px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-style: normal; font-weight: 700; }
.mall-panel .money-sum { margin: 0; font-size: 1.5rem; }
.mall-panel .run-help, .mall-panel .served { margin: 0; }
.mall-panel .served { font-size: 2.6rem; }
.mall-panel .coin { width: 72px; height: 72px; font-size: 1.1rem; }
.till-screen { padding: 4px 22px; border-radius: 12px; background: #14213d; color: #8ff0c8; }
.note { width: 112px; height: 62px; border: 3px solid var(--ink); border-radius: 12px; background: #bfe3ff; color: var(--ink); box-shadow: 0 4px 0 var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; touch-action: manipulation; }
.note.n5 { background: #c9f0b8; } .note.n10 { background: #ffc9c9; } .note.n20 { background: #ffd8a8; }
.slip { display: grid; gap: 2px; width: min(100%, 280px); padding: 10px 16px; border: 2px dashed var(--ink); border-radius: 8px; background: #fff; text-align: center; }
.slip span { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.slip i { font-style: normal; } .slip .sum { font-weight: 700; border-top: 1px solid var(--line); }
.mall.creating .mall-stick, .mall.creating .mall-strip, .mall.creating .mall-hud, .mall.creating .mall-list { display: none; }
.mall.creating .mall-panel { max-height: 58%; gap: 7px; }
.mall .chip.colour { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line-strong); }
.mall .chip.colour.on { box-shadow: 0 0 0 4px var(--ink); }
.mall.creating .chip:not(.colour) { min-height: 42px; padding: 5px 14px; }
.mall.creating .btn-xl { min-height: 48px; padding: 6px 20px; }
.mall.creating .songs { gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.mall.creating .chip:not(.colour) { padding: 5px 10px; font-size: .88rem; white-space: nowrap; }
.mall.creating .chip.colour { width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
.mall.creating .mall-head h3 { font-size: 1rem; }
#stage:has(.mall) { gap: 0; }
.mall-pill { white-space: nowrap; }
@media (max-width: 420px) { .mall-pill { padding: 4px 9px; font-size: .95rem; } .mall-shop small { font-size: .56rem; } }
@media (max-height: 760px) {
  .mall-panel { max-height: calc(100% - 12px); }
  .mall.creating .mall-panel { max-height: 66%; gap: 5px; padding: 6px 6px 8px; }
  .mall.creating .chip:not(.colour) { min-height: 38px; padding: 3px 8px; font-size: .8rem; }
  .mall.creating .chip.colour { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
  .mall.creating .songs { gap: 5px; padding: 3px; }
  .mall.creating .btn-xl { min-height: 44px; padding: 4px 18px; }
  .mall-panel .slip { padding: 6px 14px; gap: 0; }
  .mall-panel .slip span { font-size: .8rem; }
  .mall-panel .btn-xl { min-height: 50px; padding-top: 6px; padding-bottom: 6px; }
}

/* bigger mall: shop rail, map, rides */
.mall-strip { grid-template-columns: 54px minmax(0, 1fr) 54px; }
.mall-rail { display: flex; gap: 4px; min-width: 0; overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; }
.mall-rail .mall-shop { flex: 0 0 54px; }
.mall-shop.map { background: #fff3c9; }
.mall-map { position: absolute; right: 8px; top: 60px; width: 114px; padding: 0; border: 3px solid var(--ink); border-radius: 12px; background: #9fd193; overflow: hidden; line-height: 0; }
.mall-map canvas { width: 100%; height: auto; }
.mall-list { right: 132px; }
.mall.creating .mall-map, .mall.riding .mall-map, .mall.riding .mall-strip, .mall.riding .mall-stick { display: none; }
@media (min-width: 700px) { .mall-map { width: 180px; } .mall-list { right: 200px; } }
@media (max-width: 480px) { .mall-list .nm { display: none; } .mall-list .tick { font-size: 1.15rem; } }

/* 3D outdoor playground */
.game-card.g18 { background: #dcf7e6; }
.park-jump { position: absolute; right: 12px; bottom: 72px; width: 58px; height: 58px; min-width: 58px; min-height: 58px; padding: 0; font-size: 1.45rem; background: #fff3c9; }
.park .mall-action { right: 78px; bottom: 72px; max-width: calc(100% - 208px); }
.park.creating .park-jump, .park.riding .park-jump { display: none; }
.park-ridebar { position: absolute; left: 10px; right: 10px; bottom: 12px; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.park-ridebar.hidden { display: none; }
.park-ridebar > button { pointer-events: auto; min-height: 52px; }
.park-ridebar .park-boost.hidden { display: none; }
.park-ridebar .park-exit { background: #fff; }
.game-card.g19 { background: #fff0d4; }
.game-card.g20 { background: #d8f5ff; }
.game-card.g21 { background: #ffe0ef; }
.game-card.g22 { background: #eef7cf; }
.game-card.g23 { background: #ffe5d9; }
.game-card.g24 { background: #e2e4ff; }
.game-card.g25 { background: #d9f5d8; }
.game-card.g26 { background: #ffe8f2; }

/* Fullscreen 3D worlds (portrait & landscape on iPhone, iPad, Android, Desktop) */
.mall.fs { position: fixed; inset: 0; z-index: 80; width: 100vw; height: 100vh !important; height: 100dvh !important; max-width: none; border: 0; border-radius: 0; }
.mall.fs .mall-hud { top: calc(8px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); }
.mall.fs .mall-list { top: calc(58px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(130px + var(--safe-r)); }
.mall.fs .mall-map { top: calc(58px + var(--safe-t)); right: calc(8px + var(--safe-r)); }
.mall.fs .mall-strip { left: calc(6px + var(--safe-l)); right: calc(6px + var(--safe-r)); bottom: calc(6px + var(--safe-b)); }
.mall.fs .mall-stick { left: calc(12px + var(--safe-l)); bottom: calc(70px + var(--safe-b)); }
.mall.fs .park-jump { right: calc(12px + var(--safe-r)); bottom: calc(72px + var(--safe-b)); }
.mall.fs .mall-action { right: calc(12px + var(--safe-r)); bottom: calc(84px + var(--safe-b)); }
.mall.fs.park .mall-action { right: calc(78px + var(--safe-r)); bottom: calc(72px + var(--safe-b)); }
.mall.fs .park-ridebar { left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(12px + var(--safe-b)); }
.mall.fs .mall-panel { left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); max-height: calc(100% - 62px - var(--safe-t) - var(--safe-b)); }
.mall.fs.creating .mall-panel { max-height: 44%; gap: 0; padding: 8px 0 0; overflow: hidden; }
.mall.creating .mall-head { padding: 0 10px 6px; }
.creator-scroll { flex: 1 1 auto; min-height: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 2px 10px 10px; }
.creator-foot { flex: none; width: 100%; display: flex; justify-content: center; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--paper); border-top: 2px solid var(--line); }
.mall.creating .mall-ok { position: static; box-shadow: 0 4px 0 var(--ink); }
.mall:not(.fs) .mall-back { display: none; }
.mall-pill.fs-on { background: #cdf0df; }

@media (min-width: 700px) and (min-height: 540px) {
  .mall.fs .mall-list { right: calc(200px + var(--safe-r)); }
}
@media (max-width: 480px) {
  .mall-hud { gap: 4px; }
  .mall-pill { min-width: 34px; min-height: 38px; padding: 2px 7px; font-size: .84rem; border-width: 2.5px; }
  .mall.fs .mall-list { top: calc(52px + var(--safe-t)); }
  .mall.fs .mall-map { top: calc(52px + var(--safe-t)); width: 102px; }
  .mall.fs .mall-list { right: calc(116px + var(--safe-r)); }
}
@media (max-height: 520px) {
  /* Compact landscape HUD so the 3D world fills sideways phone screens */
  .mall.fs .mall-hud { gap: 5px; top: calc(6px + var(--safe-t)); }
  .mall.fs .mall-pill { min-width: 36px; min-height: 36px; padding: 2px 9px; font-size: .86rem; border-width: 2.5px; }
  .mall.fs .mall-list { top: calc(46px + var(--safe-t)); right: calc(112px + var(--safe-r)); font-size: .74rem; }
  .mall.fs .mall-list .nm { display: none; }
  .mall.fs .mall-map { top: calc(46px + var(--safe-t)); width: 96px; border-width: 2.5px; }
  .mall.fs .mall-strip .mall-shop { min-height: 44px; padding: 2px 0; border-radius: 12px; }
  .mall.fs .mall-strip .mall-shop span { font-size: 1.15rem; line-height: 1.15; }
  .mall.fs .mall-strip .mall-shop small { font-size: .54rem; }
  .mall.fs .mall-stick { width: 84px; height: 84px; bottom: calc(56px + var(--safe-b)); }
  .mall.fs .mall-stick i { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .mall.fs .park-jump { width: 48px; height: 48px; min-width: 48px; min-height: 48px; bottom: calc(56px + var(--safe-b)); font-size: 1.25rem; }
  .mall.fs .mall-action { bottom: calc(56px + var(--safe-b)); min-height: 46px; padding: 6px 16px; font-size: .95rem; }
  .mall.fs.park .mall-action { right: calc(66px + var(--safe-r)); bottom: calc(56px + var(--safe-b)); }
  .mall.fs .park-ridebar > button { min-height: 42px; padding: 6px 16px; font-size: .95rem; }
  .mall.fs.creating .mall-panel { left: 48%; max-height: calc(100% - 16px - var(--safe-t) - var(--safe-b)); padding: 6px 8px 8px; gap: 5px; }
  .park-side { bottom: calc(112px + var(--safe-b)); gap: 4px; }
  .park-mini { width: 38px; height: 38px; min-width: 38px; min-height: 38px; font-size: 1rem; }
}

/* Right-side compact Emote / Photo / Weather / Music dock + Photo Flash */
.park-side { position: absolute; right: 12px; bottom: 138px; display: flex; flex-direction: column; gap: 6px; z-index: 12; }
.mall.fs .park-side { right: calc(12px + var(--safe-r)); bottom: calc(138px + var(--safe-b)); }
.park-mini { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; font-size: 1.15rem; background: rgba(255,255,255,.92); }
.park.creating .park-side, .park.riding .park-side { display: none; }
.park-flash { position: absolute; inset: 0; z-index: 50; background: #fff; opacity: .85; pointer-events: none; }

