/* myJawi — gaya aplikasi */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 700; z-index: 99; transition: 0.25s; max-width: 90vw; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #b3361c; }

.avatar { display: grid; place-items: center; border-radius: 30%; flex: none; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.avatar .jawi { line-height: 1; margin-top: 0.1em; }

.logo { display: inline-flex; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 24px; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand.light { color: #fff; }

/* ---------- kerangka */
.shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: rgba(251, 246, 236, 0.92); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.top-stats { gap: 10px; }
.stat { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); }
.stat svg { color: var(--coral); }
.stat + .stat svg { color: var(--sun); fill: var(--sun); }
.child-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); }
.guest-bar { background: var(--sun-soft); text-align: center; padding: 8px 16px; font-size: 15px; }
.shell-body { display: grid; grid-template-columns: 220px 1fr; max-width: 1200px; margin: 0 auto; }
.tabs { position: sticky; top: 70px; align-self: start; display: flex; flex-direction: column; gap: 6px; padding: 20px 12px; }
.tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--ink-2); text-decoration: none; font-weight: 700; }
.tab:hover { background: var(--paper-2); }
.tab.on { background: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal-2); }
.tab.parent { margin-top: 14px; border-top: 2px dashed var(--line); padding-top: 16px; border-radius: 0 0 14px 14px; }
.page { padding: 24px 20px 120px; min-width: 0; }
.page-head { margin-bottom: 18px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); text-decoration: none; font-weight: 700; margin-bottom: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 4px; }
.narrow { max-width: 460px; margin: 30px auto; }
.center-row { justify-content: center; margin-top: 16px; }
.icon-btn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }

@media (max-width: 860px) {
  .shell-body { grid-template-columns: 1fr; }
  .tabs { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 30; flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--card); border-top: 2px solid var(--line); }
  .tab { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; flex: 1; text-align: center; }
  .tab.on { box-shadow: none; }
  .tab.parent { margin: 0; border: 0; padding-top: 6px; border-radius: 14px; }
  .child-chip > span, .brand > span:not(.logo) { display: none; }
  .hero-glyph { display: none; } .hero-strip { padding: 22px; }
  .topbar { padding: 8px 14px; }
}

