/* Paham Beneran · tema "Teh Hangat" (palet chamomile) */
:root {
  --bg: #FFFDF5;
  --card: #FFF5CC;
  --card2: #FFEFA4;
  --yolk: #F6D365;
  --dark: #525007;
  --ink: #33320F;
  --muted: #7A7546;
  --rec: #E07A5F;
  --ok: #E3EBC0;
  --warn: #C0623F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { font-family: Nunito, system-ui, sans-serif; font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--dark); }

.scr {
  max-width: 480px; min-height: 100vh; margin: 0 auto;
  padding: 24px 18px 110px; display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow-x: hidden;
}
.scr::before {
  content: ""; position: fixed; width: 220px; height: 220px; border-radius: 50%;
  background: var(--card); left: -90px; bottom: -90px; opacity: .7; z-index: -1;
}

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; }
.hello { font-size: 26px; font-weight: 900; }
.sub { font-size: 13px; color: var(--muted); }
.flower { width: 50px; height: 50px; flex: none; }
.bar { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; }
.back { font-size: 30px; line-height: 1; color: var(--muted); padding: 0 6px 4px 0; }
.bar .grow { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { font-size: 13px; font-weight: 700; color: var(--dark); background: var(--card); border-radius: 999px; padding: 6px 12px; }

/* Cards */
.hero { background: var(--card2); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.45); pointer-events: none; }
.tag { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--dark); }
.ht { font-size: 23px; font-weight: 900; }
.hs { font-size: 13px; opacity: .85; }
.sec { font-size: 14px; font-weight: 800; margin-top: 6px; }
.grp { font-size: 13px; font-weight: 900; color: var(--dark); margin-top: 4px; }
.grp em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 6px; }
.empty { background: var(--card); border-radius: 22px; padding: 18px; font-size: 14px; color: var(--muted); text-align: center; }

