/* Jom Main — "toy box arcade": loud grape floor, chunky ink outlines, hard drop shadows that press in like real buttons. */
:root {
  --grape: #6c4bf4;
  --grape-d: #4a2fc9;
  --ink: #1a1033;
  --night: #241656;
  --white: #ffffff;
  --wash: #efeaff;
  --muted: #5d5680;
  --gold: #ffcf33;
  --pink: #ff4f9a;
  --lime: #b6f03c;
  --aqua: #2fd6e8;
  --tang: #ff8a1f;
  --red: #ff5a4f;
  --line: 3px solid var(--ink);
  --pop: 0 5px 0 var(--ink);
  --display: "Lilita One", "Baloo 2", system-ui, sans-serif;
  --body: "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--grape); }
body {
  margin: 0; min-height: 100dvh; font-family: var(--body); font-size: 17px; line-height: 1.35; color: var(--ink);
  background-color: var(--grape);
  background-image: radial-gradient(rgba(255,255,255,.13) 2px, transparent 2.5px), radial-gradient(rgba(26,16,51,.12) 2px, transparent 2.5px);
  background-size: 28px 28px; background-position: 0 0, 14px 14px;
  overscroll-behavior-y: none;
}
body.playing { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .01em; }

#app { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 110px); }

/* ---------- shared bits */
.card { background: var(--white); border: var(--line); border-radius: 22px; box-shadow: var(--pop); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: var(--line); border-radius: 999px; background: var(--gold); color: var(--ink);
  font-family: var(--display); font-size: 18px; padding: 10px 20px; box-shadow: 0 4px 0 var(--ink);
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-big { width: 100%; font-size: 24px; padding: 14px 20px; margin-top: 14px; background: var(--lime); }
.btn-wide { width: 100%; margin-top: 10px; }
.btn-ghost { background: var(--white); }
.btn-sm { font-size: 15px; padding: 5px 12px; box-shadow: 0 3px 0 var(--ink); }
.btn-gold { background: var(--gold); }
.btn-danger { background: var(--red); color: var(--white); }

.coin { display: inline-flex; align-items: center; gap: 5px; font-family: var(--display); font-size: 17px; }
.coin i { width: 1em; height: 1em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c2 0 18%, var(--gold) 20% 62%, #e0a400 64%); border: 2px solid var(--ink); flex: none; }
.coin-big { background: var(--white); border: var(--line); border-radius: 999px; padding: 4px 14px 4px 8px; font-size: 22px; box-shadow: 0 4px 0 var(--ink); }
.coin-big i { width: 26px; height: 26px; }
.stars { display: inline-flex; gap: 1px; font-size: 17px; line-height: 1; }
.stars i { font-style: normal; color: rgba(26,16,51,.18); }
.stars i.on { color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--wash); margin-top: 5px; overflow: hidden; border: 2px solid var(--ink); }
.bar i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.hint-line { color: var(--white); text-align: center; font-size: 15px; margin: 14px 8px; }

/* ---------- welcome */
.welcome { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 20px; }
.wordmark { display: flex; flex-direction: column; align-items: center; line-height: .86; margin: 10px 0 14px; }
.wordmark span {
  font-size: clamp(76px, 26vw, 120px); color: var(--gold); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--ink); transform: rotate(-4deg);
}
.wordmark span + span { color: var(--lime); transform: rotate(3deg) translateX(14px); }
.welcome-sub { color: var(--white); text-align: center; max-width: 34ch; margin: 6px auto 22px; font-weight: 600; }
.form { padding: 18px; display: flex; flex-direction: column; }
.form label, .form-label { font-family: var(--display); font-size: 19px; margin: 4px 0 8px; }
.form input {
  border: var(--line); border-radius: 14px; padding: 12px 14px; font-size: 20px; font-weight: 700; background: var(--wash); margin-bottom: 12px; width: 100%;
}
.av-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av { aspect-ratio: 1; font-size: 28px; border: var(--line); border-radius: 16px; background: var(--wash); padding: 0; display: grid; place-items: center; }
.av.on { background: var(--gold); box-shadow: 0 3px 0 var(--ink); transform: translateY(-2px); }

/* ---------- header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.me-chip { display: flex; align-items: center; gap: 8px; border: var(--line); border-radius: 999px; background: var(--white); padding: 3px 14px 3px 4px; box-shadow: 0 4px 0 var(--ink); min-width: 0; }
.me-av { width: 38px; height: 38px; border-radius: 50%; background: var(--wash); display: grid; place-items: center; font-size: 24px; flex: none; }
.me-name { font-family: var(--display); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-swap { color: var(--muted); font-weight: 800; }

.hello h1 { color: var(--white); font-size: clamp(28px, 8.4vw, 38px); line-height: 1.02; -webkit-text-stroke: 1px var(--ink); text-shadow: 0 4px 0 var(--ink); margin: 6px 0 18px; max-width: 16ch; }
.page-h { margin: 4px 0 16px; color: var(--white); }
.page-h h1 { font-size: 38px; text-shadow: 0 4px 0 var(--ink); -webkit-text-stroke: 1px var(--ink); }
.page-h p { margin: 4px 0 0; font-weight: 600; }

/* ---------- daily challenges: a ticket */
.daily { padding: 14px 16px 10px; position: relative; background: var(--gold); }
.daily::before, .daily::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--grape); border: var(--line); transform: translateY(-50%); }
.daily::before { left: -13px; clip-path: inset(0 0 0 50%); }
.daily::after { right: -13px; clip-path: inset(0 50% 0 0); }
.daily-head { display: flex; justify-content: space-between; align-items: baseline; }
.daily-head h2 { font-size: 22px; }
.daily-count { font-family: var(--display); font-size: 20px; }
.daily-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 3px dashed rgba(26,16,51,.35); }
.daily-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 2px dashed rgba(26,16,51,.2); }
.daily-txt { flex: 1; font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.daily-list .bar { background: rgba(255,255,255,.7); }
.daily-n { font-family: var(--display); font-size: 15px; white-space: nowrap; }
.daily-ok { font-weight: 800; font-size: 14px; white-space: nowrap; }
.daily-list li.done .daily-txt { text-decoration: line-through; text-decoration-thickness: 2px; }
.daily-list .btn-gold { background: var(--lime); }
.daily-foot { margin: 8px 0 2px; font-size: 14px; font-weight: 700; }

/* ---------- shelves of game cartridges */
.shelf { margin-top: 26px; }
.shelf h2 { color: var(--white); font-size: 25px; text-shadow: 0 3px 0 var(--ink); -webkit-text-stroke: 1px var(--ink); margin-bottom: 12px; }
.carts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cart {
  text-align: left; padding: 0; border: var(--line); border-radius: 18px 18px 14px 14px; background: var(--white); box-shadow: var(--pop);
  display: flex; flex-direction: column; overflow: hidden; transition: transform .06s, box-shadow .06s;
}
.cart:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.cart-art {
  position: relative; height: 92px; background: var(--gc); border-bottom: var(--line); display: grid; place-items: center;
  background-image: repeating-linear-gradient(90deg, rgba(26,16,51,.10) 0 4px, transparent 4px 14px);
}
.cart-art::after { content: ""; position: absolute; top: 8px; left: 50%; width: 38%; height: 6px; transform: translateX(-50%); border-radius: 9px; background: rgba(26,16,51,.25); }
.cart-art span { font-size: 46px; filter: drop-shadow(0 3px 0 rgba(26,16,51,.55)); margin-top: 8px; }
.cart-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.cart-title { font-family: var(--display); font-size: 19px; line-height: 1.05; }
.cart-blurb { font-size: 14px; color: var(--muted); line-height: 1.2; flex: 1; font-weight: 600; }
.cart-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 6px; }
.cart-best { font-size: 13px; font-weight: 800; color: var(--muted); }
.cart-best.new { background: var(--pink); color: var(--white); border-radius: 99px; padding: 0 8px; }

