/* Kantin Akhir Bulan: tema visual kantin kampus. Krem kertas nota, hijau kantin, merah sambal, kuning kunyit. */
:root {
  --ink: #2b1d14;
  --paper: #f6ead0;
  --paper-2: #ecdcb8;
  --paper-dark: #cbbf9f;
  --green: #3f8f4f;
  --green-d: #276b36;
  --red: #c8342b;
  --red-d: #8f221c;
  --gold: #e8a823;
  --gold-d: #a8761a;
  --teal: #2b6f8f;
  --teal-d: #1c4e66;
  --purple: #7a4f9a;
  --radius: 8px;
  --muted: #cdbf9d;
  --text: #f6ead0;
  --font: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --display: "Bree Serif", "Rockwell", "Georgia", serif;
  --bg-base: #1f4d3a;
  --bg-line: rgba(246, 234, 208, .09);
}
body[data-mood="boss"] { --bg-base: #5e1c17; --bg-line: rgba(246, 200, 160, .08); }
body[data-mood="shop"] { --bg-base: #4d3a1c; --bg-line: rgba(246, 220, 150, .09); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #14352a; color: var(--text); font-family: var(--font); overflow-x: hidden; }
body { font-size: 16px; line-height: 1.35; user-select: none; -webkit-user-select: none; }
button, input { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- latar taplak kotak-kotak dan tekstur kertas ---------- */
#bg {
  position: fixed; inset: 0; z-index: 0; background-color: var(--bg-base);
  background-image:
    linear-gradient(90deg, var(--bg-line) 50%, transparent 50%),
    linear-gradient(var(--bg-line) 50%, transparent 50%);
  background-size: 72px 72px;
  animation: drift 40s linear infinite; transition: background-color .8s;
}
#bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(10, 20, 14, .55) 100%); }
@keyframes drift { to { background-position: 144px 144px; } }
#crt {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .12;
  background-image: radial-gradient(rgba(43, 29, 20, .5) 1px, transparent 1.2px); background-size: 5px 5px;
  mix-blend-mode: multiply;
}
body.no-crt #crt { display: none; }

/* ---------- kerangka ---------- */
#app { position: relative; z-index: 1; min-height: 100dvh; display: flex; justify-content: center; }
.screen { width: 100%; max-width: 560px; min-height: 100dvh; padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; animation: enter .3s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.panel {
  --muted: #7b6650; position: relative; color: var(--ink); background: var(--paper);
  border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 5px 0 var(--ink); padding: 12px 14px;
}
.panel::after { content: ""; position: absolute; inset: 4px; border: 1.5px dashed rgba(43, 29, 20, .22); border-radius: 4px; pointer-events: none; }
.title { font-family: var(--display); font-weight: 400; letter-spacing: .01em; text-shadow: 0 3px 0 var(--ink); }
.panel .title { text-shadow: none; }
.muted { color: var(--muted); }
.coin { color: var(--gold); }
.panel .coin { color: var(--gold-d); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.center { text-align: center; }
svg { display: block; }

/* ---------- tombol datar seperti stempel ---------- */
.btn {
  appearance: none; border: 3px solid var(--ink); border-radius: 8px; padding: 9px 16px; min-height: 46px;
  font-family: var(--display); font-size: 1.05rem; color: #fff8e6; cursor: pointer; letter-spacing: .01em;
  background: var(--red); box-shadow: 0 4px 0 var(--ink); margin-bottom: 6px; transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active, .btn.pressed { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn.blue { background: var(--teal); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.green { background: var(--green); }
.btn.ghost { background: var(--paper-2); color: var(--ink); }
.btn.small { min-height: 38px; padding: 5px 12px; font-size: .95rem; }
.btn:disabled { filter: grayscale(.9) brightness(.8); cursor: not-allowed; opacity: .75; }
.btn:active:disabled { transform: none; box-shadow: 0 4px 0 var(--ink); }
.btn:focus-visible, .board:focus-visible, .node:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
.btn.block { width: 100%; }
.btn svg, .pill svg { display: inline-block; vertical-align: -4px; width: 20px; height: 20px; }

.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: var(--paper); padding: 3px 12px; border-radius: 99px; font-weight: 800; }
.pill svg { width: 20px; height: 20px; }

/* ---------- layar judul ---------- */
.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; padding-top: 3vh; }
.logo { font-size: clamp(2.4rem, 12vw, 3.8rem); line-height: .95; color: var(--gold); transform: rotate(-2deg); animation: bob 3.4s ease-in-out infinite; }
.logo span { display: block; color: var(--paper); font-size: .5em; letter-spacing: .2em; }
@keyframes bob { 50% { transform: rotate(-1deg) translateY(-5px); } }
.mascot { width: 128px; height: 128px; padding: 0; border: 4px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 5px 6px 0 var(--ink); cursor: pointer; transform: rotate(3deg); transition: transform .15s; background: #f08a4b; }
.mascot:active { transform: rotate(-3deg) scale(.95); }
.mascot svg { width: 100%; height: 100%; }
.menu { display: grid; gap: 4px; width: min(320px, 100%); }
.nick-input, .code-input { width: min(320px, 100%); border: 3px solid var(--ink); border-radius: 8px; padding: 10px 14px; font-size: 1.1rem; font-weight: 700; background: var(--paper); color: var(--ink); text-align: center; user-select: text; -webkit-user-select: text; box-shadow: inset 0 3px 0 rgba(43, 29, 20, .1); }
.code-input { width: 100%; text-align: left; font-size: 1rem; }
.nick-input::placeholder, .code-input::placeholder { color: #9b8a6c; }
.nick-input:focus-visible, .code-input:focus-visible { outline: 3px solid var(--gold); }
.footnote { font-size: .8rem; color: var(--muted); text-align: center; }
.footnote a { color: var(--gold); }

/* ---------- peta level ---------- */
.topbar { display: flex; align-items: center; gap: 8px; }
.topbar h2 { flex: 1; font-size: 1.3rem; }
.map { position: relative; display: grid; gap: 10px; }
.node {
  position: relative; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; color: var(--ink); cursor: pointer;
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius); padding: 8px 12px 8px 8px; box-shadow: 4px 5px 0 var(--ink); transition: transform .12s;
}
.node:nth-child(odd) { transform: rotate(-.5deg); }
.node:nth-child(even) { transform: rotate(.5deg); }
.node:hover:not(.locked) { transform: scale(1.015) rotate(0); }
.node .av { width: 56px; height: 56px; flex: none; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.node .av svg { width: 100%; height: 100%; }
.node .meta { flex: 1; min-width: 0; }
.node .day { font-size: .76rem; color: var(--red-d); font-weight: 800; letter-spacing: .1em; }
.node .nm { font-family: var(--display); font-size: 1.08rem; line-height: 1.1; }
.node .who { font-size: .8rem; color: #7b6650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.boss { background: #f1cfc2; }
.node.locked { cursor: not-allowed; background: #b8ad92; }
.node.locked .nm, .node.locked .who { filter: blur(3.5px); }
.node.locked .av svg { filter: blur(5px) grayscale(1); }
.node.current { box-shadow: 4px 5px 0 var(--ink), 0 0 0 4px var(--gold); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 4px 5px 0 var(--ink), 0 0 0 7px rgba(232, 168, 35, .55); } }
.stars { letter-spacing: 2px; font-size: 1.1rem; color: var(--paper-dark); white-space: nowrap; }
.stars b { color: var(--gold); text-shadow: 0 1.5px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); font-weight: 400; }
.fog-lock { position: absolute; right: 14px; top: 50%; width: 26px; height: 26px; transform: translateY(-50%); }

/* ---------- dialog ---------- */
.dialog { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; cursor: pointer; }
.stage-av { align-self: center; width: min(46vw, 210px); aspect-ratio: 1; border: 4px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 6px 8px 0 var(--ink); animation: bob2 2.6s ease-in-out infinite; background: var(--paper); }
.stage-av svg { width: 100%; height: 100%; }
@keyframes bob2 { 50% { transform: translateY(-5px) rotate(1deg); } }
.say { min-height: 150px; }
.say .name { position: absolute; top: -18px; left: 14px; background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 6px; padding: 0 12px; font-family: var(--display); transform: rotate(-2deg); z-index: 2; }
.say p { padding-top: 10px; font-size: 1.12rem; min-height: 4.2em; }
.say .next { position: absolute; right: 14px; bottom: 8px; animation: blink 1s steps(2) infinite; color: var(--red); font-weight: 800; }
@keyframes blink { 50% { opacity: 0; } }
.goal { font-size: .95rem; }
.goal b { color: var(--red-d); }

/* ---------- layar main ---------- */
.hud { display: grid; gap: 8px; }
.hud-top { display: flex; align-items: center; gap: 8px; }
.hud-top .ttl { flex: 1; min-width: 0; line-height: 1.05; }
.hud-top .ttl small { color: var(--gold); font-weight: 800; letter-spacing: .08em; display: block; }
.hud-top .ttl strong { font-family: var(--display); font-weight: 400; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.progress { position: relative; height: 26px; border: 3px solid var(--ink); border-radius: 6px; background: #2a1f17; overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(45deg, var(--gold) 0 10px, #f2c04e 10px 20px); transition: width .5s cubic-bezier(.2, .9, .3, 1.2); }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--paper); text-shadow: 0 1.5px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink); }
.calc { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.calc .box { border: 3px solid var(--ink); border-radius: 8px; padding: 2px 8px 4px; text-align: center; box-shadow: 0 4px 0 var(--ink); color: #fff8e6; transition: transform .12s; }
.calc .box small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .18em; opacity: .9; }
.calc .box b { font-family: var(--display); font-weight: 400; font-size: 1.8rem; line-height: 1.05; }
.calc .chips { background: var(--teal); }
.calc .mult { background: var(--red); }
.calc .x { align-self: center; font-family: var(--display); font-size: 1.6rem; text-shadow: 0 3px 0 var(--ink); }
.calc .box.bump { animation: bump .28s ease; }
@keyframes bump { 40% { transform: scale(1.14) rotate(-2deg); } }
.calc .total { grid-column: 1 / -1; text-align: center; height: 0; position: relative; }
.gain { position: absolute; left: 0; right: 0; top: -2px; font-family: var(--display); font-size: 1.6rem; color: var(--gold); text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink); opacity: 0; pointer-events: none; z-index: 5; }
.gain.show { animation: gain 1.1s ease forwards; }
@keyframes gain { 0% { opacity: 0; transform: translateY(14px) scale(.6); } 20% { opacity: 1; transform: scale(1.2); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px); } }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-weight: 800; font-size: .92rem; }
.pill.order { background: var(--paper); color: var(--ink); border: 2px dashed var(--ink); }
.pill.order.done { background: #cfe5c4; border-style: solid; color: var(--green-d); }
.pill.boost { background: var(--purple); color: #fff8e6; }
.pill.debuff { background: var(--red); color: #fff8e6; border: 2px solid var(--ink); }

.jimat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot { aspect-ratio: 3 / 4; border: 2px dashed rgba(246, 234, 208, .35); border-radius: 6px; display: grid; place-items: center; color: rgba(246, 234, 208, .35); font-size: .7rem; }
.jcard {
  position: relative; aspect-ratio: 3 / 4; border: 3px solid var(--ink); border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--ink); cursor: pointer; padding: 10px 2px 2px; overflow: hidden; animation: sway 4.2s ease-in-out infinite;
}
.jcard:nth-child(2n) { animation-delay: -1.3s; } .jcard:nth-child(3n) { animation-delay: -2.4s; }
@keyframes sway { 50% { transform: rotate(1.8deg) translateY(-2px); } 0%, 100% { transform: rotate(-1.8deg); } }
.jcard svg { width: 72%; height: auto; flex: none; }
.jcard small { font-size: .54rem; font-weight: 800; text-align: center; line-height: 1; }
.jcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 7px; background: var(--tone, #999); border-bottom: 2px solid var(--ink); }
.jcard.zap { animation: zap .5s ease; }
@keyframes zap { 30% { transform: scale(1.22) rotate(-5deg); box-shadow: 0 0 0 4px var(--gold), 0 4px 0 var(--ink); } }

.board-wrap { display: flex; justify-content: center; }
.board {
  position: relative; width: min(100%, 520px, calc(100dvh - 400px)); min-width: 280px; aspect-ratio: 1; touch-action: none; outline: none;
  background: repeating-conic-gradient(#1c4a37 0 25%, #235a43 0 50%) 0 0 / 25% 25%;
  border: 7px solid #8a5a36; border-radius: 10px; box-shadow: 0 0 0 3px var(--ink), 5px 8px 0 3px var(--ink), inset 0 0 0 3px var(--ink);
  overflow: hidden;
}
.board.locked { cursor: progress; }
.board.picking { cursor: crosshair; border-color: var(--gold); }
.tile { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; transform: translate(calc(var(--c) * 100%), calc(var(--r) * 100%)); transition: transform .2s cubic-bezier(.3, .8, .4, 1.05); will-change: transform; z-index: 1; }
.tile .face {
  position: absolute; inset: 5%; border: 3px solid var(--ink); border-radius: 18%; background: var(--c1);
  box-shadow: inset 0 -5px 0 var(--c2), 0 2px 0 rgba(0, 0, 0, .35); display: grid; place-items: center; transition: transform .12s;
}
.tile .icon { width: 84%; height: 84%; margin-top: -3%; }
.tile .icon svg, .tile .badge svg { width: 100%; height: 100%; }
.tile .badge { position: absolute; right: -14%; bottom: -14%; width: 52%; height: 52%; filter: drop-shadow(0 2px 0 var(--ink)); }
.t0 { --c1: #b98355; --c2: #8a5a36; } .t1 { --c1: #e8615a; --c2: #b02a24; } .t2 { --c1: #f0b73a; --c2: #c98a10; }
.t3 { --c1: #4fb3c4; --c2: #2b8296; } .t4 { --c1: #78bf6c; --c2: #4a9040; } .t5 { --c1: #b497d6; --c2: #8366a8; }
.tile.sel { z-index: 5; } .tile.sel .face { transform: scale(1.1) rotate(-3deg); box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--ink), 0 8px 0 7px rgba(0, 0, 0, .3); }
.tile.cursor .face { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.tile.hint .face { animation: hint .9s ease-in-out infinite; }
@keyframes hint { 50% { transform: scale(1.13) rotate(3deg); } }
.tile.nope .face { animation: nope .3s linear; }
@keyframes nope { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tile.pop { z-index: 3; } .tile.pop .face { animation: pop .3s ease forwards; }
@keyframes pop { 30% { transform: scale(1.22) rotate(8deg); } 100% { transform: scale(0) rotate(40deg); opacity: 0; } }
.tile.blast { z-index: 4; } .tile.blast .face { animation: blast .34s ease forwards; }
@keyframes blast { 40% { transform: scale(1.8); filter: brightness(1.8); } 100% { transform: scale(2.3); opacity: 0; } }
.tile.born .face { animation: born .5s ease; }
@keyframes born { 0% { transform: scale(.2); } 60% { transform: scale(1.3) rotate(-6deg); } 100% { transform: scale(1); } }
.tile.sp-row .face, .tile.sp-col .face { box-shadow: inset 0 -5px 0 var(--c2), 0 0 0 3px var(--red), 0 0 0 5px var(--ink); }
.tile.sp-bomb .face { animation: bombglow 1.2s linear infinite; }
@keyframes bombglow { 0% { box-shadow: inset 0 -5px 0 var(--c2), 0 0 0 3px var(--red), 0 0 0 5px var(--ink); } 50% { box-shadow: inset 0 -5px 0 var(--c2), 0 0 0 3px var(--gold), 0 0 0 5px var(--ink); } 100% { box-shadow: inset 0 -5px 0 var(--c2), 0 0 0 3px var(--red), 0 0 0 5px var(--ink); } }
.tile.sp-bomb .icon { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spark { position: absolute; left: var(--x); top: var(--y); width: 8px; height: 8px; margin: -4px; border: 2px solid var(--ink); border-radius: 2px; z-index: 6; pointer-events: none; animation: fly .55s ease-out forwards; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(260deg) scale(.3); opacity: 0; } }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tool { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 4px 4px 6px; font-size: .8rem; line-height: 1.05; }
.tool em { display: block; width: 28px; height: 28px; }
.tool em svg { width: 100%; height: 100%; }
.tool .count { position: absolute; top: -10px; right: -6px; background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 99px; min-width: 26px; text-align: center; font-weight: 800; }
.toast-banner { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 70; font-family: var(--display); font-size: clamp(1.7rem, 8vw, 2.7rem); color: var(--gold); text-shadow: 0 4px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink); pointer-events: none; animation: banner 1.3s ease forwards; white-space: nowrap; }
@keyframes banner { 0% { opacity: 0; transform: translateX(-50%) scale(.4) rotate(-8deg); } 25% { opacity: 1; transform: translateX(-50%) scale(1.2) rotate(2deg); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(1); } }
.shake1 { animation: shake1 .35s linear; } .shake2 { animation: shake2 .5s linear; }
@keyframes shake1 { 20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, -2px); } 80% { transform: translate(2px, 2px); } }
@keyframes shake2 { 15% { transform: translate(-7px, 4px) rotate(-.5deg); } 35% { transform: translate(7px, -4px) rotate(.5deg); } 55% { transform: translate(-5px, -4px); } 75% { transform: translate(5px, 4px); } }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(20, 12, 6, .72); animation: fade .2s ease both; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(440px, 100%); animation: drop .3s cubic-bezier(.2, 1.2, .4, 1) both; display: grid; gap: 10px; max-height: 92dvh; overflow-y: auto; }
@keyframes drop { from { transform: translateY(-26px) scale(.92) rotate(-2deg); opacity: 0; } }
.modal h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--red-d); }
.modal .choices { display: grid; gap: 4px; }

/* ---------- hasil ---------- */
.result { text-align: center; }
.result .big { font-size: clamp(2rem, 10vw, 3rem); line-height: 1; margin: 6px 0; }
.result .big.win { color: var(--green-d); } .result .big.lose { color: var(--red); }
.star-row { font-size: 3rem; letter-spacing: 6px; color: var(--paper-dark); }
.star-row b { font-weight: 400; color: var(--gold); text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink); display: inline-block; animation: starin .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.star-row b:nth-child(2) { animation-delay: .25s; } .star-row b:nth-child(3) { animation-delay: .5s; }
@keyframes starin { from { transform: scale(0) rotate(-120deg); opacity: 0; } }
.tally { display: grid; gap: 4px; text-align: left; font-weight: 700; }
.tally div { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px dashed rgba(43, 29, 20, .22); padding: 2px 0; }
.tally div:last-child { border: 0; font-size: 1.2rem; color: var(--red-d); }
.tally svg { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; }
.newcard { display: flex; gap: 12px; align-items: center; text-align: left; border: 3px dashed var(--gold); border-radius: 8px; padding: 8px; background: rgba(20, 12, 6, .45); }
.newcard .av { width: 64px; height: 64px; flex: none; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.newcard .av svg { width: 100%; height: 100%; }
.badge-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--purple); color: #fff8e6; border: 3px solid var(--ink); border-radius: 6px; padding: 2px 10px; margin: 3px; font-weight: 800; font-size: .9rem; }
.badge-chip svg { width: 18px; height: 18px; }

/* ---------- warung ---------- */
.shop-offer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.offer { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 8px 6px 10px; }
.offer .jcard { width: 70%; cursor: default; animation: none; }
.offer .jcard svg { width: 80%; }
.offer h4 { font-family: var(--display); font-weight: 400; font-size: .88rem; line-height: 1.05; }
.offer p { font-size: .7rem; color: #7b6650; line-height: 1.1; min-height: 4.4em; }
.cons { display: grid; gap: 8px; }
.cons .item { display: flex; align-items: center; gap: 10px; }
.cons .item em { display: block; width: 34px; height: 34px; flex: none; }
.cons .item em svg { width: 100%; height: 100%; }
.cons .item small { display: block; color: #7b6650; line-height: 1.1; font-size: .78rem; }

/* ---------- album, lencana, peringkat ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card-item { padding: 8px; text-align: center; display: grid; gap: 4px; align-content: start; }
.card-item .av { aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: #3a2a1e; }
.card-item .av svg { width: 100%; height: 100%; }
.card-item h4 { font-family: var(--display); font-weight: 400; font-size: .95rem; line-height: 1.05; }
.card-item p { font-size: .72rem; color: #7b6650; line-height: 1.15; }
.card-item.locked .av svg { filter: brightness(0) opacity(.45); }
.card-item.secret.got { box-shadow: 4px 5px 0 var(--ink), 0 0 0 4px var(--purple); }
.badge-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.badge-item .ic { width: 36px; height: 36px; flex: none; }
.badge-item .ic svg { width: 100%; height: 100%; }
.badge-item.locked { background: #b8ad92; }
.badge-item.locked .ic { opacity: .55; }
.badge-item small { color: #7b6650; display: block; line-height: 1.1; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; }
.rank-row .n { width: 28px; font-family: var(--display); color: var(--red-d); text-align: center; font-size: 1.1rem; }
.rank-row.me { background: #f3d889; }
.rank-row .sc { margin-left: auto; font-weight: 800; }
.rank-row small { display: block; color: #7b6650; line-height: 1; }

/* ---------- obrolan, toast ---------- */
#chat { position: fixed; left: 10px; bottom: 10px; z-index: 55; display: grid; gap: 6px; pointer-events: none; max-width: min(300px, 78vw); }
.bubble { background: #fff8e6; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px 12px 12px 3px; padding: 5px 10px; font-size: .82rem; line-height: 1.15; box-shadow: 2px 3px 0 var(--ink); animation: bubble 4.6s ease forwards; }
.bubble b { color: var(--red-d); }
@keyframes bubble { 0% { opacity: 0; transform: translateY(14px) scale(.8); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
#toasts { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(420px, 92vw); pointer-events: none; }
.toast { background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; padding: 8px 14px; font-weight: 800; box-shadow: 3px 4px 0 var(--ink); animation: toast 3.6s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-30px); } 10% { opacity: 1; transform: none; } 88% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px); } }

.share-preview { width: 100%; max-width: 320px; margin: 0 auto; border: 3px solid var(--ink); border-radius: 4px; box-shadow: 4px 5px 0 var(--ink); display: block; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-weight: 700; }
.switch { appearance: none; width: 56px; height: 30px; border-radius: 99px; border: 3px solid var(--ink); background: var(--paper-dark); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); transition: transform .2s; }
.switch:checked { background: var(--green); } .switch:checked::after { transform: translateX(26px); }
.switch:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (max-width: 380px) { .node .who { display: none; } .calc .box b { font-size: 1.5rem; } }
@media (min-width: 900px) { #chat { left: 24px; bottom: 24px; } }
.s-play .slot, .s-play .jcard { aspect-ratio: auto; height: 68px; }
.s-play .jcard svg { width: 36px; }
.s-play .jimat-row { grid-template-columns: repeat(5, minmax(0, 72px)); justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #bg { animation: none; }
}
