/* Penny v4 · "warung" theme — warm cream paper, chili + mango + pandan, sticker cards. No blue. */
[hidden] { display: none !important; }
:root {
  --bg: #fff3df; --paper: #fffaf1; --card: #ffffff; --card2: #fff1dc; --line: #2a1e17; --soft: #ecdcc4;
  --text: #2a1e17; --muted: #7a6656; --accent: #e8442e; --accent2: #ffb627; --pandan: #2f9e5b;
  --accent-ink: #fffaf1; --ok: #2f9e5b; --bad: #d7263d; --okbg: #e3f5e8; --badbg: #fde5e2;
  --shadow: 3px 3px 0 var(--line); --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); padding-bottom: 96px;
  background: var(--bg) radial-gradient(circle at 1px 1px, rgba(42,30,23,.07) 1px, transparent 0) 0 0 / 18px 18px;
  font: 17px/1.55 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 880px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
b { font-weight: 800; }

/* ---- header + nav ---- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255,243,223,.96); backdrop-filter: blur(6px); border-bottom: 2px solid var(--line); padding: 12px 16px 0; }
.top > * { max-width: 880px; margin-left: auto; margin-right: auto; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h1 { margin: 0; font-size: 1.45rem; font-weight: 900; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.h1sub { color: var(--muted); font-weight: 700; font-size: .95rem; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: #fff; border: 2px solid var(--line); box-shadow: 2px 2px 0 var(--line); font-size: 1.1rem; transform: rotate(-6deg); }
.hdrstats { display: flex; gap: 6px; }
.hstat { text-decoration: none; color: var(--text); font-weight: 800; font-size: .85rem; background: var(--accent2); border: 2px solid var(--line); border-radius: 999px; padding: 3px 10px; box-shadow: 2px 2px 0 var(--line); white-space: nowrap; }
.tabs { display: flex; gap: 6px; margin-top: 10px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: .88rem; border: 2px solid transparent; border-radius: 999px; white-space: nowrap; }
.tabs a:hover { border-color: var(--soft); }
.tabs a[aria-selected="true"] { background: var(--text); color: var(--paper); border-color: var(--line); box-shadow: 2px 2px 0 var(--accent); }
.ti { font-size: 1rem; }
.view { padding-top: 18px; }

/* ---- shared bits ---- */
.meta { margin: 0; color: var(--accent); font-weight: 900; font-size: 1rem; }
.desc { color: var(--muted); font-size: .97rem; }
.desc b { color: var(--text); }
.status { color: var(--muted); font-size: .93rem; min-height: 1.3em; }
button { font: inherit; font-weight: 800; border: 2px solid var(--line); border-radius: 12px; padding: 10px 20px; background: var(--accent); color: #fff; cursor: pointer; box-shadow: var(--shadow); transition: transform .06s, box-shadow .06s; }
button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
button:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; box-shadow: none; border-color: var(--soft); }
button.ghost { background: var(--card); color: var(--text); }
button.ghost:hover:not(:disabled) { background: var(--card2); }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; margin-top: 10px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; background: var(--card2); padding: 3px 8px; border-radius: 7px; color: var(--text); border: 1px solid var(--soft); }
.search, select, .pform input[type=text] { font: inherit; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; }
.search { margin-bottom: 10px; }
.search:focus, select:focus, .pform input:focus { outline: none; box-shadow: 0 0 0 3px var(--accent2); }