/* ---------- dock */
.dock {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 12px); transform: translateX(-50%); z-index: 20;
  display: flex; gap: 2px; padding: 5px; background: var(--white); border: var(--line); border-radius: 26px; box-shadow: var(--pop);
  width: min(calc(100% - 32px), 420px);
}
.dock[hidden] { display: none; }
.dock a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 5px 2px 4px; border-radius: 20px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 14px; }
.dock .ic { font-size: 22px; line-height: 1.1; }
.dock a.on { background: var(--gold); box-shadow: inset 0 0 0 2.5px var(--ink); }

/* ---------- bottom sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-bg { position: absolute; inset: 0; background: rgba(26,16,51,.55); opacity: 0; transition: opacity .2s; }
.sheet {
  position: absolute; left: 50%; bottom: 0; width: min(100%, 560px); max-height: 88dvh; overflow-y: auto;
  background: var(--white); border: var(--line); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(var(--safe-b) + 20px); transform: translate(-50%, 100%); transition: transform .22s cubic-bezier(.2,.9,.3,1.1);
}
.sheet-wrap.open .sheet-bg { opacity: 1; }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.sheet-grip { width: 48px; height: 6px; border-radius: 9px; background: rgba(26,16,51,.2); margin: 0 auto 12px; }
.sheet h2 { font-size: 26px; margin-bottom: 10px; }
.sheet h3 { font-size: 19px; margin: 16px 0 6px; }
.sheet .form { padding: 0; }
.gs-head { display: flex; align-items: center; gap: 14px; }
.gs-art { width: 76px; height: 76px; flex: none; border: var(--line); border-radius: 20px; background: var(--gc); display: grid; place-items: center; font-size: 42px; box-shadow: 0 4px 0 var(--ink); }
.gs-head h2 { margin: 0; }
.gs-head p { margin: 2px 0 0; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.how { margin: 0; padding-left: 20px; font-weight: 600; }
.how li { margin: 5px 0; }
.how li::marker { color: var(--grape); }
.gs-stars { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; font-weight: 700; color: var(--muted); margin: 14px 0 0; }
.gs-stars span { white-space: nowrap; }
.who { display: flex; flex-direction: column; gap: 8px; }
.who.card { padding: 8px; }
.who-row { display: flex; align-items: center; gap: 10px; border: var(--line); border-radius: 16px; padding: 6px 10px 6px 6px; background: var(--wash); text-align: left; width: 100%; }
.who-row.on { background: var(--gold); }
.who-av { width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--ink); display: grid; place-items: center; font-size: 24px; flex: none; }
.who-name { flex: 1; font-family: var(--display); font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirm { text-align: center; }
.confirm-face { font-size: 64px; display: grid; place-items: center; margin: 4px 0 6px; }
.confirm p { font-weight: 600; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 96px); transform: translate(-50%, 20px); z-index: 60; opacity: 0;
  background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 16px; font-weight: 700; text-align: center; width: max-content; max-width: calc(100% - 40px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- leaderboard */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 8px; scrollbar-width: none; }