.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border-radius: 22px; text-align: left; width: 100%; }
/* Lingkaran skor: isi = poin isi materi yang tersebut di tes terakhir. Bingkai kuning = tes hari ini, putus-putus = besok. */
.dot { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #E9E3B0; display: grid; place-items: center; position: relative; font-size: 12px; font-weight: 900; color: var(--muted); }
.dot.ring { background: conic-gradient(var(--dark) calc(var(--p) * 1%), #E9E3B0 0); color: var(--dark); isolation: isolate; }
.dot.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); z-index: -1; }
.dot.due { outline: 3px solid var(--yolk); outline-offset: 2px; }
.dot.soon { outline: 3px dashed var(--yolk); outline-offset: 2px; }
.it { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.it b { font-size: 15px; }
.it span { font-size: 12px; color: var(--muted); }
.pill { font-size: 11px; padding: 4px 9px; font-weight: 800; background: #fff; border-radius: 999px; color: var(--dark); white-space: nowrap; }
.pill.ok { background: var(--ok); }
.pill.due { background: var(--yolk); }

/* Buttons */
.btn { display: block; width: 100%; text-align: center; padding: 14px; font-weight: 800; font-size: 15px; border-radius: 999px; background: var(--dark); color: #FFF5CC; margin-top: 4px; }
.btn.ghost { background: var(--card2); color: var(--dark); }
.btn.line { background: transparent; color: var(--dark); border: 2px solid var(--card2); }
.btn.sm { font-size: 14px; padding: 11px; }
.btn.danger { background: transparent; color: var(--warn); border: 2px solid #F3D3C7; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.fab { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--yolk); color: var(--ink); border-radius: 999px; padding: 13px 28px; font-weight: 800; font-size: 15px; box-shadow: 0 8px 18px -8px rgba(160,120,0,.6); z-index: 5; }

/* Forms */
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld label, .lbl { font-size: 12px; font-weight: 800; color: var(--muted); }
.in { background: #fff; border: 2px solid var(--card2); border-radius: 14px; padding: 10px 12px; font-size: 15px; width: 100%; outline: none; }
.in:focus { border-color: var(--yolk); }
textarea.in { resize: vertical; min-height: 70px; line-height: 1.4; }
.in.sm { font-size: 14px; padding: 8px 10px; }
.pt2 { display: flex; gap: 8px; align-items: flex-start; }
.num { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--dark); color: #FFF5CC; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.pf { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.del { color: var(--muted); font-size: 20px; padding: 6px 4px; line-height: 1; }
.add { border: 2px dashed var(--yolk); border-radius: 14px; text-align: center; padding: 10px; font-size: 14px; font-weight: 800; color: var(--dark); width: 100%; }
.tip { font-size: 12.5px; color: var(--muted); background: var(--card); border-radius: 12px; padding: 9px 11px; }
.auto { background: var(--card2); border-radius: 16px; padding: 10px 14px; }
.auto summary { font-size: 14px; font-weight: 800; cursor: pointer; }
.auto summary span { font-weight: 600; font-size: 12px; color: var(--dark); margin-left: 4px; }
.auto ol { margin: 8px 0 2px 20px; font-size: 13.5px; }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--card); border-radius: 999px; }
.chip.on { background: var(--dark); color: #FFF5CC; }

/* Record */
.hide { background: #fff; border-radius: 22px; border: 2px dashed var(--card2); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.hide b { font-size: 14px; }
.hide span { font-size: 13px; color: var(--muted); }
.recwrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 0; }
.timer { font-size: 46px; font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.wave { display: flex; gap: 4px; align-items: center; height: 50px; }
.wave i { width: 6px; border-radius: 3px; background: var(--dark); opacity: .75; height: 6px; transition: height .08s; }
.recbtn { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--rec); box-shadow: 0 0 0 14px rgba(224,122,95,.18), 0 0 0 28px rgba(224,122,95,.08); }
.recbtn .ic { width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.recbtn.on .ic { border-radius: 7px; }
.hint { font-size: 13px; color: var(--muted); text-align: center; }
.err { background: #FBE6DE; color: #7A2E16; border-radius: 14px; padding: 10px 12px; font-size: 13.5px; }

/* Check */
audio { width: 100%; height: 44px; }
.scores { display: flex; gap: 10px; }
.sc { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 16px; background: #fff; border: 2px solid var(--card2); }
.big { font-size: 30px; font-weight: 900; line-height: 1; }
.big small { font-size: 15px; color: var(--muted); }
.sc span { font-size: 12px; font-weight: 700; line-height: 1.2; }
.ck { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; background: var(--card); border-radius: 16px; width: 100%; text-align: left; }
.ck .box { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--dark); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; color: #FFF5CC; margin-top: 1px; }
.ck.on .box { background: var(--dark); }
.ck b { font-size: 14px; font-weight: 600; display: block; }
.ck small { font-size: 11.5px; color: var(--muted); display: block; }

/* History */
.nxt2 { background: var(--card2); border-radius: 20px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.nxt2 div { flex: 1; display: flex; flex-direction: column; }
.nxt2 span { font-size: 12px; color: var(--dark); font-weight: 700; }
.nxt2 b { font-size: 20px; font-weight: 900; }
.att { background: var(--card); border-radius: 18px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ah { display: flex; align-items: center; gap: 10px; }
.at { flex: 1; display: flex; flex-direction: column; }
.at b { font-size: 14px; }
.at span { font-size: 11.5px; color: var(--muted); }
.sp { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.sp em { font-style: normal; font-size: 11px; font-weight: 800; background: #fff; border-radius: 999px; padding: 2px 8px; }
.note { background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; }
.note b { display: block; font-size: 11px; color: var(--warn); }
.store { font-size: 12px; color: var(--muted); text-align: center; }
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; }

/* Schedule */
.done { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-align: center; }
.done .flower { width: 58px; height: 58px; }
.done b { font-size: 20px; font-weight: 900; }
.done span { font-size: 13.5px; color: var(--muted); }
.tl { display: flex; flex-direction: column; padding-left: 6px; }
.tli { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.tli i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--yolk); background: #fff; flex: none; }
.tli.ok i { background: var(--dark); border-color: var(--dark); }
.tli.now i { background: var(--yolk); }
.tli b { font-size: 14px; width: 84px; }
.tli span { font-size: 13px; color: var(--muted); }
.tli.now span { color: var(--ink); font-weight: 800; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #FFF5CC; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 10; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.foot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }
.hero > * { position: relative; z-index: 1; }
a.btn { text-decoration: none; }
.sech { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sech .sec { margin-top: 0; }
.cr { display: flex; gap: 6px; align-items: flex-start; }
.hint2 { font-size: 11.5px; color: var(--muted); line-height: 1.35; padding: 0 4px; }
.auto ol li { margin-bottom: 4px; }
.guide { background: #fff; border-radius: 14px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; }
.guide b { font-size: 13px; }
.guide .ok { color: var(--dark); font-weight: 700; }
.guide .no { color: var(--warn); }
.stepn { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--card2); }
.steps i.on { background: var(--dark); }
.fl { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; counter-reset: f; }
.fl li { background: var(--card); border-radius: 16px; padding: 10px 12px 10px 44px; position: relative; counter-increment: f; display: flex; flex-direction: column; gap: 2px; }
.fl li::before { content: counter(f); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--dark); color: #FFF5CC; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.fl li b { font-size: 14px; }
.fl li span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.row2 .btn { margin-top: 0; }
details.att > summary { list-style: none; cursor: pointer; }
details.att > summary::-webkit-details-marker { display: none; }
.chev { font-size: 22px; color: var(--muted); transition: transform .15s; }
details.att[open] .chev { transform: rotate(90deg); }
.res { display: flex; flex-direction: column; gap: 4px; background: #fff; border-radius: 12px; padding: 8px 10px; }
.res > div { display: flex; gap: 8px; font-size: 13px; align-items: flex-start; }
.res i { font-style: normal; font-weight: 900; width: 16px; flex: none; }
.res .hit i { color: var(--dark); }
.res .miss { color: var(--warn); }
.help { background: var(--card); }
.help ol { font-size: 13px; margin-bottom: 8px; }
select.in { appearance: auto; }
.row2 input.in { min-width: 0; }
[hidden] { display: none !important; }
#ndp .chip { background: #fff; }
/* Tautan "Cek poin": panah ▸ berputar saat dibuka */
.plink > summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.plink > summary::-webkit-details-marker { display: none; }
.plink > summary::before { content: "▸"; font-size: 16px; line-height: 1; transition: transform .15s; }
.plink[open] > summary::before { transform: rotate(90deg); }
.plink > summary span { text-decoration: underline; text-underline-offset: 3px; }
#pt { background: #fff; font-size: 13px; line-height: 1.45; scrollbar-width: thin; scrollbar-color: var(--yolk) transparent; }
.plbody { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.plbody ol { margin-left: 20px; font-size: 13px; color: var(--muted); }
.tlink { align-self: flex-start; font-size: 14px; font-weight: 800; color: var(--dark); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.donesec { margin-top: 14px; }
.donesec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.donesec > summary::-webkit-details-marker { display: none; }
.donesec > summary .sec { margin-top: 0; }
.donesec[open] .chev { transform: rotate(90deg); }
.donesec .item { margin-top: 10px; }
.item.fin { opacity: .75; }
.donebox b { font-size: 17px; }
.donecta { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
:root { color-scheme: light; }
.scr { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.fab { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