/* ---- Today hero ---- */
.hero { background: var(--accent2); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 16px; position: relative; overflow: hidden; }
.hero::after { content: "☀"; position: absolute; right: -6px; top: -22px; font-size: 6rem; opacity: .18; }
.hero .meta { color: var(--text); font-size: 1.25rem; }
.hero .desc { color: #4d3a2c; margin: 6px 0 8px; }
.kicker { margin: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; color: var(--accent); }
.mix { display: flex; flex-wrap: wrap; gap: 6px; }
.mixchip { background: var(--paper); border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.mixchip b { color: var(--accent); }

/* ---- quiz (readability first) ---- */
.q, .r { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 14px 10px; margin: 0 0 14px; box-shadow: var(--shadow); }
.q.answered { background: var(--paper); }
legend, .r h3 { font-weight: 700; padding: 0; margin-bottom: 10px; font-size: 1.05rem; line-height: 1.45; display: flex; gap: 10px; }
.r h3 { margin: 0 0 8px; }
.num { flex: none; min-width: 28px; height: 28px; border-radius: 9px; background: var(--text); color: var(--accent2); display: inline-grid; place-items: center; font-size: .8rem; font-weight: 900; }
.q legend { float: left; width: 100%; }
.q legend + * { clear: both; }
.opt { display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin: 7px 0; border-radius: 12px; background: var(--paper); border: 2px solid var(--soft); cursor: pointer; font-size: 1rem; }
.opt:hover { border-color: var(--line); }
.opt input { accent-color: var(--accent); width: 19px; height: 19px; margin: 0; flex: none; }
.opt:has(input:checked) { border-color: var(--line); background: #ffe7b8; box-shadow: 2px 2px 0 var(--line); }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--text); color: var(--paper); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: center; gap: 16px; }
#progress { color: #e9d9c3; font-variant-numeric: tabular-nums; font-weight: 700; }
.bar button { box-shadow: 2px 2px 0 var(--accent2); border-color: var(--paper); }
.bar button:disabled { background: #4a3a2f; color: #a99683; border-color: #4a3a2f; }
.score { text-align: center; padding: 18px 0 22px; }
.big { font-size: 4.6rem; font-weight: 900; line-height: 1; color: var(--accent); text-shadow: 3px 3px 0 var(--accent2); }
.big span { font-size: 2rem; color: var(--muted); text-shadow: none; }
.score p { color: var(--muted); }
.r.ok { border-left: 8px solid var(--ok); }
.r.bad { border-left: 8px solid var(--bad); }
.line { margin: 4px 0; }
.r.ok .line b { color: var(--ok); }
.r.bad .line b { color: var(--bad); }
.r.bad .line + .line b { color: var(--ok); }
.fb { margin: 8px 0 4px; padding: 10px 12px; background: var(--card2); border-radius: 12px; font-size: .97rem; }
.tense { color: var(--accent); font-weight: 800; }
a.tense { text-decoration: none; border-bottom: 2px dashed var(--accent); }
.review { font-size: .97rem; }

/* ---- grammar cards ---- */
.ghead { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; color: var(--text); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.ghead::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--accent); border: 2px solid var(--line); transform: rotate(8deg); }
.ghead::after { content: ""; flex: 1; height: 2px; background: var(--soft); }
.gcard { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); margin: 0 0 12px; scroll-margin-top: 140px; box-shadow: var(--shadow); }
.gcard[open] { background: var(--paper); }
.gcard summary { list-style: none; cursor: pointer; padding: 13px 14px; display: flex; flex-direction: column; gap: 2px; }
.gcard summary::-webkit-details-marker { display: none; }
.gname { font-weight: 900; color: var(--text); }
.gname::after { content: " ›"; color: var(--accent); }
.gcard[open] .gname::after { content: " ⌄"; }
.guse { color: var(--muted); font-size: .93rem; }
.gbody { padding: 0 14px 14px; font-size: .97rem; }
.gbody p { margin: 4px 0; } .gbody ul { margin: 2px 0 6px; padding-left: 20px; }
.glabel { color: var(--accent); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; margin-top: 12px !important; }
.gform { list-style: none; padding-left: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.gid { background: #e3f5e8; border: 2px dashed var(--pandan); border-radius: 12px; padding: 9px 11px; margin-top: 12px !important; }
.gtrap { color: #7d2a1f; background: var(--badbg); border-radius: 10px; padding: 7px 10px; font-size: .92rem; margin-top: 8px !important; }
.gpractice { display: inline-block; margin-top: 12px; font-weight: 900; text-decoration: none; background: var(--accent2); color: var(--text); border: 2px solid var(--line); border-radius: 999px; padding: 5px 14px; box-shadow: 2px 2px 0 var(--line); }
.playall { background: var(--text) !important; color: var(--paper); }
.playall .gname { color: var(--accent2); }
.playall .guse { color: #e2cfb6; }
.playall .gname::after { content: " ›"; }
.playall .play { color: var(--text); }

/* ---- playground ---- */
.play { margin-top: 12px; background: var(--card2); border: 2px solid var(--line); border-radius: 14px; padding: 12px; }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ptitle { color: var(--accent); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.ptitle .tense { text-transform: none; letter-spacing: 0; }
.pcount { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.pstem { font-weight: 700; margin: 4px 0 10px !important; font-size: 1.02rem; }
.pblank { color: var(--accent); letter-spacing: .1em; font-weight: 900; }
.popts { display: flex; flex-wrap: wrap; gap: 8px; }
.popt { background: var(--card); color: var(--text); padding: 8px 14px; box-shadow: 2px 2px 0 var(--line); }
.popt:not(:disabled):hover { background: #ffe7b8; }
.popt:disabled { background: var(--card); color: var(--muted); border-color: var(--soft); box-shadow: none; cursor: default; }
.popt.right, .popt.right:disabled { border-color: var(--ok); color: var(--ok); background: var(--okbg); }
.popt.wrong, .popt.wrong:disabled { border-color: var(--bad); color: var(--bad); background: var(--badbg); }
.pfill { display: flex; gap: 8px; }
.pinput { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.pinput:focus { outline: none; box-shadow: 0 0 0 3px var(--accent2); }
.pinput.right { border-color: var(--ok); background: var(--okbg); } .pinput.wrong { border-color: var(--bad); background: var(--badbg); }
.pcheck { padding: 8px 16px; }
.ptip { color: var(--muted); font-size: .92rem; margin-top: 8px !important; }
.pres { margin-top: 10px !important; padding: 9px 11px; border-radius: 12px; background: var(--card); font-size: .94rem; border: 2px solid var(--soft); border-left-width: 6px; }
.pres.ok { border-left-color: var(--ok); } .pres.ok > b:first-child { color: var(--ok); }
.pres.bad { border-left-color: var(--bad); } .pres.bad > b:first-child { color: var(--bad); }
.pright { color: var(--ok); }
.pnav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.pnav button { padding: 6px 14px; font-size: .88rem; box-shadow: 2px 2px 0 var(--line); }

/* ---- practice ---- */
.pform { margin-bottom: 14px; }
.pform.collapsed > :not(.status):not(#pgo) { display: none; }
.pform.collapsed #pgo { display: none; }
.chipsec { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 10px 12px 2px; margin-bottom: 12px; box-shadow: var(--shadow); }
.chipsec-h { margin: 0 0 8px; font-size: .88rem; color: var(--muted); }
.pill { display: inline-block; font-weight: 900; color: var(--text); border: 2px solid var(--line); border-radius: 999px; padding: 1px 10px; margin-right: 6px; }
.pill.live { background: var(--accent2); } .pill.off { background: #cdeed7; }
.chipgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.chiplabel { width: 100%; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 2px solid var(--soft); font-size: .88rem; font-weight: 700; cursor: pointer; }
.chip span:hover { border-color: var(--line); }
.chip input:checked + span { background: var(--text); border-color: var(--line); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--accent2); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.row label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 800; min-width: 100px; }
.row label.grow { flex: 1 1 180px; }
#pgo { width: 100%; font-size: 1.05rem; }

/* ---- Indo slang ---- */
#sfilters .chipgroup { margin-bottom: 6px; }
.schip { background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: .85rem; box-shadow: 2px 2px 0 var(--line); }
.schip.on { background: var(--accent); color: #fff; }
.scard { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 13px 14px; margin: 0 0 12px; font-size: .97rem; box-shadow: var(--shadow); }
.scard.lv-rude { border-left: 8px solid var(--bad); }
.scard.lv-casual { border-left: 8px solid var(--accent2); }
.scard.lv-ok { border-left: 8px solid var(--ok); }
.scard p { margin: 4px 0; }
.shead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sphrase { margin: 0; font-size: 1.2rem; font-weight: 900; }
.lvl { flex: none; font-size: .72rem; font-weight: 900; padding: 3px 9px; border-radius: 999px; border: 2px solid var(--line); color: var(--text); white-space: nowrap; }
.lvl-ok { background: var(--okbg); } .lvl-casual { background: #ffe7b8; } .lvl-rude { background: var(--badbg); color: var(--bad); }
.saka { color: var(--muted); font-size: .86rem; }
.smean { font-weight: 800; }
.sctx { color: var(--muted); font-size: .92rem; }
.sex { background: var(--card2); border-radius: 12px; padding: 8px 11px; margin-top: 10px; }
.stags { color: var(--muted); font-size: .8rem; margin-top: 8px !important; }

/* ---- Speaking ---- */
.support { font-size: .88rem; color: #4d3a2c; background: #ffe7b8; border: 2px dashed var(--line); border-radius: 12px; padding: 8px 11px; margin-top: 0; }
.stats { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(3, 1fr); } .lvl-card { grid-column: 1 / -1; } .stat-s { font-size: .7rem; } }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.stat-k { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; color: var(--muted); }
.stat-v { font-size: 1.15rem; font-weight: 900; }
.stat-s { font-size: .78rem; color: var(--muted); }
.lvl-card { background: var(--text); color: var(--paper); }
.lvl-card .stat-k, .lvl-card .stat-s { color: #e2cfb6; }
.lvl-card .stat-v { color: var(--accent2); }
.xpbar { height: 10px; background: #4a3a2f; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 99px; transition: width .4s; }
.badges { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.sbadge { flex: none; display: flex; flex-direction: column; align-items: center; width: 64px; font-size: 1.4rem; filter: grayscale(1); opacity: .35; }
.sbadge small { font-size: .6rem; text-align: center; line-height: 1.1; font-weight: 800; }
.sbadge.on { filter: none; opacity: 1; }
.modes { display: flex; gap: 8px; margin: 12px 0; }
.smode { flex: 1; background: var(--card); color: var(--text); padding: 9px 6px; font-size: .92rem; }
.smode[aria-pressed="true"] { background: var(--accent); color: #fff; }
.segs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.seg { background: var(--paper); color: var(--text); padding: 5px 12px; font-size: .82rem; box-shadow: 2px 2px 0 var(--line); border-radius: 999px; }
.seg.on { background: var(--text); color: var(--paper); }
.scard2 { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: 5px 5px 0 var(--line); border-top: 10px solid var(--ok); }
.scard2.lv2 { border-top-color: var(--accent2); } .scard2.lv3 { border-top-color: var(--accent); }
.scard2.live { animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 5px 5px 0 var(--accent); } }
.shd { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 800; color: var(--muted); }
.stheme { text-transform: uppercase; letter-spacing: .08em; }
.sline { font-size: 1.35rem; font-weight: 900; line-height: 1.35; margin: 10px 0 6px; }
.sline.blind:not(.peek) { color: transparent; text-shadow: 0 0 12px rgba(42,30,23,.55); cursor: pointer; user-select: none; }
.stip { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
.sctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sctl button { padding: 7px 14px; box-shadow: 2px 2px 0 var(--line); }
.sblind { font-size: .88rem; font-weight: 800; display: flex; gap: 6px; align-items: center; }
.sblind input { accent-color: var(--accent); width: 18px; height: 18px; }
.srec { width: 100%; font-size: 1.15rem; padding: 14px; border-radius: 16px; }
.srec.on { background: var(--text); animation: pulse 1s infinite; }
.smeter { position: relative; height: 22px; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; background: var(--paper); }
.smeter i { position: absolute; inset: 0 auto 0 0; background: var(--accent2); transition: width .1s linear; }
.smeter.timer i { background: var(--accent); }
.smeter span { position: relative; display: block; text-align: center; font-size: .78rem; font-weight: 900; line-height: 18px; }
.sres { margin-top: 14px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 12px; }
.sres.good { background: var(--okbg); } .sres.mid { background: #fff0cc; } .sres.low { background: var(--badbg); }
.sgrade { display: flex; justify-content: space-between; align-items: center; font-size: 1.3rem; font-weight: 900; }
.spts { font-size: .95rem; background: var(--accent2); border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.rings { display: flex; gap: 14px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.ring { --v: 0; width: 78px; height: 78px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 2px solid var(--line);
  background: radial-gradient(closest-side, var(--card) 72%, transparent 73%), conic-gradient(var(--pandan) calc(var(--v) * 1%), var(--soft) 0); }
.ring b { font-size: 1.3rem; line-height: 1; } .ring span { font-size: .66rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.ring.big { width: 96px; height: 96px; background: radial-gradient(closest-side, var(--card) 72%, transparent 73%), conic-gradient(var(--accent) calc(var(--v) * 1%), var(--soft) 0); }
.ring.big b { font-size: 1.7rem; }
.ring.score { background: var(--accent2); }
.srhy { font-size: .92rem; margin: 6px 0; }
.sdiff { font-size: 1.05rem; line-height: 1.9; margin: 6px 0; }
.sdiff span, .slegend span { padding: 1px 5px; border-radius: 6px; font-weight: 800; }
.w-ok { background: #c9ecd4; } .w-close { background: #ffe7b8; } .w-bad { background: #f9c6c0; text-decoration: underline wavy var(--bad); }
.w-miss { background: transparent; color: var(--bad); text-decoration: line-through; border: 1px dashed var(--bad); } .w-extra { color: var(--muted); font-style: italic; }
.slegend { font-size: .72rem; color: var(--muted); }
.sheard { font-size: .88rem; color: var(--muted); font-style: italic; }
.snote { font-size: .9rem; font-weight: 700; }
.snav { display: flex; gap: 8px; justify-content: space-between; margin-top: 14px; }
.snav button { padding: 7px 12px; font-size: .88rem; box-shadow: 2px 2px 0 var(--line); }
audio { height: 36px; max-width: 100%; }
.chintro { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: 5px 5px 0 var(--line); }
.chintro h3 { margin: 0 0 8px; font-size: 1.3rem; }
.chintro.done { text-align: center; }
.rules { padding-left: 20px; margin: 6px 0 10px; font-size: .95rem; }
.chgo, .wgo { width: 100%; margin-top: 8px; font-size: 1.1rem; }
.chhud { display: flex; justify-content: space-between; font-weight: 900; background: var(--text); color: var(--paper); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
.whist { display: flex; gap: 8px; align-items: flex-end; height: 110px; margin: 10px 0; padding: 6px; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; }
.wbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .7rem; }
.wbar i { width: 70%; background: var(--accent2); border: 2px solid var(--line); border-radius: 6px 6px 0 0; }
.wbar.now i { background: var(--accent); }
.wbar b { font-size: .75rem; }
.up { color: var(--ok); } .down { color: var(--bad); }
.wlist { padding-left: 22px; font-size: .95rem; } .wlist li { margin: 4px 0; }
.lvdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; border: 1.5px solid var(--line); background: var(--ok); }
.lvdot.lv2 { background: var(--accent2); } .lvdot.lv3 { background: var(--accent); }
.howto { margin-top: 18px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: .92rem; }
.howto summary { font-weight: 900; cursor: pointer; }
.toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: var(--text); color: var(--paper); border: 2px solid var(--accent2); border-radius: 14px; padding: 8px 14px; font-weight: 700; box-shadow: 3px 3px 0 var(--accent); animation: pop .25s ease-out; transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 520px) { .h1sub { display: none; } .tabs { gap: 4px; } .tabs a { flex: 1 1 0; flex-direction: column; gap: 0; padding: 5px 2px; font-size: .7rem; border-radius: 12px; } .ti { font-size: 1.15rem; } .sline { font-size: 1.2rem; } }

/* Speaking: practice language switch (EN default | ID) */
.slangsw { display: flex; gap: 6px; justify-content: flex-end; margin: 10px 0 0; }
.slangb { background: var(--card); color: var(--text); padding: 6px 14px; font-size: .85rem; font-weight: 600; }
.slangb[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---- v7 · Learn hub (progress.js + learn.js) ---- */
.hstat.goal { background: #cdeed7; }
.hstat.due { background: var(--accent); color: #fff; }
.lnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 0; }
.lnav::-webkit-scrollbar { display: none; }
a.smode { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-decoration: none; font-weight: 800; border: 2px solid var(--line); border-radius: 12px; box-shadow: 2px 2px 0 var(--line); white-space: nowrap; flex: 1 0 auto; padding: 8px 10px; }
.lbadge { background: var(--accent2); color: var(--text); border: 2px solid var(--line); border-radius: 999px; font-size: .72rem; padding: 0 6px; line-height: 1.3; }
.chipbtn { padding: 4px 11px; font-size: .84rem; background: var(--paper); color: var(--text); border-radius: 999px; box-shadow: 2px 2px 0 var(--line); text-transform: none; }
.chipbtn.on { background: var(--text); color: var(--paper); }
.lhero { display: flex; gap: 14px; align-items: center; background: var(--accent2); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.lhero-h { margin: 2px 0; font-weight: 900; font-size: 1.15rem; }
.lhero .stat-s { color: #4d3a2c; }
.ring { --p: 0; flex: none; width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-content: center; text-align: center; line-height: 1;
  background: radial-gradient(closest-side, var(--paper) 72%, transparent 73%), conic-gradient(var(--accent) calc(var(--p) * 1%), var(--paper) 0); }
.ring b { font-size: 1.6rem; font-weight: 900; } .ring small { font-size: .7rem; color: var(--muted); font-weight: 800; }
.goalpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-size: .8rem; font-weight: 800; }
.lnext-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ltile { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); color: var(--text); text-decoration: none; }
.ltile:hover { background: var(--card2); }
.ltile-i { font-size: 1.5rem; } .ltile small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.week { display: flex; gap: 8px; align-items: flex-end; justify-content: space-between; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 14px 8px; box-shadow: var(--shadow); }
.wday { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 96px; justify-content: flex-end; }
.wday i { width: 100%; max-width: 34px; background: var(--soft); border: 2px solid var(--line); border-radius: 7px 7px 3px 3px; }
.wday i.hit { background: var(--pandan); } .wday.now i { background: var(--accent); } .wday.now i.hit { background: var(--pandan); }
.wday small { font-weight: 900; font-size: .75rem; } .wday em { font-style: normal; font-size: .68rem; color: var(--muted); min-height: 1em; }
.weak { display: flex; flex-direction: column; gap: 8px; }
.wrow { display: grid; grid-template-columns: 1fr 90px 42px auto; gap: 8px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.wrow .tense { text-decoration: none; }
.wbar { display: block; height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; border: 1.5px solid var(--line); }
.wbar i { display: block; height: 100%; background: var(--accent); }
.lfoot { margin-top: 18px; font-size: .85rem; }
.unit .gname { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cefr { font-size: .72rem; background: var(--text); color: var(--accent2); border-radius: 999px; padding: 1px 8px; }
.ubar { margin: 6px 0 2px; } .ubar i { background: var(--pandan); }
.ustart { margin: 4px 0 10px; }
.utopics { list-style: none; padding: 0 !important; margin: 0; }
.utopics li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--soft); }
.utopics li a { flex: 1; color: var(--text); text-decoration: none; font-weight: 700; }
.stars { color: var(--accent2); -webkit-text-stroke: .6px var(--line); letter-spacing: 1px; font-size: .95rem; min-width: 46px; }
.stars i { font-style: normal; color: var(--soft); -webkit-text-stroke: 0; }
.lrun { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.lrun-top { display: flex; justify-content: space-between; align-items: center; }
.lprog { height: 10px; background: var(--soft); border-radius: 99px; margin: 8px 0 10px; overflow: hidden; border: 1.5px solid var(--line); }
.lprog i { display: block; height: 100%; background: var(--pandan); transition: width .3s; }
.ltopic { margin: 0; font-size: .82rem; } .ltopic a { text-decoration: none; }
.lopts { display: flex; flex-direction: column; gap: 8px; }
.lopt { text-align: left; }
.lend { text-align: center; }
.lempty { text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.lempty .big { font-size: 3rem; text-shadow: none; }
.gain { font-weight: 900; color: var(--pandan) !important; }
.flash { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); text-align: center; }
.fw { font-size: 2rem; font-weight: 900; margin: 14px 0 0; }
.fpos { color: var(--muted); margin: 0 0 10px; font-weight: 700; }
.fgloss { font-size: 1.2rem; font-weight: 800; background: #e3f5e8; border: 2px dashed var(--pandan); border-radius: 12px; padding: 8px; margin: 6px 0; }
.fex { font-style: italic; }
.say, .say2 { padding: 2px 8px; font-size: .95rem; background: var(--paper); color: var(--text); box-shadow: 2px 2px 0 var(--line); vertical-align: middle; }
.wlist { display: flex; flex-direction: column; gap: 8px; }
.wl { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 9px 11px; font-size: .94rem; }
.wl small { color: var(--muted); }
.dplay { justify-content: flex-start; margin: 4px 0 8px; }
.dtype { width: 100%; resize: vertical; font-size: 1.05rem; }
.ddiff { margin: 8px 0 4px; line-height: 2; }
.dw { padding: 2px 6px; border-radius: 7px; border: 1.5px solid var(--soft); }
.dw.ok { background: var(--okbg); border-color: var(--ok); } .dw.close { background: #fff1c9; border-color: var(--accent2); }
.dw.sub, .dw.miss { background: var(--badbg); border-color: var(--bad); text-decoration: underline wavy var(--bad); }
.tstrip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; text-decoration: none; color: var(--text); font-weight: 700; font-size: .9rem;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 9px 12px; box-shadow: var(--shadow); margin: -4px 0 16px; }
.tgoal { position: relative; flex: 1; min-width: 120px; height: 22px; background: var(--soft); border: 2px solid var(--line); border-radius: 99px; overflow: hidden; }
.tgoal i { position: absolute; inset: 0 auto 0 0; background: var(--accent2); }
.tgoal em { position: relative; font-style: normal; font-size: .78rem; font-weight: 900; display: block; text-align: center; line-height: 18px; }
@media (max-width: 560px) { .lnext-grid { grid-template-columns: 1fr; } .wrow { grid-template-columns: 1fr 60px 38px auto; } .ring { width: 80px; height: 80px; } }
@media (max-width: 560px) { a.smode { padding: 7px 8px; font-size: .84rem; } .lnav { gap: 6px; } }

/* ---- v8 wave 2: reading, level test, phrase of the day, backup, keyboard ---- */
.lopt kbd { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin-right: 8px; font: 800 .75rem/1 inherit; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); }
@media (hover: none) { .lopt kbd { display: none; } }
.potd { background: var(--card2); border: 2px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); margin: 14px 0 4px; }
.potd .kicker { margin: 0 0 4px; }
.potd-id { margin: 0; font-weight: 700; color: var(--muted); }
.potd-en { margin: 4px 0; font-size: 1.12rem; }
.lplace { margin: 10px 0 0; }
.lbackup { margin-top: 12px; background: var(--paper); border: 2px dashed var(--soft); border-radius: 12px; padding: 10px 12px; }
.lbackup .actions { justify-content: flex-start; margin: 8px 0 0; }
.lbtnfile { cursor: pointer; display: inline-block; border: 2px solid var(--line); font-weight: 800; }
.rlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.rtile { text-align: left; font: inherit; cursor: pointer; text-transform: none; }
.ptext { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.ptbody p { line-height: 1.65; margin: 10px 0; }
.gw { all: unset; cursor: pointer; border-bottom: 2px dotted var(--accent); font-weight: 700; }
.gw:focus-visible { outline: 2px solid var(--accent); }
.gwout { min-height: 1.4em; }
.rgloss ul { margin: 6px 0 0; padding-left: 18px; }
button:focus-visible, a:focus-visible, .lopt:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
/* v9 · Learn › Write */
.wprompt { font-weight: 700; line-height: 1.5; margin: 10px 0; }
.wbar2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
#wcount { font-weight: 800; } #wcount.ok { color: var(--ok, #1a7f37); }
.wtext { width: 100%; box-sizing: border-box; min-height: 220px; font: inherit; line-height: 1.55; padding: 12px; background: var(--paper, #fff); color: var(--text); border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); resize: vertical; }
.wtext:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.whints { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.whints li { padding: 8px 10px; border-radius: 10px; border: 2px solid var(--soft); background: var(--card2, var(--card)); line-height: 1.4; }
.whints li.ok { border-color: var(--ok, #1a7f37); }
#wmod { margin-top: 12px; }

/* ---- v11 wave 5: listening dialogues ---- */
.dlg .desc { margin: 6px 0; }
.dspk { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.dchip { font-weight: 800; font-size: .85rem; padding: 3px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); }
.dchip.b, .dl.b b { color: #b4530a; }
.dctl { justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 6px; }
.dspeed { display: inline-flex; gap: 6px; margin-left: auto; }
.dnow { margin-top: 6px; } .dnow p { margin: 6px 0 0; min-height: 1.4em; }
.dqs { padding-left: 22px; margin: 6px 0 12px; } .dq { margin: 0 0 14px; } .dq .pstem { margin: 0 0 6px; }
.dopts { display: grid; gap: 6px; }
.dopt { text-align: left; } .dopt.sel { background: #ffe7b8; border-color: var(--text); box-shadow: 2px 2px 0 var(--text); font-weight: 800; }
.dgap { display: inline-block; width: 9.5em; max-width: 60%; padding: 3px 8px; margin: 0 4px; font: inherit; }
.dgap.right { border-color: var(--ok); background: var(--okbg); } .dgap.wrong { border-color: var(--bad); background: var(--badbg); }
.dfb { margin-top: 6px; }
.dtrans { margin-top: 14px; } #dlock { font-weight: 600; color: var(--muted); font-size: .85rem; margin-left: 6px; }
.dl { margin: 6px 0; padding: 4px 6px; border-radius: 8px; line-height: 1.45; } .dl.on { background: #fff1c9; }
.dsay { padding: 0 6px; margin-right: 6px; min-height: 0; font-size: .9rem; }
@media (max-width: 560px) { .dspeed { margin-left: 0; } }

/* ---- v13 · site UI language toggle (topbar) + ID-only helper lines ---- */
.hdrright { display: flex; align-items: center; gap: 8px; }
.uilang { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; box-shadow: 2px 2px 0 var(--line); background: var(--card); }
.uilang button { all: unset; cursor: pointer; padding: 3px 9px; font-size: .78rem; font-weight: 800; line-height: 1.3; color: var(--line); }
.uilang button + button { border-left: 2px solid var(--line); }
.uilang button[aria-pressed="true"] { background: var(--line); color: var(--accent2); }
.uilang button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
html:not([lang="id"]) .only-id { display: none !important; }
.wprompt-id { margin: -4px 0 10px; font-size: .9rem; color: var(--muted, #6b5a4e); font-style: italic; }
.slangsw { align-items: center; }
.slangl { font-size: .8rem; font-weight: 700; color: var(--muted, #6b5a4e); margin-right: 2px; }
@media (max-width: 520px) { .hdrright { gap: 5px; } .uilang button { padding: 3px 7px; } }

/* Nihao · Specific Chinese Typography & Pinyin Helpers (100% Penny Design System) */
.hanzi-lg { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 2.2rem; font-weight: 900; line-height: 1.25; margin: 4px 0 2px; }
.pinyin-lg { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; color: #b4530a; font-weight: 800; margin: 0 0 6px; }
.tones-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.tcard { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); text-align: center; cursor: pointer; transition: transform .06s; }
.tcard:hover { background: var(--card2); }
.tcard:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.tmark { font-size: 2rem; font-weight: 900; color: var(--accent); margin: 2px 0; }
.tpitch { display: inline-block; font-size: .75rem; font-weight: 800; background: var(--card2); padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--line); margin-bottom: 4px; }
.tcontour { font-family: ui-monospace, monospace; font-size: 1.1rem; color: var(--pandan); font-weight: 900; }
.sandhi-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.sandhi-ex { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sandhi-pill { background: var(--card2); border: 2px solid var(--line); border-radius: 12px; padding: 6px 12px; cursor: pointer; font-size: .92rem; }
.sandhi-pill:hover { background: var(--paper); }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.pair-item { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; cursor: pointer; box-shadow: 2px 2px 0 var(--line); }
.pair-item:hover { background: var(--card2); }
.pair-hz { font-family: 'Noto Serif SC', serif; font-size: 1.6rem; font-weight: 900; margin: 0; }
.pair-py { font-size: .9rem; font-weight: 800; color: var(--accent); margin: 2px 0; }
.pair-en { font-size: .75rem; color: var(--muted); margin: 0; }
.initials-flex { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.init-btn { background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 6px 12px; font-weight: 800; cursor: pointer; box-shadow: 2px 2px 0 var(--line); }
.init-btn:hover { background: var(--card2); }
.init-btn strong { color: var(--accent); }
.init-btn small { color: var(--muted); margin-left: 4px; font-size: .8rem; }
.btn-user-voice { background: var(--pandan) !important; color: #fff !important; }

.flash-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@keyframes pulseHighlight {
  0% { box-shadow: 0 0 0 4px var(--accent); transform: scale(1.01); }
  50% { box-shadow: 0 0 0 8px var(--accent2); transform: scale(1.02); }
  100% { box-shadow: 3px 3px 0 var(--line); transform: scale(1); }
}
.pulse-highlight {
  animation: pulseHighlight 1.5s ease-out;
}
