/* 5 AM Mindset Manual — night navy + gold, the club's permanent theme. Fonts are bundled for offline use. */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/oswald-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/nunitosans-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/mukta-deva-400.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/mukta-deva-700.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
  --navy: #0a1128; --navy-2: #0e1734; --card: #121c40; --card-2: #18244f; --ink: #f5f0e4; --muted: #a8b0c9; --dim: #6f7896;
  --gold: #d4a017; --gold-2: #f2c94c; --dawn: #ff9f43; --rose: #f4a7a0; --ok: #5ad17a; --bad: #ff7a7a;
  --line: rgba(212, 160, 23, .22); --hair: rgba(255, 255, 255, .08);
  --serif: "Noto Serif", Cambria, "Times New Roman", serif;
  --sans: "Nunito Sans", Mukta, system-ui, sans-serif;
  --label: Oswald, "Nunito Sans", Mukta, sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --top: 56px; --nav: 64px; --r: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--navy); font-size: 16px; }
body { margin: 0; background: var(--navy); color: var(--ink); font-family: var(--sans); line-height: 1.5; font-variant-numeric: lining-nums;
  -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body.lang-hi { --serif: Mukta, "Noto Serif", serif; --label: Mukta, Oswald, sans-serif; --sans: Mukta, "Nunito Sans", sans-serif; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
img { max-width: 100%; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- chrome ---------- */
#topbar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: calc(var(--top) + var(--sat)); padding: var(--sat) calc(8px + var(--sar)) 0 calc(8px + var(--sal));
  display: flex; align-items: center; gap: 6px; background: rgba(10, 17, 40, .98); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair); }
.tb-t { flex: 1; margin: 0 4px; font: 600 1.05rem/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark { width: 40px; height: 40px; display: grid; place-items: center; color: var(--gold); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink); flex: none; }
.icon-btn:active { background: var(--hair); }
.icon-btn.ghosted { visibility: hidden; }
.icon-btn.del { color: var(--dim); width: 34px; height: 34px; }
.pill { height: 32px; min-width: 44px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--line); color: var(--gold-2); font: 600 .85rem var(--label); letter-spacing: .03em; }
#nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--nav) + var(--sab)); padding: 0 var(--sar) var(--sab) var(--sal);
  display: flex; background: var(--navy-2); border-top: 1px solid var(--hair); }
.nv { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim); font: 500 .7rem var(--label); letter-spacing: .04em; }
body.lang-hi .nv { font-size: .78rem; letter-spacing: 0; }
.nv.on { color: var(--gold-2); }
.nv.on .ico { stroke-width: 2.4; }
#view { padding: calc(var(--top) + var(--sat) + 14px) calc(16px + var(--sar)) calc(var(--nav) + var(--sab) + 28px) calc(16px + var(--sal)); max-width: 760px; margin: 0 auto; }
body.welcome-mode #topbar, body.welcome-mode #nav { display: none; }
body.welcome-mode #view { padding: 0; max-width: none; }

