/* EduMath 3: komponen khusus (memakai tema/palet dari app.css) */
:root { --ink:#1E293B; --muted:#526077; --card:#fff; --line:#bae6fd; --soft:#F0F9FF; --ok:#15803D; --okbg:#DCFCE7; --bad:#B91C1C; --badbg:#FEE2E2; --acc:#20CEE2; --seg:#7DD3FC; }
html[data-theme="dark"] { --ink:#e2e8f0; --muted:#94a3b8; --card:#1a1f26; --line:#2b3a44; --soft:#0b2a30; --ok:#86efac; --okbg:#052e1c; --bad:#fda4af; --badbg:#4c0519; --seg:#38bdf8; }
.header-stats .chip-ic { fill: currentColor; }
.muted { color: var(--muted); font-size: .875rem; font-weight: 600; }
.work { display: grid; gap: .875rem; grid-template-columns: minmax(0,1fr); align-items: start; }
.q-panel, .steps-panel, .menu-panel { display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
.q-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.q-tag { padding: .25rem .75rem; border-radius: 999px; background: var(--soft); color: #0E7490; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
html[data-theme="dark"] .q-tag { color: #67e8f9; }
.q-lv { font-weight: 800; font-size: .75rem; color: var(--muted); }
.q-text { font-size: 1.25rem; line-height: 1.4; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
@media (min-width: 640px) { .q-text { font-size: 1.6rem; } }
.fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.15; margin: 0 .2em; font-family: var(--pmb-font-mono); }
.fr i { font-style: normal; padding: 0 .25em; } .fr i:first-child { border-bottom: .12em solid currentColor; }
.q-vis { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.bar { display: flex; width: 9rem; max-width: 100%; height: 1.5rem; border: 2px solid var(--seg); border-radius: .5rem; overflow: hidden; }
.bar b { flex: 1; border-right: 2px solid var(--seg); background: transparent; } .bar b:last-child { border-right: 0; } .bar b.on { background: var(--acc); }
.bar-w { display: flex; flex-direction: column; gap: .2rem; font-size: .75rem; font-weight: 800; color: var(--muted); }
.q-input { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.q-input input { width: 8rem; min-height: 3.25rem; text-align: center; font: 700 1.5rem var(--pmb-font-mono); border: 2px solid var(--line); border-radius: 1rem; background: var(--card); color: var(--ink); }
.q-input input:focus { outline: none; border-color: var(--acc); }
.q-input input[readonly] { opacity: .75; }
.q-input .stack { display: inline-flex; flex-direction: column; gap: .25rem; align-items: center; } .q-input .stack input { width: 6rem; } .q-input .stack hr { width: 100%; border: 0; border-top: 3px solid var(--ink); margin: 0; }
.q-input .unit { font-weight: 800; color: var(--muted); }
.q-fb { min-height: 1.5rem; font-weight: 800; } .q-fb.ok { color: var(--ok); } .q-fb.bad { color: var(--bad); }
.q-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-main, .btn-ghost { min-height: 2.75rem; padding: 0 1.25rem; border-radius: 1rem; font-weight: 800; font-size: .95rem; border: 2px solid transparent; }
.btn-main { background: #0ea5e9; color: #fff; box-shadow: 0 3px 0 #0369a1; font-family: var(--pmb-font-display); }
.btn-main.next { background: #10b981; box-shadow: 0 3px 0 #047857; }
.btn-ghost { background: var(--card); color: #0369a1; border-color: var(--line); } html[data-theme="dark"] .btn-ghost { color: #7dd3fc; } .btn-ghost.danger { color: var(--bad); align-self: flex-start; }
.q-steps { display: flex; flex-direction: column; gap: .5rem; } .q-steps p { margin: 0; line-height: 1.5; color: var(--ink); font-weight: 700; font-size: .95rem; }
.q-steps .st { padding: .5rem .75rem; border-radius: .75rem; background: var(--soft); }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .5rem; } @media (min-width: 768px) { .topics { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.topic-btn, .lv-btn { min-height: 3.25rem; border-radius: 1rem; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; padding: .4rem; }
.topic-btn .ic { font: 800 1.35rem var(--pmb-font-display); color: #0891B2; } .topic-btn small { font-size: .7rem; font-weight: 700; color: var(--muted); }
.topic-btn[aria-pressed="true"], .lv-btn[aria-pressed="true"] { background: var(--acc); border-color: var(--acc); color: #083344; } .topic-btn[aria-pressed="true"] .ic, .topic-btn[aria-pressed="true"] small { color: #083344; }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; max-width: 30rem; }
.menu-panel .btn-ghost { min-height: 2.75rem; } #tab-menu { display: flex; flex-direction: column; gap: .875rem; }
@media (min-width: 640px) { #tab-menu { gap: 1.25rem; } }
.header-stats .chip-value { font-size: .8125rem; }
.topic-btn .ic { white-space: nowrap; }
@media (max-width: 359.98px) { .topics { grid-template-columns: repeat(2, minmax(0,1fr)); } }
/* Soal bertahap */
.prog { display: flex; align-items: center; gap: .75rem; }
#q-step { font-weight: 800; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.prog-bar { flex: 1; height: .6rem; border-radius: 999px; background: var(--soft); overflow: hidden; }
.prog-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #00B8FF, #10b981); transition: width .3s; }
.q-prompt { padding: .75rem 1rem; border-radius: 1rem; background: var(--soft); font-weight: 700; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.q-steps .st.done { background: var(--okbg); } .q-steps .st.hint { background: var(--soft); border: 2px dashed var(--seg); }
.btn-ghost:disabled { opacity: .45; }
/* Papan penyelesaian berpetak (kotak-kotak seperti EduMath 1) */
.work { grid-template-columns: minmax(0, 1fr) !important; width: 100%; }
@media (min-width: 768px) { .work { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr) !important; gap: 1.25rem; } .pad-panel { position: sticky; top: 1rem; } }
@media (max-height: 520px) and (orientation: landscape) { .pad-panel { position: static; } .key { min-height: 2.5rem !important; } }
.q-board { display: flex; flex-direction: column; gap: .85rem; padding: 1.1rem 1rem; border-radius: 1.25rem; border: 2px solid var(--line); overflow-x: auto; }
.brow { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .5rem; font: 700 1.1rem/1.2 var(--pmb-font-mono); color: var(--ink); }
@media (min-width: 640px) { .brow { font-size: 1.35rem; gap: .5rem .65rem; } }
.bx { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 3.4rem; height: 2.9rem; padding: 0 .4rem; border: 2px dashed var(--seg); border-radius: .85rem; background: transparent; color: var(--ink); font: 800 1.3rem var(--pmb-font-mono); text-align: center; }
.bx.on { border-style: solid; border-color: #eab308; background: rgba(250, 204, 21, .18); box-shadow: 0 0 0 4px rgba(56, 189, 248, .4); outline: none; }
.bx.ok { border: 2px solid #22c55e; background: var(--okbg); color: var(--ok); }
.bx.err { border-color: #f43f5e; background: var(--badbg); animation: bxshake .35s; }
@keyframes bxshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.brow .fr .bx { height: 2.5rem; } .brow .fr i { padding: .1rem .15rem; } .brow .fr i:first-child { border-bottom-width: .1em; padding-bottom: .3rem; }
.q-hint:empty { display: none; } .q-hint { padding: .6rem .9rem; border-radius: .9rem; border: 2px dashed var(--seg); background: var(--soft); font-weight: 700; line-height: 1.5; color: var(--ink); }

/* Papan Angka + tombol aksi */
.pad-panel { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.pad-head .muted { margin: 0; font-size: .75rem; }
.pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; width: 100%; max-width: 22rem; margin-inline: auto; }
.key { min-height: 3.25rem; border-radius: 1rem; border: 2px solid var(--line); background: var(--soft); color: var(--ink); font: 800 1.45rem var(--pmb-font-display); box-shadow: 0 3px 0 var(--line); }
@media (min-width: 640px) { .key { min-height: 3.6rem; font-size: 1.6rem; } }
.key.k2 { background: #ECFDF5; border-color: #A7F3D0; box-shadow: 0 3px 0 #A7F3D0; color: #065F46; }
.key.k3 { background: #FFFBEB; border-color: #FDE68A; box-shadow: 0 3px 0 #FDE68A; color: #92400E; }
.key.k4 { background: #FAF5FF; border-color: #E9D5FF; box-shadow: 0 3px 0 #E9D5FF; color: #6B21A8; }
.key.kdel { background: #FFF1F2; border-color: #FECDD3; box-shadow: 0 3px 0 #FECDD3; color: #9F1239; }
.key.kx { background: #EEF2FF; border-color: #C7D2FE; box-shadow: 0 3px 0 #C7D2FE; color: #3730A3; }
html[data-theme="dark"] .key { background: #0b2a30; border-color: #1c4a55; box-shadow: 0 3px 0 #1c4a55; color: #a5f3fc; }
html[data-theme="dark"] .key.k2 { background: #0c2a1f; border-color: #1d5a3f; color: #86efac; }
html[data-theme="dark"] .key.k3 { background: #2b2410; border-color: #6b5314; color: #fde68a; }
html[data-theme="dark"] .key.k4 { background: #231636; border-color: #4c2a73; color: #d8b4fe; }
html[data-theme="dark"] .key.kdel { background: #35121a; border-color: #7a2336; color: #fda4af; }
html[data-theme="dark"] .key.kx { background: #1a1f45; border-color: #343c8a; color: #a5b4fc; }
.key:disabled { opacity: .45; }
.key:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.pad-panel .q-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .5rem; }
.pad-panel .btn-main { grid-column: 1 / -1; min-height: 3.25rem; font-size: 1.05rem; }
.pad-panel .btn-ghost { padding: 0 .5rem; }
.q-board { min-height: 12rem; }
.q-fb { min-height: 1.25rem; }
.q-input input, .bx.on { caret-color: #0891B2; }
.tag-l { display: none; } @media (min-width: 640px) { .tag-s { display: none; } .tag-l { display: inline; } }
.q-fb:empty { display: none; }
.pad-panel .btn-ghost { font-size: .85rem; }

/* ===== Multiwarna (seperti EduMath 1): tiap topik punya warna sendiri ===== */
.topic-btn { background: var(--tcbg, var(--card)); border-color: var(--tc, var(--line)); color: var(--tcink, var(--ink)); box-shadow: 0 3px 0 var(--tc, var(--line)); }
.topic-btn .ic { color: var(--tcink, #0891B2); } .topic-btn small { color: var(--tcink, var(--muted)); opacity: .85; }
.topic-btn[aria-pressed="true"] { background: var(--tc); border-color: var(--tc); color: var(--tcon); box-shadow: 0 4px 0 color-mix(in srgb, var(--tc) 60%, #000); }
.topic-btn[aria-pressed="true"] .ic, .topic-btn[aria-pressed="true"] small { color: var(--tcon); opacity: 1; }
.q-tag { background: var(--tcbg, var(--soft)); color: var(--tcink, #0E7490); }
.q-prompt { background: var(--tcbg, var(--soft)); border-left: .4rem solid var(--tc, var(--seg)); }
.q-board { border-color: var(--tc, var(--line)); }
.q-hint { border-color: var(--tc, var(--seg)); }
.prog-bar i { background: linear-gradient(90deg, var(--tc, #00B8FF), #10b981); }
.btn-main { background: var(--tc, #0ea5e9); color: var(--tcon, #fff); box-shadow: 0 3px 0 color-mix(in srgb, var(--tc, #0ea5e9) 60%, #000); }
.btn-main.next { background: #10b981; color: #fff; box-shadow: 0 3px 0 #047857; }
.q-fb.ok { background: var(--okbg); padding: .45rem .8rem; border-radius: .9rem; } .q-fb.bad { background: var(--badbg); padding: .45rem .8rem; border-radius: .9rem; }
/* Tombol bantuan berwarna */
.btn-ghost.g-amber { background: #FFFBEB; border-color: #FDE68A; color: #92400E; box-shadow: 0 3px 0 #FDE68A; }
.btn-ghost.g-green { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; box-shadow: 0 3px 0 #A7F3D0; }
html[data-theme="dark"] .btn-ghost.g-amber { background: #2b2410; border-color: #6b5314; color: #fde68a; box-shadow: 0 3px 0 #6b5314; }
html[data-theme="dark"] .btn-ghost.g-green { background: #0c2a1f; border-color: #1d5a3f; color: #86efac; box-shadow: 0 3px 0 #1d5a3f; }
/* Tingkat: hijau, kuning, ungu */
.lv-btn[data-l="1"] { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; box-shadow: 0 3px 0 #A7F3D0; }
.lv-btn[data-l="2"] { background: #FFFBEB; border-color: #FDE68A; color: #92400E; box-shadow: 0 3px 0 #FDE68A; }
.lv-btn[data-l="3"] { background: #FAF5FF; border-color: #E9D5FF; color: #6B21A8; box-shadow: 0 3px 0 #E9D5FF; }
.lv-btn[data-l="1"][aria-pressed="true"] { background: #10b981; border-color: #059669; color: #fff; box-shadow: 0 4px 0 #047857; }
.lv-btn[data-l="2"][aria-pressed="true"] { background: #f59e0b; border-color: #d97706; color: #fff; box-shadow: 0 4px 0 #b45309; }
.lv-btn[data-l="3"][aria-pressed="true"] { background: #9333ea; border-color: #7e22ce; color: #fff; box-shadow: 0 4px 0 #581c87; }
html[data-theme="dark"] .lv-btn[data-l="1"]:not([aria-pressed="true"]) { background: #0c2a1f; border-color: #1d5a3f; color: #86efac; box-shadow: 0 3px 0 #1d5a3f; }
html[data-theme="dark"] .lv-btn[data-l="2"]:not([aria-pressed="true"]) { background: #2b2410; border-color: #6b5314; color: #fde68a; box-shadow: 0 3px 0 #6b5314; }
html[data-theme="dark"] .lv-btn[data-l="3"]:not([aria-pressed="true"]) { background: #231636; border-color: #4c2a73; color: #d8b4fe; box-shadow: 0 3px 0 #4c2a73; }
/* Potongan bar pecahan berwarna-warni */
.bar b.on:nth-child(6n+1) { background: #38bdf8; } .bar b.on:nth-child(6n+2) { background: #34d399; } .bar b.on:nth-child(6n+3) { background: #fbbf24; }
.bar b.on:nth-child(6n+4) { background: #c084fc; } .bar b.on:nth-child(6n+5) { background: #fb7185; } .bar b.on:nth-child(6n+6) { background: #fb923c; }
/* Bantuan Belajar & Reset */
.help-panel .subcard, .help-panel .subcard-collapse { min-width: 0; }
.menu-panel .btn-ghost.danger { margin-top: .25rem; }
[data-t="kel"], body[data-topic="kel"] { --tc: #38bdf8; --tcon: #082f49; --tcbg: #E0F2FE; --tcink: #075985; }
html[data-theme="dark"] [data-t="kel"], html[data-theme="dark"] body[data-topic="kel"] { --tcbg: rgba(56,189,248,.16); --tcink: #38bdf8; }
[data-t="luas"], body[data-topic="luas"] { --tc: #34d399; --tcon: #022c22; --tcbg: #D1FAE5; --tcink: #065f46; }
html[data-theme="dark"] [data-t="luas"], html[data-theme="dark"] body[data-topic="luas"] { --tcbg: rgba(52,211,153,.16); --tcink: #34d399; }
[data-t="ling"], body[data-topic="ling"] { --tc: #fbbf24; --tcon: #451a03; --tcbg: #FEF3C7; --tcink: #92400E; }
html[data-theme="dark"] [data-t="ling"], html[data-theme="dark"] body[data-topic="ling"] { --tcbg: rgba(251,191,36,.16); --tcink: #fbbf24; }
[data-t="sud"], body[data-topic="sud"] { --tc: #c084fc; --tcon: #3b0764; --tcbg: #F3E8FF; --tcink: #6B21A8; }
html[data-theme="dark"] [data-t="sud"], html[data-theme="dark"] body[data-topic="sud"] { --tcbg: rgba(192,132,252,.16); --tcink: #c084fc; }
[data-t="vol"], body[data-topic="vol"] { --tc: #fb7185; --tcon: #4c0519; --tcbg: #FFE4E6; --tcink: #9F1239; }
html[data-theme="dark"] [data-t="vol"], html[data-theme="dark"] body[data-topic="vol"] { --tcbg: rgba(251,113,133,.16); --tcink: #fb7185; }
[data-t="lp"], body[data-topic="lp"] { --tc: #818cf8; --tcon: #1e1b4b; --tcbg: #E0E7FF; --tcink: #3730A3; }
html[data-theme="dark"] [data-t="lp"], html[data-theme="dark"] body[data-topic="lp"] { --tcbg: rgba(129,140,248,.16); --tcink: #818cf8; }
[data-t="rg"], body[data-topic="rg"] { --tc: #2dd4bf; --tcon: #042f2e; --tcbg: #CCFBF1; --tcink: #115E59; }
html[data-theme="dark"] [data-t="rg"], html[data-theme="dark"] body[data-topic="rg"] { --tcbg: rgba(45,212,191,.16); --tcink: #2dd4bf; }
[data-t="gab"], body[data-topic="gab"] { --tc: #fb923c; --tcon: #431407; --tcbg: #FFEDD5; --tcink: #9A3412; }
html[data-theme="dark"] [data-t="gab"], html[data-theme="dark"] body[data-topic="gab"] { --tcbg: rgba(251,146,60,.16); --tcink: #fb923c; }

/* v1.6.0: kartu Topik seragam dengan kartu Operasi EduMath 1 (ikon di kiri, nama di kanan) */
.topic-btn { flex-direction: row; gap: .5rem; min-height: 3rem; padding: .5rem .75rem; border-radius: 1rem; font-family: var(--pmb-font-display); font-weight: 600; font-size: .875rem; }
@media (min-width: 640px) { .topic-btn { font-size: 1rem; } }
.topic-btn .ic { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; height: 1.5rem; padding: 0 .3rem; border-radius: .5rem; background: rgba(255,255,255,.3); font: 700 .8rem var(--pmb-font-display); }
/* Riwayat Langkah (sama dengan EduMath 1) */
.q-log { background: var(--soft); border-color: var(--line); }
.q-log .collapse-head { color: var(--ink); } .q-log .chev-wrap { color: var(--muted); } .q-log .collapse-body { border-color: var(--line); }
.q-steps .st.done { background: var(--okbg); }
.log-ans { display: inline-block; padding: .05rem .4rem; border-radius: .4rem; background: rgba(34,197,94,.18); color: var(--ok); font-weight: 800; }
#btn-next { align-self: stretch; }
.btn-ghost.g-purple { background: #FAF5FF; border-color: #E9D5FF; color: #6B21A8; box-shadow: 0 3px 0 #E9D5FF; }
html[data-theme="dark"] .btn-ghost.g-purple { background: #231636; border-color: #4c2a73; color: #d8b4fe; box-shadow: 0 3px 0 #4c2a73; }
/* Bantuan Belajar per topik */
.help-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; line-height: 1.5; color: var(--ink); font-weight: 600; }
.help-units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin-top: .6rem; font-size: .8rem; }
.help-units > div { padding: .35rem .5rem; border-radius: .6rem; background: var(--card); border: 1px solid var(--line); text-align: center; color: var(--ink); }
.help-units span { color: var(--muted); font-weight: 700; }
.help-units.hidden { display: none; }

/* v1.7.0: papan dalam kartu berpetak seperti EduMath 1 */
.q-board-wrap .q-board { border: 0; padding: 0; min-height: 0; background: none; overflow: visible; }
.q-board-wrap .brow { justify-content: center; }
.menu-panel .menu-actions { margin-top: .25rem; }

/* ============================================================================
   Perbaikan kontras warna & tata letak (EduMath 1 v1.16.0 / EduMath 2 v1.8.0)
   Target: teks >= 4.5:1 (WCAG AA) pada mode terang dan gelap.
   ============================================================================ */

/* 1) Tombol berlatar warna dengan teks putih: latar digelapkan */
.bg-emerald-500.text-white, .bg-emerald-600.text-white { background-color: #047857; border-color: #065f46; }
.bg-emerald-500.text-white:hover, .bg-emerald-600.text-white:hover { background-color: #065f46; }
.bg-sky-500.text-white { background-color: #0369a1; border-color: #075985; }
.bg-sky-500.text-white:hover { background-color: #075985; }
.bg-amber-500.text-white { background-color: #b45309; border-color: #92400e; }
.bg-rose-500.text-white { background-color: #be123c; border-color: #9f1239; }
.bg-indigo-500.text-white { background-color: #4f46e5; }
.bg-indigo-500.text-white:hover { background-color: #4338ca; }
#victory-banner { --tw-gradient-from: #047857; --tw-gradient-to: #0f766e; }
/* kotak simbol di dalam tombol aktif: gelap transparan, bukan putih transparan */
html[data-theme] .text-white .bg-white\/30 { background-color: rgba(0, 0, 0, 0.25); }
html[data-theme="dark"] .bg-white\/30 { background-color: rgba(255, 255, 255, 0.16); }
html[data-theme="dark"] .text-white .bg-white\/30 { background-color: rgba(0, 0, 0, 0.25); }

/* 2) Tombol tingkat (Lv.1-3) terpilih */
.lv-btn[data-l="1"][aria-pressed="true"] { background: #047857; border-color: #065f46; color: #fff; box-shadow: 0 4px 0 #064e3b; }
.lv-btn[data-l="2"][aria-pressed="true"] { background: #b45309; border-color: #92400e; color: #fff; box-shadow: 0 4px 0 #78350f; }
.lv-btn[data-l="3"][aria-pressed="true"] { background: #7e22ce; border-color: #6b21a8; color: #fff; box-shadow: 0 4px 0 #4c1d95; }

/* 3) Teks kecil/redup */
.chip-label { color: #0e7490; }
html[data-theme="dark"] .chip-label { color: #22d3ee; }
.dev-tag { color: #4b5b73; }
.dev-copy { color: #586a82; }
html[data-theme="dark"] .dev-tag { color: #a3b1c4; }
html[data-theme="dark"] .dev-copy { color: #8b9bb0; }
html[data-theme="light"] #tab-menu .text-slate-400,
html[data-theme="light"] .pwa-toast .text-slate-400 { color: #5b6b82; }
html[data-theme="light"] .modal-card .text-sky-600 { color: #0369a1; }
html[data-theme="light"] .modal-card .text-emerald-600 { color: #047857; }
html[data-theme="light"] .modal-card .text-orange-600 { color: #c2410c; }
html[data-theme="light"] .modal-card .text-purple-600 { color: #7e22ce; }

/* 4) Lencana terkunci: tetap terbaca (tanda terkunci = ikon abu-abu + label) */
.badge-card.opacity-75 { opacity: 1; }
html[data-theme="light"] .badge-card.text-slate-400 { color: #5b6b82; }
html[data-theme="dark"] .badge-card.text-slate-400 { color: #a3b1c4; }
html[data-theme="light"] .badge-card .bg-slate-200 { color: #475569; }
html[data-theme="dark"] .badge-card .text-slate-500 { color: #cbd5e1; }

/* 5) Tab Menu: padding kartu seragam */
#tab-menu .panel { padding: 0.875rem; }
@media (min-width: 640px) { #tab-menu .panel { padding: 1.25rem; } }

/* 6) Papan Angka & tombol aksi tidak terpotong di kolom sempit (320px, 768-900px) */
.pad-panel { container-type: inline-size; }
.btn-ghost { white-space: normal; line-height: 1.15; text-wrap: balance; }
@container (max-width: 19rem) {
  #btn-backspace, #btn-hint { flex-direction: column; gap: 0; font-size: 0.8rem; line-height: 1.1; padding: 0 0.15rem; }
}
@container (max-width: 21rem) {
  .pad-panel .btn-ghost { flex-direction: row; gap: 0.2rem; font-size: 0.78rem; padding: 0.3rem 0.2rem; }
}
/* Ikon kecil pada tombol topik (mode gelap): latar gelap agar warna ikon terbaca */
html[data-theme="dark"] .topic-btn:not([aria-pressed="true"]) .ic { background: rgba(0, 0, 0, 0.4); }
.pad-panel .btn-ghost { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
/* Modal Buat Soal: tombol jenis soal menyesuaikan lebar, kata panjang tidak meluap */
#custom-modes { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); }
#custom-modes .custom-op-btn { min-width: 0; overflow-wrap: anywhere; line-height: 1.15; }
#custom-modes .custom-op-btn { min-height: 2.75rem; }
/* Tab Menu (HP): dua tombol aksi sama lebar, label tidak terbungkus tiga baris */
.menu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
.menu-actions > button { justify-content: center; text-align: center; line-height: 1.15; min-height: 2.75rem; padding-left: 0.5rem; padding-right: 0.5rem; }
@media (min-width: 768px) { .menu-actions { display: flex; justify-content: flex-start; } .menu-actions > button { padding-left: 0.875rem; padding-right: 0.875rem; } }
/* Daftar ringkasan: penanda poin terlihat */
.help-list { list-style: disc outside; }
.help-list li::marker { color: var(--muted); }

/* v1.8.1: seragam dengan EduMath 1 (papan angka selebar kolom, tinggi tombol aksi sama) */
.pad { max-width: none; }
.q-btns .btn-ghost { min-height: 2.75rem; }

/* ===== v1.9.0: kartu Topik bergaya seperti Tingkat Kesulitan (warna redup, terpilih solid) ===== */
.topic-btn[data-t="kel"] { --lb:#F0F9FF; --lbd:#BAE6FD; --li:#075985; --db:#0c2433; --dbd:#1b4a66; --di:#7dd3fc; --dsh:#07141d; --sb:#0369a1; --sbd:#075985; --ssh:#0c4a6e; }
.topic-btn[data-t="luas"] { --lb:#ECFDF5; --lbd:#A7F3D0; --li:#065F46; --db:#0c2a1f; --dbd:#1d5a3f; --di:#86efac; --dsh:#06180f; --sb:#047857; --sbd:#065f46; --ssh:#064e3b; }
.topic-btn[data-t="ling"] { --lb:#FFFBEB; --lbd:#FDE68A; --li:#92400E; --db:#262415; --dbd:#463e2a; --di:#fcd34d; --dsh:#14130a; --sb:#b45309; --sbd:#92400e; --ssh:#78350f; }
.topic-btn[data-t="sud"] { --lb:#FAF5FF; --lbd:#E9D5FF; --li:#6B21A8; --db:#201a2e; --dbd:#342a4d; --di:#d8b4fe; --dsh:#100d18; --sb:#7e22ce; --sbd:#6b21a8; --ssh:#4c1d95; }
.topic-btn[data-t="vol"] { --lb:#FFF1F2; --lbd:#FECDD3; --li:#9F1239; --db:#27181f; --dbd:#462631; --di:#fda4af; --dsh:#150d11; --sb:#be123c; --sbd:#9f1239; --ssh:#881337; }
.topic-btn[data-t="lp"] { --lb:#EEF2FF; --lbd:#C7D2FE; --li:#3730A3; --db:#1a1d33; --dbd:#333a73; --di:#a5b4fc; --dsh:#0d0f1c; --sb:#4338ca; --sbd:#3730a3; --ssh:#312e81; }
.topic-btn[data-t="rg"] { --lb:#F0FDFA; --lbd:#99F6E4; --li:#115E59; --db:#0b2624; --dbd:#175550; --di:#5eead4; --dsh:#061413; --sb:#0f766e; --sbd:#115e59; --ssh:#134e4a; }
.topic-btn[data-t="gab"] { --lb:#FFF7ED; --lbd:#FED7AA; --li:#9A3412; --db:#2a1a10; --dbd:#5c3416; --di:#fdba74; --dsh:#150d08; --sb:#c2410c; --sbd:#9a3412; --ssh:#7c2d12; }
html[data-theme] .topic-btn { background: var(--lb); border-color: var(--lbd); color: var(--li); box-shadow: 0 3px 0 var(--lbd); }
html[data-theme="dark"] .topic-btn:not([aria-pressed="true"]) { background: var(--db); border-color: var(--dbd); color: var(--di); box-shadow: 0 3px 0 var(--dsh); }
html[data-theme] .topic-btn[aria-pressed="true"], html[data-theme] .topic-btn[aria-pressed="true"]:hover { background: var(--sb); border-color: var(--sbd); color: #fff; box-shadow: 0 4px 0 var(--ssh); }
html[data-theme] .topic-btn > .ic { background: rgba(0,0,0,.08); color: inherit; }
html[data-theme="dark"] .topic-btn:not([aria-pressed="true"]) > .ic { background: rgba(255,255,255,.2); color: var(--di); }
html[data-theme] .topic-btn[aria-pressed="true"] > .ic { background: rgba(0,0,0,.25); color: #fff; }

/* v1.10.0: timer per soal di baris label (sama dengan EduMath 1) */
.q-timer { margin-left: auto; padding: .25rem .65rem; border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 800; font-size: .75rem; white-space: nowrap; }

/* ===== Aksen seragam semua tombol: latar pastel + garis & bayangan 3D sewarna + teks gelap (seperti Papan Angka) ===== */
html[data-theme] #btn-open-custom, html[data-theme] #btn-helper-prev, html[data-theme] #btn-helper-next, html[data-theme] #btn-start-custom, html[data-theme] #pwa-install-btn, html[data-theme] .btn-action-ghost.bg-white, html[data-theme] #btn-ok-report, html[data-theme] #pwa-update-btn, html[data-theme] #btn-ok-badges, html[data-theme] #btn-reset-progress, html[data-theme] #btn-reset, html[data-theme] #btn-reset-stats, html[data-theme] #btn-swap-nums, html[data-theme] #btn-close-badges, html[data-theme] #btn-close-report, html[data-theme] #btn-close-custom, html[data-theme] #btn-cancel-custom { border: 2px solid; box-shadow: 0 3px 0 var(--ab); transition: transform .1s ease, box-shadow .1s ease; font-weight: 800; }
html[data-theme] #btn-open-custom:active:not(:disabled), html[data-theme] #btn-helper-prev:active:not(:disabled), html[data-theme] #btn-helper-next:active:not(:disabled), html[data-theme] #btn-start-custom:active:not(:disabled), html[data-theme] #pwa-install-btn:active:not(:disabled), html[data-theme] .btn-action-ghost.bg-white:active:not(:disabled), html[data-theme] #btn-ok-report:active:not(:disabled), html[data-theme] #pwa-update-btn:active:not(:disabled), html[data-theme] #btn-ok-badges:active:not(:disabled), html[data-theme] #btn-reset-progress:active:not(:disabled), html[data-theme] #btn-reset:active:not(:disabled), html[data-theme] #btn-reset-stats:active:not(:disabled), html[data-theme] #btn-swap-nums:active:not(:disabled), html[data-theme] #btn-close-badges:active:not(:disabled), html[data-theme] #btn-close-report:active:not(:disabled), html[data-theme] #btn-close-custom:active:not(:disabled), html[data-theme] #btn-cancel-custom:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 transparent !important; }
html[data-theme] #btn-open-custom:disabled, html[data-theme] #btn-helper-prev:disabled, html[data-theme] #btn-helper-next:disabled, html[data-theme] #btn-start-custom:disabled, html[data-theme] #pwa-install-btn:disabled, html[data-theme] .btn-action-ghost.bg-white:disabled, html[data-theme] #btn-ok-report:disabled, html[data-theme] #pwa-update-btn:disabled, html[data-theme] #btn-ok-badges:disabled, html[data-theme] #btn-reset-progress:disabled, html[data-theme] #btn-reset:disabled, html[data-theme] #btn-reset-stats:disabled, html[data-theme] #btn-swap-nums:disabled, html[data-theme] #btn-close-badges:disabled, html[data-theme] #btn-close-report:disabled, html[data-theme] #btn-close-custom:disabled, html[data-theme] #btn-cancel-custom:disabled { opacity: .45; }
html[data-theme] #btn-open-custom, html[data-theme] #btn-helper-prev, html[data-theme] #btn-helper-next, html[data-theme] #btn-open-custom:hover, html[data-theme] #btn-helper-prev:hover, html[data-theme] #btn-helper-next:hover { background: #EEF2FF; border-color: #C7D2FE; color: #3730A3; --ab: #C7D2FE; }
html[data-theme="dark"] #btn-open-custom, html[data-theme="dark"] #btn-helper-prev, html[data-theme="dark"] #btn-helper-next, html[data-theme="dark"] #btn-open-custom:hover, html[data-theme="dark"] #btn-helper-prev:hover, html[data-theme="dark"] #btn-helper-next:hover { background: #1a1d33; border-color: #333a73; color: #a5b4fc; --ab: #333a73; }
html[data-theme] #btn-start-custom, html[data-theme] #pwa-install-btn, html[data-theme] .btn-action-ghost.bg-white, html[data-theme] #btn-start-custom:hover, html[data-theme] #pwa-install-btn:hover, html[data-theme] .btn-action-ghost.bg-white:hover { background: #F0F9FF; border-color: #BAE6FD; color: #075985; --ab: #BAE6FD; }
html[data-theme="dark"] #btn-start-custom, html[data-theme="dark"] #pwa-install-btn, html[data-theme="dark"] .btn-action-ghost.bg-white, html[data-theme="dark"] #btn-start-custom:hover, html[data-theme="dark"] #pwa-install-btn:hover, html[data-theme="dark"] .btn-action-ghost.bg-white:hover { background: #0c2433; border-color: #1b4a66; color: #7dd3fc; --ab: #1b4a66; }
html[data-theme] #btn-ok-report, html[data-theme] #pwa-update-btn, html[data-theme] #btn-ok-report:hover, html[data-theme] #pwa-update-btn:hover { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; --ab: #A7F3D0; }
html[data-theme="dark"] #btn-ok-report, html[data-theme="dark"] #pwa-update-btn, html[data-theme="dark"] #btn-ok-report:hover, html[data-theme="dark"] #pwa-update-btn:hover { background: #0c2a1f; border-color: #1d5a3f; color: #86efac; --ab: #1d5a3f; }
html[data-theme] #btn-ok-badges, html[data-theme] #btn-ok-badges:hover { background: #FAF5FF; border-color: #E9D5FF; color: #6B21A8; --ab: #E9D5FF; }
html[data-theme="dark"] #btn-ok-badges, html[data-theme="dark"] #btn-ok-badges:hover { background: #231636; border-color: #4c2a73; color: #d8b4fe; --ab: #4c2a73; }
html[data-theme] #btn-reset-progress, html[data-theme] #btn-reset, html[data-theme] #btn-reset-stats, html[data-theme] #btn-swap-nums, html[data-theme] #btn-reset-progress:hover, html[data-theme] #btn-reset:hover, html[data-theme] #btn-reset-stats:hover, html[data-theme] #btn-swap-nums:hover { background: #FFF1F2; border-color: #FECDD3; color: #9F1239; --ab: #FECDD3; }
html[data-theme="dark"] #btn-reset-progress, html[data-theme="dark"] #btn-reset, html[data-theme="dark"] #btn-reset-stats, html[data-theme="dark"] #btn-swap-nums, html[data-theme="dark"] #btn-reset-progress:hover, html[data-theme="dark"] #btn-reset:hover, html[data-theme="dark"] #btn-reset-stats:hover, html[data-theme="dark"] #btn-swap-nums:hover { background: #35121a; border-color: #7a2336; color: #fda4af; --ab: #7a2336; }
html[data-theme] #btn-close-badges, html[data-theme] #btn-close-report, html[data-theme] #btn-close-custom, html[data-theme] #btn-cancel-custom, html[data-theme] #btn-close-badges:hover, html[data-theme] #btn-close-report:hover, html[data-theme] #btn-close-custom:hover, html[data-theme] #btn-cancel-custom:hover { background: #F8FAFC; border-color: #E2E8F0; color: #475569; --ab: #E2E8F0; }
html[data-theme="dark"] #btn-close-badges, html[data-theme="dark"] #btn-close-report, html[data-theme="dark"] #btn-close-custom, html[data-theme="dark"] #btn-cancel-custom, html[data-theme="dark"] #btn-close-badges:hover, html[data-theme="dark"] #btn-close-report:hover, html[data-theme="dark"] #btn-close-custom:hover, html[data-theme="dark"] #btn-cancel-custom:hover { background: #1a2028; border-color: #334155; color: #cbd5e1; --ab: #334155; }

/* Tombol jenis soal di modal Buat Soal: warna bergilir seperti kartu Operasi/Topik */
html[data-theme] .custom-op-btn { box-shadow: 0 3px 0 var(--lbd); font-weight: 800; }
html[data-theme] .custom-op-btn:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
html[data-theme] .custom-op-btn:nth-child(1):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(1):not(.bg-sky-500):hover { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; box-shadow: 0 3px 0 #A7F3D0; }
html[data-theme="dark"] .custom-op-btn:nth-child(1):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(1):not(.bg-sky-500):hover { background: #0c2a1f; border-color: #1d5a3f; color: #86efac; box-shadow: 0 3px 0 #1d5a3f; }
html[data-theme] .custom-op-btn:nth-child(1).bg-sky-500 { background: #047857; border-color: #065f46; color: #fff; box-shadow: 0 4px 0 #064e3b; }
html[data-theme] .custom-op-btn:nth-child(2):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(2):not(.bg-sky-500):hover { background: #FFF1F2; border-color: #FECDD3; color: #9F1239; box-shadow: 0 3px 0 #FECDD3; }
html[data-theme="dark"] .custom-op-btn:nth-child(2):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(2):not(.bg-sky-500):hover { background: #27181f; border-color: #462631; color: #fda4af; box-shadow: 0 3px 0 #462631; }
html[data-theme] .custom-op-btn:nth-child(2).bg-sky-500 { background: #be123c; border-color: #9f1239; color: #fff; box-shadow: 0 4px 0 #881337; }
html[data-theme] .custom-op-btn:nth-child(3):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(3):not(.bg-sky-500):hover { background: #FFFBEB; border-color: #FDE68A; color: #92400E; box-shadow: 0 3px 0 #FDE68A; }
html[data-theme="dark"] .custom-op-btn:nth-child(3):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(3):not(.bg-sky-500):hover { background: #262415; border-color: #463e2a; color: #fcd34d; box-shadow: 0 3px 0 #463e2a; }
html[data-theme] .custom-op-btn:nth-child(3).bg-sky-500 { background: #b45309; border-color: #92400e; color: #fff; box-shadow: 0 4px 0 #78350f; }
html[data-theme] .custom-op-btn:nth-child(4):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(4):not(.bg-sky-500):hover { background: #FAF5FF; border-color: #E9D5FF; color: #6B21A8; box-shadow: 0 3px 0 #E9D5FF; }
html[data-theme="dark"] .custom-op-btn:nth-child(4):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(4):not(.bg-sky-500):hover { background: #201a2e; border-color: #342a4d; color: #d8b4fe; box-shadow: 0 3px 0 #342a4d; }
html[data-theme] .custom-op-btn:nth-child(4).bg-sky-500 { background: #7e22ce; border-color: #6b21a8; color: #fff; box-shadow: 0 4px 0 #4c1d95; }
html[data-theme] .custom-op-btn:nth-child(5):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(5):not(.bg-sky-500):hover { background: #F0F9FF; border-color: #BAE6FD; color: #075985; box-shadow: 0 3px 0 #BAE6FD; }
html[data-theme="dark"] .custom-op-btn:nth-child(5):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(5):not(.bg-sky-500):hover { background: #0c2433; border-color: #1b4a66; color: #7dd3fc; box-shadow: 0 3px 0 #1b4a66; }
html[data-theme] .custom-op-btn:nth-child(5).bg-sky-500 { background: #0369a1; border-color: #075985; color: #fff; box-shadow: 0 4px 0 #0c4a6e; }
html[data-theme] .custom-op-btn:nth-child(6):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(6):not(.bg-sky-500):hover { background: #EEF2FF; border-color: #C7D2FE; color: #3730A3; box-shadow: 0 3px 0 #C7D2FE; }
html[data-theme="dark"] .custom-op-btn:nth-child(6):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(6):not(.bg-sky-500):hover { background: #1a1d33; border-color: #333a73; color: #a5b4fc; box-shadow: 0 3px 0 #333a73; }
html[data-theme] .custom-op-btn:nth-child(6).bg-sky-500 { background: #4338ca; border-color: #3730a3; color: #fff; box-shadow: 0 4px 0 #312e81; }
html[data-theme] .custom-op-btn:nth-child(7):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(7):not(.bg-sky-500):hover { background: #F0FDFA; border-color: #99F6E4; color: #115E59; box-shadow: 0 3px 0 #99F6E4; }
html[data-theme="dark"] .custom-op-btn:nth-child(7):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(7):not(.bg-sky-500):hover { background: #0b2624; border-color: #175550; color: #5eead4; box-shadow: 0 3px 0 #175550; }
html[data-theme] .custom-op-btn:nth-child(7).bg-sky-500 { background: #0f766e; border-color: #115e59; color: #fff; box-shadow: 0 4px 0 #134e4a; }
html[data-theme] .custom-op-btn:nth-child(8):not(.bg-sky-500), html[data-theme] .custom-op-btn:nth-child(8):not(.bg-sky-500):hover { background: #FFF7ED; border-color: #FED7AA; color: #9A3412; box-shadow: 0 3px 0 #FED7AA; }
html[data-theme="dark"] .custom-op-btn:nth-child(8):not(.bg-sky-500), html[data-theme="dark"] .custom-op-btn:nth-child(8):not(.bg-sky-500):hover { background: #2a1a10; border-color: #5c3416; color: #fdba74; box-shadow: 0 3px 0 #5c3416; }
html[data-theme] .custom-op-btn:nth-child(8).bg-sky-500 { background: #c2410c; border-color: #9a3412; color: #fff; box-shadow: 0 4px 0 #7c2d12; }

/* ===== Chip header seragam: semua chip (statistik & tombol) berformat aksen — latar pastel, garis & bayangan 3D sewarna ===== */
html[data-theme] .header-stats > .chip, html[data-theme] #btn-sound.chip, html[data-theme] #btn-theme.chip { border: 2px solid !important; box-shadow: 0 3px 0 var(--ab) !important; font-weight: 800; }
html[data-theme] .header-stats > .chip:active, html[data-theme] #btn-sound.chip:active, html[data-theme] #btn-theme.chip:active { box-shadow: 0 0 0 transparent !important; }
html[data-theme] .chip .chip-label, html[data-theme] .chip .chip-value { color: inherit !important; }
html[data-theme] .chip .chip-ic { color: var(--ci); }
html[data-theme] .header-stats > .chip:nth-child(1), html[data-theme] .header-stats > .chip:nth-child(1):hover { background: #FFFBEB !important; border-color: #FDE68A !important; color: #92400E !important; --ab: #FDE68A; --ci: #f59e0b; }
html[data-theme="dark"] .header-stats > .chip:nth-child(1), html[data-theme="dark"] .header-stats > .chip:nth-child(1):hover { background: #262415 !important; border-color: #463e2a !important; color: #fcd34d !important; --ab: #463e2a; --ci: #fcd34d; }
html[data-theme] .header-stats > .chip:nth-child(2), html[data-theme] .header-stats > .chip:nth-child(2):hover { background: #FFF1F2 !important; border-color: #FECDD3 !important; color: #9F1239 !important; --ab: #FECDD3; --ci: #fb7185; }
html[data-theme="dark"] .header-stats > .chip:nth-child(2), html[data-theme="dark"] .header-stats > .chip:nth-child(2):hover { background: #27181f !important; border-color: #462631 !important; color: #fda4af !important; --ab: #462631; --ci: #fda4af; }
html[data-theme] .header-stats > .chip:nth-child(3), html[data-theme] .header-stats > .chip:nth-child(3):hover { background: #FAF5FF !important; border-color: #E9D5FF !important; color: #6B21A8 !important; --ab: #E9D5FF; --ci: #a855f7; }
html[data-theme="dark"] .header-stats > .chip:nth-child(3), html[data-theme="dark"] .header-stats > .chip:nth-child(3):hover { background: #201a2e !important; border-color: #342a4d !important; color: #d8b4fe !important; --ab: #342a4d; --ci: #d8b4fe; }
html[data-theme] .header-stats > .chip:nth-child(4), html[data-theme] .header-stats > .chip:nth-child(4):hover { background: #ECFDF5 !important; border-color: #A7F3D0 !important; color: #065F46 !important; --ab: #A7F3D0; --ci: #10b981; }
html[data-theme="dark"] .header-stats > .chip:nth-child(4), html[data-theme="dark"] .header-stats > .chip:nth-child(4):hover { background: #0c2a1f !important; border-color: #1d5a3f !important; color: #86efac !important; --ab: #1d5a3f; --ci: #86efac; }
html[data-theme] #btn-sound.chip, html[data-theme] #btn-theme.chip, html[data-theme] #btn-sound.chip:hover, html[data-theme] #btn-theme.chip:hover { background: #ECFEFF !important; border-color: #A5F3FC !important; color: #0E7490 !important; --ab: #A5F3FC; --ci: #20CEE2; }
html[data-theme="dark"] #btn-sound.chip, html[data-theme="dark"] #btn-theme.chip, html[data-theme="dark"] #btn-sound.chip:hover, html[data-theme="dark"] #btn-theme.chip:hover { background: #0b2a30 !important; border-color: #1c4a55 !important; color: #67e8f9 !important; --ab: #1c4a55; --ci: #67e8f9; }

/* v1.18.2: mode gelap — bayangan 3D sewarna dengan garis (seperti mode terang) */
html[data-theme="dark"] .key.k2 { box-shadow: 0 3px 0 #1d5a3f; }
html[data-theme="dark"] .key.k2:active:not(:disabled) { box-shadow: 0 0 0 transparent !important; }
html[data-theme="dark"] .key.k3 { box-shadow: 0 3px 0 #6b5314; }
html[data-theme="dark"] .key.k3:active:not(:disabled) { box-shadow: 0 0 0 transparent !important; }
html[data-theme="dark"] .key.k4 { box-shadow: 0 3px 0 #4c2a73; }
html[data-theme="dark"] .key.k4:active:not(:disabled) { box-shadow: 0 0 0 transparent !important; }
html[data-theme="dark"] .key.kdel { box-shadow: 0 3px 0 #7a2336; }
html[data-theme="dark"] .key.kdel:active:not(:disabled) { box-shadow: 0 0 0 transparent !important; }
html[data-theme="dark"] .key.kx { box-shadow: 0 3px 0 #343c8a; }
html[data-theme="dark"] .key.kx:active:not(:disabled) { box-shadow: 0 0 0 transparent !important; }
html[data-theme="dark"] #btn-toggle-adaptive { box-shadow: 0 3px 0 #065f46; }
html[data-theme="dark"] #btn-toggle-adaptive:active:not(:disabled) { box-shadow: 0 0 0 transparent !important; }

/* v1.18.3: chip tombol (Lencana/Rapor) di mode gelap tak lagi memakai bayangan hitam bawaan; kotak petunjuk berformat sama (garis + bayangan 3D sewarna, aksen kiri tebal) */
html[data-theme] .header-stats > .chip.chip-cyan:nth-child(n), html[data-theme] .header-stats > .chip.chip-cyan:nth-child(n):hover { box-shadow: 0 3px 0 var(--ab) !important; }
html[data-theme] .header-stats > .chip.chip-cyan:nth-child(n):active { box-shadow: 0 0 0 transparent !important; }
html[data-theme] .q-prompt {
  border: 2px solid color-mix(in srgb, var(--tc, #38bdf8) 38%, var(--card, #fff));
  border-left: .4rem solid var(--tc, #38bdf8);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tc, #38bdf8) 38%, var(--card, #fff));
}

/* v1.19.0: aksen biru di kiri kotak petunjuk dihapus (tak redundan); garis & bayangan sewarna di semua sisi */
html[data-theme] .q-prompt { border-left-width: 2px; border-left-style: solid; border-left-color: color-mix(in srgb, var(--tc, #38bdf8) 38%, var(--card, #fff)); }

/* v1.14.0: tombol Bacakan / Lihat Cara / Soal Baru setinggi tombol Papan Angka (3.25rem; sm: 3.6rem) */
.pad-panel .q-btns .btn-ghost { min-height: 3.25rem; }
@media (min-width: 640px) { .pad-panel .q-btns .btn-ghost { min-height: 3.6rem; } }
@media (min-width: 400px) { .pad-panel .q-btns .btn-ghost { font-size: .9rem; } }

/* EduMath 3: gambar bangun (SVG) */
.geo { width: 100%; max-width: 17rem; height: auto; display: block; }
.geo .sh { fill: color-mix(in srgb, var(--tc, #38bdf8) 22%, transparent); stroke: var(--tc, #38bdf8); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.geo .dash { fill: none; stroke: var(--muted, #64748b); stroke-width: 2; stroke-dasharray: 5 4; }
.geo text { fill: var(--ink, currentColor); font: 800 13px var(--font-display, 'Fredoka', system-ui, sans-serif); }
.q-vis { justify-content: center; }
