@font-face{font-family:"Andika";src:url(fonts/andika-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Andika";src:url(fonts/andika-700.woff2) format("woff2");font-weight:700;font-display:swap}

:root{
  --paper:#F6F3EE;
  --surface:#FFFFFF;
  --ink:#2B2A28;
  --muted:#5F5B55;
  --line:#E4DED4;
  --accent:#2E7D74;
  --accent-ink:#FFFFFF;
  --accent-tint:#E1EFEC;
  --sand-tint:#F3EADB;
  --good:#3C8A4A;
  --good-tint:#E3F1E3;
  --star:#E0A526;
  --radius:18px;
  --tap:84px;
  --shadow:0 2px 8px rgba(43,42,40,.07);
  font-family:"Andika",ui-rounded,"Segoe UI",system-ui,sans-serif;
  color:var(--ink);
  background:var(--paper);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html{touch-action:manipulation;-webkit-text-size-adjust:100%}
body{background:var(--paper);-webkit-tap-highlight-color:transparent;touch-action:manipulation;-webkit-user-select:none;user-select:none}
::selection{background:var(--accent-tint);color:var(--ink)}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
input,select{font:inherit;user-select:auto;-webkit-user-select:auto}
.emo{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;line-height:1}

#app{max-width:980px;margin:0 auto;padding:max(14px,env(safe-area-inset-top)) 16px max(24px,env(safe-area-inset-bottom));min-height:100dvh;display:flex;flex-direction:column}

/* ---------- top bar ---------- */
.bar{display:flex;align-items:center;gap:10px;min-height:56px}
.bar h1{font-size:21px;font-weight:700;margin:0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ibtn{width:52px;height:52px;border-radius:16px;background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;flex:none}
.ibtn svg{width:26px;height:26px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ibtn:active{transform:scale(.96)}
.pill-btn{height:52px;padding:0 18px;border-radius:16px;background:var(--surface);border:1px solid var(--line);display:flex;align-items:center;gap:8px;font-weight:700;font-size:16px;flex:none}
.pill-btn svg{width:22px;height:22px;stroke:var(--ink);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- token board ---------- */
.tokens{display:flex;gap:6px;justify-content:center;margin:8px 0 4px}
.tok{width:30px;height:30px}
.tok svg{width:100%;height:100%}
.tok path{fill:#fff;stroke:#CFC6B8;stroke-width:2;stroke-linejoin:round}
.tok.on path{fill:var(--star);stroke:#B9861A}

/* ---------- home ---------- */
.hello{margin:14px 0 4px;font-size:24px;font-weight:700}
.sub{margin:0 0 18px;color:var(--muted);font-size:16px}
.today{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-bottom:22px;box-shadow:var(--shadow)}
.today h2{font-size:17px;margin:0 0 12px}
.steps{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.step{display:flex;align-items:center;gap:8px;padding:8px 12px 8px 8px;border-radius:14px;background:var(--paper);font-size:16px;font-weight:700}
.step .emo{font-size:28px}
.step.done{color:var(--good);background:var(--good-tint)}
.step.now{outline:2px solid var(--accent);background:var(--accent-tint)}
.arrow{color:var(--muted);font-size:20px}
.go{margin-top:14px;width:100%;height:64px;border-radius:16px;background:var(--accent);color:var(--accent-ink);font-size:21px;font-weight:700}
.go:active{filter:brightness(.95)}
.grp{font-size:17px;font-weight:700;margin:4px 0 10px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-bottom:24px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);min-height:128px;padding:14px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;box-shadow:var(--shadow)}
.tile .emo{font-size:46px}
.tile b{font-size:17px;line-height:1.2}
.tile small{font-size:13px;color:var(--muted)}
.tile:active{transform:scale(.98)}
.foot{margin-top:auto;padding-top:10px;color:var(--muted);font-size:13px;text-align:center}

/* ---------- question ---------- */
.q{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:6px 0 6vh}
.prompt{display:flex;align-items:center;gap:12px;justify-content:center;text-align:center;max-width:720px}
.prompt p{font-size:26px;font-weight:700;margin:0;line-height:1.25;text-wrap:balance}
.say{width:56px;height:56px;border-radius:50%;background:var(--accent-tint);display:grid;place-items:center;flex:none}
.say svg{width:28px;height:28px;stroke:var(--accent);fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.visual{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;width:100%;max-width:720px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;min-height:120px;box-shadow:var(--shadow)}
.visual .big{font-size:96px}
.visual .word{font-size:44px;font-weight:700;letter-spacing:.01em}
.objs{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:420px}
.objs .emo{font-size:58px}
.objs .gone{position:relative;opacity:.35}
.objs .gone::after{content:"";position:absolute;left:-4px;right:-4px;top:50%;height:4px;background:#B4463B;transform:rotate(-35deg);border-radius:2px}
.op{font-size:44px;font-weight:700;color:var(--muted);padding:0 6px}
.seq{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.seq span{width:70px;height:78px;border-radius:14px;border:2px solid var(--line);display:grid;place-items:center;font-size:36px;font-weight:700;background:var(--paper)}
.seq span.blank{border:2px dashed var(--accent);background:var(--accent-tint);color:var(--accent)}
.caption{width:100%;text-align:center;font-size:24px;font-weight:700;color:var(--muted)}

.choices{display:grid;gap:14px;width:100%;max-width:720px;grid-template-columns:repeat(var(--n,3),1fr)}
.ch{background:var(--surface);border:2px solid var(--line);border-radius:var(--radius);min-height:150px;padding:12px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;box-shadow:var(--shadow);transition:opacity .35s ease-out,border-color .2s,background-color .2s}
.ch.center{justify-content:center}
.ch .emo{font-size:64px}
.ch .num{font-size:48px;font-weight:700}
.ch .lbl{font-size:20px;font-weight:700}
.ch.wordc{min-height:88px;justify-content:center}
.ch.wordc .lbl{font-size:26px}
.ch svg.shape{width:100px;height:100px}
.ch:active{transform:scale(.98)}
.ch.dim{opacity:.28;pointer-events:none}
.ch.hint{border-color:var(--accent);background:var(--accent-tint)}
.ch.right{border-color:var(--good);background:var(--good-tint)}
.ch .tall{display:flex;align-items:flex-end;justify-content:center;height:170px}

/* scenes (preposition) */
.scene{position:relative;width:100%;aspect-ratio:4/3;container-type:inline-size;border-bottom:3px solid #D9CFBF}
.scene svg.obj{position:absolute;bottom:0;transform:translateX(-50%)}
.scene .who{position:absolute;transform:translateX(-50%);font-size:30cqw;line-height:1}
.scene .who.sm{font-size:22cqw}

/* shapes in visual */
.visual svg.shape{width:150px;height:150px}

/* trace */
.trace-wrap{position:relative;width:min(100%,440px);aspect-ratio:1;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);touch-action:none;overflow:hidden}
.trace-wrap canvas{position:absolute;inset:0;width:100%;height:100%}
.trace-tools{display:flex;gap:12px;width:min(100%,440px)}
.trace-tools button{flex:1;height:60px;border-radius:16px;font-size:19px;font-weight:700}
.btn-soft{background:var(--surface);border:1px solid var(--line)}
.btn-main{background:var(--accent);color:var(--accent-ink)}
.note{min-height:28px;font-size:18px;font-weight:700;color:var(--muted);text-align:center}

/* praise */
.praise{min-height:34px;font-size:24px;font-weight:700;color:var(--good);text-align:center}

/* ---------- finish ---------- */
.done-screen{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}
.done-screen h2{font-size:30px;margin:0}
.done-screen p{font-size:18px;color:var(--muted);margin:0}
.done-screen .tokens .tok{width:44px;height:44px}
.done-actions{display:flex;gap:12px;width:min(100%,520px);margin-top:10px;flex-wrap:wrap}
.done-actions button{flex:1 1 200px;height:64px;border-radius:16px;font-size:20px;font-weight:700}

/* ---------- break ---------- */
.rest{position:fixed;inset:0;background:#EAF1EE;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;z-index:20;padding:24px;text-align:center}
.rest p{font-size:26px;font-weight:700;margin:0;min-height:36px}
.breath{width:150px;height:150px;border-radius:50%;background:#B9D8D1;animation:breath 8s ease-in-out infinite}
@keyframes breath{0%,100%{transform:scale(.7)}50%{transform:scale(1.15)}}
.rest .go{max-width:360px}

/* ---------- parent ---------- */
.hold{position:relative;overflow:hidden}
.hold .fill{position:absolute;inset:auto 0 0 0;height:0;background:var(--accent-tint);transition:none}
.hold svg{position:relative}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin:12px 0;box-shadow:var(--shadow)}
.panel h2{font-size:18px;margin:0 0 4px}
.panel .hint-t{color:var(--muted);font-size:14px;margin:0 0 14px}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--line);font-size:16px}
.row:first-of-type{border-top:0}
.row label{font-weight:700}
.row input[type=text]{height:44px;border:1px solid var(--line);border-radius:12px;padding:0 12px;width:min(260px,55vw);background:var(--paper)}
.seg{display:flex;background:var(--paper);border:1px solid var(--line);border-radius:12px;padding:3px;gap:3px;flex-wrap:wrap;justify-content:flex-end}
.seg button{height:38px;padding:0 12px;border-radius:9px;font-size:15px;font-weight:700;color:var(--muted)}
.seg button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.picks{display:flex;flex-wrap:wrap;gap:8px}
.pick{height:44px;padding:0 12px 0 8px;border-radius:12px;border:1px solid var(--line);background:var(--paper);display:flex;align-items:center;gap:6px;font-size:15px;font-weight:700}
.pick .emo{font-size:22px}
.pick .ord{display:none;width:22px;height:22px;border-radius:50%;background:var(--accent);color:#fff;font-size:13px;place-items:center}
.pick[aria-pressed=true]{border-color:var(--accent);background:var(--accent-tint)}
.pick[aria-pressed=true] .ord{display:grid}
table.prog{width:100%;border-collapse:collapse;font-size:15px}
table.prog th{background:#F3F1ED;text-align:left;font-size:13px;color:var(--muted);font-weight:700;padding:10px}
table.prog td{padding:10px;border-top:1px solid var(--line)}
table.prog td.n{font-variant-numeric:tabular-nums}
.badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:13px;font-weight:700;min-width:64px;text-align:center}
.b-good{background:var(--good-tint);color:#2D6B38}
.b-mid{background:#FBF0D9;color:#8A5B07}
.b-low{background:#F8E3E0;color:#9A3A2F}
.b-none{background:#F0EEEA;color:var(--muted)}
.danger{color:#9A3A2F;font-weight:700;font-size:15px;padding:10px 0}
.table-scroll{overflow-x:auto}

@media (max-width:560px){
  .prompt p{font-size:22px}
  .choices{gap:10px}
  .ch{min-height:104px}
  .ch .emo{font-size:50px}
  .ch .num{font-size:40px}
  .ch.wordc .lbl{font-size:21px}
  .ch svg.shape{width:76px;height:76px}
  .ch .tall{height:130px}
  .visual .big{font-size:80px}
  .objs .emo{font-size:38px}
  .seq span{width:56px;height:64px;font-size:28px}
  .tiles{grid-template-columns:repeat(2,1fr)}
  .tile{min-height:116px}
  .tile .emo{font-size:40px}
  .pill-btn span{display:none}
  .row:has(.seg){flex-direction:column;align-items:stretch;gap:8px}
  .seg{flex-wrap:nowrap}
  .seg button{flex:1;padding:0 6px;font-size:14px}
  .choices.scenes{grid-template-columns:1fr;max-width:230px}
  .choices.scenes .ch{min-height:0;padding:10px 14px}
  .pill-btn{padding:0 14px}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important}
  .breath{animation-duration:16s}
}

/* ---------- rakam suara ---------- */
.rec-open{height:44px;padding:0 16px;border-radius:12px;font-size:15px;font-weight:700;white-space:nowrap;flex:none}
.vgroup{padding:0}
.vgroup summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;font-size:17px;font-weight:700;cursor:pointer}
.vgroup summary::-webkit-details-marker{display:none}
.vgroup summary::after{content:"";width:9px;height:9px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin-left:4px;flex:none}
.vgroup[open] summary::after{transform:rotate(225deg)}
.vgroup summary span:first-child{flex:1}
.vrow{display:flex;align-items:center;gap:12px;padding:10px 18px;border-top:1px solid var(--line)}
.vtext{flex:1;font-size:17px;min-width:0}
.vbtns{display:flex;gap:6px;flex:none}
.vb{height:44px;min-width:44px;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:var(--paper);font-size:14px;font-weight:700}
.vb.rec{background:var(--accent-tint);border-color:#BCD9D3;color:#1F5E57}
.vb.rec.on{background:#B4463B;border-color:#B4463B;color:#fff}
.vb:disabled{opacity:.35;cursor:default}
.vb.del{color:#9A3A2F}
@media (max-width:560px){
  .vrow{flex-wrap:wrap;padding:10px 14px}
  .vtext{flex-basis:100%}
  .vbtns{width:100%}
  .vbtns .vb{flex:1}
  .vbtns .vb.del{flex:0 0 44px}
}

/* ---------- gambar sebenar ---------- */
img.ph{width:112px;height:112px;object-fit:cover;border-radius:14px;display:block;background:var(--paper)}
img.ph.big-ph{width:190px;height:190px;border-radius:18px}
.pthumb{width:52px;height:52px;flex:none;display:grid;place-items:center;border-radius:12px;background:var(--paper);overflow:hidden}
.pthumb .emo{font-size:30px}
.pthumb img{width:100%;height:100%;object-fit:cover}

/* ---------- ganjaran ---------- */
.rw-area{width:min(100%,560px);margin-top:6px}
.rw-ask{font-size:22px;font-weight:700;color:var(--ink);margin:0 0 12px}
.rw-grid{display:grid;gap:14px;grid-template-columns:repeat(var(--n,2),1fr)}
.rw-grid .ch{min-height:170px}
.rw-grid .ch .emo{font-size:72px}
.rw-got{display:flex;flex-direction:column;align-items:center;gap:10px;padding:10px 0}
.rw-got .big{font-size:110px}
.rw-got b{font-size:26px}
.done-actions[hidden]{display:none}
@media (max-width:560px){
  img.ph{width:84px;height:84px}
  img.ph.big-ph{width:150px;height:150px}
  .rw-grid .ch{min-height:140px}
  .rw-grid .ch .emo{font-size:56px}
  .vrow:has(.pthumb) .vtext{flex-basis:auto}
  .vrow:has(.pthumb) .vbtns{width:auto}
}
.row b.n{white-space:nowrap}

/* ---------- v5: bantuan bertahap ---------- */
.ch.glow{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-tint);animation:glow 1.6s ease-in-out infinite}
@keyframes glow{0%,100%{box-shadow:0 0 0 3px var(--accent-tint)}50%{box-shadow:0 0 0 9px var(--accent-tint)}}
.pill-btn.suggest{border-color:var(--accent);background:var(--accent-tint)}

/* ---------- v5: papan bintang ---------- */
.board{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.board-stars{display:flex;gap:6px;flex-wrap:wrap}
.board .tok{width:36px;height:36px}
.board .arrow{color:var(--muted);font-size:22px;font-weight:700}
.board-rw{width:64px;height:64px;border-radius:14px;border:2px dashed var(--line);background:var(--paper);display:grid;place-items:center;overflow:hidden;flex:none;padding:0}
.board-rw .emo{font-size:38px}
.board-rw img.ph{width:100%;height:100%;border-radius:0}
.board-rw .q-mark{font-size:30px;font-weight:700;color:var(--muted)}
.board.in-done{justify-content:center;margin:4px 0}
.board-left{font-size:18px;font-weight:700;margin:6px 0 0;text-align:center}
.sheet{position:fixed;inset:0;background:rgba(43,42,40,.35);display:flex;align-items:flex-end;justify-content:center;z-index:30;padding:16px}
.sheet-in{background:var(--surface);border-radius:var(--radius);padding:18px;width:min(100%,560px);margin-bottom:env(safe-area-inset-bottom)}
.sheet .rw-area{margin:0;width:100%}

/* ---------- v5: rehat ---------- */
.rdots{display:flex;gap:8px}
.rdot{width:14px;height:14px;border-radius:50%;background:#CFE2DD}
.rdot.on{background:var(--accent)}
.rest-actions{display:flex;flex-direction:column;align-items:center;gap:10px;width:min(100%,360px)}
.rest-actions .btn-soft{width:100%;height:56px;border-radius:16px;font-size:18px;font-weight:700}
.rest.ready .go{box-shadow:0 0 0 6px var(--accent-tint)}
@media (max-width:560px){
  .board .tok{width:30px;height:30px}
  .board-rw{width:56px;height:56px}
}
@media (prefers-reduced-motion:reduce){
  .ch.glow{animation:none}
}

/* ---------- v5: soalan lembaran guru ---------- */
.objs.toys{max-width:640px;gap:6px}
.objs.toys .emo{font-size:40px}
.objs.toys .toy-r svg,.caption svg.rings{width:30px;height:44px;vertical-align:middle}
.caption .emo{font-size:40px}
svg.rings{display:block}
.tall-svg{display:flex;align-items:flex-end}
.tall-svg svg{height:100%;width:auto}
.cone-stack{display:flex;flex-direction:column;align-items:center;line-height:.8}
svg.bodyfig{width:90px;height:135px}
.prep-v{width:min(100%,340px)}
.spell-slots{display:flex;gap:8px;justify-content:center;width:100%;margin-top:8px}
.slot{width:56px;height:64px;border-radius:12px;border:2px dashed var(--accent);background:var(--accent-tint);display:grid;place-items:center;font-size:34px;font-weight:700;color:var(--ink)}
.slot i{font-style:normal;color:#B8CFC9}
.slot.on{border-style:solid;background:var(--surface)}
.spell-tiles{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;width:100%;max-width:720px}
.tile-l{width:84px;height:84px;border-radius:var(--radius);border:2px solid var(--line);background:var(--surface);box-shadow:var(--shadow);font-size:40px;font-weight:700;color:var(--ink)}
.tile-l.used{opacity:.25}
.tile-l.glow{border-color:var(--accent);box-shadow:0 0 0 6px var(--accent-tint)}
.tile-l.no{animation:nope .35s}
@keyframes nope{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
@media (max-width:560px){
  .objs.toys .emo{font-size:30px}
  .slot{width:44px;height:52px;font-size:28px}
  .tile-l{width:64px;height:64px;font-size:32px}
  svg.bodyfig{width:64px;height:96px}
}
@media (prefers-reduced-motion:reduce){.tile-l.no{animation:none}}
/* v6: pangkah sendiri, tulis sendiri, muka garis */
.objs .xable{font:inherit;background:none;border:0;padding:2px;margin:0;cursor:pointer;min-width:44px;min-height:44px;border-radius:10px;-webkit-tap-highlight-color:transparent}
.objs .xable:focus-visible{outline:3px solid #2E7D74;outline-offset:2px}
.model{font-size:34px;font-weight:700;color:#8F887D;text-align:center;line-height:1;margin:-4px 0 6px}
.trace-wrap.own{background-image:linear-gradient(#E9E3D8,#E9E3D8);background-size:100% 2px;background-position:0 82%;background-repeat:no-repeat}
svg.face{width:120px;height:120px;display:block;margin:0 auto}

/* v7: pautan lembaran */
a.go{display:grid;place-items:center;text-decoration:none}
.lemb-sec .sub{margin:0}
