:root {
  --bg: #fbf7f0; --card: #ffffff; --text: #2a211b; --muted: #75685d; --line: #e8dfd3;
  --accent: #b4541a; --accent-ink: #ffffff; --soft: #f6e6d8; --good: #2f7d4f;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1b1714; --card: #26201c; --text: #f2ebe3; --muted: #b3a597; --line: #3a312a; --accent: #e07a3a; --accent-ink: #1b1714; --soft: #3a2a1f; --good: #5cbf85; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 "Noto Sans", system-ui, sans-serif; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
main { max-width: 560px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 0 0 8px; } h2 { font-size: 1.15rem; margin: 0 0 8px; } h3 { font-size: 1rem; margin: 16px 0 4px; }
p { margin: 0 0 10px; }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.hero { text-align: center; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; } .row > * { flex: 1; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
button { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: 10px 16px; min-height: 44px; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; width: 100%; }
.row button.primary { width: auto; }
button.icon { min-height: 32px; padding: 2px 10px; font-size: .85rem; vertical-align: middle; }
.link { font-weight: 600; text-decoration: none; display: inline-block; padding: 4px 0; }
.pa { font-family: "Noto Sans Gurmukhi", "Noto Sans", sans-serif; font-size: 1.35rem; margin: 0 0 2px; }
.pa.big { font-size: 1.6rem; line-height: 1.9; }
.ring { --p: 0; width: 132px; height: 132px; margin: 12px auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--soft) 0); }
.ring span { width: 104px; height: 104px; border-radius: 50%; background: var(--card); display: grid; place-content: center; font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.ring small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.week { display: flex; justify-content: center; gap: 6px; margin: 8px 0 12px; }
.week span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); font-size: .85rem; font-weight: 600; }
.week span.on { background: var(--good); color: #fff; }
.week span.today { outline: 2px solid var(--accent); outline-offset: 2px; }
.flash { background: var(--soft); border-radius: 12px; padding: 20px 16px; margin: 8px 0 12px; text-align: center; }
.prompt { font-size: 1.25rem; font-weight: 600; }
.letters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.letters span { font-family: "Noto Sans Gurmukhi", sans-serif; font-size: 2rem; width: 60px; height: 60px; display: grid; place-items: center; background: var(--soft); border-radius: 12px; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); } .list li:last-child { border-bottom: 0; }
.list a { text-decoration: none; color: inherit; display: block; }
.phrases { list-style: none; padding: 0; margin: 0; } .phrases li { padding: 10px 0; border-bottom: 1px solid var(--line); } .phrases li:last-child { border: 0; }
.stats { display: flex; gap: 12px; margin: 8px 0; } .stats div { flex: 1; background: var(--soft); border-radius: 12px; padding: 12px; text-align: center; }
.stats strong { display: block; font-size: 1.3rem; } .stats span { color: var(--muted); font-size: .85rem; }
.board { width: 100%; border-collapse: collapse; font-size: .9rem; }
.board th, .board td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.board td:first-child, .board th:first-child { text-align: left; }
.board td { color: var(--good); } .board td:first-child { color: var(--text); }
.board th.today { color: var(--accent); }
details summary { cursor: pointer; color: var(--muted); margin-bottom: 6px; }
nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
nav a { flex: 1; text-align: center; padding: 10px 2px; text-decoration: none; color: var(--muted); font-size: .85rem; font-weight: 600; border-radius: 8px; }
nav a.active { color: var(--accent); background: var(--soft); }
.demo { background: var(--soft); color: var(--text); text-align: center; font-size: .8rem; padding: 6px 16px; }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
[hidden] { display: none !important; }
.pa.huge { font-size: 2.6rem; line-height: 1.4; margin: 4px 0; }
.tl { color: var(--accent); margin: 2px 0 6px; }
.ex { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.ex .pa { font-size: 1.2rem; }
#btns button { flex: 1; line-height: 1.2; }
#btns .small { font-weight: 400; }
#btns .primary .muted { color: inherit; opacity: .8; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1rem; }
label.check input { width: 22px; height: 22px; min-height: 0; }
.recrow { padding: 8px 0; } .recrow + .recrow { border-top: 1px solid var(--line); }
.recrow .row { align-items: center; } .recrow .row > * { flex: 0 0 auto; }
.ok { color: var(--good); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
nav a { font-size: .78rem; padding: 10px 1px; }
:root { --he: #1f5fbf; --he-bg: #e7effb; --she: #b0306a; --she-bg: #fbe7f0; }
@media (prefers-color-scheme: dark) { :root { --he: #7fb0ff; --he-bg: #1c2a40; --she: #ff86bd; --she-bg: #3d1f2d; } }
.gm { color: var(--he); font-weight: 700; } .gf { color: var(--she); font-weight: 700; }
.flash-m { background: var(--he-bg); border: 2px solid var(--he); }
.flash-f { background: var(--she-bg); border: 2px solid var(--she); }
.flash { position: relative; }
.gtag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; margin-right: 6px; }
.gtag.gm { background: var(--he); color: #fff; } .gtag.gf { background: var(--she); color: #fff; }
.flash .gtag { position: absolute; top: 10px; right: 10px; margin: 0; }
.pa-inline { font-family: "Noto Sans Gurmukhi", sans-serif; font-size: 1.1em; }