/* ---------- type & blocks ---------- */
.kicker { font: 600 .72rem/1.3 var(--label); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
body.lang-hi .kicker { letter-spacing: .02em; font-size: .85rem; }
.center, .center-all { text-align: center; }
.ph { margin: 4px 0 16px; }
.ph-t { margin: 6px 0 4px; font: 700 1.55rem/1.22 var(--serif); color: var(--ink); }
.ph-t.caps { text-transform: uppercase; letter-spacing: .03em; font-size: 1.3rem; color: #efe6cf; }
.ph-s { margin: 0; color: var(--gold-2); font: italic 400 .95rem/1.4 var(--serif); opacity: .9; }
body.lang-hi .ph-s { font-style: normal; }
.rule { height: 2px; margin: 12px 0 4px; background: linear-gradient(90deg, var(--gold), rgba(212, 160, 23, 0)); border-radius: 2px; }
.center-all .rule, .center .rule { background: linear-gradient(90deg, rgba(212, 160, 23, 0), var(--gold), rgba(212, 160, 23, 0)); }
.sect { margin: 26px 2px 10px; font: 600 .78rem var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
body.lang-hi .sect { letter-spacing: 0; font-size: .95rem; }
.grp { margin: 18px 0 8px; font: 600 .78rem var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
body.lang-hi .grp { letter-spacing: 0; font-size: .95rem; }
.em { font-family: var(--serif); font-style: italic; color: #e9dfc4; }
body.lang-hi .em { font-style: normal; }
.em.gold, .gold { color: var(--gold-2); }
.by { text-align: right; color: var(--gold-2); font-family: var(--serif); margin: 6px 0; }
.muted, .mini { color: var(--muted); font-size: .86rem; }
.mini.center { margin: 10px 0; }
.foot { margin: 18px 0 4px; text-align: center; font: italic .92rem var(--serif); color: var(--gold-2); }
body.lang-hi .foot { font-style: normal; }
.tight { margin: 2px 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.row.gap { gap: 8px; margin-top: 14px; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: 10px; margin-top: 14px; }
.card, .sheet { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 16px; margin: 12px 0; }
.sheet { background: linear-gradient(180deg, var(--card) 0%, var(--navy-2) 100%); border-color: var(--line); }
.sheet.navy { background: radial-gradient(120% 80% at 50% 0%, #17245a 0%, var(--navy-2) 70%); }
.sheet.slate { background: radial-gradient(120% 90% at 50% 0%, #2a2c33 0%, #17181d 75%); border-color: rgba(212, 160, 23, .35); padding: 22px 18px; }
.sheet.slate p { color: #ddd6c6; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-h h2 { margin: 0; font: 700 1.02rem/1.3 var(--serif); }
.card-h span { color: var(--muted); font: 500 .85rem var(--label); white-space: nowrap; }
.card p { margin: 6px 0; }
.dots-l, .dia { margin: 6px 0 10px; padding-left: 20px; }
.dots-l li, .dia li { margin: 5px 0; }
.dots-l li::marker { color: var(--gold); }
.dia { list-style: none; padding-left: 4px; }
.dia li::before { content: "◆"; color: var(--gold); font-size: .7em; margin-right: 10px; vertical-align: 2px; }
.numl { margin: 0; padding-left: 26px; }
.numl li { margin: 0 0 12px; padding-left: 4px; }
.numl li::marker { color: var(--gold); font: 700 1rem var(--serif); }
.rulebox { margin: 16px 0; padding: 14px 16px; border-left: 3px solid var(--gold); background: rgba(212, 160, 23, .08); border-radius: 0 12px 12px 0; font-family: var(--serif); font-style: italic; color: #eadfbf; }
body.lang-hi .rulebox { font-style: normal; }
.note { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 159, 67, .1); color: #ffd5ab; font-size: .9rem; }
.note .ico { width: 18px; height: 18px; margin-top: 2px; }
.hint { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: rgba(242, 201, 76, .08); color: var(--muted); font-size: .9rem; }
.hint b { color: var(--ink); }
.hint .ico { color: var(--gold-2); width: 18px; height: 18px; margin-top: 2px; }
.ok-line { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; font-size: .9rem; }
.ok-line .ico { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: .95rem; border: 1px solid transparent; }
.btn .ico { width: 20px; height: 20px; }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; }
.btn.ghost { border-color: var(--line); color: var(--gold-2); background: rgba(212, 160, 23, .05); }
.btn.navy { background: rgba(10, 17, 40, .85); color: #f5e6b8; }
.btn.danger { border-color: rgba(255, 122, 122, .45); color: var(--bad); background: rgba(255, 122, 122, .06); }
.btn.wide { width: 100%; margin: 10px 0; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: .86rem; border-radius: 12px; }
.btn.sm .ico { width: 17px; height: 17px; }
.btn.add { margin-top: 8px; }
.btn:active { transform: scale(.98); }

/* ---------- form fields with ruled lines ---------- */
.lbl { display: block; margin: 14px 0 6px; font: 600 .74rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
body.lang-hi .lbl { letter-spacing: 0; font-size: .9rem; }
.inp { display: block; width: 100%; min-height: 44px; padding: 8px 2px; background: transparent; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; outline: none; color: var(--ink); }
.inp:focus { border-bottom-color: var(--gold-2); }
.inp.big { font: 600 1.2rem var(--serif); }
.inp.ro { color: var(--gold-2); display: flex; align-items: center; }
.inp[type="date"], .inp[type="time"] { color-scheme: dark; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.inp.time { width: 118px; flex: none; }
.inp.done { text-decoration: line-through; text-decoration-color: rgba(90, 209, 122, .7); color: var(--muted); }
.ta { display: block; width: 100%; resize: none; overflow: hidden; border: 0; outline: none; background: transparent; color: var(--ink); padding: 0 2px; min-height: 2.1em; }
.ta.ruled { --lh: 2.1em; line-height: var(--lh); background-image: linear-gradient(transparent calc(var(--lh) - 1.5px), var(--line) calc(var(--lh) - 1.5px), var(--line) var(--lh)); background-size: 100% var(--lh); background-attachment: local; }
.ta.ruled:focus { background-image: linear-gradient(transparent calc(var(--lh) - 1.5px), rgba(242, 201, 76, .5) calc(var(--lh) - 1.5px), rgba(242, 201, 76, .5) var(--lh)); }
.ta.big { min-height: 22em; }
.ta::placeholder, .inp::placeholder { color: var(--dim); opacity: 1; }
.q { margin: 16px 0 4px; }
.q b { display: block; font: 700 .98rem/1.35 var(--serif); color: #f1e7c9; }
.q span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }

/* checkbox look */
.box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(212, 160, 23, .55); display: inline-grid; place-items: center; flex: none; transition: background .15s; }
.box .ico { width: 16px; height: 16px; stroke-width: 3; opacity: 0; color: #1a1405; }
.box.on { background: var(--gold-2); border-color: var(--gold-2); }
.box.on .ico { opacity: 1; }
.cbtn { padding: 6px; margin-left: -6px; display: grid; place-items: center; }
.chk { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 2px; text-align: left; }
.chk.on span:last-child { color: var(--ink); }
.checks { display: grid; gap: 0; }
.act { display: flex; align-items: center; gap: 8px; }
.act .inp { flex: 1; }
.setrow { display: flex; align-items: center; gap: 10px; }
.setrow .chk { flex: 1; }

/* segmented & score */
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--hair); }
.seg-b { flex: 1; min-height: 42px; border-radius: 10px; font-weight: 700; color: var(--muted); font-size: .92rem; }
.seg-b.on { background: var(--gold-2); color: #1a1405; }
.seg-b.ex-f.on { background: var(--ok); color: #06210e; }
.seg-b.ex-p.on { background: var(--dawn); color: #2a1300; }
.seg-b.ex-i.on { background: var(--bad); color: #2b0606; }
.seg.big .seg-b { min-height: 50px; font-size: 1.05rem; }
.score { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.sc { aspect-ratio: 1; min-height: 30px; border-radius: 50%; border: 1.5px solid var(--line); font: 600 .95rem var(--label); color: var(--muted); }
.sc.on { background: var(--gold-2); color: #1a1405; border-color: var(--gold-2); transform: scale(1.08); }

/* bars & chips */
.bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--rose), var(--dawn), var(--gold-2)); }
.bar.gold i { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.bar.ex-f i { background: var(--ok); } .bar.ex-p i { background: var(--dawn); } .bar.ex-i i { background: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px; background: rgba(255, 255, 255, .06); font-size: .85rem; font-weight: 700; }
.chip .ico { width: 16px; height: 16px; color: var(--dawn); }

/* ---------- Today ---------- */
.hero { padding: 18px 18px 16px; border-radius: 20px; margin-bottom: 12px; border: 1px solid var(--line);
  background: radial-gradient(140% 120% at 85% -10%, rgba(255, 159, 67, .38) 0%, rgba(244, 167, 160, .12) 30%, rgba(10, 17, 40, 0) 60%), linear-gradient(180deg, #16234f, #0e1734); }
.hero.done { background: radial-gradient(140% 120% at 50% -20%, rgba(242, 201, 76, .45) 0%, rgba(10, 17, 40, 0) 65%), linear-gradient(180deg, #1b2a5c, #0e1734); }
.hero-t { margin: 8px 0 6px; font: 700 1.55rem/1.15 var(--serif); }
.hero-t .big { font-size: 2.4rem; letter-spacing: -.01em; }
.hero-t .of { font-size: 1.2rem; color: var(--muted); margin-left: 6px; font-weight: 500; }
.hero-s { margin: 4px 0 0; color: var(--muted); }
.setup .setup-list { display: grid; margin-top: 6px; }
.setup-i { display: flex; align-items: center; gap: 12px; padding: 10px 2px; text-align: left; border-top: 1px solid var(--hair); }
.setup-i > span:not(.box) { flex: 1; }
.setup-i.ok > span:not(.box) { color: var(--muted); }
.chev { width: 18px; height: 18px; color: var(--dim); }
.review { border-color: rgba(242, 201, 76, .4); }
.live { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin: 12px 0; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--hair); text-align: left; }
.live > .ico:first-child { width: 36px; height: 36px; padding: 9px; border-radius: 50%; background: #e53935; color: #fff; fill: #fff; stroke: none; }
.live span { flex: 1; display: flex; flex-direction: column; }
.live small { color: var(--muted); }
.live.now { border-color: rgba(229, 57, 53, .6); background: rgba(229, 57, 53, .1); }
.quote { margin: 14px 0; padding: 14px 16px; border-left: 3px solid var(--gold); background: rgba(212, 160, 23, .06); border-radius: 0 14px 14px 0; }
.quote p { margin: 0; font: italic 1.02rem/1.45 var(--serif); color: #f0e6c8; }
body.lang-hi .quote p { font-style: normal; }
.quote cite { display: block; margin-top: 6px; font: 500 .78rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-style: normal; }
body.lang-hi .quote cite { letter-spacing: 0; font-size: .88rem; }
.pre-note { color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- day editor ---------- */
.day-ed { margin-top: 6px; }
.tabs { position: sticky; z-index: 5; top: calc(var(--top) + var(--sat)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px 0; background: var(--navy); }
.tab { min-height: 42px; border-radius: 12px; font-weight: 700; font-size: .86rem; color: var(--muted); background: rgba(255, 255, 255, .04); display: flex; align-items: center; justify-content: center; gap: 4px; }
.tab.on { background: var(--gold-2); color: #1a1405; }
.tb-ok { width: 15px; height: 15px; color: var(--ok); stroke-width: 3; }
.tab.on .tb-ok { color: #1a1405; }
.tb-n { font-style: normal; font-size: .75rem; padding: 0 6px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.tab.on .tb-n { background: rgba(0, 0, 0, .15); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.daytag { padding: 4px 10px; border-radius: 8px; background: var(--navy); border: 1px solid var(--line); font: 700 .8rem var(--label); letter-spacing: .1em; color: var(--gold-2); }
.sheet-date { color: var(--muted); font-size: .88rem; }
.band { margin: 4px -16px 6px; padding: 7px 16px; background: rgba(212, 160, 23, .14); color: var(--gold-2); font: 600 .74rem var(--label); letter-spacing: .14em; text-transform: uppercase; }
body.lang-hi .band { letter-spacing: 0; font-size: .9rem; }
.band.center { margin: 18px -16px 6px; text-align: center; }
.welcome .band { margin: 18px 0 6px; border-radius: 10px; }
.ritcount { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.ritcount b { font: 700 2rem var(--serif); color: var(--gold-2); }
.ritcount span { color: var(--muted); }
.rit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 2px; text-align: left; border-bottom: 1px solid var(--hair); }
.rit-n { width: 22px; text-align: right; color: var(--dim); font: 600 .8rem var(--label); flex: none; }
.rit-t { flex: 1; }
.rit.on .rit-t { color: var(--ink); }
.rit:not(.on) .rit-t { color: #cfd3e2; }
.rit:disabled { opacity: .45; }
.journal .j-h { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 8px; }
.journal h2 { margin: 0; font: 700 1.6rem var(--serif); }
.daynav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dn { text-align: center; display: flex; flex-direction: column; }
.dn b { font: 700 1.15rem var(--serif); }
.dn span { color: var(--muted); font-size: .85rem; }

/* ---------- manual contents ---------- */
.cover { position: relative; margin: 0 0 12px; border-radius: 20px; overflow: hidden; height: 190px; border: 1px solid var(--line); cursor: pointer; }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; display: block; }
.cover.tall { height: 340px; cursor: default; }
.cover.tall img { object-position: 50% 0; }
.cover-in { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(180deg, rgba(10, 17, 40, 0), rgba(10, 17, 40, .92)); }
.cover-name { font: 700 1.4rem var(--serif); }
.cover-d { color: var(--gold-2); font-size: .88rem; }
.toc { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; }
.toc-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; border-top: 1px solid var(--hair); }
.toc-i:first-child { border-top: 0; }
.toc-i:active { background: var(--hair); }
.toc-n { width: 22px; color: var(--gold); font: 600 .85rem var(--label); flex: none; }
.toc-t { flex: 1; font-weight: 600; }
.tmeta { color: var(--muted); font: 500 .8rem var(--label); display: inline-flex; }
.tmeta.ok { color: var(--ok); }
.tmeta .ico { width: 17px; height: 17px; }

/* ---------- tracker grid ---------- */
.blocks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.blocks.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.blk { min-height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .05); color: var(--muted); font: 600 .82rem var(--label); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 4px 0; }
.blk small { font-size: .68rem; opacity: .8; }
.blk.cur { box-shadow: inset 0 0 0 1.5px var(--dawn); }
.blk.on { background: var(--gold-2); color: #1a1405; }
.grid-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.tgrid { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: .8rem; }
.tgrid th, .tgrid td { border-bottom: 1px solid var(--hair); padding: 0; text-align: center; height: 34px; }
.tgrid thead th { height: 36px; background: rgba(212, 160, 23, .12); color: var(--gold-2); font: 600 .78rem var(--label); }
.tgrid thead th button { width: 100%; height: 100%; color: inherit; font: inherit; }
.tgrid .rl { text-align: left; padding: 3px 6px 3px 8px; width: 40%; font-weight: 600; font-size: .74rem; line-height: 1.2; color: #d6d9e6; overflow: hidden; display: table-cell; word-break: break-word; }
.tgrid thead .rl, .tgrid .tot .rl { font-size: .8rem; }
.tgrid thead .rl { color: var(--gold-2); }
.rn { color: var(--dim); font: 600 .72rem var(--label); margin-right: 5px; }
.tgrid .today { background: rgba(255, 159, 67, .1); }
.tc { width: 24px; height: 24px; border-radius: 6px; border: 1.5px solid rgba(212, 160, 23, .4); display: inline-grid; place-items: center; }
.tc .ico { width: 15px; height: 15px; stroke-width: 3; color: #1a1405; }
.tc.on { background: var(--gold-2); border-color: var(--gold-2); }
.tc:disabled { opacity: .25; }
.tgrid .tot td, .tgrid .tot th { font: 700 .8rem var(--label); color: var(--gold-2); height: 32px; }

/* ---------- log ---------- */
.intro { text-align: center; background: radial-gradient(120% 80% at 50% 0%, #1a2960 0%, var(--card) 70%); }
.intro h2 { margin: 6px 0 10px; font: 700 1.4rem var(--serif); }
.intro p { color: #dcd5c2; font-family: var(--serif); }
.log { display: grid; gap: 6px; }
.log-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--hair); text-align: left; }
.log-i.today { border-color: var(--dawn); background: linear-gradient(90deg, rgba(255, 159, 67, .14), var(--card)); }
.log-i.fut { opacity: .55; }
.ln { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: var(--gold-2); font: 700 .9rem var(--label); flex: none; }
.ld { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.ld small { color: var(--muted); }
.dots { display: flex; gap: 4px; }
.dot { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font: 600 .7rem var(--label); font-style: normal; color: var(--dim); background: rgba(255, 255, 255, .05); }
.dot.on { background: rgba(242, 201, 76, .9); color: #1a1405; }
.legend { color: var(--muted); font-size: .82rem; text-align: center; margin-top: 14px; }
.legend b { color: var(--gold-2); }

/* ---------- progress ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font: 700 1.6rem/1.1 var(--serif); }
.tile b small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.tile span { color: var(--muted); font-size: .76rem; line-height: 1.25; }
.tile.gold b { color: var(--gold-2); }
.chart { width: 100%; height: 120px; display: block; }
.chart .bars rect { fill: var(--gold-2); }
.chart .ax { stroke: var(--hair); stroke-width: 1; }
.chart .ax.dash { stroke-dasharray: 3 3; }
.chart .now { stroke: var(--dawn); stroke-width: 1.2; }
.hb { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 28px; align-items: center; gap: 10px; font-size: .84rem; }
.hb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d6d9e6; }
.hb b { text-align: right; font: 600 .85rem var(--label); color: var(--gold-2); }
.hb .bar { margin: 6px 0; }

/* ---------- lists & pages ---------- */
.list { display: grid; }
.li { display: flex; align-items: flex-start; gap: 8px; }
.li-n { width: 26px; flex: none; padding-top: .45em; color: var(--gold); font: 600 .85rem var(--label); text-align: right; }
.li .ta { flex: 1; }
.li .cbtn { margin-top: 3px; }
.li.done .ta { text-decoration: line-through; color: var(--muted); }
.ex .exi { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--hair); }
.ex .exi p { flex: 1; font: italic .95rem var(--serif); color: #e5dcc2; }
body.lang-hi .ex .exi p { font-style: normal; }
.ex .icon-btn { color: var(--gold-2); }
.areas { display: grid; gap: 0; }
.area h3 { margin: 0 0 4px; font: 700 1rem var(--serif); color: var(--gold-2); }
.area { border-left: 3px solid var(--gold); }
.area.a0 { border-left-color: #ff6b6b; } .area.a1 { border-left-color: #51cf66; } .area.a2 { border-left-color: #ffd43b; }
.area.a3 { border-left-color: #f06595; } .area.a4 { border-left-color: #22b8cf; } .area.a5 { border-left-color: #b197fc; }
.proj-h { display: flex; align-items: center; gap: 6px; }
.proj-h .inp { flex: 1; }
.proj.done { opacity: .75; }
.rule-i { display: flex; gap: 14px; align-items: flex-start; }
.rule-i h3 { margin: 2px 0 4px; font: 700 1rem/1.3 var(--serif); color: #f1e7c9; text-transform: none; }
.rule-i p { margin: 4px 0; color: #d0d3e0; }
.big-n { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: rgba(212, 160, 23, .14); color: var(--gold-2); font: 700 .95rem var(--label); flex: none; }
.steps { padding-left: 0; list-style: none; margin: 12px 0; }
.steps li { padding: 10px 0; border-top: 1px solid var(--hair); }
.steps b { color: var(--gold-2); font-family: var(--serif); }
.steps p { margin: 4px 0 0; color: #d0d3e0; }
.declare { margin-top: 18px; padding: 16px; border-radius: 14px; background: rgba(212, 160, 23, .08); border: 1px solid var(--line); }
.sigbox { width: 100%; min-height: 96px; border-radius: 12px; border: 1.5px dashed rgba(212, 160, 23, .55); display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold-2); background: rgba(245, 240, 228, .03); }
.sigbox.has { background: #f5f0e4; border-style: solid; padding: 8px; }
.sigbox img { max-height: 90px; }

/* intention page — yellow, like the book */
.ipage { position: relative; margin: 14px 0; padding: 14px 14px 16px; border-radius: 18px; color: #1d1806;
  background: radial-gradient(circle at 10% 8%, rgba(255, 255, 255, .35) 0 40px, transparent 41px), radial-gradient(circle at 92% 92%, rgba(255, 196, 0, .45) 0 60px, transparent 61px), linear-gradient(160deg, #ffe066, #f5c518 60%, #f0b90b); }
.ip-top { display: flex; justify-content: space-between; align-items: center; }
.ip-n { font: 700 .78rem var(--label); letter-spacing: .14em; text-transform: uppercase; color: #6b5200; }
.ipage .icon-btn.del { color: #6b5200; }
.oval-wrap { position: relative; width: 100%; max-width: 380px; aspect-ratio: 4 / 5; margin: 6px auto 10px; }
.arrows { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #7a5d00; stroke-width: .8; stroke-linecap: round; stroke-linejoin: round; }
.oval { position: absolute; inset: 11% 13%; border: 2px solid #7a5d00; border-radius: 50%; display: grid; place-items: center; padding: 14% 11%; }
.oval-t { text-align: center; color: #1d1806; font: 600 1.05rem/1.5 var(--serif); max-height: 100%; }
.oval-t::placeholder { color: rgba(29, 24, 6, .55); }
.ip-sym { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ip-emoji { font-size: 3rem; line-height: 1; }
.ip-img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; border: 3px solid #fff8dc; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.ip-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ip-read { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; color: #4d3b00; font-size: .88rem; }
.ipage .ok-line { color: #14632e; }
.symgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sym { aspect-ratio: 1; font-size: 2rem; border-radius: 14px; background: rgba(255, 255, 255, .06); }

/* certificate */
.cert-wrap { position: relative; }
.cert { border-radius: 16px; padding: 10px; background: linear-gradient(180deg, #16224f, #0a1128); border: 2px solid var(--gold); }
.cert-in { border: 1px solid rgba(212, 160, 23, .6); border-radius: 10px; padding: 22px 16px; text-align: center; }
.cert h2 { margin: 8px 0 0; font: 700 1.55rem var(--serif); }
.cert p { margin: 4px 0; font-family: var(--serif); color: #e6dfcd; }
.cert-name { margin: 10px 0 12px; padding-bottom: 6px; border-bottom: 1px solid rgba(212, 160, 23, .6); font: 700 1.6rem var(--serif); color: var(--gold-2); }
.cert-ok { margin: 14px 0; font: 700 1.2rem var(--serif); color: var(--gold); }
.cert-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.cert-row div { display: flex; flex-direction: column; align-items: center; }
.cert-v { min-height: 44px; display: flex; align-items: flex-end; justify-content: center; width: 100%; border-bottom: 1px solid rgba(212, 160, 23, .6); padding-bottom: 4px; font-family: var(--serif); }
.cert-v.sig img { max-height: 56px; filter: invert(1) sepia(.25); }
.cert-row small { margin-top: 4px; color: var(--muted); font: 500 .68rem var(--label); letter-spacing: .12em; text-transform: uppercase; }
.cert-foot { margin-top: 16px !important; font-size: .85rem; font-style: italic; color: var(--muted) !important; }
.cert-wrap.locked .cert { filter: blur(3px) grayscale(.4); opacity: .55; }
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px; }
.lock .ico { width: 40px; height: 40px; color: var(--gold-2); }
.lock b { font: 700 1.2rem var(--serif); }
.lock span { color: var(--muted); }

/* ---------- welcome ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; position: relative; background: var(--navy); --wimg: min(54vh, 620px); }
.w-img { display: block; width: 100%; max-width: 620px; margin: 0 auto; height: var(--wimg); object-fit: cover; object-position: 50% 0; }
.welcome::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--wimg) - 130px); height: 130px; background: linear-gradient(180deg, rgba(10, 17, 40, 0), var(--navy)); pointer-events: none; }
.w-in { position: relative; z-index: 1; margin: -28px auto 0; padding: 0 calc(20px + var(--sar)) calc(28px + var(--sab)) calc(20px + var(--sal)); max-width: 560px; width: 100%; }
.w-t { margin: 8px 0; font: 700 2.1rem/1.1 var(--serif); }
.w-s { color: #d7d2c3; margin: 0 0 18px; }
.w-note { color: var(--muted); font-size: .82rem; text-align: center; }
.welcome .seg { margin-bottom: 8px; }
.welcome.form { padding-top: calc(var(--sat) + 24px); background: radial-gradient(120% 60% at 50% 0%, #1a2960 0%, var(--navy) 70%); }
.welcome.form .w-in { margin-top: 0; }
.welcome.form::after { display: none; }

/* ---------- toast, modal, reader ---------- */
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav) + var(--sab) + 14px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 14px; background: #f5f0e4; color: #0a1128; font-weight: 700; font-size: .92rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .45); transition: .2s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.welcome-mode #toast { bottom: calc(var(--sab) + 20px); }
.toast-a { color: #b07d00; font-weight: 800; text-transform: uppercase; font-size: .82rem; }
#modal-root { display: none; }
#modal-root.on { display: block; position: fixed; inset: 0; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: rgba(3, 6, 15, .7); }
.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 28px)); max-height: calc(100% - 40px); overflow: auto;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.modal h2 { margin: 0 0 6px; font: 700 1.2rem var(--serif); }
.modal p { color: #d7dbea; }
.sigpad { width: 100%; aspect-ratio: 5 / 2; background: #f5f0e4; border-radius: 12px; touch-action: none; display: block; margin: 8px 0; }
#fx-root { display: none; }
#fx-root.on { display: block; position: fixed; inset: 0; z-index: 70; }
.reader { position: absolute; inset: 0; padding: calc(var(--sat) + 20px) 24px calc(var(--sab) + 30px); display: flex; flex-direction: column; align-items: center; text-align: center;
  background: radial-gradient(120% 70% at 50% 100%, rgba(255, 159, 67, .35) 0%, rgba(244, 167, 160, .1) 35%, rgba(10, 17, 40, 0) 70%), var(--navy); }
.rd-x { position: absolute; top: calc(var(--sat) + 10px); right: 12px; }
.rd-n { margin-top: 6px; color: var(--muted); font: 600 .85rem var(--label); }
.rd-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; max-width: 620px; }
.rd-t { font: 600 1.75rem/1.4 var(--serif); margin: 0; }
.rd-t.sm { font-size: 1.25rem; }
.rd-hint { color: var(--dim); font-size: .85rem; }
.rd-sun .ico { width: 64px; height: 64px; color: var(--gold-2); }

/* ---------- printable manual ---------- */
#print-root { display: none; }
@media print {
  @page { size: A4; margin: 12mm 13mm; }
  html, body { background: #fff !important; color: #0a1128; }
  #app, #topbar, #nav, #toast, #modal-root, #fx-root { display: none !important; }
  #print-root { display: block !important; font: 10.5pt/1.45 "Noto Serif", Cambria, Georgia, serif; color: #0a1128; }
  #print-root.lang-hi { font-family: Mukta, "Noto Sans Devanagari", sans-serif; }
  .pp { position: relative; page-break-after: always; break-after: page; min-height: 255mm; padding-bottom: 12mm; }
  .pp:last-child { page-break-after: auto; break-after: auto; }
  .pf { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font: 600 7pt Oswald, sans-serif; letter-spacing: .2em; color: #b08a14; }
  .pt { font-size: 18pt; margin: 0 0 1mm; text-align: center; color: #0a1128; }
  .pt.big { font-size: 26pt; }
  .ps { text-align: center; font-style: italic; color: #9a7610; margin: 0 0 2mm; }
  .pr { height: 1.2pt; background: #d4a017; margin: 3mm auto 5mm; width: 60%; }
  .pk { font: 600 8pt Oswald, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #b08a14; }
  .pc { text-align: center; padding-top: 30mm; }
  .pc .pk.mt { margin-top: 18mm; }
  .pname { font-size: 24pt; font-weight: 700; margin: 4mm 0 6mm; border-bottom: 1pt solid #d4a017; display: inline-block; min-width: 60%; padding-bottom: 2mm; }
  .pi { font-style: italic; margin: 6mm 10mm; }
  .pmade { margin-top: 20mm; font-size: 8pt; color: #666; }
  .pkv { margin: 0 auto; border-collapse: collapse; }
  .pkv td { padding: 1.5mm 4mm; text-align: left; }
  .pp.dark { background: #0a1128; color: #f5f0e4; padding: 10mm; height: 271mm; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp.dark .pt { color: #f5f0e4; }
  .pp.dark .pname { color: #f2c94c; }
  .pp.dark .psv img { filter: invert(1); }
  .pok { font-size: 14pt; font-weight: 700; color: #d4a017; }
  .pol { padding-left: 7mm; } .pol li { margin-bottom: 2mm; }
  .pdecl { margin-top: 6mm; padding: 4mm; border: 1pt solid #d4a017; text-align: center; background: #fbf6e6; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .psig { width: 100%; margin-top: 4mm; border-collapse: collapse; }
  .psig td { width: 33%; text-align: center; font-size: 8pt; color: #666; padding: 0 3mm; vertical-align: bottom; }
  .psv { min-height: 14mm; border-bottom: .8pt solid #b08a14; display: flex; align-items: flex-end; justify-content: center; color: #0a1128; font-size: 10.5pt; margin-bottom: 1mm; }
  .pp.dark .psv { color: #f5f0e4; }
  .psv img { max-height: 16mm; max-width: 100%; }
  .plist { padding-left: 7mm; } .plist li { margin: 0 0 2.5mm; padding-bottom: 1.5mm; border-bottom: .5pt solid #e5d6a8; }
  .pv { white-space: normal; padding: 1mm 0 2mm; border-bottom: .5pt solid #e5d6a8; }
  .pv.journal { border: 0; }
  .pl { border-bottom: .5pt solid #e5d6a8; }
  .p2col { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm 6mm; }
  .p2col.tight { font-size: 7.6pt; line-height: 1.2; }
  .parea h3, .pproj h3 { margin: 0 0 1mm; font-size: 11pt; color: #9a7610; }
  .pproj { margin-bottom: 5mm; }
  .pb { display: inline-block; width: 3.6mm; height: 3.6mm; border: .8pt solid #b08a14; border-radius: .8mm; text-align: center; line-height: 3.4mm; font-size: 8pt; vertical-align: -.5mm; }
  .pb.on { background: #f2c94c; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .p108 { margin: 0; padding-left: 9mm; } .p108 li { border-bottom: .4pt solid #e5d6a8; min-height: 3.9mm; padding-top: .2mm; }
  .pblank { display: inline-block; }
  .pgrid { width: 100%; border-collapse: collapse; font-size: 7pt; line-height: 1.15; margin: 0 0 4mm; break-inside: avoid; }
  .pgrid th, .pgrid td { border: .5pt solid #d9c78f; text-align: center; padding: .35mm 0; }
  .pgrid .prl { text-align: left; padding-left: 1.5mm; width: 42%; }
  .pgrid thead th { background: #0a1128; color: #f2c94c; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ptot td { font-weight: 700; }
  .pdh { display: flex; align-items: baseline; gap: 4mm; border-bottom: 1.2pt solid #d4a017; padding-bottom: 1.5mm; margin-bottom: 2mm; }
  .pday { background: #0a1128; color: #f2c94c; padding: .5mm 2.5mm; font: 700 9pt Oswald, sans-serif; letter-spacing: .1em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pdate { margin-left: auto; color: #666; font-size: 9pt; }
  .pband { background: #0a1128; color: #f2c94c; font: 600 7.5pt Oswald, sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 1mm 2mm; margin: 3mm 0 1mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-root.lang-hi .pband, #print-root.lang-hi .pk { font-family: Mukta, sans-serif; letter-spacing: 0; font-size: 9pt; }
  .pq { font-weight: 700; margin-top: 2mm; font-size: 9.5pt; }
  .pact { margin: .8mm 0; }
  .pmuted { color: #aaa; }
  .prit { font-size: 8pt; color: #555; margin: 1mm 0; }
  .pen { display: flex; flex-wrap: wrap; gap: 1mm 5mm; font-size: 9pt; }
  .pscore { display: flex; gap: 2mm; }
  .pscore span { width: 6mm; height: 6mm; border: .8pt solid #b08a14; border-radius: 50%; text-align: center; line-height: 5.6mm; font-size: 8pt; }
  .pscore span.on { background: #0a1128; color: #f2c94c; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pjh { display: flex; align-items: baseline; gap: 4mm; }
  .pquote { margin-top: 5mm; text-align: center; font-style: italic; color: #9a7610; font-size: 9pt; }
  .pp.yellow { height: 271mm; overflow: hidden; background: #f7cf3b; -webkit-print-color-adjust: exact; print-color-adjust: exact; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .poval { width: 150mm; height: 190mm; border: 1.5pt solid #7a5d00; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 30mm 22mm; text-align: center; }
  .pgoal { font-size: 15pt; font-weight: 700; color: #1d1806; }
  .pgimg { width: 38mm; height: 38mm; object-fit: cover; border-radius: 3mm; margin-top: 6mm; }
  .pgsym { font-size: 30pt; margin-top: 6mm; }
  .pp.yellow .pf { color: #6b5200; }
}

@media (min-width: 700px) {
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .areas { grid-template-columns: 1fr 1fr; gap: 0 12px; }
}
@media (max-width: 370px) {
  .tgrid .rl { width: 36%; font-size: .68rem; }
  .tc { width: 21px; height: 21px; }
  .hero-t .big { font-size: 2rem; }
}