.chip { flex: none; border: var(--line); border-radius: 999px; background: var(--white); padding: 6px 12px; font-weight: 800; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.chip.on { background: var(--gold); }
.board { list-style: none; margin: 0; padding: 8px; }
.board li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
.board li + li { border-top: 2px dashed rgba(26,16,51,.15); }
.board li.me { background: var(--wash); }
.rank { width: 30px; text-align: center; font-family: var(--display); font-size: 21px; }
.board-s { font-family: var(--display); font-size: 21px; }

/* ---------- shop */
.seg { display: flex; border: var(--line); border-radius: 999px; background: var(--white); padding: 4px; box-shadow: 0 4px 0 var(--ink); margin-bottom: 8px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 8px; font-family: var(--display); font-size: 16px; }
.seg button.on { background: var(--grape); color: var(--white); }
.shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.shop-item { border: var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 4px 0 var(--ink); padding: 12px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.shop-item:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.shop-item.using { background: var(--lime); }
.shop-item.poor .shop-em, .shop-item.poor .shop-sk { opacity: .45; filter: grayscale(.6); }
.shop-em { font-size: 42px; line-height: 1.1; }
.shop-sk { width: 46px; height: 46px; border-radius: 50%; background: var(--c); border: var(--line); box-shadow: inset 0 -8px 0 var(--d); display: block; }
.shop-name { font-family: var(--display); font-size: 15px; }
.shop-price { font-weight: 800; font-size: 14px; }

/* ---------- me */
.me-card { display: flex; align-items: center; gap: 14px; padding: 14px; }
.me-card > div { flex: 1; min-width: 0; }
.me-big { font-size: 54px; width: 76px; height: 76px; display: grid; place-items: center; background: var(--wash); border-radius: 50%; border: var(--line); flex: none; }
.me-card h1 { font-size: 28px; overflow: hidden; text-overflow: ellipsis; }
.me-card p { margin: 0; font-weight: 600; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stats div { background: var(--night); color: var(--white); border: var(--line); border-radius: 18px; padding: 10px 6px; text-align: center; box-shadow: 0 4px 0 var(--ink); }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--gold); line-height: 1.1; }
.stats span { font-size: 13px; font-weight: 700; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge { background: rgba(255,255,255,.18); border: 3px dashed rgba(26,16,51,.5); border-radius: 18px; padding: 10px; color: var(--white); display: flex; flex-direction: column; }
.badge.got { background: var(--white); color: var(--ink); border-style: solid; border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.badge-ic { font-size: 30px; }
.badge b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.badge span:last-child { font-size: 13.5px; font-weight: 600; line-height: 1.2; opacity: .9; }
.settings { padding: 6px 14px; }
.tog { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-family: var(--display); font-size: 19px; position: relative; }
.tog + .tog { border-top: 2px dashed rgba(26,16,51,.15); }
.tog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tog i { width: 56px; height: 32px; border-radius: 99px; background: var(--wash); border: var(--line); position: relative; transition: background .15s; }
.tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--ink); transition: transform .15s; }
.tog input:checked + i { background: var(--lime); }
.tog input:checked + i::after { transform: translateX(24px); }
.tog input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- the game player (full screen) */
.play { position: fixed; inset: 0; z-index: 40; background: var(--ink); display: flex; justify-content: center; }
.play[hidden] { display: none; }
.play-host { position: relative; width: 100%; max-width: 480px; height: 100%; overflow: hidden; background: var(--night); touch-action: none; user-select: none; -webkit-user-select: none; }
.game-canvas { display: block; touch-action: none; }
.play-loading { color: var(--white); display: grid; place-items: center; height: 100%; padding: 30px; text-align: center; font-family: var(--display); font-size: 22px; }
.play-pause {
  position: absolute; top: calc(var(--safe-t) + 10px); left: max(10px, calc(50% - 230px)); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: var(--line); background: var(--white); font-size: 14px; font-weight: 900; box-shadow: 0 3px 0 var(--ink); display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0;
}
.play-pause i { width: 5px; height: 16px; border-radius: 2px; background: var(--ink); }
.play-pause[hidden] { display: none; }
.play-over { position: absolute; inset: 0; z-index: 4; background: rgba(26,16,51,.72); display: grid; place-items: center; padding: 20px; }
.play-over[hidden] { display: none; }
.po-card { width: min(100%, 360px); background: var(--white); border: var(--line); border-radius: 26px; box-shadow: 0 6px 0 var(--ink); padding: 22px 20px 20px; text-align: center; animation: pop .28s cubic-bezier(.2,1.4,.4,1); }
.po-card h2 { font-size: 34px; }
.po-card > p { margin: 2px 0 6px; font-weight: 700; }
.po-game { font-family: var(--display); font-size: 20px; color: var(--muted); }
.po-best { display: inline-block; background: var(--pink); color: var(--white); border: var(--line); border-radius: 99px; padding: 2px 14px !important; font-family: var(--display); transform: rotate(-3deg); }
.po-score { font-family: var(--display); font-size: 76px; line-height: 1; color: var(--gc); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); margin: 6px 0 4px; }
.result .stars { font-size: 38px; gap: 4px; }
.po-sub { color: var(--muted); min-height: 0; }
.po-coins { display: inline-flex; align-items: center; gap: 4px; font-family: var(--display); font-size: 26px; background: var(--gold); border: var(--line); border-radius: 99px; padding: 2px 16px; margin: 6px 0 4px; }
.po-coins .coin { font-size: 26px; }
.po-note { background: var(--wash); border-radius: 12px; padding: 6px 10px; font-size: 15px; }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }

