/* Layout: one phone-width column on a cool sky ground so orange Oyen pops; chunky toy-like buttons; bottom tab bar */
:root {
  --bg: #E3F2FA;          /* langit pagi */
  --bg-deep: #C8E4F2;
  --surface: #FFFFFF;
  --ink: #1B2A4A;         /* biru malam: teks */
  --muted: #5A6B88;
  --line: #B7D5E6;
  --oyen: #FF9A3C;        /* bulu Oyen: aksen utama */
  --oyen-dark: #D9711E;
  --leaf: #22A06B;        /* butang utama */
  --leaf-dark: #167A50;
  --mango: #FFC23D;       /* ganjaran */
  --mango-dark: #D99A0B;
  --hibiscus: #F2545B;
  --water: #2E9FD6;
  --orchid: #8B6CF6;
  --night: #1D2A5C;

  --f-display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-lg: 28px; --r-md: 18px; --r-sm: 12px;
  --pop: 0 6px 0 rgba(27, 42, 74, .16);
  color-scheme: light;
}
/* peranti lama tanpa emoji baharu (js/emojifix.js): fon emoji sandaran untuk semua teks */
:root.emo {
  --f-display: "Baloo 2", "Oyen Emoji", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", "Oyen Emoji", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.45;
  overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible { outline: 4px solid var(--water); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; margin: 0; text-wrap: balance; }
.center { text-align: center; }
[hidden] { display: none !important; }

#app { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; position: relative; }
.screen {
  flex: 1; display: flex; flex-direction: column; gap: 16px;
  padding-block: 14px 110px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  animation: rise .25s ease-out;
}
.screen.no-nav { padding-bottom: 24px; }
@keyframes rise { from { transform: translateY(8px) } to { transform: none } }
.h-big { font-size: 1.9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 22px; border-radius: 999px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem;
  background: var(--leaf); color: #fff; box-shadow: 0 5px 0 var(--leaf-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--leaf-dark); }
.btn.mango { background: var(--mango); color: var(--ink); box-shadow: 0 5px 0 var(--mango-dark); }
.btn.white { background: var(--surface); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn.ghost { background: transparent; color: var(--leaf-dark); box-shadow: none; min-height: 44px; }
.btn.block { width: 100%; }
.btn.small { min-height: 42px; font-size: .98rem; padding: 0 16px; }
.icon-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); box-shadow: 0 4px 0 var(--line); display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

/* ---------- welcome ---------- */
.welcome { justify-content: center; text-align: center; align-items: center; gap: 12px; }
.hero-oyen { position: relative; }
.hero-oyen::before { content: ""; position: absolute; inset: 12% 8% 4%; background: radial-gradient(circle, #FFE0BF 0 60%, transparent 61%); z-index: -1; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--ink); letter-spacing: .01em; }
.brand span { color: var(--oyen); }
.tagline { font-size: 1.08rem; color: var(--muted); max-width: 30ch; margin: 0; font-weight: 700; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero-badges span { background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .88rem; box-shadow: 0 3px 0 var(--line); }
.welcome .stack { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 340px; margin-top: 6px; }
.gbtn { background: var(--surface); color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.gbtn svg { width: 22px; height: 22px; }
.fine { font-size: .85rem; color: var(--muted); margin: 0; font-weight: 600; }
.lang-switch { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: 0 3px 0 var(--line); }
.lang-switch button { padding: 6px 14px; min-height: 40px; min-width: 44px; border-radius: 999px; font-weight: 800; font-size: .9rem; color: var(--muted); }
.lang-switch button.on { background: var(--ink); color: #fff; }

/* Oyen sizes & motion */
.oyen-big { width: min(230px, 62vw); height: auto; display: block; }
.oyen-mid { width: 160px; height: auto; display: block; margin: 0 auto; }
.oyen-mini { width: 96px; height: 96px; }
.oyen-tiny { width: 72px; height: 72px; flex: none; }
.bob { animation: bob 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%,100% { transform: none } 50% { transform: translateY(-5px) scale(1.01,.99) } }
.jump { animation: jump .6s ease-out; }
@keyframes jump { 35% { transform: translateY(-26px) scale(.96,1.05) } 70% { transform: scale(1.05,.95) } }
.eye-blink { animation: blink 4s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1) } 96% { transform: scaleY(.1) } }
.oy-tail { animation: tail 2s ease-in-out infinite; transform-origin: 140px 182px; }
@keyframes tail { 50% { transform: rotate(-8deg) } }

/* ---------- profiles ---------- */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row h1 { font-size: 1.85rem; }
.profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border-radius: var(--r-lg); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--pop); }
.pcard:active { transform: translateY(4px); }
.pcard b { font-family: var(--f-display); font-size: 1.3rem; }
.pcard small { color: var(--muted); font-weight: 700; }
.pcard.add { border: 3px dashed var(--line); background: transparent; box-shadow: none; justify-content: center; min-height: 170px; color: var(--leaf-dark); font-family: var(--f-display); font-size: 1.1rem; font-weight: 700; }
.pcard.add .plus { font-size: 2.6rem; line-height: 1; }
.form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--pop); }
.form label { font-weight: 800; display: flex; flex-direction: column; gap: 8px; }
.form input[type=text] { font: inherit; font-size: 1.2rem; padding: 14px 16px; border-radius: var(--r-md); border: 3px solid var(--line); background: var(--bg); color: var(--ink); }
.age-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.age-grid button { min-height: 52px; border-radius: var(--r-md); background: var(--bg); font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; border: 3px solid transparent; }
.age-grid button.on { background: var(--mango); border-color: var(--mango-dark); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.swatches button { width: 44px; height: 44px; border-radius: 50%; border: 4px solid transparent; }
.swatches button.on { border-color: var(--ink); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 8px; }
.who { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; box-shadow: 0 3px 0 var(--line); font-weight: 800; min-width: 0; }
.who .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--f-display); font-size: 1.05rem; flex: none; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9ch; }
.spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border-radius: 999px; padding: 6px 11px; font-weight: 800; box-shadow: 0 3px 0 var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .95rem; }
.chip.hot { background: #FFE7D1; box-shadow: 0 3px 0 #F5C49A; }

/* ---------- home room ---------- */
.room {
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 330px;
  background: linear-gradient(#FFE9D2 0 62%, #E9B98A 62% 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.06);
}
.room.night { background: linear-gradient(#2B3A70 0 62%, #5B4A6E 62% 100%); }
.room .window { position: absolute; top: 18px; left: 18px; width: 82px; height: 70px; border-radius: 12px; background: #BFE6FF; border: 6px solid #fff; display: grid; place-items: center; font-size: 2rem; }
.room.night .window { background: #16204A; }
.room .shelf { position: absolute; top: 34px; right: 22px; font-size: 2.4rem; }
.room .rug { position: absolute; bottom: 18px; left: 50%; width: 240px; height: 44px; margin-left: -120px; border-radius: 50%; background: #F2545B; opacity: .35; }
.room.night .rug { opacity: .2; }
.bubble { position: relative; background: var(--surface); border-radius: var(--r-md); padding: 10px 16px; font-weight: 800; font-size: 1.02rem; max-width: 92%; text-align: center; margin-bottom: 6px; box-shadow: 0 4px 0 rgba(0,0,0,.08); z-index: 1; }
.bubble::after { content: ""; position: absolute; bottom: -10px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: var(--surface); }
.oy-wrap { position: relative; z-index: 1; padding: 0; }
.fx { position: absolute; font-size: 2rem; pointer-events: none; animation: floatup 1.2s ease-out forwards; z-index: 2; }
@keyframes floatup { from { transform: translateY(0) scale(.7); opacity: 1 } to { transform: translateY(-130px) scale(1.25); opacity: 0 } }

.stage-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-md); padding: 12px 16px; box-shadow: 0 4px 0 var(--line); }
.stage-card .lvl { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; }
.stage-card small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.bar { height: 12px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; display: block; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--leaf); transition: width .5s; }
.bar.mango > i { background: var(--mango); }
.bar.water > i { background: var(--water); }
.bar.pink > i { background: var(--hibiscus); }
.needs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.need { background: var(--surface); border-radius: var(--r-md); padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: var(--pop); font-weight: 800; }
.need:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(27,42,74,.16); }
.need .ico { font-size: 2rem; line-height: 1; }
.need .bar { width: 100%; height: 9px; }
.need small { color: var(--muted); font-size: .78rem; }
.cta-play { min-height: 76px; flex-direction: column; gap: 0; font-size: 1.5rem; }
.cta-play small { font-family: var(--f-body); font-size: .9rem; font-weight: 800; opacity: .8; }

.panel { background: var(--surface); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 0 var(--line); }
.panel h2 { font-size: 1.3rem; }
.panel .sub { color: var(--muted); font-size: .92rem; margin: 0; }
.mrow { display: flex; align-items: center; gap: 12px; }
.mrow b { display: block; font-size: .98rem; margin-bottom: 6px; }
.mrow.done { opacity: .55; }
.mrew { font-weight: 800; color: var(--muted); white-space: nowrap; }
.mdone { width: 36px; height: 36px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-weight: 900; }
.claim { animation: wiggle 1.2s infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0) } 85% { transform: rotate(-6deg) } 90% { transform: rotate(6deg) } 95% { transform: rotate(-3deg) } }

/* ---------- map ---------- */
.worlds { display: flex; flex-direction: column; gap: 12px; }
.wcard { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 16px 12px 12px; border-radius: var(--r-lg); background: var(--ws); box-shadow: 0 5px 0 var(--wc); border: 3px solid var(--wc); }
.wcard:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wc); }
.wcard.locked { filter: grayscale(.85); opacity: .7; }
.wicon { flex: none; width: 64px; height: 64px; border-radius: 20px; background: var(--surface); display: grid; place-items: center; font-size: 2.2rem; }
.winfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.winfo small { color: var(--muted); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.winfo b { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.1; }
.wstars { font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wstars small { color: var(--muted); }

.world-screen { background: linear-gradient(var(--ws), var(--bg) 70%); }
.wtitle { flex: 1; min-width: 0; }
.wtitle small { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.wtitle h1 { font-size: 1.5rem; }
.path { position: relative; display: flex; flex-direction: column; gap: 4px; padding-block: 8px; }
.pnode { display: flex; align-items: center; gap: 12px; position: relative; }
.pnode.l { padding-right: 34%; } .pnode.c { padding-inline: 17%; } .pnode.r { padding-left: 34%; flex-direction: row-reverse; text-align: right; }
.gnode {
  flex: none; position: relative; width: 84px; height: 84px; border-radius: 50%;
  background: var(--surface); border: 5px solid var(--wc); box-shadow: 0 6px 0 var(--wc);
  display: grid; place-items: center;
}
.gnode:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--wc); }
.gnode .gi { font-size: 2.3rem; line-height: 1; }
.gnode .num { position: absolute; top: -8px; left: -8px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 900; display: grid; place-items: center; }
.gnode .lock { position: absolute; bottom: -6px; right: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; font-size: .9rem; }
.pnode.locked .gnode { filter: grayscale(1); opacity: .6; }
.pnode.boss .gnode { width: 108px; height: 108px; background: #FFF6DB; border-color: var(--mango-dark); box-shadow: 0 7px 0 var(--mango-dark); }
.pnode.boss .gi { font-size: 3rem; }
.pnode.here .gnode { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 6px 0 var(--wc), 0 0 0 0 rgba(255,154,60,.6) } 50% { box-shadow: 0 6px 0 var(--wc), 0 0 0 14px rgba(255,154,60,0) } }
.gnode .you { position: absolute; top: -46px; right: -30px; width: 58px; height: 58px; }
.gnode .you svg { width: 100%; height: 100%; }
.gl { min-width: 0; display: flex; flex-direction: column; }
.gl b { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.15; }
.gl .st { color: var(--mango-dark); letter-spacing: 2px; }
.gl small { color: var(--muted); font-weight: 700; font-size: .78rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; width: 100%; }
.row .btn { flex: 1; min-width: 130px; }

/* ---------- game ---------- */
.game { padding-bottom: 24px; gap: 12px; overflow-x: clip; }
.game-top { display: flex; align-items: center; gap: 8px; }
.gbar { flex: 1; height: 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 3px var(--line); overflow: hidden; }
.gbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mango), var(--oyen)); border-radius: 999px; transition: width .35s; }
.timer.low { background: #FFE1E2; color: var(--hibiscus); animation: beat .5s infinite; }
@keyframes beat { 50% { transform: scale(1.1) } }
.prompt { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-md); padding: 8px 10px 8px 6px; box-shadow: 0 4px 0 var(--line); }
.oy-mini { flex: none; width: 58px; height: 58px; }
.oy-mini svg { width: 100%; height: 100%; }
.oy-mini.hop { animation: jump .5s; }
.prompt p { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.22rem; line-height: 1.2; flex: 1; min-width: 0; }
.prompt .say { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--water); color: #fff; display: grid; place-items: center; font-size: 1.25rem; box-shadow: 0 4px 0 #1B78A6; }
.playarea { display: flex; flex-direction: column; gap: 14px; }
.combo { position: fixed; top: 34%; left: 50%; transform: translateX(-50%); z-index: 30; pointer-events: none; font-family: var(--f-display); font-weight: 800; font-size: 2.2rem; color: var(--oyen); text-shadow: 2px 0px 0 #fff, -2px 0px 0 #fff, 0px 2px 0 #fff, 0px -2px 0 #fff, 1.4px 1.4px 0 #fff, -1.4px 1.4px 0 #fff, 1.4px -1.4px 0 #fff, -1.4px -1.4px 0 #fff, 0 5px 0 var(--oyen-dark); white-space: nowrap; opacity: 0; }
.combo.pop { animation: combo .9s ease-out; }
@keyframes combo { 0% { opacity: 0; transform: translateX(-50%) scale(.4) } 25% { opacity: 1; transform: translateX(-50%) scale(1.2) } 70% { opacity: 1; transform: translateX(-50%) scale(1) } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px) } }
.floater { position: fixed; z-index: 40; pointer-events: none; transform: translateX(-50%); font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; color: var(--leaf); text-shadow: 1.5px 0px 0 #fff, -1.5px 0px 0 #fff, 0px 1.5px 0 #fff, 0px -1.5px 0 #fff, 1.0px 1.0px 0 #fff, -1.0px 1.0px 0 #fff, 1.0px -1.0px 0 #fff, -1.0px -1.0px 0 #fff; animation: flo .9s ease-out forwards; }
.floater.hot { color: var(--oyen); font-size: 1.9rem; }
@keyframes flo { to { transform: translate(-50%, -70px); opacity: 0 } }
.confetti { position: fixed; z-index: 60; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; animation: conf 1.2s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes conf { to { transform: translate(var(--dx), calc(var(--dy) + 220px)) rotate(var(--r)); opacity: 0 } }
.count-in { min-height: 320px; display: grid; place-items: center; }
.count-in span { font-family: var(--f-display); font-weight: 800; font-size: 6rem; color: var(--oyen); animation: pop .6s; }

.stagebox { min-width: 0; max-width: 100%; overflow: hidden; background: var(--surface); border-radius: var(--r-lg); padding: 16px 12px; min-height: 150px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; box-shadow: inset 0 0 0 4px var(--bg-deep); font-size: 2.4rem; line-height: 1.1; text-align: center; }
.stagebox .emo { font-size: 5.2rem; line-height: 1; width: 100%; }
.stagebox .emo.sm { font-size: 3.6rem; }
.stagebox .eq { font-family: var(--f-display); font-weight: 800; font-size: 2.5rem; font-variant-numeric: tabular-nums; }
.stagebox em, .eq em { color: var(--oyen-dark); font-style: normal; }
.stagebox .basket { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px; border-radius: var(--r-sm); background: #FFF1CC; font-size: 1.45rem; max-width: 118px; justify-content: center; }
.stagebox .gone { opacity: .25; filter: grayscale(1); position: relative; }
.stagebox .mini, .opt .mini { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: 1.6rem; }
.tiles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; width: 100%; }
.tiles span { width: 46px; height: 54px; border-radius: var(--r-sm); background: var(--bg); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; }
.tiles span.blank { background: #FFF1CC; box-shadow: inset 0 0 0 3px var(--mango); color: var(--mango-dark); }
.seq { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; align-items: center; }
.seq span { min-width: 44px; height: 54px; padding: 0 4px; border-radius: var(--r-sm); background: var(--bg); display: grid; place-items: center; font-size: 1.7rem; font-family: var(--f-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.seq span.q { background: #FFF1CC; box-shadow: inset 0 0 0 3px var(--mango); color: var(--mango-dark); }
.coin { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF0B3, #E8B52E 70%); border: 3px solid #C99316; font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; line-height: .9; color: #6B4A00; }
.coin small { font-size: .62rem; display: block; }
.coin.c5, .coin.c10 { background: radial-gradient(circle at 35% 30%, #fff, #B9C3CF 70%); border-color: #8C98A6; color: #3D4652; }
.note { display: inline-grid; place-items: center; height: 58px; padding: 0 14px; border-radius: 8px; background: #7BC67E; border: 3px solid #4D9A52; color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; }
.frac { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--f-display); font-weight: 800; line-height: 1; font-size: 1.6rem; vertical-align: middle; }
.frac i { width: 28px; height: 3px; background: currentColor; margin: 3px 0; border-radius: 2px; }
.dots { font-size: 1rem; letter-spacing: 1px; color: var(--oyen-dark); word-break: break-all; line-height: 1.1; max-width: 90px; display: inline-block; }

.options { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 12px; }
.opt { min-height: 82px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--pop); display: grid; place-items: center; padding: 8px; font-family: var(--f-display); font-weight: 800; font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1.1; text-align: center; }
.opt.txt { font-size: 1.15rem; font-family: var(--f-body); font-weight: 900; }
.opt svg { max-width: 76px; max-height: 76px; }
.opt:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(27,42,74,.16); }
.opt.right { background: var(--leaf); color: #fff; box-shadow: 0 6px 0 var(--leaf-dark); animation: pop .35s; }
.opt.wrong { background: #FFE1E2; color: var(--hibiscus); animation: shake .35s; pointer-events: none; opacity: .65; }
.opt.odd { min-height: 110px; }
.why { text-align: center; font-weight: 800; color: var(--leaf-dark); margin: 0; min-height: 1.4em; }
@keyframes shake { 0%,100% { transform: translateX(0) } 25% { transform: translateX(-8px) } 75% { transform: translateX(8px) } }
@keyframes pop { 0% { transform: scale(.6) } 60% { transform: scale(1.15) } 100% { transform: scale(1) } }

/* item sizes shared by engines */
.it { display: inline-block; line-height: 1; font-family: var(--f-display); font-weight: 800; }
.it.emo { font-size: 2.4rem; } .it.l { font-size: 2.2rem; } .it.m { font-size: 1.6rem; } .it.s { font-size: 1.15rem; } .it.xs { font-size: .95rem; }
.it.svg svg { width: 64px; height: 64px; }

/* arena: balloons & falling */
.arena { position: relative; height: min(60vh, 500px); border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(#BFE6FF, #E8F7FF); box-shadow: inset 0 0 0 4px var(--bg-deep); touch-action: none; }
.arena.catch { background: linear-gradient(#E8F7FF, #D3F0DF); }
.arena.catch::after { content: "🧺"; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 2.6rem; opacity: .6; }
.balloon, .faller { position: absolute; width: 19%; aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; animation-timing-function: linear; animation-fill-mode: forwards; }
.balloon { bottom: -24%; animation-name: rise-up; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.6) 0 12%, transparent 13%), var(--bc); box-shadow: inset -6px -8px 0 rgba(0,0,0,.12); color: #fff; }
.balloon::after { content: ""; position: absolute; top: 100%; left: 50%; width: 2px; height: 34px; background: rgba(27,42,74,.35); }
.balloon .it { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.22); }
@keyframes rise-up { to { transform: translateY(calc(-1 * min(60vh, 500px) - 140%)) } }
.faller { top: -20%; animation-name: fall; border-radius: 22px; background: var(--surface); box-shadow: 0 4px 0 var(--line); }
@keyframes fall { to { transform: translateY(calc(min(60vh, 500px) + 140%)) rotate(20deg) } }
.balloon.burst, .faller.burst { animation: burst .3s forwards !important; }
@keyframes burst { to { transform: scale(1.6); opacity: 0 } }
.balloon.bad, .faller.bad { filter: grayscale(1); animation: shake .3s !important; }
.goal-line { display: none; }

/* whack */
.holes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: var(--r-lg); background: #9ED69F; box-shadow: inset 0 0 0 4px #7CC07E; }
.hole { position: relative; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(ellipse at 50% 70%, #5B3B22 0 46%, #7A5232 47% 58%, transparent 59%); overflow: hidden; max-width: 100%; }
.mole { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transform: translateY(100%); transition: transform .16s ease-out; padding-bottom: 8%; }
.mole.up { transform: translateY(0); }
.mole .mouse { font-size: 2.4rem; line-height: 1; }
.mole .sign { background: var(--surface); border-radius: 12px; padding: 2px 8px; min-width: 60%; box-shadow: 0 3px 0 var(--line); margin-top: -6px; }
.mole .sign .it.emo { font-size: 1.6rem; } .mole .sign .it.l { font-size: 1.6rem; } .mole .sign .it.m { font-size: 1.15rem; } .mole .sign .it.s, .mole .sign .it.xs { font-size: .85rem; }
.mole.bonk .mouse { transform: scaleY(.6); }
.mole.bonk .sign { background: var(--leaf); color: #fff; }
.mole.nope .sign { background: #FFE1E2; }

/* memory */
.mem { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 10px; perspective: 800px; }
.card { aspect-ratio: 3 / 4; position: relative; transform-style: preserve-3d; transition: transform .35s; max-width: 100%; }
.card.up { transform: rotateY(180deg); }
.card .f, .card .b { position: absolute; inset: 0; border-radius: var(--r-md); backface-visibility: hidden; display: grid; place-items: center; padding: 4px; }
.card .f { background: var(--oyen); box-shadow: inset 0 0 0 5px var(--oyen-dark); font-size: 1.8rem; }
.card .b { background: var(--surface); transform: rotateY(180deg); box-shadow: inset 0 0 0 4px var(--line); overflow: hidden; }
.card .b svg { max-width: 100%; height: auto; }
.card.got .b { box-shadow: inset 0 0 0 5px var(--mango); background: #FFF6DB; }

/* match columns */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.match .col { display: flex; flex-direction: column; gap: 10px; }
.mt { min-height: 66px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--pop); display: grid; place-items: center; padding: 6px; }
.mt svg { max-height: 64px; width: auto; }
.mt.sel { background: #FFF1CC; box-shadow: 0 6px 0 var(--mango-dark), inset 0 0 0 3px var(--mango); }
.mt.ok { background: var(--leaf); color: #fff; box-shadow: 0 6px 0 var(--leaf-dark); opacity: .85; }
.mt.ok .dots { color: #fff; }
.mt.wrong { animation: shake .35s; background: #FFE1E2; }
.mt.hint { animation: shake .35s; }

/* order / spell */
.slots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; width: 100%; }
.slot { min-width: 44px; height: 52px; padding: 0 6px; border-radius: var(--r-sm); background: var(--bg); box-shadow: inset 0 0 0 3px var(--line); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; }
.slot.on { background: var(--leaf); color: #fff; box-shadow: none; animation: pop .3s; }
.slot.given { background: var(--water); }
.bubbles { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 6px 0; }
.nb { min-width: 80px; height: 80px; padding: 0 12px; border-radius: 40px; background: var(--surface); box-shadow: var(--pop); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.nb.s, .nb.xs { font-size: 1.05rem; height: 64px; border-radius: 32px; }
.nb.ok { background: var(--leaf); color: #fff; box-shadow: 0 6px 0 var(--leaf-dark); pointer-events: none; opacity: .5; }
.nb.bad, .tile.bad { animation: shake .35s; background: #FFE1E2; }
.tilebank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tile { width: 62px; height: 66px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--pop); font-family: var(--f-display); font-weight: 800; font-size: 2rem; }
.tile.used { visibility: hidden; }

/* sort */
.sortstage { min-height: 200px; display: grid; place-items: center; background: var(--surface); border-radius: var(--r-lg); box-shadow: inset 0 0 0 4px var(--bg-deep); }
.sortitem .it.emo { font-size: 5rem; } .sortitem .it.l, .sortitem .it.m { font-size: 4rem; }
.sortitem .it.svg svg { width: 120px; height: 120px; }
.sortitem.in { animation: pop .35s; }
.sortitem.fly { animation: dive .35s forwards; }
.sortitem.shake { animation: shake .35s; }
@keyframes dive { to { transform: translateY(160px) scale(.3); opacity: 0 } }
.bins { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 10px; }
.bin { min-height: 104px; border-radius: var(--r-md); background: #FFF1CC; box-shadow: 0 6px 0 var(--mango-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; font-weight: 900; }
.bin .lid { font-size: 2rem; }
.bin .lb { display: flex; align-items: center; gap: 6px; font-size: .95rem; text-align: center; justify-content: center; flex-wrap: wrap; }
.bin .lb svg { width: 22px; height: 22px; }
.bin.gulp { animation: pop .35s; }
.sw { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }

/* true / false */
.stagebox.tf { min-height: 190px; }
.stmt { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; max-width: 100%; overflow-wrap: anywhere; font-family: var(--f-display); font-weight: 800; font-size: clamp(1.4rem, 8vw, 2.2rem); font-variant-numeric: tabular-nums; }
.stmt .coin { width: 52px; height: 52px; font-size: 1.1rem; }
.stagebox.flash { animation: flash .3s; }
@keyframes flash { from { opacity: .3; transform: translateY(6px) } to { opacity: 1; transform: none } }
.tfbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tfb { min-height: 110px; border-radius: var(--r-lg); font-size: 3rem; font-weight: 900; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.tfb small { font-size: 1rem; font-family: var(--f-display); margin-top: 4px; }
.tfb.yes { background: var(--leaf); box-shadow: 0 7px 0 var(--leaf-dark); }
.tfb.no { background: var(--hibiscus); box-shadow: 0 7px 0 #C23A40; }
.tfb:active { transform: translateY(5px); box-shadow: none; }

/* simon */
.simon-status { text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; }
.pads { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 14px; }
.pad { aspect-ratio: 1; max-width: 100%; border-radius: 28px; background: var(--pc); box-shadow: 0 7px 0 rgba(0,0,0,.18); opacity: .75; transition: transform .1s, opacity .1s, filter .1s; display: grid; place-items: center; }
.pad .it.emo { font-size: 3rem; }
.pad.lit { opacity: 1; transform: scale(1.06); filter: brightness(1.2) drop-shadow(0 0 16px var(--pc)); }
.lives { text-align: center; font-size: 1.5rem; letter-spacing: 4px; }

/* seek */
.seekgrid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 6px; background: var(--surface); border-radius: var(--r-lg); padding: 10px; box-shadow: inset 0 0 0 4px var(--bg-deep); }
.sk { aspect-ratio: 1; max-width: 100%; border-radius: 12px; font-size: clamp(1.3rem, 7vw, 2.3rem); display: grid; place-items: center; background: var(--bg); }
.sk.ok { background: var(--leaf); animation: pop .3s; }
.sk.bad { animation: shake .35s; background: #FFE1E2; }

/* ---------- result ---------- */
.result { align-items: center; text-align: center; gap: 12px; padding-bottom: 28px; background: radial-gradient(circle at 50% 18%, #FFE9D2, var(--bg) 60%); }
.result h1 { font-size: 2.4rem; }
.record { background: var(--mango); padding: 6px 16px; border-radius: 999px; font-family: var(--f-display); font-weight: 800; animation: pop .5s, wiggle 1.4s .5s infinite; box-shadow: 0 4px 0 var(--mango-dark); }
.big-stars { font-size: 3.2rem; letter-spacing: 6px; }
.big-stars .off { filter: grayscale(1); opacity: .25; }
.big-stars span { display: inline-block; animation: pop .5s backwards; }
.big-stars span:nth-child(2) { animation-delay: .2s } .big-stars span:nth-child(3) { animation-delay: .4s }
.res-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.res-stats div { background: var(--surface); border-radius: var(--r-md); padding: 8px; box-shadow: 0 4px 0 var(--line); }
.res-stats small { display: block; color: var(--muted); font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.res-stats b { font-family: var(--f-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.reward { display: inline-flex; gap: 8px; align-items: center; justify-content: center; background: var(--surface); border-radius: 999px; padding: 8px 18px; font-weight: 900; font-size: 1.1rem; box-shadow: 0 4px 0 var(--line); }
.reward.big { font-size: 1.3rem; }
.chest-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chest { font-size: 4.6rem; line-height: 1; width: 120px; height: 120px; border-radius: 30px; background: #FFF1CC; box-shadow: 0 7px 0 var(--mango-dark); animation: wiggle 1.3s infinite; display: grid; place-items: center; }
.chest.gold { background: #FFE38A; box-shadow: 0 7px 0 var(--mango-dark), 0 0 0 8px rgba(255,194,61,.3); }
.chest.boss { background: #FFD24D; box-shadow: 0 7px 0 #B8860B, 0 0 0 10px rgba(255,194,61,.45); }
.chest.shake { animation: rattle .7s; }
@keyframes rattle { 0%,100% { transform: none } 20% { transform: rotate(-12deg) scale(1.05) } 40% { transform: rotate(12deg) scale(1.1) } 60% { transform: rotate(-12deg) scale(1.15) } 80% { transform: rotate(10deg) scale(1.2) } }
.reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: pop .5s; }
.reveal small { color: var(--muted); font-weight: 800; }
.gift { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.gift h2 { font-size: 1.8rem; }
.streak-txt { font-weight: 900; font-size: 1.15rem; color: var(--oyen-dark); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
.week span { aspect-ratio: 1; border-radius: 12px; background: var(--surface); display: grid; place-items: center; font-weight: 900; color: var(--muted); box-shadow: 0 3px 0 var(--line); max-width: 100%; }
.week span.on { background: #FFE7D1; font-size: 1.2rem; }

/* ---------- collection ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tabs button { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--surface); font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.tabs button.on { background: var(--ink); color: #fff; box-shadow: none; }
.tabs.big button { flex: 1; padding: 12px; font-size: 1.05rem; }
.shop-hero { display: flex; justify-content: center; background: radial-gradient(circle, #FFE9D2 0 55%, transparent 56%); }
.shop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.item { background: var(--surface); border-radius: var(--r-md); padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--pop); border: 3px solid transparent; }
.item:active { transform: translateY(4px); }
.item.on { border-color: var(--leaf); }
.item.poor { opacity: .6; }
.item-oy { width: 100px; height: 100px; }
.item b { font-size: .92rem; text-align: center; line-height: 1.2; }
.item .price { font-weight: 900; background: var(--bg); border-radius: 999px; padding: 3px 12px; font-size: .9rem; }
.item.on .price { background: var(--leaf); color: #fff; }
.album { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stk { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--line), inset 0 0 0 3px var(--line); display: grid; place-items: center; font-size: 2.2rem; }
.reveal .stk { width: 110px; font-size: 4rem; }
.stk.rare { box-shadow: 0 4px 0 var(--mango-dark), inset 0 0 0 4px var(--mango); background: #FFF6DB; }
.stk.miss { background: var(--bg); color: var(--line); font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; box-shadow: inset 0 0 0 3px var(--line); }
.stk i { position: absolute; bottom: -4px; right: -4px; background: var(--ink); color: #fff; font-style: normal; font-size: .7rem; font-weight: 900; padding: 1px 6px; border-radius: 999px; }

/* ---------- nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); background: var(--surface); box-shadow: 0 -4px 0 var(--line); }
.nav .in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nav button { display: flex; flex-direction: column; align-items: center; padding: 8px 0 10px; font-weight: 800; font-size: .8rem; color: var(--muted); }
.nav button .i { font-size: 1.65rem; line-height: 1.2; transition: transform .15s; }
.nav button.on { color: var(--oyen-dark); }
.nav button.on .i { transform: translateY(-3px) scale(1.15); }

/* ---------- parent ---------- */
.gate { align-items: center; text-align: center; justify-content: center; }
.gate h1 { font-size: 1.7rem; }
.gate p { color: var(--muted); margin: 0; max-width: 32ch; }
.pin-dots { display: flex; gap: 14px; justify-content: center; }
.pin-dots i { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 3px var(--line); }
.pin-dots i.on { background: var(--ink); box-shadow: none; }
.pin-dots.bad { animation: shake .35s; }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 320px; width: 100%; }
.keypad button { min-height: 64px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 4px 0 var(--line); font-family: var(--f-display); font-weight: 800; font-size: 1.7rem; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; }
.kv span:last-child { font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.seg button { padding: 8px 14px; border-radius: 999px; background: var(--bg); font-weight: 800; font-size: .92rem; }
.seg button.on { background: var(--ink); color: #fff; }
.skills { display: flex; flex-direction: column; gap: 8px; }
.skill { display: grid; grid-template-columns: 26px minmax(0, 1fr) 70px 48px; gap: 8px; align-items: center; font-weight: 700; font-size: .9rem; }
.skill .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill .st { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.test-box { border: 3px dashed var(--orchid); background: #F3EFFF; }
.test-box h2 { color: var(--orchid); }

/* ---------- plans ---------- */
.plans { display: flex; flex-direction: column; gap: 16px; }
.plan { background: var(--surface); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 0 var(--line); position: relative; border: 4px solid transparent; }
.plan.hot { border-color: var(--mango); }
.plan.cur { border-color: var(--leaf); }
.plan .flag { position: absolute; top: -14px; right: 16px; background: var(--mango); color: var(--ink); font-weight: 800; font-size: .78rem; padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.plan.cur .flag { background: var(--leaf); color: #fff; }
.plan .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan h3 { font-size: 1.45rem; }
.plan .price { font-family: var(--f-display); font-weight: 800; font-size: 2rem; white-space: nowrap; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 700; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
.plan li::before { content: "✔"; color: var(--leaf); font-weight: 900; }

/* ---------- overlays ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-weight: 700; z-index: 70; max-width: calc(100% - 32px); width: max-content; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.sheet-wrap { position: fixed; inset: 0; background: rgba(27,42,74,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 520px; border-radius: var(--r-lg) var(--r-lg) 0 0; padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 14px; animation: up .25s ease-out; max-height: 90%; overflow-y: auto; }
.sheet h2 { font-size: 1.5rem; }
.sheet p { margin: 0; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.steps-ios { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.timeup { background: var(--night); color: #fff; align-items: center; justify-content: center; text-align: center; }
.timeup h1 { font-size: 2rem; }
.timeup p { color: #C9D2F5; max-width: 30ch; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .bob, .eye-blink, .oy-tail, .claim, .chest, .record, .pnode.here .gnode { animation: none !important; }
}

/* ---------- ikon cel-shading ---------- */
.ico { display: block; width: 100%; height: 100%; }
.wicon { padding: 6px; }
.whead { flex: none; width: 52px; height: 52px; }
.chest { padding: 10px; }
.chest .ico { filter: drop-shadow(0 4px 0 rgba(0,0,0,.12)); }
.chip .fish-ico { width: 22px; height: 22px; display: inline-block; }
.chip.mus { font-size: 1rem; padding: 6px 9px; min-width: 42px; min-height: 40px; justify-content: center; }

/* ---------- nav ikon ---------- */
.nav button .i { width: 34px; height: 34px; display: block; }
.nav button .i svg { width: 100%; height: 100%; }
.nav button { font-size: .74rem; }
.nav button:not(.on) .i { filter: saturate(.55); opacity: .8; }

/* ---------- Akademi ---------- */
.acad-hero { display: flex; align-items: center; gap: 12px; }
.acad-hero .fine { font-size: .92rem; }
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tcard { background: var(--surface); border-radius: var(--r-lg); padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: 0 5px 0 var(--wc); border: 3px solid var(--wc); }
.tcard:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wc); }
.tcard b { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.1; }
.tcard small { color: var(--muted); font-weight: 800; font-size: .8rem; }
.tcard .bar { width: 100%; margin-top: 4px; }
.ticon { width: 64px; height: 64px; flex: none; }
.acad-cta { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-lg); padding: 10px 16px 10px 10px; box-shadow: 0 5px 0 #6A4ED6; border: 3px solid #8B6CF6; text-align: left; }
.acad-cta:active { transform: translateY(4px); box-shadow: 0 1px 0 #6A4ED6; }
.acad-cta .ticon { width: 54px; height: 54px; }
.acad-cta b { display: block; font-family: var(--f-display); font-size: 1.2rem; }
.acad-cta small { color: var(--muted); font-weight: 700; }
.acad-cta > span:nth-child(2) { flex: 1; min-width: 0; }
.acad-cta .go { font-size: 2rem; font-weight: 900; color: #8B6CF6; }
.ladder { display: flex; flex-direction: column; gap: 10px; }
.lv { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-md); padding: 10px 14px 10px 10px; box-shadow: 0 4px 0 var(--line); text-align: left; border: 3px solid transparent; }
.lv:active { transform: translateY(3px); }
.lv .lvn { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--wc); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.lv .lvt { flex: 1; min-width: 0; }
.lv .lvt b { display: block; font-family: var(--f-display); font-size: 1.1rem; line-height: 1.15; }
.lv .lvt small { color: var(--muted); font-weight: 700; }
.lv .st { color: var(--mango-dark); letter-spacing: 2px; white-space: nowrap; }
.lv.locked { opacity: .55; }
.lv.locked .lvn { background: var(--ink); font-size: 1rem; }
.lv.here { border-color: var(--oyen); animation: pulse 1.4s infinite; }
.lv.master { background: #FFF6DB; }
.sk-ico { width: 26px; height: 26px; display: block; }
.skill .sk-ico svg { width: 100%; height: 100%; }
.syl { min-width: 64px !important; width: auto !important; padding: 0 10px; text-transform: uppercase; }
.tiles span.syl { background: #FFE3F0; }
.tile.syl { width: auto; min-width: 76px; padding: 0 12px; font-size: 1.7rem; }
.slot.syl { min-width: 70px; }
.blocks { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; justify-content: center; max-width: 300px; }
.blocks .ten { width: 14px; height: 70px; border-radius: 3px; background: repeating-linear-gradient(#2E9FD6 0 6px, #1B78A6 6px 7px); border: 2px solid #4A2410; }
.blocks .one { width: 14px; height: 14px; border-radius: 3px; background: #FFC93D; border: 2px solid #4A2410; }

/* ---------- Oyen hidup ---------- */
.room { touch-action: manipulation; cursor: pointer; }
.oy-pos { position: relative; z-index: 1; transition: transform .6s cubic-bezier(.3,1.3,.5,1); }
.oy-wrap { cursor: grab; touch-action: none; outline: none; }
.oy-wrap:focus-visible { outline: 4px solid var(--water); border-radius: 30px; }
.room-hint { margin: -8px 0 0; text-align: center; font-size: .78rem; font-weight: 800; color: var(--muted); }
.bubble.pop { animation: pop .35s; }
.oyen-live .oy-body { transform-box: view-box; transform-origin: 100px 192px; animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.025, .975) } }
.oyen-live .oy-head { transform-box: view-box; transform-origin: 100px 150px; animation: headsway 7s ease-in-out infinite; }
@keyframes headsway { 0%, 100% { transform: rotate(0) } 25% { transform: rotate(-2.5deg) } 60% { transform: rotate(2deg) } }
.oy-ear { transform-box: view-box; }
.oy-ear.l { transform-origin: 62px 72px; } .oy-ear.r { transform-origin: 138px 72px; }
.oyen-live .oy-ear.l { animation: twitchL 5.5s infinite; }
.oyen-live .oy-ear.r { animation: twitchR 7.3s infinite 1.6s; }
@keyframes twitchL { 0%, 88%, 100% { transform: none } 91% { transform: rotate(-14deg) } 95% { transform: rotate(5deg) } }
@keyframes twitchR { 0%, 88%, 100% { transform: none } 91% { transform: rotate(14deg) } 95% { transform: rotate(-5deg) } }
.oy-look { transform: translate(var(--ex, 0px), var(--ey, 0px)); transition: transform .18s ease-out; }
.oy-mouth { transform-box: view-box; transform-origin: 100px 115px; }
/* tindakan */
.act-tilt .oy-head { animation: tilt .9s ease-in-out !important; }
@keyframes tilt { 30% { transform: rotate(-12deg) } 70% { transform: rotate(-10deg) } 100% { transform: none } }
.act-pet .oy-head { animation: nuzzle .3s ease-in-out 3 alternate !important; }
@keyframes nuzzle { from { transform: rotate(-6deg) translateY(2px) } to { transform: rotate(6deg) translateY(2px) } }
.act-wiggle > :is(svg, img) { animation: wig .7s ease-in-out; transform-origin: 50% 100%; }
@keyframes wig { 20% { transform: rotate(-6deg) scale(1.03) } 40% { transform: rotate(6deg) } 60% { transform: rotate(-4deg) } 80% { transform: rotate(3deg) } }
.act-roll > :is(svg, img) { animation: roll 1s ease-in-out; transform-origin: 50% 60%; }
@keyframes roll { 0% { transform: none } 40% { transform: translateY(-30px) rotate(200deg) } 80% { transform: translateY(0) rotate(360deg) scale(1.05,.95) } 100% { transform: rotate(360deg) } }
.act-stretch > :is(svg, img) { animation: stretch 1.2s ease-in-out; transform-origin: 50% 100%; }
@keyframes stretch { 40% { transform: scale(1.12, .86) } 70% { transform: scale(.94, 1.08) } }
.act-chew .oy-mouth { animation: chew .18s ease-in-out 6 alternate; }
@keyframes chew { to { transform: scaleY(.55) } }
.act-shake > :is(svg, img) { animation: shakeoff .9s; transform-origin: 50% 80%; }
@keyframes shakeoff { 10%, 50% { transform: rotate(-7deg) } 30%, 70% { transform: rotate(7deg) } 90% { transform: rotate(-2deg) } }
.act-wag .oy-tail { animation: tail .3s ease-in-out 4 !important; }
.yarn { position: absolute; bottom: 26px; font-size: 2.2rem; transform: translateX(-50%); animation: yarnin .45s cubic-bezier(.3,1.6,.5,1); z-index: 2; pointer-events: none; }
@keyframes yarnin { from { transform: translate(-50%, -120px) rotate(-200deg) } }
.yarn.caught { animation: caught .4s forwards; }
@keyframes caught { to { transform: translate(-50%, -20px) scale(.2); opacity: 0 } }
.flyer { position: fixed; z-index: 60; font-size: 2.2rem; transform: translate(0, 0); transition: transform .6s cubic-bezier(.4,-0.3,.6,1.2), opacity .6s; pointer-events: none; margin: -18px 0 0 -18px; }

/* ---------- Ganjaran ---------- */
.jar { width: 100%; height: 100%; display: block; overflow: visible; }
.jar-fill, .jar-fill > g { transition: transform 1.1s cubic-bezier(.3,1.2,.5,1); }
.rw-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #FFF6DB, #FFE7D1); border-radius: var(--r-lg); padding: 12px 16px 12px 12px; box-shadow: 0 5px 0 #F5C49A; border: 3px solid #FFC27A; text-align: left; width: 100%; }
.rw-card.ready { animation: glow 1.4s infinite; border-color: var(--mango); }
@keyframes glow { 50% { box-shadow: 0 5px 0 #F5C49A, 0 0 0 10px rgba(255,194,61,.35) } }
.rw-card.empty { opacity: .9; }
.rw-jar { flex: none; width: 76px; height: 95px; padding: 0; }
.rw-jar.lg { width: 104px; height: 130px; }
.rw-jar.sm { width: 52px; height: 65px; }
.rw-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rw-txt small { font-weight: 800; color: var(--oyen-dark); text-transform: uppercase; letter-spacing: .05em; font-size: .74rem; }
.rw-txt b { font-family: var(--f-display); font-size: 1.25rem; line-height: 1.15; }
.rw-pct { display: flex; align-items: center; gap: 10px; }
.rw-pct .bar { flex: 1; }
.rw-pct em { font-style: normal; font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; color: var(--oyen-dark); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar.big { height: 18px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.06); }
.bar.big > i { background: linear-gradient(90deg, var(--mango), var(--oyen)); }
.bar > i.grow { animation: growbar 1.4s .5s cubic-bezier(.3,1.2,.5,1) both; }
@keyframes growbar { from { width: var(--from) } to { width: var(--to) } }
.rw-left { font-weight: 900; color: var(--leaf-dark); }
.rw-wait { font-weight: 900; color: var(--orchid); }
.rw-mini { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface); border-radius: var(--r-md); padding: 8px 14px 8px 8px; box-shadow: 0 4px 0 var(--line); text-align: left; animation: pop .5s .3s backwards; }
.rw-mini .rw-jar { width: 54px; height: 68px; }
.rw-mini .rw-pct em { font-size: 1rem; }
.rw-panel.ready { border: 3px solid var(--mango); animation: glow 1.4s infinite; }
.rw-head { display: flex; gap: 14px; align-items: center; }
.rw-head h2 { font-size: 1.4rem; margin-bottom: 6px; }
.rw-head > div { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.rw-missions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rw-missions li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rw-missions .rmi { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 1.1rem; }
.rw-missions li.done .rmi { background: var(--leaf); color: #fff; font-weight: 900; }
.rw-missions .rmt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rw-missions .rmt b { font-size: .95rem; }
.rw-missions .rmv { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--muted); }
.rw-missions li.done .rmv { color: var(--leaf-dark); }
.rw-missions.compact { gap: 6px; margin-top: 6px; }
.rw-missions.compact li { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; }
.rw-missions.compact .rmi { width: 26px; height: 26px; font-size: .85rem; }
.rw-missions.compact .rmt b { font-size: .82rem; }
.rw-big { width: 150px; height: 188px; margin: 0 auto; }
.rw-hist { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-h { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
.rw-h span { font-size: 1.3rem; } .rw-h small { color: var(--muted); font-weight: 700; }
.prw { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: var(--r-md); background: var(--bg); }
.prw.ready, .prw.claimed { background: #FFF6DB; box-shadow: inset 0 0 0 3px var(--mango); }
.prw b { display: block; font-family: var(--f-display); font-size: 1.1rem; }
.prw small { color: var(--muted); font-weight: 800; }
.prw-btns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.rw-preview { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #FFF6DB, #FFE7D1); border-radius: var(--r-lg); padding: 10px 16px; }
.rw-preview .jar { width: 64px; height: 80px; }
.rw-preview small { display: block; color: var(--muted); font-weight: 800; }
.rw-preview b { font-family: var(--f-display); font-size: 1.3rem; }
.ideas { margin-top: -6px; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; margin-top: 8px; }
.icon-pick button { aspect-ratio: 1; max-width: 100%; border-radius: 12px; background: var(--bg); font-size: 1.5rem; border: 3px solid transparent; }
.icon-pick button.on { border-color: var(--oyen); background: #FFE7D1; }
.mrows { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.mbuild { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--bg); padding: 10px; border-radius: var(--r-md); }
.mbuild select { flex: 1 1 100%; min-width: 0; font: inherit; font-weight: 800; padding: 10px 12px; border-radius: 12px; border: 3px solid var(--line); background: var(--surface); color: var(--ink); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 4px; box-shadow: 0 3px 0 var(--line); }
.stepper button { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); font-size: 1.4rem; font-weight: 900; }
.stepper b { min-width: 46px; text-align: center; font-family: var(--f-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .oyen-live .oy-body, .oyen-live .oy-head, .oyen-live .oy-ear, .rw-card.ready, .rw-panel.ready { animation: none !important; } }

/* ---------- Kampung Oyen ---------- */
.vill-cta { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-lg); padding: 10px 16px 10px 12px; box-shadow: 0 5px 0 #167A50; border: 3px solid #22A06B; text-align: left; width: 100%; }
.vill-cta:active { transform: translateY(4px); box-shadow: 0 1px 0 #167A50; }
.vill-cta .big { font-size: 2.6rem; line-height: 1; }
.vill-cta > span:nth-child(2) { flex: 1; min-width: 0; }
.vill-cta b { display: block; font-family: var(--f-display); font-size: 1.2rem; }
.vill-cta small { color: var(--muted); font-weight: 700; }
.vill-cta .go { font-size: 2rem; font-weight: 900; color: #22A06B; }
.village-screen { background: linear-gradient(#DFF5E6, var(--bg) 40%); }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vcard { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; box-shadow: 0 5px 0 var(--wc); border: 3px solid var(--wc); }
.vcard:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wc); }
.vcard.locked { filter: grayscale(.8); opacity: .65; }
.vcard .vic { position: relative; font-size: 2.8rem; line-height: 1.1; }
.vcard .vic .lock { position: absolute; right: -14px; bottom: -4px; font-size: 1rem; background: var(--ink); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.vcard b { font-family: var(--f-display); font-size: 1.05rem; line-height: 1.15; }
.vcard small { color: var(--muted); font-weight: 700; font-size: .76rem; line-height: 1.2; }
.vcard .st { color: var(--mango-dark); letter-spacing: 2px; }
.vcard .tier { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; background: var(--bg); padding: 2px 8px; border-radius: 999px; color: var(--muted); }
.mission-tag { align-self: flex-start; background: var(--ink); color: #fff; font-weight: 900; font-size: .8rem; padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; }
#play > .playarea, #ms { display: flex; flex-direction: column; gap: 12px; }

/* susun urutan */
.seqslots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.sslot { width: 58px; height: 58px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 3px var(--line); display: grid; place-items: center; position: relative; }
.sslot i { font-style: normal; font-weight: 900; color: var(--line); font-size: 1.2rem; }
.sslot.on { background: #E2F6D8; box-shadow: inset 0 0 0 3px var(--leaf); animation: pop .3s; }
.sslot .se, .scard .se { font-size: 2rem; line-height: 1; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scard { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--pop); text-align: left; min-height: 64px; }
.scard .sl { font-weight: 800; font-size: .95rem; line-height: 1.2; min-width: 0; }
.scard.used { visibility: hidden; }
.scard.bad { animation: shake .35s; background: #FFE1E2; }
.after { grid-column: 1 / -1; text-align: center; font-size: 4rem; animation: pop .5s; }
.reveal-box:empty { display: none; }
.reveal-box { text-align: center; animation: pop .4s; }
.re { margin: 0; font-weight: 800; color: var(--hibiscus); text-align: center; }
.re.ok { color: var(--leaf-dark); }
.opt.choice { min-height: 64px; text-align: left; justify-content: start; padding: 10px 16px; }
.stagebox.story { min-height: 170px; }
.who-say { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.who-say .emo { font-size: 4.6rem; }
.sbub { background: #FFF6DB; border-radius: 16px; padding: 8px 14px; font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; box-shadow: 0 3px 0 #F5C49A; animation: pop .4s; }

/* dulang, kira, timbang */
.ticket { background: #FFFBEF; border: 2px dashed var(--mango-dark); border-radius: 14px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 1.2rem; font-weight: 800; }
.tk { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 10px; padding: 4px 10px; box-shadow: 0 2px 0 var(--line); font-size: 1.3rem; }
.tray { min-height: 92px; background: #E9D7BF; border-radius: 20px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.08), 0 4px 0 #C9A97E; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 10px; }
.tray.shake { animation: shake .35s; }
.tray .hint { color: rgba(74,36,16,.55); font-weight: 800; font-size: .9rem; }
.ti { font-size: 2rem; line-height: 1; animation: pop .25s; }
.palette { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pi { width: 66px; height: 66px; border-radius: 18px; background: var(--surface); box-shadow: var(--pop); font-size: 2.1rem; display: grid; place-items: center; }
.pi:active { transform: translateY(3px); }
.pi.w { height: 78px; display: flex; flex-direction: column; justify-content: center; }
.pi.w small { font-size: .78rem; font-weight: 900; color: var(--muted); }
.pi.sh { width: 70px; height: 70px; }
.pi.bad { animation: shake .35s; background: #FFE1E2; }
.pot { position: relative; font-size: 5rem; line-height: 1; }
.potin { position: absolute; left: 50%; top: 44%; transform: translateX(-50%); width: 120px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; font-size: 1.2rem; }
.cntrow { display: flex; align-items: center; justify-content: center; gap: 16px; }
.cntrow .btn { min-width: 76px; font-size: 1.5rem; }
.cntv { font-family: var(--f-display); font-size: 2.6rem; min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.scale { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.pan { min-height: 64px; width: 82%; border-radius: 0 0 60px 60px; background: #DDE6EE; border: 4px solid #4A2410; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; padding: 4px; }
.pan button { font-size: 2rem; }
.dial { position: relative; width: 150px; height: 80px; border-radius: 150px 150px 0 0; background: #fff; border: 4px solid #4A2410; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.dial i { position: absolute; left: 50%; bottom: 0; width: 4px; height: 64px; margin-left: -2px; background: var(--hibiscus); transform-origin: 50% 100%; transform: rotate(-90deg); transition: transform .5s cubic-bezier(.3,1.5,.5,1); border-radius: 2px; }
.dial b { position: relative; font-family: var(--f-display); font-size: 1.3rem; margin-bottom: 2px; background: #fff; padding: 0 6px; border-radius: 6px; }

/* bina */
.stagebox.bp { padding: 8px; }
.blueprint { width: 100%; max-width: 280px; height: auto; background: repeating-linear-gradient(0deg, transparent 0 19px, rgba(46,159,214,.12) 19px 20px), repeating-linear-gradient(90deg, transparent 0 19px, rgba(46,159,214,.12) 19px 20px); border-radius: 14px; }
.slot-now { animation: blinkslot 1s infinite; }
@keyframes blinkslot { 50% { opacity: .45 } }
.blueprint.built { animation: jump .6s; }
.need { text-align: center; margin: -4px 0 0; font-weight: 800; color: var(--muted); }
.need b { color: var(--oyen-dark); }

/* laluan */
.rgrid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; background: #9ED69F; padding: 8px; border-radius: 18px; box-shadow: inset 0 0 0 4px #7CC07E; }
.cell { aspect-ratio: 1; max-width: 100%; border-radius: 10px; background: #C9EBCB; display: grid; place-items: center; font-size: clamp(1.2rem, 7vw, 2rem); }
.cell.blk { background: #B5D9B7; }
.cell .hero { animation: pop .25s; }
.cmdq { min-height: 44px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; background: var(--surface); border-radius: 14px; padding: 6px; box-shadow: inset 0 0 0 3px var(--line); font-size: 1.3rem; }
.cmdq em { font-style: normal; font-size: .85rem; font-weight: 800; color: var(--muted); }
.arrows { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.arrows button { height: 58px; border-radius: 16px; background: var(--surface); box-shadow: var(--pop); font-size: 1.7rem; }
.arrows button:active { transform: translateY(3px); }
.arrows .del { background: #FFE1E2; }

/* cari beza, ingatan */
.spotwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spotg { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; background: var(--surface); padding: 6px; border-radius: 14px; box-shadow: inset 0 0 0 3px var(--line); }
.spotg span, .spotg button { aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; font-size: clamp(1rem, 5.4vw, 1.6rem); border-radius: 8px; }
.spotg.b { box-shadow: inset 0 0 0 3px var(--oyen); }
.spotg button.ok { background: var(--leaf); animation: pop .3s; }
.spotg button.bad { background: #FFE1E2; animation: shake .35s; }
.stagebox.memo { font-size: 3rem; gap: 14px; }
.stagebox.memo .q { color: var(--mango-dark); font-family: var(--f-display); }

/* lagu */
.compose { display: grid; grid-template-columns: 40px repeat(8, minmax(0, 1fr)); gap: 4px; align-items: center; background: var(--surface); padding: 10px; border-radius: 18px; box-shadow: inset 0 0 0 3px var(--line); }
.compose .ca { font-size: 1.7rem; text-align: center; }
.cc { aspect-ratio: 1; max-width: 100%; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); }
.cc.on { background: var(--pc); box-shadow: inset 0 0 0 3px #4A2410; }
.cc.beat { transform: scale(1.15); filter: brightness(1.15); }

/* cerita */
.stagebox.movie { min-height: 250px; flex-direction: column; background: linear-gradient(#2B3A70, #1D2A5C); color: #fff; }
.panel-scene { position: relative; width: 100%; height: 150px; display: grid; place-items: center; animation: rise .5s; }
.panel-scene .bg { position: absolute; font-size: 7rem; opacity: .45; }
.panel-scene .fg { position: relative; font-size: 4.4rem; }
.movie .cap { margin: 0; font-family: var(--f-display); font-size: 1.15rem; text-align: center; padding: 0 8px; animation: rise .5s; }

/* pelbagai */
.house { display: flex; flex-direction: column; align-items: center; font-size: 2.6rem; line-height: 1; }
.house b { font-size: 1.4rem; background: #fff; border-radius: 8px; padding: 0 8px; margin-top: -6px; box-shadow: 0 2px 0 var(--line); }
.lbl { display: inline-block; background: #FFFBEF; border: 3px solid var(--mango-dark); border-radius: 8px; padding: 6px 12px; font-family: var(--f-display); font-size: 1.2rem; letter-spacing: .05em; }
.tank { width: 160px; height: 120px; border: 4px solid #4A2410; border-top: 0; border-radius: 0 0 18px 18px; background: linear-gradient(transparent 22%, #8FD3F5 22%); display: flex; justify-content: center; align-items: flex-start; padding-top: 4px; font-size: 2.6rem; margin: 0 auto; }
.tank.float { align-items: flex-start; padding-top: 10px; }
.tank.sink { align-items: flex-end; padding-bottom: 6px; }
.mixres { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 900; font-size: 1.4rem; }
.river { width: 100%; padding: 18px 10px; border-radius: 16px; background: linear-gradient(#9C8A5E, #6E7F57); font-size: 2rem; text-align: center; letter-spacing: 6px; }
.river.clean { background: linear-gradient(#8FD3F5, #2E9FD6); }
.scene-bg { border-radius: 16px; overflow: hidden; filter: saturate(calc(.4 + var(--clean) * .6)); }
.scene-bg .river { background: linear-gradient(color-mix(in srgb, #8FD3F5 calc(var(--clean) * 100%), #9C8A5E), color-mix(in srgb, #2E9FD6 calc(var(--clean) * 100%), #6E7F57)); transition: background .5s; }
.flow { font-size: 1.6rem; letter-spacing: 2px; }
.sym { font-size: 1.8rem; letter-spacing: 2px; }
.bfly { display: flex; align-items: center; gap: 6px; font-size: 1.8rem; }
.bfly .body { font-size: 2.2rem; }
.bfly .q { color: var(--mango-dark); font-family: var(--f-display); font-weight: 800; font-size: 2.2rem; }

/* ---------- lukisan PNG Oyen ---------- */
img.oy-img { display: block; height: auto; scale: var(--sc, 1); transform-origin: 50% 100%; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.oyen-big.oy-img { width: min(240px, 64vw); }
.oyen-mid.oy-img { width: 170px; }
.oyen-mini.oy-img { width: 100px; }
.oyen-tiny.oy-img { width: 74px; }
.oy-mini img, .gnode .you img { width: 100%; height: 100%; object-fit: contain; }
.oy-img.oy-legend { filter: drop-shadow(0 0 10px rgba(255,201,61,.9)) drop-shadow(0 0 22px rgba(255,201,61,.5)); }
.oy-img.mood-sad { filter: saturate(.55) brightness(.95); rotate: -5deg; }
.oy-img.mood-excited { animation: hopimg .6s ease-out; }
@keyframes hopimg { 40% { transform: translateY(-10px) scale(1.04, .96) } }
.oyen-live.oy-img { animation: breatheimg 2.6s ease-in-out infinite; }
@keyframes breatheimg { 0%, 100% { transform: scale(1, 1) } 50% { transform: scale(1.025, .975) } }
.act-tilt > img { animation: tiltimg .9s ease-in-out !important; }
@keyframes tiltimg { 30% { transform: rotate(-9deg) } 70% { transform: rotate(-7deg) } 100% { transform: none } }
.act-pet > img { animation: nuzzleimg .3s ease-in-out 3 alternate !important; }
@keyframes nuzzleimg { from { transform: rotate(-5deg) } to { transform: rotate(5deg) } }
.act-chew > img { animation: chewimg .2s ease-in-out 6 alternate !important; }
@keyframes chewimg { to { transform: scale(1.04, .95) } }
.act-wag > img { animation: wagimg .25s ease-in-out 5 alternate !important; }
@keyframes wagimg { from { transform: translateX(-3px) } to { transform: translateX(3px) } }
.nav .i img.face { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- animasi UI: peralihan skrin ---------- */
.screen.slide-in-r { animation: slideR .38s cubic-bezier(.22,1,.36,1); }
.screen.slide-in-l { animation: slideL .38s cubic-bezier(.22,1,.36,1); }
.screen.fade-in { animation: fadeIn .3s ease-out; }
.screen.pop-in { animation: popIn .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes slideR { from { transform: translateX(64px); opacity: .25 } to { transform: none; opacity: 1 } }
@keyframes slideL { from { transform: translateX(-64px); opacity: .25 } to { transform: none; opacity: 1 } }
@keyframes fadeIn { from { opacity: .4 } to { opacity: 1 } }
@keyframes popIn { from { transform: scale(.9); opacity: .3 } to { transform: none; opacity: 1 } }
/* kad muncul berperingkat */
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > * { animation: cardIn .42s cubic-bezier(.34,1.56,.64,1) backwards; }
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > :nth-child(2) { animation-delay: .04s }
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > :nth-child(3) { animation-delay: .08s }
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > :nth-child(4) { animation-delay: .12s }
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > :nth-child(5) { animation-delay: .16s }
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > :nth-child(6) { animation-delay: .2s }
:is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > :nth-child(n+7) { animation-delay: .24s }
@keyframes cardIn { from { transform: translateY(14px) scale(.94); opacity: .2 } to { transform: none; opacity: 1 } }
.path > .pnode { animation: cardIn .45s cubic-bezier(.34,1.56,.64,1) backwards; }
.path > .pnode:nth-child(2) { animation-delay: .05s } .path > .pnode:nth-child(3) { animation-delay: .1s } .path > .pnode:nth-child(4) { animation-delay: .15s } .path > .pnode:nth-child(n+5) { animation-delay: .2s }

/* ---------- animasi butang ---------- */
:is(.btn, .opt, .need, .wcard, .vcard, .tcard, .lv, .pcard, .icon-btn, .nav button, .scard, .pi, .bin, .item, .acad-cta, .vill-cta, .rw-card, .tile, .nb, .mt, .tfb, .keypad button, .seg button, .tabs button, .arrows button, .rw-mini) { position: relative; transition: transform .12s cubic-bezier(.34,1.56,.64,1), box-shadow .12s, filter .15s; }
:is(.btn, .opt, .need, .wcard, .vcard, .tcard, .lv, .pcard, .scard, .pi, .bin, .item, .acad-cta, .vill-cta, .tfb):active { transform: translateY(4px) scale(.97); }
.boing { animation: boing .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes boing { 0% { transform: scale(.95) } 45% { transform: scale(1.05) } 100% { transform: none } }
.rip-wrap { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; mix-blend-mode: soft-light; }
.btn:not(.white):not(.ghost) .ripple { background: rgba(255,255,255,.45); mix-blend-mode: normal; }
@keyframes ripple { to { transform: scale(1); opacity: 0 } }
@media (hover: hover) {
  :is(.btn, .wcard, .vcard, .tcard, .pcard, .item, .acad-cta, .vill-cta, .need, .lv):hover { transform: translateY(-2px); filter: brightness(1.03); }
}
/* kilauan pada butang utama */
.btn.mango, .cta-play, .claim-rw { overflow: hidden; }
.btn.mango::after, .cta-play::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 60% { left: -60% } 85%, 100% { left: 130% } }
.cta-play { animation: ctaPulse 2.4s ease-in-out infinite; }
@keyframes ctaPulse { 0%, 100% { box-shadow: 0 5px 0 var(--mango-dark) } 50% { box-shadow: 0 5px 0 var(--mango-dark), 0 0 0 8px rgba(255,194,61,.28) } }
/* bar navigasi: penunjuk tab */
.nav button.on::before { content: ""; position: absolute; top: 4px; left: 50%; width: 46px; height: 40px; margin-left: -23px; border-radius: 14px; background: #FFE7D1; z-index: -1; animation: popIn .3s cubic-bezier(.34,1.56,.64,1); }
.nav button { isolation: isolate; }
.nav button.on .i { animation: tabHop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes tabHop { 40% { transform: translateY(-7px) scale(1.2) } 100% { transform: translateY(-3px) scale(1.15) } }
/* lembaran (sheet) */
.sheet-wrap { animation: fadeIn .2s ease-out; }
.sheet { animation: sheetUp .38s cubic-bezier(.22,1,.36,1); }
@keyframes sheetUp { from { transform: translateY(70px); opacity: .3 } to { transform: none; opacity: 1 } }
/* bar kemajuan bergerak lembut */
.bar > i { transition: width .7s cubic-bezier(.22,1,.36,1); }
@media (prefers-reduced-motion: reduce) {
  .screen, .sheet, .sheet-wrap, .cta-play, .btn.mango::after, .cta-play::after, .boing, .ripple, :is(.worlds, .vgrid, .tracks, .profiles, .shop, .ladder, .needs, .options, .cards, .palette, .bins, .album, .plans, .holes, .pads, .mem) > *, .path > .pnode { animation: none !important; }
}

/* ---------- Studio Avatar ---------- */
.studio-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border-radius: var(--r-lg); padding: 8px 16px 8px 8px; color: #fff;
  background: linear-gradient(120deg, #8B6CF6, #E05BB5 60%, #FF9A3C); box-shadow: 0 5px 0 #6A4ED6; position: relative; overflow: hidden; }
.studio-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: shine 4.2s ease-in-out infinite; pointer-events: none; }
.studio-cta:active { transform: translateY(4px); box-shadow: 0 1px 0 #6A4ED6; }
.studio-cta .sc-oy { width: 64px; height: 64px; flex: none; border-radius: 20px; background: rgba(255,255,255,.25); display: grid; place-items: center; overflow: hidden; }
.studio-cta .sc-oy svg { width: 58px; height: 58px; }
.studio-cta > span:nth-child(2) { flex: 1; min-width: 0; }
.studio-cta b { display: block; font-family: var(--f-display); font-size: 1.22rem; line-height: 1.15; }
.studio-cta b em { font-style: normal; font-size: .68rem; background: #FFC23D; color: var(--ink); padding: 2px 7px; border-radius: 999px; vertical-align: 3px; letter-spacing: .04em; }
.studio-cta small { font-weight: 800; opacity: .95; }
.studio-cta .go { font-size: 2rem; font-weight: 900; }
.who .dot.av { overflow: hidden; }
.who .dot.av svg { width: 34px; height: 34px; }

.av-stage { position: relative; border-radius: var(--r-lg); display: grid; place-items: center; padding: 14px 10px 6px; box-shadow: inset 0 0 0 4px rgba(255,255,255,.55), 0 5px 0 rgba(27,42,74,.16); overflow: hidden; }
.av-stage.main { min-height: 210px; padding-top: 8px; }
.av-stage.main .av-big { width: min(180px, 48vw); }
.studio .title-row h1, .avvid .wtitle h1 { font-size: clamp(1.2rem, 6.2vw, 1.6rem); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avvid .row .btn { padding: 0 10px; font-size: .92rem; min-width: 120px; }
.av-big { width: min(220px, 58vw); height: auto; display: block; filter: drop-shadow(0 6px 0 rgba(27,42,74,.12)); }
.av-dice { position: absolute; right: 10px; top: 10px; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 4px 0 rgba(27,42,74,.2); font-size: 1.7rem; display: grid; place-items: center; }
.av-dice:active { transform: translateY(3px) rotate(40deg); }
.av-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; text-align: center; }
.av-id b { font-family: var(--f-display); font-size: 1.45rem; line-height: 1.1; width: 100%; }
.rar { display: inline-flex; align-items: center; gap: 4px; background: var(--rc); color: #fff; font-weight: 900; font-size: .85rem; padding: 4px 12px; border-radius: 999px; box-shadow: 0 3px 0 rgba(27,42,74,.18); letter-spacing: .03em; white-space: nowrap; }
.rar.sm { font-size: .72rem; padding: 2px 8px; }
.rar.r3 { background: linear-gradient(90deg, #F0A500, #FFD45C, #F0A500); background-size: 200% 100%; animation: goldShine 2.2s linear infinite; color: #5A3B00; }
@keyframes goldShine { to { background-position: -200% 0 } }
.av-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; font-size: 1rem; letter-spacing: .06em; background: #fff; border-radius: 10px; padding: 4px 10px; color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; margin: 0 -2px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button { flex: none; padding: 9px 15px; border-radius: 999px; background: var(--surface); font-weight: 900; box-shadow: 0 3px 0 var(--line); }
.cat-tabs button.on { background: var(--ink); color: #fff; box-shadow: none; }
.av-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.av-opt { position: relative; background: var(--surface); border-radius: var(--r-md); padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 4px 0 var(--line); border: 3px solid transparent; min-width: 0; }
.av-opt.on { border-color: var(--leaf); box-shadow: 0 4px 0 var(--leaf-dark); }
.av-opt.rare:not(.locked) { background: linear-gradient(160deg, #fff, #F1EBFF); }
.av-opt.locked > :not(.lk) { opacity: .45; filter: grayscale(.5); }
.av-opt small { font-weight: 800; font-size: .72rem; line-height: 1.1; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.av-opt .sw { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #4A2410; display: block; }
.av-opt .sw.eye { box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 9px #4A2410; }
.av-opt .sw.bgsw { border-radius: 12px; width: 52px; border-color: rgba(27,42,74,.25); }
.ao-oy { width: 54px; height: 54px; display: block; }
.av-opt .lk { position: absolute; top: -6px; right: -6px; font-style: normal; font-weight: 900; font-size: .72rem; background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 6px; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.av-opt .lk.egg { background: #8B6CF6; font-size: .85rem; }
.av-opt .lk.star { background: #8B6CF6; }
.pop-in-av { animation: popIn .5s cubic-bezier(.34,1.56,.64,1); }

.egg-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border-radius: var(--r-lg); padding: 8px 14px 8px 8px; background: linear-gradient(130deg, #FFF3DC, #FFE0F0); border: 3px solid #FF9EC8; box-shadow: 0 5px 0 #E679A8; }
.egg-cta:active { transform: translateY(4px); box-shadow: 0 1px 0 #E679A8; }
.egg-cta .egg-ico { width: 62px; height: 70px; flex: none; animation: eggIdle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.egg-cta .egg-ico svg { width: 100%; height: 100%; }
@keyframes eggIdle { 0%, 70%, 100% { transform: none } 76% { transform: rotate(-9deg) } 84% { transform: rotate(8deg) } 92% { transform: rotate(-4deg) } }
.egg-cta > span:nth-child(2) { flex: 1; min-width: 0; }
.egg-cta b { display: block; font-family: var(--f-display); font-size: 1.25rem; }
.egg-cta small { color: var(--muted); font-weight: 800; }
.egg-price { background: var(--mango); font-weight: 900; padding: 6px 10px; border-radius: 999px; box-shadow: 0 3px 0 var(--mango-dark); white-space: nowrap; font-size: .9rem; }
.av-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.av-card { position: relative; background: var(--surface); border-radius: var(--r-md); padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--pop); border: 3px solid transparent; min-width: 0; }
.av-card.mine { border-color: var(--mango); }
.av-card b { font-family: var(--f-display); font-size: .86rem; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.av-thumb { width: 100%; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.av-th { width: 92%; height: auto; display: block; }
.mine-dot, .fr-dot { position: absolute; top: -8px; left: -6px; font-style: normal; font-size: 1.2rem; }
.fcode { display: flex; gap: 8px; }
.fcode input { flex: 1; min-width: 0; font: inherit; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; font-size: 1.05rem; letter-spacing: .05em; text-transform: uppercase; padding: 10px 12px; border-radius: var(--r-md); border: 3px solid var(--line); background: var(--bg); color: var(--ink); }
.av-detail { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; }
.av-detail .av-stage { width: 100%; }
.av-detail h2 { font-size: 1.55rem; }
.av-traits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.av-traits span { background: #fff; border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 700; box-shadow: 0 2px 0 var(--line); }
.mine-flag { position: absolute; left: 10px; top: 10px; background: var(--mango); font-weight: 900; font-size: .8rem; padding: 4px 10px; border-radius: 999px; box-shadow: 0 3px 0 var(--mango-dark); }
.egg-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 300px; justify-content: center; }
.egg-btn { background: none; }
.egg-big { width: 170px; height: auto; display: block; animation: eggIdle 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
.egg-btn.wob .egg-big { animation: rattle .45s; }
.egg-won { margin: 0; font-weight: 900; color: #6A4ED6; background: #F1EBFF; padding: 6px 14px; border-radius: 999px; }
.hatch .flash { position: absolute; inset: -30px; background: #fff; border-radius: 30px; animation: flashOut .6s ease-out forwards; pointer-events: none; z-index: 2; }
@keyframes flashOut { to { opacity: 0 } }

/* video */
.tpls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tpl { background: var(--surface); border-radius: var(--r-md); padding: 8px 2px; font-weight: 900; font-size: .74rem; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 0 var(--line); border: 3px solid transparent; line-height: 1.1; }
.tpl span { font-size: 1.6rem; }
.tpl.on { border-color: #E05BB5; box-shadow: 0 4px 0 #B53E8E; }
.vid-wrap { position: relative; align-self: center; width: min(100%, 300px); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #1B2A4A; box-shadow: 0 6px 0 rgba(27,42,74,.25); }
.vid-wrap canvas, .vid-wrap video { width: 100%; height: 100%; display: block; object-fit: cover; }
.rec-badge { position: absolute; top: 10px; left: 10px; background: #F2545B; color: #fff; font-weight: 900; font-size: .8rem; padding: 3px 10px; border-radius: 999px; animation: blinkslot 1s infinite; }
.rec-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.35); overflow: hidden; }
.rec-bar i { display: block; height: 100%; width: 0; background: #F2545B; }
.avvid .cap textarea { font: inherit; font-size: .9rem; border-radius: var(--r-sm); border: 3px solid var(--line); background: var(--bg); padding: 8px 10px; resize: none; color: var(--ink); width: 100%; }
.pok { background: #DDF5E8; color: var(--leaf-dark); font-weight: 900; padding: 10px 14px; border-radius: var(--r-md); text-align: center; }
.glowing { animation: glow 1.2s ease-in-out infinite; }
.parent-note { background: #FFF6E5; border-radius: var(--r-md); padding: 10px 12px; color: #7A5A1A; }
@media (prefers-reduced-motion: reduce) { .studio-cta::after, .egg-cta .egg-ico, .egg-big, .rar.r3, .rec-badge { animation: none !important; } }

.adult-q { font-family: var(--f-display); font-size: 2rem; display: block; margin-top: 4px; }
.pin-dots i { font-style: normal; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .9rem; }

/* ---------- hab skrin utama (4 jubin) ---------- */
.hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub-t { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border-radius: var(--r-lg); padding: 10px 12px 12px; min-height: 132px; background: var(--surface); border: 3px solid var(--wc, var(--line)); box-shadow: 0 5px 0 var(--wd, var(--line)); overflow: hidden; min-width: 0; }
.hub-t:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--wd, var(--line)); }
.hub-t .hi { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 2px; }
.hub-t .hi svg, .hub-t .hi img { width: 58px; height: 58px; }
.hub-t .hi.big { font-size: 2.7rem; line-height: 1; }
.hub-t b { font-family: var(--f-display); font-size: 1.08rem; line-height: 1.1; }
.hub-t small { color: var(--muted); font-weight: 800; font-size: .8rem; line-height: 1.2; }
.hub-t em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: .66rem; font-weight: 900; background: #FFC23D; color: var(--ink); padding: 2px 7px; border-radius: 999px; letter-spacing: .04em; }
.hub-t.acad { --wc: #8B6CF6; --wd: #6A4ED6; }
.hub-t.vill { --wc: #22A06B; --wd: #167A50; }
.hub-t.studio { --wc: #E05BB5; --wd: #B53E8E; background: linear-gradient(160deg, #fff 40%, #FFE3F3); }
.hub-t.run { --wc: #2E9FD6; --wd: #1B78A6; background: linear-gradient(165deg, #BDE6FF, #E9F7FF 55%, #C8EFC0); }
.hub-t.run .hi { width: 64px; height: 64px; }
.hub-t.run .hub-oy { width: 64px; height: auto; animation: hubRun .5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes hubRun { from { transform: translateY(0) rotate(-4deg) } to { transform: translateY(-5px) rotate(4deg) } }
.hub-t.run::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -14px; height: 34px; background: repeating-linear-gradient(90deg, #6B7385 0 24px, #F5F1E6 24px 34px); transform: perspective(60px) rotateX(40deg); opacity: .35; }

/* ---------- Larian Oyen 3D ---------- */
.runner-screen { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; padding: 0 !important; gap: 0; touch-action: none; user-select: none; -webkit-user-select: none; background: #9ED8FF; overflow: hidden; z-index: 5; }
.runner-screen canvas#rc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.r-top { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; z-index: 3; }
.r-top .chip { font-size: 1.05rem; }
.r-pw { display: flex; gap: 6px; margin-left: auto; }
.r-pw span { background: rgba(255,255,255,.92); border-radius: 999px; padding: 6px 10px; font-weight: 900; box-shadow: 0 3px 0 var(--line); }
.r-q { position: absolute; top: calc(max(10px, env(safe-area-inset-top, 0px)) + 60px); left: 50%; transform: translateX(-50%); z-index: 3; background: #FFC23D; border: 4px solid var(--ink); border-radius: 22px; padding: 6px 18px 8px; text-align: center; box-shadow: 0 5px 0 rgba(27,42,74,.3); max-width: calc(100% - 24px); }
.r-q small { display: block; font-weight: 900; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.r-q b { font-family: var(--f-display); font-size: 1.8rem; line-height: 1.1; white-space: nowrap; }
.r-q.pop { animation: rqPop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes rqPop { from { transform: translateX(-50%) scale(.5) } to { transform: translateX(-50%) scale(1) } }
.r-qc { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.r-qc i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); }
.r-count { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; font-family: var(--f-display); font-weight: 800; font-size: 6rem; color: #FFC23D; text-shadow: 3px 0px 0 var(--ink), -3px 0px 0 var(--ink), 0px 3px 0 var(--ink), 0px -3px 0 var(--ink), 2.1px 2.1px 0 var(--ink), -2.1px 2.1px 0 var(--ink), 2.1px -2.1px 0 var(--ink), -2.1px -2.1px 0 var(--ink), 0 7px 0 rgba(27,42,74,.35); }
.r-count.pop { animation: pop .5s; }
.r-ov { position: absolute; inset: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, transparent 35%, rgba(27,42,74,.55)); }
.r-card { width: 100%; background: rgba(227,242,250,.96); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: sheetUp .4s cubic-bezier(.22,1,.36,1); text-align: center; }
.r-card h1 { font-size: 1.7rem; }
.r-sub { margin: 0; color: var(--muted); font-weight: 800; }
.r-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; text-align: left; }
.r-how li { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; border-radius: 14px; padding: 6px 6px 8px; font-weight: 800; font-size: .74rem; line-height: 1.2; text-align: center; box-shadow: 0 2px 0 var(--line); }
.r-how li span { font-size: 1.15rem; }
.r-score b { display: block; font-family: var(--f-display); font-size: 3.4rem; line-height: 1; color: var(--oyen-dark); }
.r-score small { font-weight: 900; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.r-score small svg { width: 20px; height: 20px; }
.r-spin { font-size: 3rem; animation: wiggle 1s infinite; }
#rload { align-items: center; background: rgba(158,216,255,.92); }
@media (prefers-reduced-motion: reduce) { .hub-t.run .hub-oy { animation: none; } }

/* ---------- bilik 3D ---------- */
.room canvas.room3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.room.r3d { background: #FFE9D2; justify-content: flex-start; }
.room.r3d.night { background: #2B3A70; }
.room.r3d .window, .room.r3d .shelf, .room.r3d .rug { display: none; }
.room.r3d .bubble { margin-top: 0; z-index: 2; pointer-events: none; }
.room.r3d .fx { z-index: 3; }

/* ---------- Lumba Oyen 3D ---------- */
.hub-t.race { --wc: #F2545B; --wd: #C93A44; background: linear-gradient(165deg, #FFE1D6, #FFF6F0 55%, #E4E8F0); }
.hub-t.race .hi svg { width: 64px; height: 64px; }
.hub-t.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; gap: 12px; }
.hub-t.wide .hi { margin: 0; flex: none; }
.hub-t.wide b { margin-right: auto; }
.rc-pos { background: #fff; border-radius: 16px; padding: 2px 12px; box-shadow: 0 3px 0 var(--line); font-family: var(--f-display); line-height: 1; display: flex; align-items: baseline; gap: 2px; }
.rc-pos b { font-size: 1.9rem; color: var(--ink); }
.rc-pos small { font-weight: 900; color: var(--muted); }
.rc-pos.first b { color: #E8A100; }
.rc-info { display: flex; flex-direction: column; gap: 4px; }
.rc-info .chip { font-size: .92rem; padding: 4px 10px; }
.rc-map { margin-left: auto; width: 84px; height: 84px; background: rgba(255,255,255,.55); border-radius: 18px; box-shadow: 0 3px 0 rgba(27,42,74,.2); }
.racer-screen .r-q { top: calc(max(10px, env(safe-area-inset-top, 0px)) + 100px); }
.rc-pad { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; align-items: flex-end; padding: 0 14px; z-index: 3; pointer-events: none; }
.rc-btn { pointer-events: auto; width: 86px; height: 86px; border-radius: 50%; background: rgba(255,255,255,.82); color: var(--ink); font-size: 2.2rem; box-shadow: 0 6px 0 rgba(27,42,74,.25); border: 4px solid rgba(27,42,74,.15); touch-action: none; }
.rc-btn.on { transform: translateY(4px) scale(.95); background: #FFC23D; box-shadow: 0 2px 0 rgba(27,42,74,.25); }
.rc-kmh { background: rgba(27,42,74,.7); color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 900; margin-bottom: 26px; font-size: .9rem; }
.rc-kmh b { font-family: var(--f-display); font-size: 1.2rem; }
.rc-boost { position: absolute; left: 50%; top: 42%; transform: translateX(-50%) rotate(-6deg); z-index: 3; font-family: var(--f-display); font-weight: 800; font-size: 2.6rem; color: #FFE27A; text-shadow: 2.5px 0px 0 var(--ink), -2.5px 0px 0 var(--ink), 0px 2.5px 0 var(--ink), 0px -2.5px 0 var(--ink), 1.8px 1.8px 0 var(--ink), -1.8px 1.8px 0 var(--ink), 1.8px -1.8px 0 var(--ink), -1.8px -1.8px 0 var(--ink), 0 5px 0 rgba(27,42,74,.35); pointer-events: none; animation: boostPulse .35s ease-in-out infinite alternate; }
@keyframes boostPulse { to { transform: translateX(-50%) rotate(-6deg) scale(1.12) } }
.rc-lights { flex-direction: column; gap: 8px; }
.rc-lights .lights { display: flex; gap: 12px; background: #1B2A4A; padding: 12px 16px; border-radius: 20px; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.rc-lights .lights i { width: 34px; height: 34px; border-radius: 50%; background: #3A4566; }
.rc-lights .lights i.on { background: #F2545B; box-shadow: 0 0 16px #F2545B; }
.rc-lights .lights i.go { background: #2FD36B; box-shadow: 0 0 16px #2FD36B; }
.rc-lights b { font-size: 4.4rem; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin-top: 4px; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 31%; min-width: 0; }
.pd.p1 { order: 2; } .pd.p2 { order: 1; } .pd.p3 { order: 3; }
.pdn { font-weight: 900; font-size: .78rem; text-align: center; overflow-wrap: anywhere; line-height: 1.15; }
.pd.me .pdn { color: var(--oyen-dark); }
.pdb { width: 100%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; color: #fff; background: var(--kc); border-radius: 12px 12px 4px 4px; border: 3px solid var(--ink); }
.pd.p1 .pdb { height: 74px; } .pd.p2 .pdb { height: 56px; } .pd.p3 .pdb { height: 42px; }
.tpls { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
.tpls::-webkit-scrollbar { display: none; }
.tpls .tpl { flex: 0 0 76px; }

/* ---------- Oyen 2D hidup + latar cuaca ---------- */
.room.live2d { min-height: 0; height: clamp(300px, 86vw, 380px); padding: 0; justify-content: flex-start; background: #BFE6FF; touch-action: pan-y; }
.room.live2d .window, .room.live2d .shelf, .room.live2d .rug { display: none; }
.room.live2d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.room.live2d .bubble { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); margin: 0; z-index: 4; pointer-events: none; width: max-content; max-width: 74%; }
.room.live2d .bubble { animation: bubLifeA 7s ease forwards; }
.room.live2d .bubble.pop { animation: bubLifeB 7s ease forwards; }
@keyframes bubLifeA { 0% { opacity: 0; transform: translateX(-50%) scale(.6) } 3% { opacity: 1; transform: translateX(-50%) scale(1.08) } 6%, 86% { opacity: 1; transform: translateX(-50%) scale(1) } 100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.96) } }
@keyframes bubLifeB { 0% { opacity: 0; transform: translateX(-50%) scale(.6) } 3% { opacity: 1; transform: translateX(-50%) scale(1.08) } 6%, 86% { opacity: 1; transform: translateX(-50%) scale(1) } 100% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.96) } }
.room.live2d .fx, .room.live2d .yarn { z-index: 5; }
.room.live2d .yarn { bottom: 9%; }
.lh-chip { display: none; }
.room.live2d .lh-chip { display: inline-flex; position: absolute; right: 10px; top: 10px; z-index: 4; align-items: center; gap: 4px; background: rgba(255,255,255,.88); border-radius: 999px; padding: 4px 10px; font-weight: 900; font-size: .85rem; box-shadow: 0 3px 0 rgba(27,42,74,.15); min-height: 36px; }
.room.live2d .lh-chip span { color: var(--muted); }
.wx-sel { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.wx-sel select { font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: var(--r-md); border: 3px solid var(--line); background: var(--bg); color: var(--ink); }

/* ===== 🔬 Sains & Teknologi ===== */
.pnode.sci .gnode { background: linear-gradient(160deg, #E6FBF6, #D4F1FF); border-color: #13A89E; box-shadow: 0 7px 0 #0E8A82; }
.pnode.sci .gnode .num { background: #13A89E; font-size: .85rem; }
.sci-tag { display: inline-block; white-space: nowrap; font-size: .68rem; font-weight: 900; color: #0E8A82; background: #E0F7F3; border-radius: 999px; padding: 1px 8px; margin-bottom: 2px; }
.opt svg.circ { max-width: 100%; max-height: none; width: 100%; height: auto; }
.stagebox svg.circ { max-width: 78%; height: auto; }
.stmt-txt { font-size: clamp(1.05rem, 5.4vw, 1.4rem); line-height: 1.25; text-align: center; }
.opt .code { font-size: 1.5rem; letter-spacing: 2px; font-family: var(--f-body); }
.rgrid.mini { width: min(220px, 70%); margin: 0 auto; }
.rgrid.mini .cell { font-size: clamp(1rem, 6vw, 1.6rem); }
/* Kod Robot Oyen */
.code-wrap { display: grid; gap: 10px; }
.rgrid.code { width: min(360px, 100%); margin: 0 auto; background: #A7D3F2; box-shadow: inset 0 0 0 4px #7FB6DE; }
.rgrid.code .cell { background: #DDF0FF; }
.rgrid.code .cell.blk { background: #C2DDF2; }
.rgrid.code .cell.trail { background: #FFF1B8; }
.cmdq .blk-c { display: inline-flex; align-items: center; gap: 1px; background: #EEF5FF; border-radius: 10px; padding: 2px 6px; box-shadow: 0 2px 0 var(--line); }
.cmdq .blk-c.loop { background: #FFE9C9; }
.cmdq .blk-c sub { font-size: .8rem; font-weight: 900; color: var(--mango-dark); }
.cmdq .blk-c.on { outline: 3px solid var(--mango); transform: translateY(-2px); }
.cmdq .hint-c { font-size: .9rem; font-weight: 900; background: #FFF6DB; border-radius: 10px; padding: 2px 8px; animation: pop .3s; }
.arrows.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.arrows .loopb { background: #FFE9C9; }
/* Bonus Sains di skrin keputusan */
.sci-bonus { width: min(420px, 100%); background: linear-gradient(160deg, #E9FBF7, #EAF4FF); border: 3px solid #9ADFD3; border-radius: 22px; padding: 12px 14px; text-align: left; box-shadow: 0 5px 0 #BFE9E1; }
.sb-head { display: flex; align-items: center; gap: 8px; }
.sb-head b { flex: 1; font-size: .95rem; color: #0E6F69; }
.sb-ico { font-size: 1.4rem; }
.sb-say { width: 38px; height: 38px; font-size: 1rem; }
.sb-q { margin: 6px 0 10px; font-weight: 900; font-size: 1.05rem; line-height: 1.3; }
.sb-opts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.sb-o { min-height: 52px; border-radius: 14px; background: var(--surface); box-shadow: 0 4px 0 var(--line); font-weight: 900; font-size: .9rem; line-height: 1.15; padding: 6px; }
.sb-o.emo { font-size: 1.7rem; }
.sb-o.right { background: var(--leaf); color: #fff; box-shadow: 0 4px 0 var(--leaf-dark); animation: pop .35s; }
.sb-o.wrong { background: #FFE1E2; color: var(--hibiscus); animation: shake .35s; }
.sb-o.dim { opacity: .5; }
.sb-fact { margin: 10px 0 0; font-size: .92rem; line-height: 1.4; background: #fff; border-radius: 14px; padding: 8px 10px; animation: pop .3s; }
.wx-sci { background: #E9FBF7; border-radius: 14px; padding: 8px 10px; font-size: .92rem; line-height: 1.4; }
.r-tip { max-width: 300px; margin: 10px auto 0; font-size: .9rem; line-height: 1.4; background: #E9FBF7; border-radius: 14px; padding: 8px 10px; color: var(--ink); }
/* soalan sains di pintu 3D lebih panjang: benarkan dua baris & saiz lebih kecil */
.r-q b { display: block; white-space: normal; text-wrap: balance; font-size: clamp(1.25rem, 6.4vw, 1.8rem); }
.r-q { width: max-content; }

/* ===== Profil anak: kunci gambar ===== */
.pcard { position: relative; }
.pcard.cur { outline: 3px solid var(--mango); outline-offset: -3px; }
.p-lock { position: absolute; top: 8px; right: 10px; font-size: 1.2rem; }
.lockgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.lk { aspect-ratio: 1; border-radius: 18px; background: var(--surface); box-shadow: var(--pop); font-size: 2.4rem; }
.lk:active { transform: translateY(3px); }
.lk.bad { animation: shake .35s; background: #FFE1E2; }
.lockpick { display: flex; flex-wrap: wrap; gap: 6px; }
.lockpick button { min-width: 44px; height: 44px; border-radius: 12px; background: var(--surface); box-shadow: 0 3px 0 var(--line); font-size: 1.4rem; padding: 0 8px; }
.lockpick button:first-child { font-size: .85rem; font-weight: 900; }
.lockpick button.on { background: var(--mango); color: #fff; box-shadow: 0 3px 0 var(--mango-dark); }
.vdiag { background: #F4F8FF; border-radius: 14px; padding: 8px 12px; font-size: .9rem; }
.vdiag ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vdiag li.no { color: var(--hibiscus); font-weight: 800; }
.vdiag li.tip { color: var(--muted); }
.vdiag code { background: #fff; padding: 1px 6px; border-radius: 6px; }

/* ===== 🎮 Hab Game 3D ===== */
.hub-t.g3 { --wc: #2E9FD6; --wd: #1B78A6; background: linear-gradient(160deg, #D9F1FF, #FFF4E0 60%, #DFF5D6); padding: 10px 12px; }
.hub-t.g3 .hi { width: 72px; height: 72px; }
.hub-t.g3 .hub-oy { width: 72px; height: auto; animation: hubRun .5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.hub-t.g3 .g3t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.hub-t.g3 .g3t b { font-size: 1.3rem; margin: 0; }
.g3row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.g3row i { font-style: normal; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: #fff; box-shadow: 0 2px 0 var(--gc); font-size: 1.05rem; }
.g3grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.g3card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px; min-height: 150px; border-radius: var(--r-lg); background: linear-gradient(170deg, #fff 55%, color-mix(in srgb, var(--gc) 18%, #fff)); border: 3px solid var(--gc); box-shadow: 0 5px 0 color-mix(in srgb, var(--gc) 70%, #000); min-width: 0; }
.g3card:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--gc) 70%, #000); }
.g3card .g3i { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 0 rgba(27,42,74,.15)); }
.g3card b { font-family: var(--f-display); font-size: 1.1rem; line-height: 1.1; }
.g3card small { color: var(--muted); font-weight: 800; font-size: .78rem; line-height: 1.2; }
.g3card .g3l { font-size: .7rem; font-weight: 900; color: color-mix(in srgb, var(--gc) 75%, #000); background: color-mix(in srgb, var(--gc) 14%, #fff); border-radius: 999px; padding: 2px 8px; margin-top: auto; }
.g3card .g3b { font-size: .72rem; font-weight: 900; color: var(--ink); }
.g3card em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: .64rem; font-weight: 900; background: #FFC23D; color: var(--ink); padding: 2px 7px; border-radius: 999px; }
/* cangkerang game */
.g3-screen .g3-ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.g3-screen .g3-ui > * { pointer-events: auto; }
.g3-screen .g3-ui > .g3-trail { pointer-events: none; position: absolute; inset: 0; }
.g3-screen .r-top { flex-wrap: wrap; }
.g3-screen .g3-tm.low { background: #FFE1E2; color: var(--hibiscus); animation: pop .5s infinite alternate; }
.g3-prog { flex: 1; min-width: 90px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 3px rgba(27,42,74,.15); position: relative; overflow: hidden; }
.g3-prog i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gc), #FFC23D); border-radius: 999px; transition: width .4s; }
.g3-prog span { position: relative; display: block; text-align: center; font-size: .72rem; font-weight: 900; line-height: 22px; color: var(--ink); white-space: nowrap; }
.g3-q { top: calc(max(10px, env(safe-area-inset-top, 0px)) + 64px); }
.g3-q small { display: block; }
.g3-tip { position: absolute; left: 16px; right: 16px; margin: 0 auto; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); z-index: 4; width: fit-content; max-width: calc(100% - 32px); background: rgba(255,255,255,.95); border: 3px solid var(--ink); border-radius: 18px; padding: 6px 14px; font-weight: 900; text-align: center; pointer-events: none; box-shadow: 0 4px 0 rgba(27,42,74,.25); }
.g3-tip.pop { animation: pop .35s; }
/* butang kawalan dalam game */
.g3-pad { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; gap: 10px; padding: 0 12px; }
.g3-pad button { min-width: 64px; height: 64px; border-radius: 20px; background: rgba(255,255,255,.92); box-shadow: 0 5px 0 rgba(27,42,74,.25); font-size: 1.7rem; font-weight: 900; }
.g3-pad button:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(27,42,74,.25); }
.g3-pad button.on { background: var(--mango); color: #fff; box-shadow: 0 5px 0 var(--mango-dark); }
.g3-pad button small { display: block; font-size: .62rem; line-height: 1; }
.g3-pad.tools { gap: 6px; padding: 0 8px; }
.g3-pad.tools button { min-width: 52px; flex: 0 1 60px; height: 66px; font-size: 1.55rem; padding: 4px 4px; }

/* senarai rakaman sendiri (Ruang Ibu Bapa → Suara Oyen) */
.own-list { margin: 6px 0 10px; }
.own-list summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.own-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 240px; overflow-y: auto; }
.own-chip { padding: 6px 10px; border-radius: 999px; background: #FFF4E0; box-shadow: inset 0 0 0 2px rgba(27,42,74,.12); font-weight: 800; font-size: .78rem; color: var(--ink); }
.own-chip:active { background: var(--mango); color: #fff; }

/* ================= 👫 MAIN BERSAMA (game 2D 1–4 pemain, satu peranti) ================= */
.hub-t.party { background: linear-gradient(135deg, #FFF0F6, #E8F6FF); }
.hub-t.party .ptyrow { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.hub-t.party .ptyrow i { font-style: normal; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gc) 45%, transparent); font-size: .95rem; }
.hub-t.party .ptyplayers { display: flex; margin-top: 2px; }
.hub-t.party .ptyplayers i { width: 30px; height: 30px; margin-right: -8px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px #fff; }
.hub-t.party .ptyplayers i svg, .hub-t.party .ptyplayers i img { width: 100%; height: 100%; }
.pcard em { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: .64rem; font-weight: 900; background: #FFC23D; color: var(--ink); padding: 2px 7px; border-radius: 999px; }
/* pilih pemain */
.psetup .pnum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.psetup .pnum button { min-height: 84px; border-radius: 20px; background: #fff; box-shadow: var(--pop); font-weight: 900; font-size: 1.5rem; display: grid; place-items: center; gap: 2px; }
.psetup .pnum button small { font-size: .62rem; font-weight: 800; color: var(--muted); }
.psetup .pnum button.on { background: var(--gc, var(--mango)); color: #fff; box-shadow: 0 5px 0 rgba(27,42,74,.3); }
.psetup .pnum button.on small { color: #fff; }
.psetup .plist { display: grid; gap: 8px; margin-top: 10px; }
.psetup .prow { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 6px 10px; box-shadow: inset 0 0 0 3px var(--pc); }
.psetup .prow .pav { width: 44px; height: 44px; flex: none; }
.psetup .prow .pav svg, .psetup .prow .pav img { width: 100%; height: 100%; }
.psetup .prow input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; font-weight: 800; font-size: 1.05rem; color: var(--ink); padding: 8px 0; }
.psetup .prow small { color: var(--muted); font-weight: 800; white-space: nowrap; }
.psetup .seatmap { display: grid; place-items: center; margin: 8px 0; }
.psetup .seatmap svg { width: 150px; height: auto; }
/* skrin game */
.party-screen { position: fixed; inset: 0; max-width: none; margin: 0; padding: 0 !important; gap: 0; background: var(--ink); touch-action: manipulation; user-select: none; -webkit-user-select: none; overflow: hidden; z-index: 5; }
.pz { position: absolute; inset: 0; display: grid; gap: 4px; padding: 4px; background: #1B2A4A; overflow: hidden; }
.pzone { position: relative; min-width: 0; min-height: 0; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 14%, #fff), #fff 60%); box-shadow: inset 0 0 0 4px var(--pc); display: flex; flex-direction: column; overflow: hidden; --u: 3.6px; }
.pzone.flip { transform: rotate(180deg); }
.pz-head { display: flex; gap: 4px; padding: calc(var(--u) * 1.6) calc(var(--u) * 2) 0; flex-wrap: nowrap; overflow: hidden; }
.pz-chip { display: inline-flex; align-items: center; gap: 3px; background: #fff; border-radius: 999px; padding: 2px 8px 2px 2px; box-shadow: inset 0 0 0 2px var(--pc); font-weight: 900; font-size: calc(var(--u) * 3.2); color: var(--ink); min-width: 0; }
.pz-chip b { max-width: 8ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82em; }
.pz-chip em { font-style: normal; background: var(--pc); color: #fff; border-radius: 999px; padding: 0 6px; min-width: 1.6em; text-align: center; }
.pz-chip.lead em::after { content: " 👑"; }
.pzone .pz-chip:not([data-c]) { display: none; }
.pz-av { display: inline-block; width: calc(var(--u) * 6.4); height: calc(var(--u) * 6.4); min-width: 22px; min-height: 22px; border-radius: 50%; overflow: hidden; background: #fff; }
.pz-av svg, .pz-av img { width: 100%; height: 100%; display: block; }
.pzone[data-p="0"] .pz-chip[data-c="0"], .pzone[data-p="1"] .pz-chip[data-c="1"], .pzone[data-p="2"] .pz-chip[data-c="2"], .pzone[data-p="3"] .pz-chip[data-c="3"] { order: -1; flex: 0 1 auto; background: var(--pc); color: #fff; }
.pzone[data-p="0"] .pz-chip[data-c="0"] em, .pzone[data-p="1"] .pz-chip[data-c="1"] em, .pzone[data-p="2"] .pz-chip[data-c="2"] em, .pzone[data-p="3"] .pz-chip[data-c="3"] em { background: #fff; color: var(--ink); }
.pz-q { margin: calc(var(--u) * 1.4) calc(var(--u) * 2.4) 0; text-align: center; color: var(--ink); line-height: 1.15; min-height: calc(var(--u) * 6); }
.pz-q small { display: block; font-size: calc(var(--u) * 2.8); font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pz-q b { font-family: var(--f-display); font-size: calc(var(--u) * 5.2); font-weight: 800; }
.pz-q.pop { animation: pop .35s; }
.pz-body { flex: 1; position: relative; min-height: 0; padding: calc(var(--u) * 2); display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: calc(var(--u) * 2); }
.pz-fx { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 6; }
.pz-fx.show { opacity: 1; }
.pz-fx b { font-size: calc(var(--u) * 26); line-height: 1; text-shadow: 0 4px 0 rgba(27,42,74,.25); }
.pz-fx.ok b { color: #22A06B; } .pz-fx.bad b { color: #E2384A; }
.pz-fx small { display: block; margin-top: 4px; background: #fff; border-radius: 14px; padding: 4px 10px; font-weight: 900; font-size: calc(var(--u) * 3.6); color: var(--ink); box-shadow: 0 3px 0 rgba(27,42,74,.2); max-width: 90%; text-align: center; }
.pz-frz { position: absolute; inset: 0; background: rgba(27,42,74,.35); display: none; place-items: center; font-size: calc(var(--u) * 14); z-index: 5; border-radius: 18px; }
.pzone.frozen .pz-frz { display: grid; }
.pz-plus { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-weight: 900; font-size: calc(var(--u) * 9); color: var(--pc); text-shadow: 0 2px 0 #fff; animation: pzPlus .9s ease-out forwards; pointer-events: none; z-index: 7; }
@keyframes pzPlus { from { opacity: 1; transform: translate(-50%, 0) scale(.8); } to { opacity: 0; transform: translate(-50%, -60px) scale(1.2); } }
.pz-extra { background: linear-gradient(180deg, #FFF4E0, #FFE3B8); box-shadow: inset 0 0 0 4px #FFC23D; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; }
.pz-extra-oy { width: 55%; max-width: 160px; aspect-ratio: 1; } .pz-extra-oy svg, .pz-extra-oy img { width: 100%; height: 100%; }
.pz-extra-t { font-weight: 900; color: var(--ink); padding: 0 8px; }
.pz-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20; display: flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 6px; box-shadow: 0 0 0 4px #1B2A4A, 0 4px 12px rgba(0,0,0,.25); font-weight: 900; }
.pz-mid .pz-pause { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1rem; font-weight: 900; }
.pz-mid .pz-info:empty { display: none; }
.pz-mid .pz-info { padding: 0 8px 0 2px; font-size: .95rem; white-space: nowrap; }
.pz-mid.low .pz-info { color: #FFC23D; animation: pop .5s infinite alternate; }
.pz-n1:not(.pz-tug) .pz-mid { left: auto; right: 10px; top: 10px; transform: none; }
.pz-turn .pz-mid { top: auto; bottom: 8px; transform: translateX(-50%); }
.pz-count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; font-family: var(--f-display); font-size: 5rem; font-weight: 800; color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.25); pointer-events: none; }
.pz-count.pop { animation: pop .5s; }
/* butang jawapan umum dalam zon */
.pz-opts { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: calc(var(--u) * 2); }
.pz-opt { min-height: calc(var(--u) * 15); border-radius: calc(var(--u) * 4); background: #fff; box-shadow: 0 calc(var(--u) * 1.2) 0 color-mix(in srgb, var(--pc) 45%, #B7D5E6), inset 0 0 0 2px color-mix(in srgb, var(--pc) 30%, transparent); display: grid; place-items: center; padding: calc(var(--u) * 1.2); font-family: var(--f-display); font-weight: 800; font-size: calc(var(--u) * 6.4); color: var(--ink); line-height: 1.05; text-align: center; overflow: hidden; }
.pz-opt:active { transform: translateY(2px); }
.pz-opt.txt { font-size: calc(var(--u) * 4.2); }
.pz-opt.right { background: #D9F7E5; box-shadow: inset 0 0 0 4px #22A06B; }
.pz-opt.wrong { background: #FFE1E2; box-shadow: inset 0 0 0 4px #E2384A; animation: shake .35s; }
.pz-opt svg { max-width: 100%; max-height: calc(var(--u) * 18); }
.pz-opt .coin, .pz-stage .coin { transform: scale(.8); }
.pz-stage { text-align: center; font-size: calc(var(--u) * 9); line-height: 1.1; max-height: calc(var(--u) * 26); overflow: hidden; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; }
.pz-stage svg { max-height: calc(var(--u) * 24); width: auto; }
.pz-stage .eq { font-size: calc(var(--u) * 7); font-weight: 900; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
/* mod giliran (papan dikongsi) */
.pz-turn { display: block; background: linear-gradient(180deg, #2B3B66, #1B2A4A); }
.pt-board { position: absolute; left: 4px; right: 4px; top: 60px; bottom: 60px; display: grid; place-items: center; }
.pt-seat { position: absolute; z-index: 10; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 4px 12px 4px 4px; box-shadow: inset 0 0 0 3px var(--pc); font-weight: 900; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.pt-seat .pz-av { width: 38px; height: 38px; }
.pt-seat em { font-style: normal; background: var(--pc); color: #fff; border-radius: 999px; padding: 1px 8px; }
.pt-seat.s0 { left: 8px; bottom: 8px; } .pt-seat.s3 { right: 8px; bottom: 8px; }
.pt-seat.s1 { right: 8px; top: 8px; } .pt-seat.s2 { left: 8px; top: 8px; }
.pt-seat.flip { transform: rotate(180deg); }
.pt-seat.now { box-shadow: inset 0 0 0 3px var(--pc), 0 0 0 5px var(--pc), 0 0 22px var(--pc); background: color-mix(in srgb, var(--pc) 22%, #fff); }
.pt-seat.now::after { content: "👈"; margin-left: 2px; animation: pop .6s infinite alternate; }
.pt-seat.s1.now::after, .pt-seat.s3.now::after { content: "👉"; order: -1; }
.pt-seat.lead em::after { content: " 👑"; }
/* keputusan */
.pres { position: absolute; inset: 0; z-index: 40; background: rgba(27,42,74,.72); display: grid; place-items: center; padding: 16px; }
.pres .r-card { width: min(420px, 100%); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 10px 0 6px; }
.podium .pp { display: grid; justify-items: center; gap: 4px; width: 25%; max-width: 92px; }
.podium .pp .pz-av { width: 56px; height: 56px; box-shadow: 0 0 0 3px var(--pc); }
.podium .pp b { font-size: .8rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .pp .blk { width: 100%; border-radius: 12px 12px 0 0; background: var(--pc); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 1.1rem; }
.podium .pp.p1 .blk { height: 92px; } .podium .pp.p2 .blk { height: 66px; } .podium .pp.p3 .blk { height: 48px; } .podium .pp.p4 .blk { height: 34px; }
.podium .pp.p1 .pz-av { width: 70px; height: 70px; }
.podium .pp .crown { font-size: 1.4rem; line-height: 1; height: 1.4rem; }
.pz.paused *, .pz.paused *::before, .pz.paused *::after { animation-play-state: paused !important; }
/* --- game: Tarik Tali --- */
.pz-band { position: relative; min-height: 120px; height: 24vh; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, #2E9FD6 22%, #fff), #FFF4E0 50%, color-mix(in srgb, #FF8A1F 22%, #fff)); box-shadow: inset 0 0 0 4px #FFC23D; overflow: hidden; }
.pz-tug .pz-mid { left: auto; right: 10px; transform: translateY(-50%); }
.tug { position: absolute; inset: 0; }
.tug-team { position: absolute; display: flex; align-items: center; gap: 6px; font-weight: 900; color: var(--ink); background: #fff; border-radius: 999px; padding: 3px 10px 3px 3px; box-shadow: 0 2px 0 rgba(27,42,74,.2); max-width: 44%; font-size: .85rem; }
.tug-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tug-team .pz-av { width: 34px; height: 34px; }
.tug-team.top { top: 6px; left: 8px; transform: rotate(180deg); }
.tug-team.bot { bottom: 6px; left: 8px; }
.tug-team.win { background: #FFC23D; animation: pop .5s infinite alternate; }
.tug-track { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 60px; transform: translateX(-50%); }
.tug-rope { position: absolute; left: 50%; top: -40%; bottom: -40%; width: 10px; margin-left: -5px; border-radius: 6px; background: repeating-linear-gradient(45deg, #C8893F 0 6px, #A86E2C 6px 12px); transition: transform .25s; }
.tug-goal { position: absolute; left: -30px; right: -30px; height: 5px; border-radius: 3px; }
.tug-goal.top { top: 0; background: #2E9FD6; } .tug-goal.bot { bottom: 0; background: #FF8A1F; }
.tug-mid { position: absolute; left: -16px; right: -16px; top: 50%; border-top: 3px dashed rgba(27,42,74,.35); }
.tug-knot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 2rem; transition: top .25s cubic-bezier(.34,1.56,.64,1); filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }
.pz-tugtop { background: linear-gradient(180deg, #E9EEF4, #fff); box-shadow: inset 0 0 0 4px #6B7686; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; }
/* --- Lumba Ejaan & Suku Kata --- */
.sp-pic { text-align: center; font-size: calc(var(--u) * 15); line-height: 1; }
.sp-slots { display: grid; grid-template-columns: repeat(var(--k), minmax(0, 1fr)); gap: calc(var(--u) * 1); max-width: calc(var(--k) * var(--u) * 13); margin: 0 auto; width: 100%; }
.sp-slots i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; border-radius: calc(var(--u) * 2.4); background: #fff; box-shadow: inset 0 calc(var(--u) * -0.8) 0 color-mix(in srgb, var(--pc) 40%, #DCE7F0); font-family: var(--f-display); font-weight: 800; font-size: calc(var(--u) * 6); color: var(--ink); }
.sp-slots i.on { background: var(--pc); color: #fff; animation: pop .3s; }
.syl ~ .sp-slots i, .sp-slots:has(+ .syl) i { aspect-ratio: auto; min-height: calc(var(--u) * 11); font-size: calc(var(--u) * 5); }
.sp-tiles { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: calc(var(--u) * 1.6); }
.sp-tile { min-height: calc(var(--u) * 12); font-size: calc(var(--u) * 6.4); }
.sp-tiles.syl .sp-tile { font-size: calc(var(--u) * 5.2); }
.sp-tile.used { opacity: .18; transform: scale(.9); }
/* --- Pop Belon --- */
.pb-bal { position: absolute; bottom: -24%; width: calc(var(--u) * 17); min-width: 54px; aspect-ratio: .82; border-radius: 50% 50% 48% 48%; background: radial-gradient(circle at 32% 28%, #fff8 0 12%, transparent 13%), var(--bc); box-shadow: inset calc(var(--u) * -1.6) calc(var(--u) * -2) 0 rgba(0,0,0,.15); color: #fff; font-weight: 900; font-size: calc(var(--u) * 6); display: grid; place-items: center; animation: pbRise linear forwards; z-index: 2; }
.pb-bal::after { content: ""; position: absolute; left: 50%; bottom: -18%; width: 2px; height: 22%; background: rgba(27,42,74,.35); }
.pb-bal span { text-shadow: 0 2px 0 rgba(0,0,0,.25); max-width: 90%; overflow: hidden; }
.pb-bal.popped { animation: pbPop .25s forwards !important; }
@keyframes pbRise { from { transform: translateY(0); } to { transform: translateY(calc(-1 * (100cqh + 140%))); } }
@keyframes pbPop { to { transform: scale(1.6); opacity: 0; } }
.pz-body:has(.pb-bal) { container-type: size; overflow: hidden; }
/* --- Pasar Oyen --- */
.ps-purse { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border-radius: 999px; padding: 4px 6px 4px 14px; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--pc) 40%, #DCE7F0); font-weight: 900; color: var(--ink); font-size: calc(var(--u) * 4.2); align-self: center; }
.ps-purse span { color: var(--muted); font-size: .8em; }
.ps-undo { width: calc(var(--u) * 9); height: calc(var(--u) * 9); min-width: 34px; min-height: 34px; border-radius: 50%; background: #FFF4E0; font-size: calc(var(--u) * 4.4); }
.ps-coins { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: calc(var(--u) * 1.6); }
.ps-coin { min-height: calc(var(--u) * 16); }
.ps-coin .coin { width: calc(var(--u) * 13); height: calc(var(--u) * 13); min-width: 40px; min-height: 40px; font-size: calc(var(--u) * 4); transform: none; }
.ps-coin .note { height: calc(var(--u) * 11); min-height: 34px; font-size: calc(var(--u) * 4.2); }
.ps-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: calc(var(--u) * 7); }
.ps-tray .coin { width: calc(var(--u) * 7); height: calc(var(--u) * 7); min-width: 22px; min-height: 22px; font-size: calc(var(--u) * 2.4); border-width: 2px; }
.ps-tray .coin small { display: none; } .ps-tray .note { height: calc(var(--u) * 6); min-height: 20px; font-size: calc(var(--u) * 2.6); padding: 0 6px; border-width: 2px; }
/* --- Isih Sains --- */
.is-item { display: grid; place-items: center; }
.is-item span { width: calc(var(--u) * 30); height: calc(var(--u) * 30); min-width: 90px; min-height: 90px; border-radius: calc(var(--u) * 6); background: #fff; box-shadow: 0 calc(var(--u) * 1.4) 0 color-mix(in srgb, var(--pc) 40%, #DCE7F0); display: grid; place-items: center; font-size: calc(var(--u) * 17); font-weight: 900; color: var(--ink); animation: pop .3s; }
.is-item span svg { width: 70%; height: 70%; }
.is-bins { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: calc(var(--u) * 2); }
.is-bin { min-height: calc(var(--u) * 17); font-size: calc(var(--u) * 4.2); }
/* --- mod giliran: Ular Tangga & Memori --- */
.pt-modal { position: absolute; inset: 0; z-index: 35; background: rgba(27,42,74,.55); display: grid; place-items: center; padding: 18px; --u: 3.4px; }
.pt-modal.flip { transform: rotate(180deg); }
.pt-card { width: min(380px, 100%); background: #fff; border-radius: 22px; padding: 14px; box-shadow: inset 0 0 0 5px var(--pc), 0 10px 30px rgba(0,0,0,.3); display: grid; gap: 10px; text-align: center; }
.pt-card small { font-weight: 900; color: var(--pc); }
.pt-card h3 { margin: 0; font-family: var(--f-display); font-size: 1.5rem; color: var(--ink); }
.pt-card .pz-opt { --pc: #1B2A4A; min-height: 64px; font-size: 1.7rem; }
.pt-card .pz-opt.txt { font-size: 1.05rem; }
.pt-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 34; background: #fff; color: var(--ink); border-radius: 18px; padding: 10px 18px; font-weight: 900; font-size: 1.2rem; box-shadow: inset 0 0 0 4px var(--pc, #FFC23D), 0 8px 20px rgba(0,0,0,.3); animation: pop .35s; pointer-events: none; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.pt-banner.flip { transform: translate(-50%, -50%) rotate(180deg); }
.ul-wrap { position: relative; width: min(100%, calc((100vh - 140px) * 5 / 6)); aspect-ratio: 5 / 6; }
.ul-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(6, 1fr); gap: 3px; }
.ul-c { position: relative; border-radius: 10px; background: #FFF4E0; display: grid; place-items: center; overflow: hidden; }
.ul-c.alt { background: #FFE3B8; } .ul-c.q { background: #DFF0FF; box-shadow: inset 0 0 0 3px #2E9FD6; }
.ul-c[data-n="30"] { background: #FFC23D; }
.ul-c small { position: absolute; left: 5px; top: 3px; font-weight: 900; color: rgba(27,42,74,.55); font-size: .72rem; }
.ul-c i { font-style: normal; font-size: 1.5rem; }
.ul-c em { position: absolute; right: 4px; bottom: 2px; font-style: normal; font-size: .62rem; font-weight: 900; color: var(--ink); }
.ul-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ul-toks { position: absolute; inset: 0; pointer-events: none; }
.ul-tok { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--pc), 0 3px 6px rgba(0,0,0,.3); transition: left .22s, top .22s; z-index: 3; }
.ul-dice { position: absolute; z-index: 12; left: 50%; bottom: 66px; transform: translateX(-50%); width: 76px; height: 76px; border-radius: 22px; background: #fff; font-size: 2.6rem; box-shadow: 0 6px 0 var(--pc, #D99A0B), 0 0 0 4px var(--pc, #FFC23D); }
.ul-dice.flip { bottom: auto; top: 66px; transform: translateX(-50%) rotate(180deg); }
.ul-dice.ready { animation: pop .7s infinite alternate; }
.pz-turn .pt-board { top: 58px; bottom: 58px; }
.mm-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 6px; width: min(100%, 560px); }
.mm-card { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; perspective: 600px; background: transparent; }
.mm-card > span { position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; backface-visibility: hidden; transition: transform .35s; overflow: hidden; }
.mm-back { background: linear-gradient(135deg, #FFC23D, #FF8A1F); box-shadow: inset 0 0 0 3px #fff; }
.mm-back svg, .mm-back img { width: 70%; height: 70%; opacity: .9; }
.mm-face { background: #fff; transform: rotateY(180deg); font-weight: 900; color: var(--ink); font-size: clamp(.8rem, 3.6vw, 1.5rem); text-align: center; padding: 4px; line-height: 1.05; word-break: break-word; }
.mm-face .dots { font-size: .8em; letter-spacing: -1px; }
.mm-card.open .mm-back { transform: rotateY(180deg); } .mm-card.open .mm-face { transform: rotateY(0); }
.mm-card.got .mm-face { box-shadow: inset 0 0 0 4px var(--pc); background: color-mix(in srgb, var(--pc) 14%, #fff); }
.pz-opts.cari .pz-opt { font-size: calc(var(--u) * 10); }
/* papan skor di tepi pemain (bawah zon); ruang tengah untuk butang jeda */
.pzone > .pz-head { order: 3; padding: 0 calc(var(--u) * 2) calc(var(--u) * 1.6); justify-content: center; }
.pzone > .pz-q { order: 0; } .pzone > .pz-body { order: 1; }
.pz:not(.pz-n1) .pzone > .pz-q { margin-top: calc(var(--u) * 1.4 + 18px); }
.pz-n1 .pzone > .pz-q { margin-top: calc(var(--u) * 2 + 40px); }
.pz-n3 .pzone .pz-chip b, .pz-n4 .pzone .pz-chip b { display: none; }
.pz-n3 .pzone[data-p="0"] .pz-chip[data-c="0"] b, .pz-n3 .pzone[data-p="1"] .pz-chip[data-c="1"] b, .pz-n3 .pzone[data-p="2"] .pz-chip[data-c="2"] b,
.pz-n4 .pzone[data-p="0"] .pz-chip[data-c="0"] b, .pz-n4 .pzone[data-p="1"] .pz-chip[data-c="1"] b, .pz-n4 .pzone[data-p="2"] .pz-chip[data-c="2"] b, .pz-n4 .pzone[data-p="3"] .pz-chip[data-c="3"] b { display: inline; }
.pz-n3 .pz-chip, .pz-n4 .pz-chip { padding-right: 4px; gap: 2px; }
.pz-n3 .pz-head, .pz-n4 .pz-head { gap: 2px; }
/* tablet: papan giliran lebih besar, kad memori lebih tinggi */
@media (min-width: 700px) { .pt-card { width: min(460px, 100%); } .pt-card h3 { font-size: 1.8rem; } .mm-grid { width: min(100%, 720px, calc((100vh - 150px) * 1.1)); } .ul-tok { width: 46px; height: 46px; } .ul-c i { font-size: 2rem; } .ul-c small { font-size: .9rem; } }
.pz-turn.land .mm-grid { width: min(100%, calc((100vh - 140px) * 1.4 * var(--cols) / 4)); }
/* ================= 🏆 CARTA JUARA ================= */
.hub-t.carta { background: linear-gradient(135deg, #FFF6D6, #FFE7B0); box-shadow: inset 0 0 0 3px #FFC23D, var(--pop); }
.hub-t.carta .lbmini { display: block; margin-top: 4px; font-size: .78rem; font-weight: 800; color: var(--ink); }
.hub-t.carta .g3t { flex: 1; min-width: 0; text-align: left; } .hub-t.carta .g3t > b { display: block; margin: 0; } .hub-t.carta .g3t > small { display: block; margin-top: 2px; }
.lbme { display: flex; flex-direction: row; align-items: center; gap: 12px; background: linear-gradient(135deg, #FFF6D6, #fff); }
.lbme small { display: block; color: var(--muted); font-weight: 800; font-size: .72rem; text-transform: uppercase; }
.lbme b { display: block; font-size: 1.15rem; font-family: var(--f-display); color: var(--ink); overflow-wrap: anywhere; line-height: 1.2; }
.lbname .lbc { color: var(--ink); font-size: .85rem; letter-spacing: -.02em; } .lbname .lbc span + span { margin-left: 3px; }
.lbmypts { text-align: center; } .lbmypts b { font-size: 1.8rem; color: #D99A0B; } .lbmypts small { display: block; font-size: .7rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.lbav { display: inline-block; width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; background: #FFF4E0; }
.lbav.big { width: 62px; height: 62px; }
.lbav svg, .lbav img { width: 100%; height: 100%; display: block; }
.lbtabs { margin-top: 4px; }
.lbband { margin: 8px 0; }
.lblist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; position: relative; }
.lbrow { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.lbrow.r1 { background: linear-gradient(90deg, #FFF3C4, #fff); box-shadow: inset 0 0 0 3px #FFC23D; }
.lbrow.r2 { background: linear-gradient(90deg, #EEF2F7, #fff); box-shadow: inset 0 0 0 3px #B9C3CF; }
.lbrow.r3 { background: linear-gradient(90deg, #F8E3D0, #fff); box-shadow: inset 0 0 0 3px #D9A066; }
.lbrow.me { box-shadow: inset 0 0 0 3px var(--leaf), 0 0 0 3px rgba(34,160,107,.18); }
.lbn { width: 2.2em; text-align: center; font-weight: 900; color: var(--muted); font-size: 1rem; flex: none; }
.lbrow.r1 .lbn, .lbrow.r2 .lbn, .lbrow.r3 .lbn { font-size: 1.5rem; }
.lbname { flex: 1; min-width: 0; } .lbname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.lbname small { display: block; color: var(--muted); font-weight: 800; font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { .panel.lblist { padding: 10px; } .lbrow .lbav { width: 36px; height: 36px; } .lbrow { gap: 6px; padding: 6px 8px; } .lbn { width: 1.6em; } .lbrow.r1 .lbn, .lbrow.r2 .lbn, .lbrow.r3 .lbn { font-size: 1.25rem; } .lbname b { white-space: normal; line-height: 1.15; font-size: .95rem; } .lbpts { min-width: 2.6em; font-size: 1.05rem; } }
.lbcups { display: flex; gap: 2px; font-size: .85rem; font-weight: 900; flex: none; }
.lbpts { font-size: 1.15rem; color: var(--ink); flex: none; text-align: right; min-width: 3.2em; } .lbpts small { font-size: .75em; margin-left: 2px; }
.lblist.sample { padding-top: 34px; }
.lbtag { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: #E2384A; color: #fff; font-weight: 900; font-size: .72rem; padding: 3px 10px; border-radius: 999px; letter-spacing: .04em; white-space: nowrap; }
.lbmsg { text-align: center; } .lbmsg p { font-weight: 800; color: var(--ink); }
.lbinfo p { margin: 4px 0; }