/* ---------- log masuk */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-side { background: var(--teal); color: #fdf0cf; padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 12px; position: relative; overflow: hidden; }
.auth-side h1 { color: #fff; }
.auth-side .brand { position: absolute; top: 28px; left: 32px; }
.auth-art { font-size: 140px; color: rgba(253, 240, 207, 0.22); line-height: 1.2; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-form { width: 100%; max-width: 420px; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.or { text-align: center; position: relative; margin: 14px 0; color: var(--ink-3); }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--line); }
.or span { position: relative; background: var(--paper); padding: 0 10px; }
@media (max-width: 760px) { .auth { grid-template-columns: 1fr; } .auth-side { padding: 70px 24px 28px; } .auth-art { font-size: 80px; } }

/* ---------- pilih anak */
.choose { max-width: 820px; margin: 0 auto; padding: 28px 20px 60px; }
.child-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 30px 0; }
.child-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: var(--r-lg); border: 2px solid transparent; background: none; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 20px; transition: transform .15s; }
.child-card:hover { transform: translateY(-4px); border-color: var(--line); background: var(--card); }
.add-av { width: 110px; height: 110px; background: var(--paper-2); color: var(--ink-3); font-size: 48px; border: 3px dashed var(--line); box-shadow: none; }
.av-pick { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.av-opt { border: 3px solid transparent; border-radius: 22px; padding: 3px; background: none; cursor: pointer; }
.av-opt.on { border-color: var(--sun); }
.field-label { font-weight: 700; font-size: 16px; margin: 0; }

/* ---------- peta */
.hero-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; border-radius: var(--r-lg); background: var(--teal); color: #fff; box-shadow: 0 6px 0 var(--teal-2); margin-bottom: 18px; overflow: hidden; }
.hero-strip h1 { color: #fff; margin-bottom: 6px; }
.hero-strip p { margin-bottom: 10px; max-width: 520px; }
.hero-strip .eyebrow { color: rgba(255,255,255,.75); }
.hero-strip.sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 #c98f22; } .hero-strip.sun h1 { color: var(--ink); } .hero-strip.sun .eyebrow { color: rgba(0,0,0,.55); }
.hero-strip.coral { background: var(--coral); box-shadow: 0 6px 0 #b54a32; }
.hero-strip.sky { background: var(--sky); box-shadow: 0 6px 0 #2d6d8c; }
.hero-strip.plum { background: var(--plum); box-shadow: 0 6px 0 #694377; }
.hero-strip.leaf { background: var(--leaf); box-shadow: 0 6px 0 #437a2a; }
.hero-glyph { font-size: 120px; line-height: 1; opacity: 0.35; }
.progress-line { height: 12px; background: rgba(0,0,0,.14); border-radius: 99px; overflow: hidden; max-width: 360px; }
.progress-line > div { height: 100%; background: var(--sun); border-radius: 99px; transition: width .4s; }
.hero-strip.sun .progress-line > div { background: var(--teal); }
.card .progress-line { background: var(--paper-2); }
.darjah-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; }
.dtab { flex: none; width: 74px; padding: 8px 0; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; box-shadow: var(--shadow); }
.dtab small { font-size: 12px; color: var(--ink-2); }
.dtab b { font-size: 26px; }
.dtab.on { border-color: var(--ink); transform: translateY(-2px); }
.dtab.on.teal { background: var(--teal-soft); } .dtab.on.sun { background: var(--sun-soft); } .dtab.on.coral { background: var(--coral-soft); } .dtab.on.sky { background: var(--sky-soft); } .dtab.on.plum { background: var(--plum-soft); } .dtab.on.leaf { background: var(--leaf-soft); }
.lock-note { display: flex; gap: 10px; align-items: center; background: var(--sun-soft); border: 2px solid #f1d79a; border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }

.path { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 0 30px; }
.node { position: relative; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); width: min(420px, 100%); }
.node.l { transform: translateX(-70px); } .node.r { transform: translateX(70px); }
@media (max-width: 560px) { .node.l { transform: translateX(-26px); } .node.r { transform: translateX(26px); } }
.node-btn { width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 3px solid var(--line); box-shadow: 0 6px 0 var(--line); font-size: 34px; transition: transform .1s; }
.node-btn .jawi { line-height: 1; margin-top: .15em; }
.node:active .node-btn { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.node.done .node-btn { background: var(--teal); color: #fff; border-color: var(--teal-2); box-shadow: 0 6px 0 var(--teal-2); }
.path.sun .node.done .node-btn { background: var(--sun); color: var(--ink); border-color: #c98f22; box-shadow: 0 6px 0 #c98f22; }
.path.coral .node.done .node-btn { background: var(--coral); border-color: #b54a32; box-shadow: 0 6px 0 #b54a32; }
.path.sky .node.done .node-btn { background: var(--sky); border-color: #2d6d8c; box-shadow: 0 6px 0 #2d6d8c; }
.path.plum .node.done .node-btn { background: var(--plum); border-color: #694377; box-shadow: 0 6px 0 #694377; }
.path.leaf .node.done .node-btn { background: var(--leaf); border-color: #437a2a; box-shadow: 0 6px 0 #437a2a; }
.node.next .node-btn { border-color: var(--sun); box-shadow: 0 6px 0 #c98f22; animation: bob 1.6s ease-in-out infinite; }
.node.locked { opacity: .6; } .node.locked .node-btn { color: var(--ink-3); }
.node-label { display: flex; flex-direction: column; line-height: 1.25; }
.node-stars { display: flex; gap: 2px; color: var(--line); }
.node-stars i { display: inline-flex; } .node-stars i.on { color: var(--sun); } .node-stars i.on svg { fill: var(--sun); }
.node-flag { position: absolute; left: 18px; top: -20px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.quick { margin-top: 20px; }
.quick-tile { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); text-decoration: none; color: var(--ink); border: 2px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.quick-tile b { display: block; font-size: 19px; } .quick-tile small { color: var(--ink-2); }
.qt-ic { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; flex: none; }
.quick-tile.teal .qt-ic { background: var(--teal-soft); color: var(--teal); } .quick-tile.sun .qt-ic { background: var(--sun-soft); color: #9a6a00; } .quick-tile.coral .qt-ic { background: var(--coral-soft); color: var(--coral); }

/* ---------- unit */
.unit-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.unit-glyph { width: 92px; height: 92px; flex: none; display: grid; place-items: center; border-radius: 26px; background: var(--teal); color: #fdf0cf; font-size: 40px; box-shadow: 0 5px 0 var(--teal-2); }
.unit-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; }
.utab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 700; }
.utab .step { width: 22px; height: 22px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-size: 13px; }
.utab.on { background: var(--ink); border-color: var(--ink); color: #fff; } .utab.on .step { background: var(--sun); color: var(--ink); }
.notes .lead { font-size: 21px; }
.note-sec { margin: 26px 0; }
.objectives ul, .tips ul { margin: 0; padding-left: 20px; }
.tips { background: var(--sun-soft); border-color: #f1d79a; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.word-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 12px 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); box-shadow: var(--shadow); cursor: pointer; }
.word-card:hover { border-color: var(--teal); }
.wc-j { font-size: 36px; line-height: 1.7; }
.wc-r { font-weight: 700; } .wc-m { font-size: 13px; color: var(--ink-2); }
.wc-ic { position: absolute; top: 8px; right: 8px; color: var(--ink-3); }
.table-wrap { overflow-x: auto; }
.note-table, .forms-table, .tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.note-table th, .forms-table th, .tbl th { background: var(--paper-2); text-align: left; padding: 10px 12px; font-size: 15px; }
.note-table td, .forms-table td, .tbl td { padding: 8px 12px; border-top: 1px solid var(--line); }
.note-table td.jawi, .forms-table td.jawi { font-size: 30px; text-align: center; }
.forms-table th:not(:first-child) { text-align: center; }
.forms-table tr { cursor: pointer; } .forms-table tbody tr:hover { background: var(--teal-soft); }
.passage-lines { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 22px; }
.pline { padding: 8px 0; border-bottom: 1px dashed var(--line); } .pline:last-child { border: 0; }
.pj { font-size: 32px; margin: 0; cursor: pointer; border-radius: 10px; padding: 0 8px; transition: background .2s; }
.pj:hover, .pj.reading { background: var(--sun-soft); }
.pr { margin: 0 8px; color: var(--ink-2); }
.passage.hide-rumi .pr { visibility: hidden; }
.toggle { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; font-weight: 700; cursor: pointer; }
.toggle input { width: 22px; min-height: 22px; }
.next-row { margin: 30px 0 10px; }
.flash { max-width: 480px; margin: 0 auto; }
.flash-card { min-height: 280px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; border-radius: var(--r-lg); background: var(--card); border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); cursor: pointer; padding: 20px; position: relative; }
.flash-r { font-size: 26px; font-weight: 700; }
.tap-hint { position: absolute; bottom: 12px; display: inline-flex; gap: 6px; color: var(--ink-3); font-size: 14px; align-items: center; }
.count { font-weight: 700; min-width: 70px; text-align: center; }
.start-ex { max-width: 520px; margin: 0 auto; }
.stars-big { display: flex; justify-content: center; gap: 6px; color: var(--line); margin-bottom: 10px; }
.stars-big .on { color: var(--sun); } .stars-big .on svg { fill: var(--sun); }
.print-opt { display: flex; gap: 14px; align-items: center; padding: 18px; border: 2px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; width: 100%; }
.print-opt b { display: block; } .print-opt small { color: var(--ink-2); } .print-opt svg { color: var(--teal); flex: none; }

/* ---------- latihan */
.focus { max-width: 680px; margin: 0 auto; padding: 18px 16px 60px; }
.qtop { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qbar { flex: 1; height: 16px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.qbar-fill { height: 100%; width: 0; background: var(--teal); border-radius: 99px; transition: width .3s; }
.qcount, .game-score { font-weight: 700; color: var(--ink-2); min-width: 50px; text-align: right; }
.game-title { flex: 1; font-weight: 700; font-size: 20px; }
.qhead { text-align: center; margin-bottom: 18px; }
.qprompt { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.qrumi { font-size: 34px; font-weight: 700; color: var(--teal); }
.big-rumi { font-size: 44px; }
.qshow { margin: 6px 0; }
.say { margin-top: 8px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { min-height: 72px; padding: 10px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 4px 0 var(--line); font-size: 22px; font-weight: 700; cursor: pointer; }
.opt.jawi { font-size: 40px; line-height: 1.4; font-weight: 600; }
.opt:hover:not(:disabled) { border-color: var(--teal); }
.opt:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.opt.ok { background: var(--leaf-soft); border-color: var(--leaf); box-shadow: 0 4px 0 var(--leaf); }
.opt.bad { background: var(--coral-soft); border-color: var(--coral); box-shadow: 0 4px 0 var(--coral); }
.opt:disabled { cursor: default; }
.build-slot { min-height: 96px; border: 3px dashed var(--line); border-radius: 18px; display: grid; place-items: center; background: #fff; margin-bottom: 14px; }
.build-slot.ok { border-color: var(--leaf); background: var(--leaf-soft); } .build-slot.bad { border-color: var(--coral); background: var(--coral-soft); }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tile { min-width: 64px; height: 70px; padding: 0 12px; font-size: 34px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); box-shadow: 0 4px 0 var(--line); cursor: pointer; }
.tile:disabled { opacity: .25; }
.feedback { margin-top: 18px; padding: 16px; border-radius: 18px; animation: up .25s; }
.feedback.ok { background: var(--leaf-soft); border: 2px solid #b6d9a1; } .feedback.bad { background: var(--coral-soft); border: 2px solid #f2b9a9; }
.fb-head { display: flex; align-items: center; gap: 8px; font-size: 22px; margin-bottom: 6px; }
.feedback.ok .fb-head { color: #3b6e22; } .feedback.bad .fb-head { color: #9c3a24; }
.fb-ans { margin-bottom: 10px; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.result { text-align: center; padding: 20px 0; }
.result .big { font-size: 22px; font-weight: 700; }
.trophy { display: grid; place-items: center; color: var(--sun); margin-bottom: 10px; }

.tutor-bubble { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px 14px; margin: 10px 0; text-align: left; }
.tutor-bubble ul { margin: 6px 0 0; padding-left: 18px; font-size: 16px; }
.tutor-face { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--plum); color: #fff; display: grid; place-items: center; font-size: 24px; }
.tutor-face.big { width: 96px; height: 96px; font-size: 50px; margin: 0 auto 8px; }
.ai-note { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 15px; }

/* papan kekunci */
.kb { background: var(--paper-2); border-radius: 20px; padding: 12px; margin-bottom: 14px; }
.kb-out { min-height: 84px; background: #fff; border: 2px solid var(--line); border-radius: 14px; font-size: 44px; padding: 0 14px; display: flex; align-items: center; margin-bottom: 10px; }
.kb-out.empty::before { content: "Tekan huruf di bawah"; font-family: var(--font); font-size: 16px; color: var(--ink-3); direction: ltr; }
.kb-keys { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.kb-key { height: 52px; border-radius: 12px; border: 0; background: var(--card); box-shadow: 0 3px 0 var(--line); font-size: 26px; cursor: pointer; padding: 0; }
.kb-key:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.kb-ctl { display: flex; gap: 6px; margin-top: 6px; }
.kb-key.wide { flex: 1; font-family: var(--font); font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
@media (max-width: 520px) { .kb-keys { grid-template-columns: repeat(8, 1fr); } .kb-key { height: 46px; font-size: 22px; } .opt.jawi { font-size: 32px; } }

/* surih */
.trace { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.trace-canvas { background: #fff; border: 2px solid var(--line); border-radius: 20px; box-shadow: inset 0 2px 0 rgba(0,0,0,.03); cursor: crosshair; }
.trace-fb { min-height: 1.6em; text-align: center; }
.trace-head { margin-bottom: 8px; }
.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.letter-tile { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.letter-tile .jawi { font-size: 40px; line-height: 1.5; }
.letter-tile small { font-size: 13px; color: var(--ink-2); }
.letter-tile.done { border-color: var(--leaf); background: var(--leaf-soft); }
.letter-tile.done::after { content: ""; position: absolute; top: 4px; left: 6px; width: 24px; height: 24px; background: url(/img/ic-betul.webp) center/contain no-repeat; }
.forms-row { display: flex; justify-content: center; gap: 18px; margin: 10px 0 16px; direction: ltr; }
.forms-row > div { display: flex; flex-direction: column; align-items: center; background: var(--paper-2); border-radius: 14px; padding: 4px 14px; }
.forms-row small { color: var(--ink-2); font-size: 13px; }

/* permainan */
.game-card { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--r-lg); text-decoration: none; color: var(--ink); border: 2px solid var(--line); background: var(--card); box-shadow: 0 6px 0 var(--line); }
.game-card b { font-size: 22px; display: block; } .game-card small { display: block; color: var(--ink-2); } .game-card .best { color: var(--teal); font-weight: 700; }
.gc-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; flex: none; }
.game-card.teal .gc-ic { background: var(--teal); color: #fff; } .game-card.sun .gc-ic { background: var(--sun); color: var(--ink); } .game-card.coral .gc-ic { background: var(--coral); color: #fff; } .game-card.sky .gc-ic { background: var(--sky); color: #fff; }
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 520px) { .memory { grid-template-columns: repeat(3, 1fr); } }
.mcard { position: relative; aspect-ratio: 3/4; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; }
.mcard > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; backface-visibility: hidden; transition: transform .35s; font-weight: 700; font-size: 18px; }
.mcard .back { background: var(--teal); color: rgba(253,240,207,.5); font-size: 40px; box-shadow: 0 4px 0 var(--teal-2); }
.mcard .face { background: var(--card); border: 2px solid var(--line); transform: rotateY(180deg); }
.mcard .face.jawi { font-size: 30px; }
.mcard.open .back { transform: rotateY(180deg); } .mcard.open .face { transform: rotateY(360deg); }
.mcard.done .face { background: var(--leaf-soft); border-color: var(--leaf); }
.target { text-align: center; font-size: 24px; margin-bottom: 6px; } .target b { color: var(--coral); }
.game .say { display: flex; margin: 0 auto 14px; }
.holes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 460px; margin: 0 auto; }
.hole { position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; background: radial-gradient(ellipse at 50% 70%, #6b5a43 0 45%, #8d7a5e 46% 100%); overflow: hidden; cursor: pointer; }
.mole { position: absolute; left: 12%; right: 12%; bottom: -80%; height: 76%; border-radius: 45% 45% 20% 20%; background: var(--sun); display: grid; place-items: center; font-size: 40px; transition: bottom .2s; color: var(--ink); box-shadow: inset 0 -6px 0 #c98f22; }
.hole.up .mole { bottom: 8%; }
.hole.hit .mole { background: var(--leaf); color: #fff; } .hole.miss .mole { background: var(--coral); color: #fff; }
.clock { width: 84px; height: 84px; margin: 0 auto 6px; border-radius: 50%; border: 5px solid var(--teal); display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.clock.warn { border-color: var(--coral); color: var(--coral); }
.balloon-sky { position: relative; height: 420px; border-radius: 22px; background: linear-gradient(#dceef6, #f4f9fb); overflow: hidden; border: 2px solid var(--line); }
.balloon { position: absolute; bottom: -120px; width: 22%; height: 110px; border: 0; border-radius: 50% 50% 46% 46%; font-size: 26px; cursor: pointer; animation: rise 7s linear forwards; color: #fff; }
.balloon::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 2px; height: 26px; background: rgba(0,0,0,.25); }
.balloon.c0 { background: var(--coral); } .balloon.c1 { background: var(--teal); } .balloon.c2 { background: var(--plum); } .balloon.c3 { background: var(--sky); }
.balloon.pop { animation: pop .3s forwards; } .balloon.shake { animation: rise 7s linear forwards, shake .3s; }
@keyframes rise { to { bottom: 110%; } }
@keyframes pop { to { transform: scale(1.6); opacity: 0; } }
@keyframes shake { 25% { margin-left: -8px; } 75% { margin-left: 8px; } }

/* Cikgu Ain */
.cikgu { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.cikgu-side { text-align: center; } .cikgu-side input { margin-top: 8px; font-size: 16px; }
@media (max-width: 760px) { .cikgu { grid-template-columns: 1fr; } }
.reveal { text-align: center; margin: 8px 0; }

/* kemajuan */
.statgrid { margin-bottom: 16px; }
.stat-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.stat-card b { font-size: 30px; line-height: 1.1; } .stat-card small { color: var(--ink-2); }
.stat-card.teal svg { color: var(--teal); } .stat-card.sun svg { color: #c98f22; } .stat-card.coral svg { color: var(--coral); } .stat-card.sky svg { color: var(--sky); }
.bar-row { display: grid; grid-template-columns: 90px 1fr 50px; gap: 12px; align-items: center; margin: 8px 0; }
.bar-row .progress-line { max-width: none; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.badge { text-align: center; padding: 14px 10px; border-radius: var(--r); border: 2px dashed var(--line); color: var(--ink-3); }
.badge b { display: block; font-size: 16px; } .badge small { font-size: 13px; }
.b-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--paper-2); margin-bottom: 6px; }
.badge.on { border-style: solid; color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
.badge.on .b-ic { background: var(--sun); color: var(--ink); }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(23,51,47,.45); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal-card { background: var(--card); border-radius: var(--r-lg); padding: 28px; max-width: 420px; width: 100%; box-shadow: 0 10px 0 rgba(0,0,0,.12); }
.badge-big { width: 100px; height: 100px; margin: 0 auto 10px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; }
@keyframes fade { from { opacity: 0; } }

/* ibu bapa */
.upsell { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r); background: var(--ink); color: #fff; margin-bottom: 18px; flex-wrap: wrap; }
.upsell p { margin: 0; color: rgba(255,255,255,.8); }
.paid-note { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--leaf-soft); color: #3b6e22; font-weight: 700; margin-bottom: 18px; }
.report { margin-bottom: 18px; }
.report h4 { margin: 14px 0 4px; }
.report ul { margin: 0; padding-left: 18px; }
.chart { display: flex; gap: 6px; align-items: flex-end; height: 120px; margin: 16px 0 4px; padding: 8px; background: var(--paper); border-radius: 14px; }
.chart-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.chart-bar { width: 100%; max-width: 26px; min-height: 3px; background: var(--teal); border-radius: 6px 6px 2px 2px; }
.chart-col small { font-size: 11px; color: var(--ink-3); }
.parent-links { margin-top: 20px; }

/* bayaran */
.pay { display: grid; place-items: center; }
.pay-card { max-width: 440px; width: 100%; text-align: center; }
.price { font-size: 56px; font-weight: 700; line-height: 1; margin: 6px 0; }
.was { color: var(--ink-2); font-weight: 700; min-height: 1.4em; }
.checks { list-style: none; padding: 0; margin: 16px 0; text-align: left; }
.checks li { display: flex; gap: 10px; padding: 5px 0; } .checks svg { color: var(--teal); flex: none; margin-top: 3px; }
.pay-card input { margin-bottom: 10px; }
.linkbox { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; } .linkbox input { flex: 1; min-width: 220px; font-size: 16px; }
.darjah-tabs { align-items: flex-start; }
.auth-side .logo rect { fill: #fdf0cf; } .auth-side .logo path { stroke: #0e6b5c; }

/* ================================================================ Lapisan 3D (imej ChatGPT + bayang & cahaya) */
.avatar { overflow: hidden; border-radius: 50%; box-shadow: 0 4px 0 rgba(0,0,0,.12), inset 0 0 0 3px rgba(255,255,255,.6); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tutor-face { overflow: hidden; background: #e9dcf2; }
.tutor-face img, .tutor-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tutor-face.big { width: 140px; height: 140px; box-shadow: 0 8px 0 #c9b6d8, 0 14px 30px rgba(138,90,158,.25); }
.award { display: inline-block; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0,0,0,.15)); }
.stat .award { width: 24px; height: 24px; margin: -4px 0; }

/* butang dengan cahaya atas — rasa "boleh ditekan" */
.btn { background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 55%); }
.opt, .tile, .kb-key { background-image: linear-gradient(180deg, #fff, #f6efe2); }

/* peta: nod seperti butang plastik bulat */
.node-btn { background: radial-gradient(circle at 35% 28%, #fff 0 18%, var(--card) 45%, #eadfcc 100%); }
.node.done .node-btn { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.55) 0 12%, transparent 40%), var(--teal); }
.path.sun .node.done .node-btn { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.6) 0 12%, transparent 40%), var(--sun); }
.path.coral .node.done .node-btn { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.5) 0 12%, transparent 40%), var(--coral); }
.path.sky .node.done .node-btn { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.5) 0 12%, transparent 40%), var(--sky); }
.path.plum .node.done .node-btn { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.5) 0 12%, transparent 40%), var(--plum); }
.path.leaf .node.done .node-btn { background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.5) 0 12%, transparent 40%), var(--leaf); }
.node-btn { font-size: 38px; text-shadow: 0 2px 0 rgba(0,0,0,.12); }

/* jalur hero darjah dengan ilustrasi */
.hero-strip { position: relative; }
.hero-art { width: 190px; height: 190px; border-radius: 30px; flex: none; object-fit: cover; box-shadow: 0 10px 24px rgba(0,0,0,.22), 0 0 0 5px rgba(255,255,255,.35); transform: rotate(3deg); }
@media (max-width: 860px) { .hero-art { width: 110px; height: 110px; border-radius: 22px; } }
@media (max-width: 420px) { .hero-art { position: absolute; right: 12px; top: 12px; width: 76px; height: 76px; opacity: .95; } .hero-strip h1 { padding-right: 70px; } }
.dtab { width: 84px; padding: 6px 0 8px; overflow: hidden; }
.dtab-img { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; margin-bottom: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.08); }

.quick-tile .qt-ic { width: 64px; height: 64px; overflow: hidden; }
.quick-tile .qt-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }

/* kad permainan: ilustrasi besar + condong 3D */
.game-card { perspective: 800px; transition: transform .2s, box-shadow .2s; }
.game-card:hover { transform: translateY(-4px) rotateX(4deg); box-shadow: 0 12px 0 var(--line); }
.gc-ic { width: 112px; height: 112px; border-radius: 26px; overflow: hidden; background: none !important; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.gc-ic img { width: 100%; height: 100%; object-fit: cover; }

/* lencana */
.b-ic { width: 72px; height: 72px; background: none !important; }
.badge:not(.on) .award { filter: grayscale(1) opacity(.35); }
.badge.on { background: radial-gradient(circle at 50% 20%, #fff7df, var(--card) 70%); }
.stars-big span .award { filter: grayscale(1) opacity(.25); }
.stars-big span.on .award { filter: drop-shadow(0 4px 3px rgba(0,0,0,.18)); animation: pop-in .45s cubic-bezier(.3,1.6,.5,1) both; }
.stars-big span:nth-child(2).on .award { animation-delay: .15s; } .stars-big span:nth-child(3).on .award { animation-delay: .3s; }
@keyframes pop-in { from { transform: scale(0) rotate(-30deg); } }
.trophy .award { animation: pop-in .5s cubic-bezier(.3,1.6,.5,1) both; }

/* Padan Kad: kad tebal berlapis */
.mcard .back { background: linear-gradient(145deg, #15876f, #0a5549); box-shadow: 0 6px 0 #073f36, inset 0 2px 0 rgba(255,255,255,.25); }
.mcard .face { box-shadow: 0 6px 0 var(--line); background: linear-gradient(180deg, #fff, #f8f1e4); }
.memory { perspective: 1000px; }

/* Ketuk Huruf: lubang tanah 3D + kancil memegang papan */
.holes { gap: 22px; }
.hole { border-radius: 50%; background: radial-gradient(ellipse at 50% 62%, #3b2c1c 0 38%, #6d5235 52%, #7fae4f 54%, #5f8f35 100%); box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), 0 6px 0 #4c7428; overflow: hidden; }
.mole { background: none; box-shadow: none; left: 6%; right: 6%; height: 92%; bottom: -100%; display: block; }
.hole.up .mole { bottom: -6%; }
.kancil { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.sign { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); min-width: 52%; padding: 0 8px; border-radius: 10px; background: linear-gradient(180deg, #fffdf6, #f1e3c4); border: 2px solid #c98f22; font-size: 30px; line-height: 1.5; color: var(--ink); box-shadow: 0 3px 0 #c98f22; }
.hole.hit .sign { background: var(--leaf); color: #fff; border-color: #3b6e22; }
.hole.miss .sign { background: var(--coral); color: #fff; border-color: #9c3a24; }
.hole.hit .mole, .hole.miss .mole { background: none; }

/* Belon: berkilat seperti getah */
.balloon { background-image: radial-gradient(circle at 32% 28%, rgba(255,255,255,.75) 0 8%, rgba(255,255,255,0) 30%), linear-gradient(160deg, rgba(255,255,255,.12), rgba(0,0,0,.18)); box-shadow: inset -8px -10px 18px rgba(0,0,0,.18); text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.balloon-sky { background: linear-gradient(#bfe3f5, #eef8fc 70%, #dff1d0); }

/* Kuiz pantas: jam 3D */
.clock { background: radial-gradient(circle at 35% 30%, #fff, #f3ead8); box-shadow: 0 6px 0 var(--teal-2), inset 0 -4px 0 rgba(0,0,0,.06); }

/* halaman Cikgu Ain */
.cikgu-side b { font-size: 20px; }
.avatar img { transform: scale(1.1); }
/* pintu masuk Kampung Jawi 3D */
.world-card { display: flex; align-items: center; gap: 18px; padding: 16px 20px; margin-bottom: 18px; border-radius: var(--r-lg); text-decoration: none; color: #fff; background: linear-gradient(120deg, #0e6b5c, #3f8fb5); box-shadow: 0 8px 0 #0a5549; transition: transform .2s; }
.world-card:hover { transform: translateY(-3px); }
.world-card img { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); flex: none; }
.world-card > span:nth-child(2) { flex: 1; }
.world-card small { font-weight: 700; letter-spacing: .08em; color: var(--sun); display: block; }
.world-card b { font-size: 28px; display: block; line-height: 1.1; }
.world-card .btn { flex: none; }
@media (max-width: 560px) { .world-card { flex-wrap: wrap; } .world-card img { width: 80px; height: 80px; } .world-card .btn { width: 100%; } }

/* ikon 3D */
.ic3d { display: inline-block; flex: none; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.12)); -webkit-user-drag: none; }
.btn .ic3d { width: 26px; height: 26px; margin: -4px 0; }
.btn.sm .ic3d { width: 22px; height: 22px; }
.tab .ic3d { width: 30px; height: 30px; }
.tab.on .ic3d { filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.utab .ic3d { width: 24px; height: 24px; }
.icon-btn .ic3d { width: 26px; height: 26px; }
.stat-card .ic3d { width: 40px; height: 40px; }
.print-opt .ic3d { width: 44px; height: 44px; }
.fb-head .ic3d { width: 34px; height: 34px; }
.word-card .wc-ic .ic3d { width: 18px; height: 18px; }
.lock-note .ic3d { width: 30px; height: 30px; }
.node-btn .ic3d { width: 40px; height: 40px; }
.checks li .ic3d { width: 22px; height: 22px; margin-top: 2px; }