/* ---------- learning games (DOM) */
.lg { height: 100%; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 64px) 16px calc(var(--safe-b) + 16px); color: var(--white); overflow-y: auto; }
.lg-start { margin: auto 0; text-align: center; }
.lg-big { font-size: 72px; filter: drop-shadow(0 5px 0 rgba(0,0,0,.35)); }
.lg-start h2 { font-size: 40px; text-shadow: 0 4px 0 var(--ink); }
.lg-start p { font-weight: 700; margin: 4px 0 16px; }
.lg-choices { display: flex; flex-direction: column; gap: 12px; }
.lg-choices .btn { width: 100%; font-size: 21px; padding: 12px 16px; flex-direction: column; gap: 0; background: var(--white); }
.lg-choices .btn small { font-family: var(--body); font-size: 14px; font-weight: 700; color: var(--muted); }
.lg-grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.lg-grid2 .btn:last-child { grid-column: 1 / -1; }
.em { font-size: 28px; }
.lg-top { display: flex; gap: 8px; justify-content: flex-end; margin-top: -54px; margin-left: 54px; }
.lg-stat { flex: 1; background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.18); border-radius: 14px; text-align: center; padding: 3px 4px; }
.lg-stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.lg-stat span { font-size: 12px; font-weight: 700; opacity: .8; }
.hearts { color: var(--pink); letter-spacing: 1px; white-space: nowrap; }
.hearts s { color: rgba(255,255,255,.25); text-decoration: none; }
.lg-combo.hot { background: var(--pink); border-color: var(--ink); }
.lg-timebar { height: 14px; border-radius: 99px; background: rgba(255,255,255,.12); margin: 14px 0; overflow: hidden; border: 2px solid var(--ink); flex: none; }
.lg-timebar i { display: block; height: 100%; width: 100%; background: var(--lime); border-radius: 99px; }
.lg-timebar i.low { background: var(--red); }

