/* Misi Tompok · gaya */
:root {
  --bg: #EEF2FF; --bg2: #E2E8FF; --card: #FFFFFF; --ink: #1E1B3A; --muted: #6A6890; --line: #E3E1F2;
  --pri: #7B5CE6; --pri-d: #5A3FC4; --pri-s: #EFEAFF; --yel: #FFC93C; --yel-d: #E5A800; --ok: #2DB57A; --bad: #E2473D; --org: #FF8A2A;
  --sh: 0 2px 4px rgba(30, 27, 58, .06), 0 10px 26px rgba(30, 27, 58, .10); --r: 22px;
  --fd: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif; --fb: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: radial-gradient(80% 50% at 100% 0%, #FFE9B8 0, transparent 60%), radial-gradient(70% 50% at 0% 100%, #DCD3FF 0, transparent 60%), var(--bg); color: var(--ink); font: 700 16px/1.45 var(--fb); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1, h2, h3 { font-family: var(--fd); margin: 0; line-height: 1.1; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }
.wrap { width: min(1080px, 100% - 28px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: .86rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px; font: 800 1.05rem/1 var(--fd); background: var(--pri); color: #fff; box-shadow: 0 5px 0 var(--pri-d); transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pri-d); }
.btn.yel { background: var(--yel); color: #3B2A00; box-shadow: 0 5px 0 var(--yel-d); }
.btn.ok { background: var(--ok); box-shadow: 0 5px 0 #1C8A5A; }
.btn.white { background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--line), var(--sh); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: var(--sh); font-weight: 900; font-size: .9rem; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--sh); display: grid; place-items: center; font-size: 1.25rem; flex: none; }

/* ---------- laman utama ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand .tompok { width: 54px; height: auto; flex: none; }
.brand b { font: 800 1.35rem/1 var(--fd); display: block; } .brand small { color: var(--muted); font-size: .8rem; }
.hero { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; background: linear-gradient(135deg, #7B5CE6, #9C7CFF); color: #fff; border-radius: 28px; padding: 18px 22px; box-shadow: var(--sh); margin-bottom: 18px; position: relative; overflow: hidden; }
.hero .tompok { width: 120px; height: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.2)); }
.hero h1 { font-size: 1.9rem; } .hero p { opacity: .92; margin-top: 4px; font-weight: 700; }
.hero .bub { display: inline-block; margin-top: 10px; background: #fff; color: var(--ink); border-radius: 16px; padding: 8px 14px; font-weight: 800; font-size: .95rem; }
.demo-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #FFF4D6; border: 2px solid #FFD77A; border-radius: 18px; padding: 12px 16px; margin-bottom: 16px; }
.demo-bar p { flex: 1; min-width: 200px; font-size: .92rem; color: #6B4A00; }
.world { background: var(--card); border-radius: 28px; box-shadow: var(--sh); padding: 18px; margin-bottom: 16px; }
.world-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.world-h h2 { font-size: 1.45rem; } .world-h small { color: var(--muted); font-weight: 800; }
.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mcard { position: relative; text-align: left; background: linear-gradient(180deg, #EAF7FF, #D3EEFF); border-radius: 20px; padding: 12px; min-height: 150px; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.06); }
.mcard.done { background: linear-gradient(180deg, #FFF6D8, #FFE7A1); }
.mcard.exam { background: linear-gradient(180deg, #F1EBFF, #DCCEFF); }
.mcard.lock { filter: grayscale(.7); opacity: .7; }
.mcard .n { font: 800 .8rem var(--fd); color: var(--muted); } .mcard b { font: 800 1.02rem/1.15 var(--fd); }
.mcard .c { font-size: .78rem; color: var(--muted); }
.mcard .lh { position: absolute; right: 10px; top: 8px; font-size: 1.6rem; }
.mcard .st { margin-top: auto; letter-spacing: 2px; color: #E5A800; font-size: 1.05rem; } .mcard .st i { color: #C9C6DA; font-style: normal; }
.mcard .lk { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; }
.ws-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #FFF0D6, #FFE1F0); border-radius: 24px; padding: 16px 18px; box-shadow: var(--sh); margin-bottom: 16px; width: 100%; text-align: left; }
.ws-card .ic { font-size: 2.4rem; } .ws-card b { font: 800 1.25rem var(--fd); display: block; }
.others { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 30px; }
.other { background: rgba(255,255,255,.6); border: 2px dashed #CFCBEA; border-radius: 20px; padding: 14px; }
.other b { font: 800 1.05rem var(--fd); display: block; } .other small { color: var(--muted); display: block; font-size: .8rem; }
.other .pill { display: inline-block; margin-top: 8px; font-size: .72rem; font-weight: 900; background: #EDEBFA; color: var(--muted); padding: 3px 9px; border-radius: 999px; }
.preview-bar { text-align: center; font-size: .8rem; color: var(--muted); padding: 6px; }

/* ---------- lembaran (modal) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(20, 16, 50, .5); z-index: 50; display: grid; place-items: end center; animation: fade .2s; }
@media (min-width: 640px) { .sheet-bg { place-items: center; } }
.sheet { background: var(--bg); width: min(520px, 100%); max-height: 92dvh; overflow: auto; border-radius: 28px 28px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: up .3s cubic-bezier(.2,1,.3,1); }
@media (min-width: 640px) { .sheet { border-radius: 28px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } } @keyframes fade { from { opacity: 0; } }
.say { display: flex; gap: 12px; align-items: flex-end; } .say .tompok { width: 86px; height: auto; flex: none; }
.say .bubble { background: #fff; border-radius: 18px 18px 18px 4px; padding: 10px 14px; box-shadow: var(--sh); font-weight: 800; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fact { background: #fff; border-radius: 14px; padding: 8px 10px; } .fact small { display: block; font-size: .7rem; color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; } .fact b { font: 800 1.05rem var(--fd); }
.goals { display: grid; gap: 6px; } .goal { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 8px 12px; font-size: .92rem; } .goal .s { color: #E5A800; letter-spacing: 1px; } .goal.got { box-shadow: inset 0 0 0 2px var(--ok); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode { background: #fff; border-radius: 18px; padding: 12px; text-align: left; box-shadow: inset 0 0 0 2px var(--line); } .mode.on { box-shadow: inset 0 0 0 3px var(--pri); background: var(--pri-s); }
.mode b { font: 800 1.1rem var(--fd); display: block; } .mode small { color: var(--muted); font-size: .8rem; line-height: 1.3; display: block; }
.concept { background: #E9FFF4; border-radius: 16px; padding: 10px 14px; font-size: .92rem; } .concept b { color: #1C8A5A; }
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > .grow { flex: 1; }
.field { display: grid; gap: 6px; font-weight: 800; } .field input[type=range] { width: 100%; accent-color: var(--pri); }

/* ---------- skrin permainan ---------- */
.game { position: fixed; inset: 0; background: #3B4A9E; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; left: 0; right: 0; pointer-events: none; display: flex; gap: 8px; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); align-items: flex-start; }
.hud > * { pointer-events: auto; }
.hud.top { top: 0; } .hud.bot { bottom: 0; align-items: flex-end; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.ttl { background: rgba(255,255,255,.92); border-radius: 16px; padding: 6px 12px; box-shadow: var(--sh); min-width: 0; } .ttl small { display: block; font-size: .72rem; color: var(--muted); font-weight: 900; } .ttl b { font: 800 1.05rem/1.1 var(--fd); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.costbox { margin-left: auto; background: rgba(255,255,255,.95); border-radius: 16px; padding: 6px 12px; box-shadow: var(--sh); text-align: right; } .costbox small { display: block; font-size: .7rem; color: var(--muted); font-weight: 900; } .costbox b { font: 800 1.15rem var(--fd); } .costbox.over b { color: var(--bad); }
.costbox .tg { font-size: .72rem; color: var(--muted); font-weight: 800; } .costbox .tg span { color: #C99400; }
.tools { display: flex; gap: 6px; background: rgba(255,255,255,.95); border-radius: 22px; padding: 6px; box-shadow: var(--sh); overflow-x: auto; max-width: calc(100vw - 150px); scrollbar-width: none; }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 62px; height: 58px; border-radius: 16px; font-size: .72rem; font-weight: 900; color: var(--muted); flex: none; }
.tool .sw { width: 30px; height: 10px; border-radius: 5px; } .tool .em { font-size: 1.2rem; line-height: 1; }
.tool.on { background: var(--pri-s); color: var(--pri-d); box-shadow: inset 0 0 0 2px var(--pri); }
.tool .pr { font-size: .62rem; opacity: .8; }
.go-btn { margin-left: auto; min-width: 104px; height: 70px; border-radius: 24px; font-size: 1.25rem; }
.presets { display: flex; gap: 8px; background: rgba(255,255,255,.95); border-radius: 18px; padding: 6px; box-shadow: var(--sh); overflow-x: auto; scrollbar-width: none; }
.presets small { align-self: center; padding: 0 6px; font-weight: 900; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.preset { padding: 8px 12px; border-radius: 12px; font-weight: 900; font-size: .85rem; background: #F4F2FC; white-space: nowrap; } .preset.on { background: var(--pri); color: #fff; }
.tipbox { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: 96px; display: flex; gap: 8px; align-items: flex-end; max-width: min(420px, 70vw); pointer-events: none; }
.tipbox .tompok { width: 64px; height: auto; flex: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.tipbox .bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: 8px 12px; box-shadow: var(--sh); font-size: .86rem; font-weight: 800; pointer-events: auto; }
.tipbox .bubble.warn { background: #FFE9E7; color: #A3241C; }
.len-tag { position: absolute; transform: translate(-50%, -150%); background: #1E1B3A; color: #fff; font-weight: 900; font-size: .8rem; padding: 3px 8px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.len-tag.bad { background: var(--bad); }
.meter { background: rgba(255,255,255,.95); border-radius: 16px; padding: 8px 12px; box-shadow: var(--sh); min-width: 180px; } .meter small { font-size: .72rem; color: var(--muted); font-weight: 900; display: flex; justify-content: space-between; }
.meter .bar { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #3dc78a, #ffd23f 50%, #ff8a2a 80%, #e23a3a); position: relative; margin-top: 6px; }
.meter .bar i { position: absolute; top: -4px; width: 4px; height: 18px; border-radius: 2px; background: #1E1B3A; transform: translateX(-2px); transition: left .1s; }
.rewind { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 24px)); background: rgba(255,255,255,.96); border-radius: 22px; padding: 12px 14px; box-shadow: var(--sh); display: grid; gap: 10px; }
.rewind input { width: 100%; accent-color: var(--bad); }
.result-stars { display: flex; justify-content: center; gap: 10px; font-size: 3rem; } .result-stars span { filter: grayscale(1) opacity(.3); transition: .3s; } .result-stars span.on { filter: none; animation: pop .4s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.2) rotate(-30deg); } }
.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 800; z-index: 90; box-shadow: var(--sh); animation: fade .2s; max-width: calc(100% - 30px); text-align: center; }
.rotate-hint { position: absolute; top: 132px; left: 50%; transform: translateX(-50%); background: rgba(30,27,58,.85); color: #fff; font-size: .78rem; font-weight: 800; padding: 6px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.legend { display: flex; align-items: center; gap: 6px; font-size: .7rem; color: var(--muted); font-weight: 900; } .legend i { width: 60px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #3dc78a, #ffd23f, #ff8a2a, #e23a3a); display: inline-block; }
@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; } .hero .tompok { width: 96px; }
  .tool { min-width: 54px; height: 54px; } .go-btn { min-width: 84px; height: 62px; } .tools { max-width: calc(100vw - 112px); }
  .tipbox { bottom: 84px; } .tipbox .tompok { width: 48px; }
}
@media (max-height: 460px) { .tipbox { display: none; } }
.parent-sec { background: #fff; border-radius: 18px; padding: 14px; display: grid; gap: 10px; }
.skill { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; border-bottom: 1px solid var(--line); padding-bottom: 6px; } .skill:last-child { border: 0; }
.seg { display: inline-flex; background: #EDEBFA; border-radius: 999px; padding: 3px; } .seg button { padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: .85rem; color: var(--muted); } .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (max-width: 760px) {
  .hud.top { flex-wrap: wrap; }
  .hud.top .ttl { flex: 1 1 0; min-width: 0; } .ttl b { max-width: none; }
  #presetsWrap { order: 3; flex-basis: 100%; min-width: 0; } #presetsWrap:empty { display: none; }
  .presets small { display: none; }
  .costbox .tg { display: none; }
}

/* ---------- Bengkel Tompok ---------- */
.bk { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; background: #fff; border-radius: 28px; box-shadow: var(--sh); padding: 12px; margin-bottom: 18px; }
.bk-stage { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 600 / 340; background: #F2EBDD; cursor: pointer; }
.bk-stage #bkSvg, .bk-stage .bk-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bk-tp { position: absolute; left: 16%; bottom: 3%; width: 25%; padding: 0; transform-origin: 50% 100%; animation: bkBob 3.2s ease-in-out infinite; }
.bk-tp .tompok { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 6px rgba(0,0,0,.15)); }
.bk-tp.hop { animation: bkHop .5s ease-out; } .bk-tp.shake { animation: bkShake .25s linear infinite; }
@keyframes bkBob { 50% { transform: translateY(-3%) scaleY(1.02); } }
@keyframes bkHop { 40% { transform: translateY(-14%); } }
@keyframes bkShake { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.bk-say { position: absolute; left: 4%; top: 3%; max-width: 52%; background: #fff; border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-weight: 800; font-size: .86rem; line-height: 1.3; box-shadow: var(--sh); }
.bk-say.pop { animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
.bk-wx { position: absolute; right: 2.5%; top: 3%; background: rgba(255,255,255,.92); border-radius: 999px; padding: 5px 11px; font-weight: 900; font-size: .78rem; box-shadow: var(--sh); max-width: 44%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-wx u { text-decoration: none; color: var(--pri); }
.bk-drone { position: absolute; width: 12%; left: 30%; top: 45%; pointer-events: none; }
.bk-drone.fly { animation: bkFly 3.5s ease-in-out forwards; } .bk-prop { animation: bkProp .08s linear infinite; transform-origin: center; transform-box: fill-box; }
@keyframes bkFly { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: 1; transform: translate(10%, -40%) scale(1); } 35% { transform: translate(180%, -160%) rotate(8deg); } 60% { transform: translate(320%, -60%) rotate(-6deg); } 85% { transform: translate(120%, -120%); } 100% { transform: translate(0, 10%) scale(.7); opacity: 0; } }
@keyframes bkProp { 50% { transform: scaleX(.3); } }
.bk-fx { position: absolute; left: 14%; bottom: 20%; width: 30%; height: 50%; pointer-events: none; }
.bk-p { position: absolute; bottom: 0; font-size: 1.4rem; animation: bkUp 1.6s ease-out forwards; } .bk-p.bub { font-size: 1.1rem; } .bk-p.gear { color: #7B5CE6; }
@keyframes bkUp { to { transform: translateY(-160%) scale(1.3); opacity: 0; } }
.bk-scene .bk-spin { animation: bkSpin .3s linear infinite; transform-origin: 0 0; }
@keyframes bkSpin { to { transform: rotate(360deg); } }
.bk-scene .bk-cloud { animation: bkCloud 40s linear infinite; } @keyframes bkCloud { from { transform: translateX(-60px); } to { transform: translateX(220px); } }
.bk-scene .bk-rain line { animation: bkRain .55s linear infinite; } @keyframes bkRain { from { transform: translate(0, -40px); } to { transform: translate(-14px, 120px); } }
.bk-scene .bk-star { animation: bkTw 2.4s ease-in-out infinite; } @keyframes bkTw { 50% { opacity: .2; } }
.bk-scene .bk-flash { opacity: 0; animation: bkFlash 6s infinite; } .bk-scene .bk-bolt { opacity: 0; animation: bkFlash 6s infinite; }
@keyframes bkFlash { 0%, 90%, 94%, 100% { opacity: 0; } 91%, 93% { opacity: .85; } }
.bk-scene .bk-drip { animation: bkDrip 2.2s linear infinite; } @keyframes bkDrip { from { transform: translateY(0); opacity: .9; } to { transform: translateY(110px); opacity: 0; } }
.bk-panel { display: flex; flex-direction: column; gap: 10px; padding: 4px 4px 4px 0; min-width: 0; }
.bk-lvl { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .bk-lvl small { display: block; font-size: .72rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .bk-lvl b { font: 800 1.2rem/1.1 var(--fd); }
.bk-gears { background: var(--pri-s); color: var(--pri-d); font: 800 1rem var(--fd); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.bk-lbar { height: 8px; border-radius: 4px; background: #EDEBFA; overflow: hidden; } .bk-lbar i { display: block; height: 100%; background: linear-gradient(90deg, #FFC93C, #FF8A2A); border-radius: 4px; transition: width .4s; }
.bk-lnote { font-size: .74rem; color: var(--muted); font-weight: 800; margin-top: -6px; }
.bk-needs { display: grid; gap: 8px; }
.bk-need { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: #F6F4FE; border-radius: 16px; padding: 8px 12px; text-align: left; transition: transform .1s; }
.bk-need:active { transform: scale(.97); } .bk-need .ic { grid-row: 1 / 3; font-size: 1.6rem; } .bk-need .nt { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; } .bk-need .nt b { font: 800 1rem var(--fd); } .bk-need .nt small { font-size: .72rem; color: var(--muted); font-weight: 900; }
.bk-need .bar { height: 8px; border-radius: 4px; background: #E3E1F2; overflow: hidden; margin-top: 4px; } .bk-need .bar i { display: block; height: 100%; width: 50%; background: #7B5CE6; border-radius: 4px; transition: width .5s; } .bk-need .bar.water i { background: #2BB3D6; } .bk-need .bar.pink i { background: #FF6F91; }
.bk-daily small { font-size: .72rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .bk-daily > div { display: grid; gap: 4px; margin-top: 4px; }
.bk-task { font-size: .8rem; font-weight: 800; display: flex; gap: 6px; } .bk-task em { margin-left: auto; font-style: normal; color: var(--pri); } .bk-task.done { color: var(--muted); text-decoration: line-through; } .bk-task.done em { text-decoration: none; }
@media (max-width: 760px) { .bk { grid-template-columns: 1fr; padding: 10px; } .bk-say { font-size: .78rem; max-width: 58%; } .bk-wx { font-size: .7rem; } .bk-tp { width: 28%; left: 14%; } }
.bk-drone { width: 17%; z-index: 3; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.bk-tp { z-index: 2; } .bk-say { z-index: 4; } .bk-wx { z-index: 4; } .bk-fx { z-index: 5; }
.chip { white-space: nowrap; }
@media (max-width: 560px) {
  .brand small { display: none; } .brand b { font-size: 1.15rem; white-space: nowrap; } .brand .tompok { width: 42px; }
  .top { gap: 8px; } .top .icon-btn { width: 42px; height: 42px; font-size: 1.05rem; }
  .bk-wx { top: auto; bottom: 3%; right: 2.5%; max-width: 60%; }
  .bk-say { max-width: 70%; }
}
.bk-drone { top: 58%; left: 34%; }
.bk-drone.fly { animation-name: bkFly2; }
@keyframes bkFly2 { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 10% { opacity: 1; transform: translate(20%, -60%) scale(1); } 35% { transform: translate(170%, -120%) rotate(8deg); } 60% { transform: translate(300%, -40%) rotate(-6deg); } 85% { transform: translate(120%, -100%); } 100% { transform: translate(0, 10%) scale(.7); opacity: 0; } }

/* ---------- Garaj ---------- */
.gj-prev { flex-shrink: 0; min-height: 230px; position: relative; border-radius: 22px; background: radial-gradient(80% 90% at 50% 20%, #FFFFFF, #E4DEFB); overflow: hidden; }
.gj-prev canvas { display: block; width: 100%; height: 230px; touch-action: none; cursor: grab; }
.gj-prev small { position: absolute; left: 12px; bottom: 8px; font-size: .72rem; font-weight: 900; color: var(--muted); }
.gj-sec { display: grid; gap: 8px; flex-shrink: 0; } .gj-sec > b { font: 800 1rem var(--fd); }
.gj-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.gj-o { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-weight: 900; font-size: .88rem; }
.gj-o.on { box-shadow: inset 0 0 0 3px var(--pri); background: var(--pri-s); } .gj-o em { font-style: normal; font-size: .72rem; color: var(--muted); }
.gj-sw { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); } .gj-sw.on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--pri); }
.bk-garage { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #FFF0D6, #FFE1F0); border-radius: 16px; padding: 8px 12px; font-weight: 900; text-align: left; }
.bk-garage .ic { font-size: 1.5rem; } .bk-garage small { display: block; color: var(--muted); font-size: .72rem; }

/* =====================================================================
   TEMA MALAM KACA (v4): biru-ungu gelap, kad kaca, butang bulat berkilat
   ===================================================================== */
:root {
  --bg: #1D2556; --bg2: #262C6B; --card: #2A2F6E; --card2: #343B85; --ink: #F4F2FF; --muted: #A9A7D8; --line: rgba(255,255,255,.14);
  --pri: #8C6BFF; --pri-d: #5A3BD6; --pri-s: rgba(140,107,255,.22); --yel: #FFC93C; --yel-d: #D99A00; --ok: #2FC488; --bad: #FF5A57; --cy: #2FA8EA;
  --dk: #1E1B3A;
  --glass: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
  --gb: 1px solid rgba(255,255,255,.13);
  --sh: 0 12px 30px rgba(6, 8, 40, .38), inset 0 1px 0 rgba(255,255,255,.14);
  color-scheme: dark;
}
body { background: radial-gradient(90% 40% at 50% 0%, #3A5A9C 0, transparent 70%), linear-gradient(180deg, #2A3B78 0%, #1F2558 45%, #241A4F 100%) fixed; color: var(--ink); }
.home { padding-bottom: 110px; }
.btn { background: linear-gradient(180deg, #A68BFF, #7552F2); box-shadow: 0 5px 0 var(--pri-d), 0 10px 20px rgba(80,50,200,.35), inset 0 2px 0 rgba(255,255,255,.3); }
.btn.yel { background: linear-gradient(180deg, #FFD966, #FFB800); }
.btn.ok { background: linear-gradient(180deg, #4FE0A3, #22B676); }
.btn.white { background: var(--glass), #2E3477; color: var(--ink); border: var(--gb); box-shadow: 0 4px 0 #171B48, var(--sh); }
.icon-btn { width: 52px; height: 52px; color: #fff; font: 900 1rem var(--fd); background: radial-gradient(circle at 35% 28%, #7FD9FF, #2196DF 55%, #1468B8); box-shadow: inset 0 -4px 8px rgba(0,0,0,.25), inset 0 2px 4px rgba(255,255,255,.45), 0 8px 18px rgba(10,30,90,.45); }
.icon-btn svg { width: 24px; height: 24px; fill: #fff; }
.chip { background: var(--card2); }

/* header + pintasan */
.top { padding: 18px 0 10px; }
.hello { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.hello .ava { width: 54px; height: 54px; border-radius: 50%; flex: none; background: radial-gradient(circle at 40% 30%, #FFE7B3, #FFB86B); box-shadow: 0 6px 14px rgba(0,0,0,.3), inset 0 -3px 6px rgba(0,0,0,.15); display: grid; place-items: end center; overflow: hidden; }
.hello .ava .tompok { width: 50px; height: auto; margin-bottom: -6px; }
.hello b { font: 800 1.45rem/1.1 var(--fd); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hello small { color: var(--muted); font-weight: 800; font-size: .82rem; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 14px; max-width: 520px; }
.quick button { display: grid; justify-items: center; gap: 6px; font-weight: 800; font-size: .8rem; color: var(--muted); }
.qi { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.75rem; box-shadow: inset 0 -5px 10px rgba(0,0,0,.25), inset 0 3px 6px rgba(255,255,255,.35), 0 10px 20px rgba(6,8,40,.4); transition: transform .12s; }
.quick button:active .qi { transform: scale(.92); }
.q1 { background: radial-gradient(circle at 35% 28%, #8E8BFF, #4D44C9); } .q2 { background: radial-gradient(circle at 35% 28%, #63CFFF, #1F6FC2); }
.q3 { background: radial-gradient(circle at 35% 28%, #C38CFF, #7140C9); } .q4 { background: radial-gradient(circle at 35% 28%, #FF9AB0, #C2456A); }
.stats { display: flex; justify-content: space-around; gap: 6px; background: linear-gradient(90deg, #4A3CA8, #5B3FB0 50%, #4A3CA8); border-radius: 999px; padding: 10px 16px; margin-bottom: 16px; box-shadow: var(--sh); border: var(--gb); max-width: 520px; font-weight: 800; }
.stats b { font: 800 1.1rem var(--fd); margin-left: 4px; }
.cols { display: grid; gap: 18px; } @media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; align-items: start; } .quick, .stats { max-width: none; } }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* kad teruskan */
.cont { position: relative; overflow: hidden; display: block; width: 100%; min-height: 200px; text-align: left; border-radius: 28px; padding: 18px; border: var(--gb); box-shadow: var(--sh);
  background: radial-gradient(70% 80% at 85% 100%, #F6A33E 0, transparent 60%), radial-gradient(60% 60% at 15% 100%, #3BBF7A 0, transparent 70%), linear-gradient(160deg, #3C6FB5, #2B4692 55%, #3A3290); }
.cont-t { position: relative; z-index: 2; display: grid; gap: 6px; max-width: 62%; }
.cont-t small { font-weight: 900; font-size: .75rem; color: #D7E4FF; text-transform: uppercase; letter-spacing: .05em; } .cont-t b { font: 800 1.4rem/1.15 var(--fd); }
.ring-pill { display: inline-flex; align-items: center; gap: 8px; width: max-content; background: rgba(14,20,60,.55); border-radius: 999px; padding: 5px 7px 5px 12px; font-weight: 900; }
.ring-pill i { width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(#6FD3FF calc(var(--p) * 1%), rgba(255,255,255,.18) 0); -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }
.go { position: absolute; right: 16px; top: 16px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.35rem; font-weight: 900; background: radial-gradient(circle at 35% 28%, #7FD9FF, #2196DF 55%, #1468B8); box-shadow: inset 0 -4px 8px rgba(0,0,0,.25), inset 0 2px 4px rgba(255,255,255,.45), 0 8px 18px rgba(10,30,90,.45); }
.go.sm { position: static; width: 40px; height: 40px; font-size: 1rem; margin-left: auto; flex: none; }
.cont-art { position: absolute; right: 4%; bottom: -10px; width: 42%; max-width: 190px; z-index: 1; } .cont-art .tompok { width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(0,0,0,.35)); }
.deco { position: absolute; z-index: 1; font-size: 1.5rem; filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); animation: bkBob 3s ease-in-out infinite; }
.d1 { left: 46%; top: 30%; } .d2 { left: 40%; bottom: 14%; animation-delay: -1s; } .d3 { left: 56%; bottom: 40%; font-size: 1.1rem; animation-delay: -2s; }

/* peta pulau */
.isle { border-radius: 28px; padding: 14px; background: var(--glass), #232A66; border: var(--gb); box-shadow: var(--sh); }
.isle-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 10px; } .isle-h h2 { font-size: 1.35rem; }
.isle-h span { background: var(--pri-s); padding: 4px 12px; border-radius: 999px; font-weight: 900; font-size: .85rem; }
.isle-map { position: relative; height: 560px; border-radius: 22px; overflow: hidden; background: radial-gradient(60% 40% at 50% 0%, rgba(140,180,255,.35), transparent 70%), linear-gradient(180deg, #2E4E92 0%, #1E6C9A 45%, #138A9A 100%); }
.isle-land { position: absolute; left: 6%; right: 6%; top: 8%; bottom: 4%; border-radius: 46% 54% 40% 48% / 18% 22% 16% 20%; background: linear-gradient(180deg, #5CC46E, #3FA95C 60%, #2F8E4E); box-shadow: 0 16px 0 #8A5A3C, 0 22px 0 #6B4330, 0 30px 30px rgba(0,0,0,.35), inset 0 6px 0 rgba(255,255,255,.18); }
.isle-land.l2 { left: 26%; right: 18%; top: 34%; bottom: 36%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #7AD488, #4CB463); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); opacity: .7; }
.dc { position: absolute; font-size: 1.9rem; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 4px rgba(0,0,0,.3)); pointer-events: none; } .dc.sm { font-size: 1.2rem; } .dc.cl { font-size: 2.2rem; opacity: .8; animation: bkBob 5s ease-in-out infinite; }
.isle-path { position: absolute; inset: 0; width: 100%; height: 100%; } .isle-path path { fill: none; stroke: #1F2A5C; stroke-width: 4; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .75; }
.node { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; z-index: 2; }
.coin { width: 56px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 1.3rem var(--fd); color: #4B4F7A; background: radial-gradient(ellipse at 50% 35%, #F4F5FF, #B9BDE0); box-shadow: 0 6px 0 #7D82B5, 0 10px 12px rgba(0,0,0,.35), inset 0 2px 0 #fff; transition: transform .12s; }
.node:active .coin { transform: translateY(3px); }
.node.done .coin { color: #7A4B00; background: radial-gradient(ellipse at 50% 35%, #FFF1B0, #FFC93C); box-shadow: 0 6px 0 #C98A00, 0 10px 12px rgba(0,0,0,.35), inset 0 2px 0 #fff; }
.node.cur .coin { color: #fff; background: radial-gradient(ellipse at 50% 35%, #A8E8FF, #2FA8EA); box-shadow: 0 6px 0 #1468B8, 0 0 0 6px rgba(111,211,255,.35), 0 0 30px 8px rgba(111,211,255,.55); animation: glow 1.6s ease-in-out infinite; }
.node.lock .coin { font-size: 1rem; filter: saturate(.3) brightness(.85); }
.node.exam .coin { width: 64px; height: 50px; }
@keyframes glow { 50% { box-shadow: 0 6px 0 #1468B8, 0 0 0 10px rgba(111,211,255,.2), 0 0 40px 14px rgba(111,211,255,.6); } }
.nst { margin-top: 8px; font-size: .78rem; letter-spacing: 1px; color: var(--yel); text-shadow: 0 2px 2px rgba(0,0,0,.4); } .nst i { color: rgba(255,255,255,.35); font-style: normal; }
.nl { margin-top: 4px; font-size: .68rem; font-weight: 900; color: #fff; background: rgba(16,22,64,.6); padding: 2px 8px; border-radius: 999px; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node.lock .nl { opacity: .6; }
.me { position: absolute; bottom: 70%; width: 54px; pointer-events: none; animation: bkBob 2s ease-in-out infinite; } .me .tompok { width: 100%; height: auto; filter: drop-shadow(0 6px 4px rgba(0,0,0,.35)); }

/* senarai cadangan */
.sec-h { font: 800 1.25rem var(--fd); margin: 6px 4px -4px; }
.rec { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border-radius: 24px; padding: 14px 16px; min-height: 84px; border: var(--gb); box-shadow: var(--sh); background: linear-gradient(120deg, #4B2E8E, #2F2B78); margin: 0; }
.rec .ic { width: 58px; height: 58px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 1.9rem; background: rgba(255,255,255,.12); box-shadow: inset 0 2px 0 rgba(255,255,255,.2); }
.rec b { font: 800 1.12rem var(--fd); display: block; color: #fff; } .rec small { display: block; color: #C9B8FF; font-size: .8rem; font-weight: 800; }
.rec.ws-card { background: linear-gradient(120deg, #7A3FB8, #3B2E8E); }
.rec.r1 { background: linear-gradient(120deg, #23407E, #2B2A70); } .rec.r2 { background: linear-gradient(120deg, #5B3A7E, #2B2A70); } .rec.r3 { background: linear-gradient(120deg, #1F5E7A, #2B2A70); } .rec.r4 { background: linear-gradient(120deg, #3B2E8E, #1F2058); }
.rec.other { opacity: .78; border-style: solid; }
.demo-bar { background: linear-gradient(120deg, rgba(255,201,60,.22), rgba(255,138,42,.16)); border: 1px solid rgba(255,201,60,.45); } .demo-bar p { color: #FFE6A8; }
.preview-bar { color: var(--muted); }

/* bar tab bawah */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: flex; gap: 4px; padding: 8px 10px; border-radius: 999px; width: min(440px, calc(100% - 28px)); justify-content: space-between;
  background: rgba(30, 30, 82, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: var(--gb); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.tabbar button { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #8F8CC6; } .tabbar svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar button.on { color: #fff; background: radial-gradient(circle at 35% 28%, #B49BFF, #7048E8); box-shadow: 0 0 0 5px rgba(140,107,255,.25), 0 8px 16px rgba(80,50,200,.5); }

/* lembaran gelap */
.sheet-bg { background: rgba(8, 10, 36, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet { background: linear-gradient(180deg, #2F3680, #232860); border: var(--gb); box-shadow: 0 -10px 40px rgba(0,0,0,.4); }
.say .bubble, .tipbox .bubble, .bk-say, .hero .bub { background: #fff; color: var(--dk); }
.fact, .goal, .mode, .parent-sec, .gj-o, .bk-need { background: rgba(255,255,255,.08); color: var(--ink); }
.mode { box-shadow: inset 0 0 0 2px var(--line); } .mode.on, .gj-o.on { background: var(--pri-s); box-shadow: inset 0 0 0 3px var(--pri); }
.concept { background: rgba(47,196,136,.16); } .concept b { color: #6FF0B8; }
.seg { background: rgba(255,255,255,.1); } .seg button.on { background: var(--pri); color: #fff; }
.sheet input:not([type=range]):not([type=checkbox]), .sheet select { background: #1D2256; color: var(--ink); border-color: rgba(255,255,255,.2) !important; }
.toast { background: #fff; color: var(--dk); }

/* HUD permainan: kaca gelap */
.ttl, .costbox, .tools, .presets, .meter, .rewind { background: rgba(30, 32, 86, .84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: var(--gb); color: var(--ink); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.costbox .tg span { color: var(--yel); } .costbox.over b { color: #FF8A86; }
.tool { color: #B4B1E6; } .tool.on { background: var(--pri-s); color: #fff; box-shadow: inset 0 0 0 2px var(--pri); }
.preset { background: rgba(255,255,255,.1); } .preset.on { background: linear-gradient(180deg, #A68BFF, #7552F2); }
.meter .bar i { background: #fff; }
.hud .icon-btn { width: 50px; height: 50px; }
.rotate-hint { background: rgba(30,32,86,.88); }

/* Bengkel dalam tema gelap */
.bk { background: var(--glass), #262C6E; border: var(--gb); }
.bk-gears { background: var(--pri-s); color: #fff; } .bk-lbar, .bk-need .bar { background: rgba(255,255,255,.14); }
.bk-garage { background: linear-gradient(120deg, #C2456A, #7140C9); color: #fff; } .bk-garage small { color: #FFD6E4; }
.bk-task em { color: var(--yel); }
.gj-prev { background: radial-gradient(80% 90% at 50% 20%, #4B57B8, #232860); } .gj-prev small { color: #C9C6F5; }
.gj-sw.on { box-shadow: 0 0 0 3px #232860, 0 0 0 6px var(--pri); }
@media (max-width: 560px) { .hello b { font-size: 1.2rem; } .qi { width: 58px; height: 58px; font-size: 1.55rem; } .isle-map { height: 520px; } .cont-t b { font-size: 1.2rem; } .top .icon-btn { width: 46px; height: 46px; } }
.col .bk { grid-template-columns: 1fr; } .col .bk-panel { padding: 4px; }
@media (min-width: 900px) { .quick, .stats { max-width: 640px; } .col .bk-needs { grid-template-columns: repeat(3, 1fr); } }