/* Kira Kilat */
.lg-kira { background: linear-gradient(#2c1a68, #1d1046); }
.lg-qcard { background: var(--white); color: var(--ink); border: var(--line); border-radius: 24px; box-shadow: 0 5px 0 #0b0620; padding: 18px 12px 14px; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 150px; max-height: 240px; }
.lg-qcard.ok { animation: ok .35s; }
.lg-qcard.bad { animation: bad .4s; }
.lg-q { font-family: var(--display); font-size: clamp(30px, 10vw, 44px); line-height: 1.1; }
.lg-ans { font-family: var(--display); font-size: 46px; color: var(--grape); min-height: 1.2em; margin-top: 4px; letter-spacing: .04em; }
.lg-qcard.bad .lg-ans { color: var(--red); }
.lg-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.key { height: clamp(52px, 8.5dvh, 66px); border: var(--line); border-radius: 18px; background: var(--white); font-family: var(--display); font-size: 30px; box-shadow: 0 4px 0 #0b0620; color: var(--ink); touch-action: manipulation; }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b0620; }
.key-alt { background: var(--wash); font-size: 18px; }
@keyframes ok { 40% { transform: scale(1.04); background: #e8ffd1; } }
@keyframes bad { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Kuiz Raksasa */
.lg-kuiz { background: linear-gradient(#3b1f74, #1d1046); }
.kz-arena { position: relative; height: clamp(190px, 32dvh, 250px); margin: -56px -16px 6px; padding: 0 16px; background: radial-gradient(ellipse at 70% 60%, rgba(255,255,255,.12), transparent 60%); flex: none; }
.kz-side { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 46%; }
.kz-mon { right: 12px; top: 54px; }
.kz-hero { left: 12px; bottom: 6px; }
.kz-face { font-size: 74px; line-height: 1; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.kz-hero .kz-face { font-size: 54px; }
.kz-face.boss { font-size: 92px; }
.kz-face.enter { animation: enter .5s cubic-bezier(.2,1.4,.4,1); }
.kz-face.gone { animation: gone .6s forwards; }
.kz-face.hurt { animation: bad .35s; filter: drop-shadow(0 0 12px #ff5a4f); }
.kz-name { font-family: var(--display); font-size: 15px; white-space: nowrap; }
.kz-hp { width: 100%; height: 12px; border-radius: 99px; background: rgba(0,0,0,.35); border: 2px solid var(--ink); overflow: hidden; }
.kz-hp i { display: block; height: 100%; background: var(--pink); transition: width .3s; }
.kz-hp.hero i { background: var(--lime); }
.kz-hp.hero i.low { background: var(--red); }
.kz-score { position: absolute; right: 16px; top: 8px; font-weight: 800; }
.kz-score b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--gold); }
.kz-stage { position: absolute; left: 70px; top: 14px; font-weight: 700; font-size: 14px; opacity: .85; }
.kz-q { font-family: var(--display); font-size: clamp(19px, 5.4vw, 23px); line-height: 1.2; margin: 0 0 12px; min-height: 2.4em; }
.kz-opts { display: flex; flex-direction: column; gap: 9px; }
.kz-opt { border: var(--line); border-radius: 16px; background: var(--white); color: var(--ink); padding: 11px 14px; font-weight: 800; font-size: 17px; text-align: left; box-shadow: 0 4px 0 #0b0620; line-height: 1.2; }
.kz-opt:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b0620; }
.kz-opt.right { background: var(--lime); }
.kz-opt.wrong { background: var(--red); color: var(--white); }
.kz-pop { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-family: var(--display); font-size: 28px; white-space: nowrap; pointer-events: none; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; animation: rise .9s forwards; z-index: 2; }
.kz-pop.hit { color: var(--gold); }
.kz-pop.ouch { color: var(--red); }
@keyframes rise { to { transform: translate(-50%, -50px); opacity: 0; } }
@keyframes enter { from { transform: translateY(-40px) scale(.4); opacity: 0; } }
@keyframes gone { to { transform: scale(1.6) rotate(20deg); opacity: 0; } }

/* Teka Kata */
.lg-kata { background: linear-gradient(#5a1d4f, #22103f); }
.kt-clue { background: var(--white); color: var(--ink); border: var(--line); border-radius: 20px; padding: 14px 16px; font-weight: 800; font-size: 19px; line-height: 1.25; box-shadow: 0 5px 0 #0b0620; min-height: 84px; display: flex; align-items: center; }
.kt-slots { position: relative; display: flex; justify-content: center; gap: 5px; margin: 22px 0 18px; flex-wrap: nowrap; }
.kt-slots.shake { animation: bad .4s; }
.kt-slot { --s: min(44px, calc((100vw - 32px) / var(--n, 6) - 6px)); width: var(--s); height: calc(var(--s) * 1.2); max-width: calc((480px - 32px) / var(--n, 6) - 6px); border: 3px dashed rgba(255,255,255,.45); border-radius: 12px; background: rgba(255,255,255,.06); color: var(--ink); font-family: var(--display); font-size: calc(var(--s) * .6); display: grid; place-items: center; padding: 0; }
.kt-slot.full { border: var(--line); background: var(--white); }
.kt-slot.locked { background: var(--gold); }
.kt-slot.win { background: var(--lime); animation: ok .35s; }
.kt-slot.shown { background: var(--wash); }
.kt-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.kt-tile { width: 52px; height: 56px; border: var(--line); border-radius: 14px; background: var(--gold); font-family: var(--display); font-size: 28px; box-shadow: 0 4px 0 #0b0620; color: var(--ink); touch-action: manipulation; }
.kt-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 #0b0620; }
.kt-tile:disabled { opacity: .15; box-shadow: none; transform: translateY(4px); }
.kt-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }
.kt-actions .btn { flex: 1; font-size: 15px; padding: 9px 6px; }

/* Ingat Corak */
.lg-corak { background: linear-gradient(#123d4a, #1d1046); }
.ck-msg { font-family: var(--display); font-size: 26px; text-align: center; margin: 22px 0 14px; min-height: 1.2em; }
.ck-board { --g: 3; display: grid; grid-template-columns: repeat(var(--g), 1fr); gap: 8px; width: min(100%, 52dvh, 420px); margin: 0 auto; aspect-ratio: 1; }
.ck-cell { border: var(--line); border-radius: 14px; background: rgba(255,255,255,.12); box-shadow: 0 4px 0 #0b0620; padding: 0; transition: background .12s; touch-action: manipulation; }
.ck-cell.lit { background: var(--aqua); }
.ck-cell.got { background: var(--lime); animation: ok .3s; }
.ck-cell.miss { background: var(--red); animation: bad .3s; }
.ck-cell.missed { background: var(--gold); }
.ck-sub { text-align: center; font-weight: 800; margin-top: 14px; font-size: 18px; }

@media (min-width: 520px) {
  .carts { grid-template-columns: repeat(2, 1fr); }
  .cart-art { height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
