:root {
  --saffron: #e8772e;
  --saffron-d: #c75e1a;
  --saffron-l: #fdebdc;
  --cream: #fffaf4;
  --ink: #2d2620;
  --muted: #7b6f66;
  --line: #efe4d8;
  --card: #ffffff;
  --good: #2e7d4f;
  --bad: #c0392b;
  --radius: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1, h2, h3, h4 { margin: 0; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 32px 18px 40px; padding-top: calc(32px + env(safe-area-inset-top)); }
.brand { text-align: center; margin-bottom: 22px; }
.brand-logo { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 6px 20px rgba(232, 119, 46, 0.3); }
.brand h1 { font-size: 26px; margin-top: 12px; color: var(--saffron-d); }
.brand p { margin: 6px 0 0; }
.tabs-inline { display: flex; background: var(--saffron-l); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.tab-btn { flex: 1; border: 0; background: transparent; padding: 10px; font-size: 15px; font-weight: 600; border-radius: 9px; color: var(--muted); cursor: pointer; }
.tab-btn.active { background: #fff; color: var(--saffron-d); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

/* ---------- cards & forms ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); background: #fffdfb; border-radius: 10px; padding: 11px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--saffron); outline-offset: 0; border-color: transparent; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { border: 0; border-radius: 12px; padding: 13px 16px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; }
.btn.primary { background: var(--saffron); color: #fff; }
.btn.primary:active { background: var(--saffron-d); }
.btn.ghost { background: transparent; color: var(--bad); border: 1px solid var(--line); margin-top: 16px; }
.btn.busy, .btn:disabled { opacity: 0.6; }
.link { background: none; border: 0; color: var(--saffron-d); font-size: 14px; cursor: pointer; padding: 4px; }
.msg { margin: 14px 2px 0; font-size: 14px; min-height: 1em; }
.msg.bad { color: var(--bad); }
.msg.good { color: var(--good); }

/* ---------- layout ---------- */
#app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: linear-gradient(135deg, #f39a4f, var(--saffron));
  color: #fff;
}
.topbar .muted { color: rgba(255, 255, 255, 0.85); }
.hello { font-size: 18px; font-weight: 700; }
.install-btn { border: 1px solid rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.15); color: #fff; border-radius: 20px; padding: 7px 12px; font-weight: 600; font-size: 13px; }
main { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.section-title { font-size: 16px; margin: 20px 2px 8px; }
.section-title:first-child { margin-top: 4px; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.nav-btn { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; }
.nav-btn span { font-size: 22px; filter: grayscale(1); opacity: 0.6; }
.nav-btn.active { color: var(--saffron-d); }
.nav-btn.active span { filter: none; opacity: 1; }

/* ---------- today ---------- */
.date-row { display: flex; gap: 8px; align-items: center; }
.date-row input { text-align: center; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 24px; color: var(--saffron-d); cursor: pointer; }
.icon-btn:disabled { opacity: 0.35; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 6px; text-align: center; }
.stat-num { font-size: 24px; font-weight: 800; color: var(--saffron-d); }
.stat-lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.practice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.practice { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 0.15s, background 0.15s; }
.practice.done { border-color: var(--saffron); background: var(--saffron-l); }
.practice.saving { opacity: 0.6; pointer-events: none; }
.p-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.p-icon { font-size: 26px; }
.p-name { flex: 1; font-weight: 600; font-size: 15.5px; }
.p-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: #fff; }
.practice.done .p-check { background: var(--saffron); border-color: var(--saffron); }
.p-min { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px 52px; }
.p-min input { width: 76px; padding: 7px 8px; text-align: center; }
.mini-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; color: var(--saffron-d); cursor: pointer; }

/* ---------- logs ---------- */
.log-list { display: flex; flex-direction: column; gap: 8px; }
.log { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.log-date { min-width: 52px; text-align: center; font-weight: 700; font-size: 13px; color: var(--saffron-d); background: var(--saffron-l); border-radius: 8px; padding: 6px 4px; }
.log-body { flex: 1; min-width: 0; }
.log-title { font-weight: 600; }
.log-note { font-size: 14px; margin-top: 4px; white-space: pre-wrap; word-wrap: break-word; }
.del { border: 0; background: none; font-size: 18px; cursor: pointer; opacity: 0.6; padding: 4px; }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- progress ---------- */
.heatmap { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.hm { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; color: var(--muted); }
.hm.l0 { background: #f4ede6; }
.hm.l1 { background: #fbd8bd; color: var(--ink); }
.hm.l2 { background: #f6b17d; color: var(--ink); }
.hm.l3 { background: #ee8c45; color: #fff; }
.hm.l4 { background: var(--saffron-d); color: #fff; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 170px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-val { font-size: 11px; color: var(--muted); height: 16px; }
.bar-track { flex: 1; width: 100%; max-width: 34px; display: flex; align-items: flex-end; background: #f7f1ea; border-radius: 6px; }
.bar { width: 100%; background: var(--saffron); border-radius: 6px; min-height: 0; }
.bar-lbl { font-size: 12px; margin-top: 4px; color: var(--muted); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini { text-align: center; }
.pb-row { display: grid; grid-template-columns: 1fr 70px; grid-template-areas: "n n" "t c"; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pb-row:last-child { border-bottom: 0; }
.pb-name { grid-area: n; font-size: 14px; font-weight: 600; }
.pb-track { grid-area: t; height: 8px; align-self: center; background: #f4ede6; border-radius: 4px; overflow: hidden; }
.pb-fill { height: 100%; background: var(--saffron); }
.pb-num { grid-area: c; font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- profile ---------- */
.install-help { margin-top: 14px; }
.install-help h4 { margin-bottom: 6px; }
.install-help p { margin: 6px 0; font-size: 14px; }

/* ---------- misc ---------- */
.center { display: grid; place-items: center; min-height: 100vh; }
.spinner { width: 38px; height: 38px; border: 4px solid var(--saffron-l); border-top-color: var(--saffron); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 22px; font-size: 14px; opacity: 0; pointer-events: none; transition: 0.2s; z-index: 50; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); }

/* ---------- ideas board ---------- */
.top-actions { display: flex; gap: 6px; }
.btn.outline { background: #fff; color: var(--saffron-d); border: 1.5px solid var(--saffron); margin-top: 14px; }
.filter-row { display: flex; gap: 8px; margin: 18px 0 10px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--saffron-l); color: var(--saffron-d); border-color: var(--saffron); }
.idea { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.vote { min-width: 50px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; }
.vote span { font-size: 18px; filter: grayscale(1); opacity: 0.7; }
.vote b { font-size: 14px; color: var(--muted); }
.vote.on { border-color: var(--saffron); background: var(--saffron-l); }
.vote.on span { filter: none; opacity: 1; }
.vote.on b { color: var(--saffron-d); }
.idea-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #eee; color: #555; }
.badge.st-planned { background: #e3efff; color: #2457a6; }
.badge.st-in-progress { background: #fff3cd; color: #8a6100; }
.badge.st-done { background: #dff3e6; color: var(--good); }
.badge.st-not-now { background: #f3e3e3; color: #8a3a3a; }
.admin-reply { margin-top: 8px; font-size: 13.5px; background: #fff7ef; border-left: 3px solid var(--saffron); padding: 6px 8px; border-radius: 4px; }

/* ---------- v2: nav, offline, routine, languages ---------- */
.nav-btn b { font-weight: 600; font-size: 10.5px; line-height: 1.1; text-align: center; }
.offline-bar { background: #fff3cd; color: #7a5a00; font-size: 13px; padding: 8px 14px; text-align: center; }
.lang-top { display: flex; justify-content: flex-end; }
.lang-top select { width: auto; padding: 6px 10px; font-size: 14px; }
.routine { gap: 10px; }
.routine input { padding: 9px 10px; }
.pe-row { display: grid; grid-template-columns: 44px 1fr 64px 32px 32px; gap: 6px; align-items: center; margin-bottom: 8px; }
.pe-row input { padding: 8px; }
.pe-ico { text-align: center; }
.x-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.x-btn:disabled { opacity: 0.3; }
.pe-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.btn.sm { width: auto; padding: 9px 16px; font-size: 14px; }
.row-check { flex-direction: row; align-items: center; gap: 8px; margin-top: 18px; font-weight: 500; }
.row-check input { width: auto; }
.danger { color: var(--bad) !important; }

/* ---------- builder ---------- */
.b-head { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.b-head .section-title { margin: 14px 2px 6px; }
.set-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.set-card { display: flex; align-items: center; gap: 10px; padding: 12px; }
.set-main { flex: 1; min-width: 0; cursor: pointer; }
.set-name { font-weight: 700; }
.play-btn { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--saffron); color: #fff; font-size: 18px; cursor: pointer; box-shadow: 0 3px 10px rgba(232, 119, 46, 0.35); }
.more-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; color: var(--muted); cursor: pointer; }
.ed-top { display: flex; gap: 8px; align-items: center; }
.ed-name { font-size: 18px; font-weight: 700; }
.ed-total { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; position: sticky; top: 70px; z-index: 3; background: var(--saffron-l); border-color: var(--saffron); }
.ed-total b { color: var(--saffron-d); font-size: 18px; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.step { padding: 0; overflow: hidden; }
.step.open { border-color: var(--saffron); }
.step-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.step-ico { font-size: 22px; cursor: pointer; }
.step-txt { flex: 1; min-width: 0; cursor: pointer; }
.step-title { font-weight: 600; }
.step-ctl { display: flex; gap: 4px; }
.step-ctl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.step-ctl button:disabled { opacity: 0.3; }
.step-body { padding: 0 12px 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.phase-head { margin-bottom: -4px; }
.phases { display: flex; flex-direction: column; gap: 6px; }
.phase-row { display: grid; grid-template-columns: 1fr 64px 1fr 32px; gap: 6px; align-items: center; }
.phase-row input, .phase-row select { padding: 8px; font-size: 15px; }
.step-actions { display: flex; justify-content: space-between; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ed-save { display: flex; gap: 8px; position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); }
.ed-save .btn { margin: 0; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.rec-box { background: #fffaf4; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rec-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { flex-direction: row; display: inline-flex; color: var(--muted); }
.rec-timer { font-size: 40px; font-weight: 800; text-align: center; color: var(--bad); margin: 16px 0; }

/* bottom sheet */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet h3 { margin-bottom: 10px; }
.menu-list { display: flex; flex-direction: column; }
.menu-list button { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 14px 6px; font-size: 16px; cursor: pointer; color: var(--ink); }
.btn.ghost-plain { background: none; color: var(--muted); margin-top: 8px; }

/* player */
.player { position: fixed; inset: 0; z-index: 70; background: radial-gradient(circle at 50% 35%, #fff5ea, #fde3cc 60%, #f6c79f); display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom)); }
.pl-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--saffron-d); }
.pl-set { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }
.pl-rem { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-progress { height: 5px; background: rgba(199, 94, 26, 0.15); border-radius: 3px; margin: 12px 0; overflow: hidden; }
.pl-progress div { height: 100%; background: var(--saffron); width: 0; }
.pl-seek { margin: 10px 0 4px; }
.pl-seek input[type=range] { width: 100%; margin: 0; height: 28px; accent-color: var(--saffron); background: transparent; touch-action: none; }
.pl-seek-t { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -2px; font-variant-numeric: tabular-nums; }
.pl-seek-t span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 75%; }
.pl-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.pl-group { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; min-height: 16px; }
.pl-step { font-size: 22px; font-weight: 800; color: var(--ink); }
.pl-circle-wrap { width: 260px; height: 260px; display: grid; place-items: center; margin: 14px 0; }
.pl-circle { width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #ffd9b5 55%, #f39a4f 100%); box-shadow: 0 0 60px rgba(232, 119, 46, 0.45); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform 0.25s linear; will-change: transform; }
.pl-circle.k-rest { background: radial-gradient(circle, #fff 0%, #e6eef7 60%, #b7c9de 100%); box-shadow: 0 0 40px rgba(120, 150, 190, 0.4); }
.pl-phase { font-size: 24px; font-weight: 800; color: var(--saffron-d); }
.pl-circle.k-rest .pl-phase { color: #456; }
.pl-count { font-size: 46px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.pl-info { font-size: 15px; font-weight: 600; color: var(--ink); min-height: 20px; }
.pl-next { font-size: 13px; min-height: 18px; }
.pl-ctl { display: flex; justify-content: center; align-items: center; gap: 28px; }
.pl-btn { width: 58px; height: 58px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.8); font-size: 22px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.pl-btn.big { width: 78px; height: 78px; background: var(--saffron); color: #fff; font-size: 30px; }
.pl-done { margin: auto; text-align: center; max-width: 360px; width: 100%; }
.pl-done-ico { font-size: 64px; }
.pl-done h2 { color: var(--saffron-d); margin: 8px 0; }
.pl-break { background: rgba(255,255,255,0.7); border-radius: 12px; padding: 8px 14px; margin: 14px 0; text-align: left; }
.pl-break div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pl-break div:last-child { border-bottom: 0; }

/* ---------- sankalp ---------- */
.sankalp-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.sankalp { padding: 12px; background: linear-gradient(135deg, #fff, #fff6ec); }
.sankalp.fulfilled { border-color: #e9c46a; background: linear-gradient(135deg, #fffdf3, #fff1c9); }
.sk-top { display: flex; gap: 12px; align-items: center; }
.sk-ring { --p: 0; width: 62px; height: 62px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--saffron) calc(var(--p) * 1%), #f4ede6 0); }
.sk-ring span { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; color: var(--saffron-d); font-size: 16px; line-height: 1; }
.sk-ring small { font-size: 10px; color: var(--muted); font-weight: 600; }
.sk-txt { flex: 1; min-width: 0; }
.sk-title { font-weight: 700; }
.sk-status { margin-top: 3px; font-weight: 600; }
.sk-wish { margin-top: 10px; font-size: 14px; font-style: italic; color: #6b4a2b; }
.sk-surrender { margin-top: 8px; font-size: 14px; background: #fff; border-left: 3px solid #e9c46a; padding: 6px 10px; border-radius: 4px; }
.sk-celebrate { text-align: center; padding: 6px 0 4px; }
.sk-celebrate h2 { color: var(--saffron-d); margin: 6px 0; }
.sk-cont { font-size: 12.5px; align-self: end; }
.sk-form textarea { font-size: 15px; }

.start-big { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 19px; padding: 14px; margin-bottom: 12px; box-shadow: 0 6px 18px rgba(232, 119, 46, 0.35); }
.start-big small { font-size: 12.5px; font-weight: 500; opacity: 0.9; }
.pl-info.pl-say { font-size: 19px; font-weight: 600; max-width: 340px; line-height: 1.45; color: #4a3422; background: rgba(255,255,255,0.65); padding: 10px 14px; border-radius: 12px; }
.pl-circle.k-speak .pl-phase { font-size: 18px; }
.speak-prev { display: flex; align-items: flex-end; }
.sel-prev { display: flex; gap: 6px; align-items: center; }
.sel-prev select { flex: 1; min-width: 0; }
.prev-btn { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 16px; cursor: pointer; }
.phase-row .prev-btn { width: 34px; height: 34px; }
.step-actions { flex-wrap: wrap; gap: 6px; }
.pl-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.8); font-size: 16px; color: var(--ink); margin-right: 8px; flex-shrink: 0; cursor: pointer; }
.pl-top .pl-set { flex: 1; }
.pl-ctl2 { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pl-chip { border: 0; background: rgba(255,255,255,0.85); border-radius: 20px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pl-chip.ok { background: #e6f4ea; color: var(--good); }
.sheet-wrap { z-index: 90; }
.sheet { max-height: 80vh; overflow-y: auto; }
.pl-steps { display: flex; flex-direction: column; }
.pl-steprow { display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 6px; font-size: 15px; cursor: pointer; color: var(--ink); }
.pl-steprow small { color: var(--muted); display: block; font-size: 12px; }
.pl-steprow.done { color: var(--muted); }
.pl-steprow.on { background: var(--saffron-l); font-weight: 700; border-radius: 8px; }

/* ---------- inspiration ---------- */
.tabs-inline.sm .tab-btn { font-size: 13px; padding: 8px 4px; }
.cat-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.cat-row .chip { white-space: nowrap; flex-shrink: 0; }
.in-list { display: flex; flex-direction: column; gap: 10px; }
.in-card { padding: 12px; overflow: hidden; }
.in-card.quote { background: linear-gradient(135deg, #fffaf3, #fff1e2); }
.in-card.quote .in-body { font-size: 17px; line-height: 1.5; font-style: italic; color: #4a3422; }
.in-title { font-weight: 700; margin-bottom: 4px; }
.in-body { font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.in-body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.in-img { width: calc(100% + 24px); margin: -12px -12px 10px; display: block; max-height: 420px; object-fit: cover; }
.in-yt { position: relative; display: block; margin: -12px -12px 10px; }
.in-yt img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.in-yt span { position: absolute; inset: 0; margin: auto; width: 60px; height: 42px; border-radius: 12px; background: rgba(220, 0, 0, 0.9); color: #fff; display: grid; place-items: center; font-size: 20px; }
.in-link { display: inline-block; margin-top: 6px; color: var(--saffron-d); font-weight: 600; text-decoration: none; word-break: break-all; }
.in-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.in-meta .del { margin-left: auto; }
.in-today { margin-bottom: 12px; }
.in-today-h { font-size: 13px; font-weight: 700; color: var(--saffron-d); margin: 0 2px 6px; }
.kind-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kind { flex-direction: column; align-items: center; gap: 2px; font-size: 22px; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 4px; cursor: pointer; text-align: center; }
.kind span { font-size: 11px; color: var(--muted); font-weight: 600; line-height: 1.2; }
.kind input { display: none; }
.kind.on { border-color: var(--saffron); background: var(--saffron-l); }
.center-sm { display: grid; place-items: center; padding: 40px 0; }
.nav-btn b { font-size: 10px; }

/* ---------- reminders ---------- */
.rem-open { margin: 0 0 12px; }
.push-card { display: flex; flex-direction: column; gap: 10px; font-size: 14px; margin-bottom: 10px; }
.push-card.ok { background: #e6f4ea; border-color: #bfe3cb; }
.rem-list { display: flex; flex-direction: column; gap: 8px; }
.rem { display: flex; align-items: center; gap: 10px; padding: 12px; }
.rem.off { opacity: 0.55; }
.rem-main { flex: 1; min-width: 0; cursor: pointer; }
.rem-title { font-weight: 700; }
.rem-msg { margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; flex-direction: row; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #ddd; border-radius: 13px; transition: 0.2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch input:checked + span { background: var(--saffron); }
.switch input:checked + span::after { transform: translateX(20px); }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; }
.preset span { font-size: 22px; }
.preset small { font-weight: 500; font-size: 11px; color: var(--muted); }
.day-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.day { flex-direction: row; border: 1.5px solid var(--line); border-radius: 18px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.day input { display: none; }
.day.on { border-color: var(--saffron); background: var(--saffron-l); color: var(--saffron-d); }
.rem-alert { position: fixed; inset: 0; z-index: 100; background: rgba(45, 38, 32, 0.55); display: grid; place-items: center; padding: 20px; }
.rem-box { background: #fff; border-radius: 20px; padding: 22px 18px; width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; gap: 10px; animation: pop 0.25s ease-out; }
.rem-box h2 { color: var(--saffron-d); }
.rem-box p { margin: 0; font-size: 16px; }
.rem-ico { font-size: 52px; animation: ring 1s ease-in-out 3; }
.rem-row { display: flex; gap: 8px; align-items: center; }
.rem-row .btn { flex: 1; margin: 0; }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }

/* ---------- reminders: auto start ---------- */
.rem-auto { font-size: 14px; background: var(--saffron-l); color: var(--saffron-d); border-radius: 10px; padding: 8px 10px; }
.link-btn { border: 0; background: none; color: var(--saffron-d); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }

/* ---------- counters ---------- */
em.badge { font-style: normal; background: #d93025; color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px; border-radius: 9px; display: inline-block; text-align: center; }
.chat-btn { position: relative; font-size: 18px; }
.chat-btn em.badge { position: absolute; top: -4px; right: -4px; }
.nav-btn { position: relative; }
.nav-btn em.nav-badge { position: absolute; top: 2px; left: 55%; }

/* ---------- sangha ---------- */
.sg-tabs { display: flex; gap: 4px; background: var(--saffron-l); border-radius: 12px; padding: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.sg-tabs::-webkit-scrollbar { display: none; }
.sg-tab { position: relative; flex: 0 0 auto; min-width: 64px; border: 0; background: none; border-radius: 9px; padding: 6px 8px; font-size: 11px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; line-height: 1.15; }
.sg-tab span { font-size: 18px; }
.sg-tab.on { background: #fff; color: var(--saffron-d); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
.sg-tab em.badge { position: absolute; top: 0; right: 4px; }
.sg-private { font-size: 13px; background: #fff8ec; margin-bottom: 10px; }
.lb-list, .ch-list, .pp-list, .cv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.lb-row.me { border-color: var(--saffron); background: var(--saffron-l); }
.lb-rank { width: 34px; text-align: center; font-weight: 700; font-size: 18px; color: var(--muted); }
.lb-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { color: var(--muted); font-size: 12px; }
.lb-val { font-weight: 700; color: var(--saffron-d); white-space: nowrap; }
.ch { display: flex; flex-direction: column; gap: 6px; }
.ch.ended { opacity: 0.7; }
.ch-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ch p { margin: 0; }
.ch-prog { height: 8px; border-radius: 4px; background: var(--saffron-l); overflow: hidden; }
.ch-prog div { height: 100%; background: var(--saffron); }
.ch-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.danger { color: #b3261e; }
.sg-search { width: 100%; margin-bottom: 10px; }
.pp, .cv { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pp-main, .cv-main { flex: 1; min-width: 0; cursor: pointer; }
.pp-acts { display: flex; gap: 6px; }
.pp-acts a.mini-btn { display: grid; place-items: center; text-decoration: none; }
.cv { cursor: pointer; }
.cv.unread { border-color: var(--saffron); }
.cv-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pc { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pc-ava { width: 64px; height: 64px; border-radius: 50%; background: var(--saffron-l); color: var(--saffron-d); display: grid; place-items: center; font-size: 28px; font-weight: 700; flex-shrink: 0; }
.pc-ava.sm { width: 42px; height: 42px; font-size: 18px; }
.pc-streak { font-weight: 700; color: var(--saffron-d); }
.pc-bio { margin: 4px 0; font-style: italic; }
.pc-acts { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; }
.pc-acts .btn { margin: 0; text-align: center; text-decoration: none; }
.th-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.th-name { flex: 1; display: flex; flex-direction: column; cursor: pointer; }
.th-msgs { display: flex; flex-direction: column; gap: 6px; height: calc(100vh - 330px); min-height: 240px; overflow-y: auto; padding: 8px 4px; background: #fffaf5; border: 1px solid var(--line); border-radius: 14px; }
.th-day { align-self: center; font-size: 11px; color: var(--muted); background: #fff; border-radius: 10px; padding: 2px 10px; margin: 4px 0; }
.bub { max-width: 80%; align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 10px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; }
.bub.mine { align-self: flex-end; background: var(--saffron-l); border-color: #f5d4b8; border-radius: 14px 14px 4px 14px; }
.bub small { display: block; text-align: right; font-size: 10px; color: var(--muted); margin-top: 2px; }
.th-send { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.th-send textarea { flex: 1; resize: none; min-height: 44px; }
.th-send .btn { margin: 0; height: 44px; }
.th-note { text-align: center; padding: 10px; }
.pv-form h3 { margin: 0 0 4px; }
.pv-opt { flex-direction: column; align-items: flex-start; gap: 2px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pv-opt input { display: none; }
.pv-opt small { color: var(--muted); font-weight: 400; }
.pv-opt.on { border-color: var(--saffron); background: var(--saffron-l); }
.pv-more { display: flex; flex-direction: column; gap: 8px; }
.pv-more.dim { opacity: 0.5; }
.pv-more .row-check { margin-top: 0; }
.ch-form { margin-top: 12px; }

/* ---------- feed ---------- */
.fd-compose { width: 100%; text-align: left; color: var(--muted); font-size: 15px; cursor: pointer; margin-bottom: 10px; }
.fd-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.fd { padding: 12px; overflow: hidden; }
.fd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fd-who { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.fd-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-cat { font-size: 11px; font-weight: 700; background: var(--saffron-l); color: var(--saffron-d); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 18px; }
.fd-body { font-size: 15px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.fd-body.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.fd-img { width: calc(100% + 24px); margin: 10px -12px 0; display: block; max-height: 480px; object-fit: cover; }
.fd-event { background: #fff8ec; border: 1px solid #f5d4b8; border-radius: 12px; padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 14px; }
.fd-acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fd-re { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 5px 10px; font-size: 16px; cursor: pointer; }
.fd-re small { font-size: 12px; font-weight: 700; color: var(--muted); }
.fd-re.on { background: var(--saffron-l); border-color: var(--saffron); }
.fd-cm { margin-left: auto; }
.fd-prev { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.cat-row.wrap { flex-wrap: wrap; overflow: visible; }
.cm-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.cm { font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.cm b { cursor: pointer; }
.cm-acts { display: flex; gap: 12px; font-size: 12px; margin-top: 2px; }

/* ---------- business + map ---------- */
.bz-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.bz-filters input[type=search] { width: 100%; }
.bz-filters .btn { margin: 0; width: 100%; }
.bz-map { height: 52vh; min-height: 300px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 8px; z-index: 0; }
.bz-pick { height: 220px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.bz-count { margin: 4px 2px 8px; }
.bz-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.bz { display: flex; flex-direction: column; gap: 4px; transition: box-shadow 0.3s; }
.bz.flash { box-shadow: 0 0 0 3px var(--saffron); }
.bz-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.bz-dist { font-weight: 700; color: var(--saffron-d); white-space: nowrap; }
.bz-desc { margin: 2px 0; }
.bz .ch-acts a.chip { text-decoration: none; }
.leaflet-popup-content { font-size: 13px; line-height: 1.4; }

/* ---------- profile card extras ---------- */
.pc-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-weight: 700; color: var(--saffron-d); font-size: 14px; }
.pc-soc { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pc-soc a { text-decoration: none; }
.pc-courses { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 6px; background: #fffaf5; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pc-course { display: flex; flex-direction: column; font-size: 14px; }
.pc-course small { color: var(--muted); font-size: 12px; }
.pc-course.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pc-course.row span { display: flex; flex-direction: column; }
.cr-list, .mb-list { margin-top: 6px; }
.soc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-more h4 { margin: 8px 0 0; }

/* ---------- invite / referral ---------- */
.inv-banner { background: #fff8ec; border: 1px solid #f5d4b8; border-radius: 14px; padding: 12px; margin-bottom: 12px; text-align: center; font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.inv-banner small { color: var(--muted); font-size: 12px; }
.inv-top { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.inv-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.inv-row:last-child { border-bottom: 0; }
.inv-row.me { background: var(--saffron-l); border-radius: 8px; padding: 6px; }
.inv-row > span:first-child { width: 30px; text-align: center; }
.inv-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inv-n small { color: var(--muted); font-size: 12px; }
.inv-cta { width: 100%; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: pointer; background: linear-gradient(135deg, #fff4e6, #ffe7cf); border-color: #f5d4b8; margin-bottom: 10px; }
.inv-cta small { width: 100%; color: var(--muted); font-size: 12px; }
.inv-hero h2 { margin: 0 0 4px; color: var(--saffron-d); }
.inv-link { display: flex; gap: 8px; margin: 8px 0; }
.inv-link input { flex: 1; min-width: 0; font-size: 14px; }
.inv-link .btn { margin: 0; }
.inv-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.inv-acts .btn { margin: 0; padding: 10px 4px; font-size: 14px; text-align: center; text-decoration: none; }
.inv-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.inv-qr svg { width: 220px; height: 220px; background: #fff; }
.inv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.inv-stats .card { text-align: center; padding: 10px 4px; display: flex; flex-direction: column; margin: 0; }
.inv-stats b { font-size: 24px; color: var(--saffron-d); }
.inv-stats small { font-size: 11px; color: var(--muted); }
.inv-tier { display: flex; flex-direction: column; gap: 8px; }
.inv-badge { display: flex; align-items: center; gap: 12px; }
.inv-badge > span { font-size: 40px; }
.inv-badge div { display: flex; flex-direction: column; }
.inv-badge small { color: var(--muted); font-size: 12px; }
.inv-by { display: flex; flex-direction: column; gap: 4px; background: #f3fbf5; border-color: #bfe3cb; }
.inv-by small { font-size: 12px; color: var(--muted); }
.inv-tiers { display: flex; flex-direction: column; gap: 6px; }
.inv-trow { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; opacity: 0.75; }
.inv-trow.done { background: var(--saffron-l); opacity: 1; }
.inv-trow > span:first-child { font-size: 24px; }
.inv-trow div { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.inv-trow small { color: var(--muted); font-size: 12px; }
.inv-per { margin: 0; }
.pc-tier { font-size: 20px; }
.pc-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* ---------- outreach (private follow-up list) ---------- */
.tabs-inline .tab-btn { white-space: nowrap; }
.or-hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, #fff4e6, #ffe7cf); border-color: #f5d4b8; }
.or-hero > div:first-child { display: flex; flex-direction: column; }
.or-hero small { color: var(--muted); font-size: 12px; }
.or-nums { display: flex; gap: 14px; }
.or-nums span { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); }
.or-nums b { font-size: 22px; color: var(--ink, #333); }
.or-nums .hot b { color: #c0392b; }
.or-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.or-acts .btn { margin: 0; padding: 9px 6px; font-size: 13px; }
.or-h { margin: 12px 2px 6px; font-size: 14px; }
.or-h small { color: var(--muted); font-weight: 500; }
.or-task { display: flex; align-items: center; gap: 8px; padding: 10px; margin-bottom: 8px; }
.or-t-main { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.or-t-main small { color: var(--muted); font-size: 12px; }
.or-t-acts { display: flex; gap: 4px; flex-shrink: 0; }
.or-t-acts .chip { padding: 6px 9px; }
.or-search { width: 100%; margin-bottom: 8px; }
.or-person { display: flex; gap: 10px; align-items: flex-start; padding: 10px; margin-bottom: 8px; cursor: pointer; }
.or-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--saffron-l); color: var(--saffron-d); display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.or-ava.org { background: #eef3fb; }
.or-p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.or-p-main small { color: var(--muted); font-size: 12px; }
.or-p-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.or-stage, .or-due, .or-tag { font-size: 11px; font-weight: 600; border-radius: 10px; padding: 2px 8px; background: #f2f2f2; color: #555; white-space: nowrap; }
.or-stage.s-did_hp, .or-stage.s-daily_sadhana, .or-stage.s-next_course { background: #e8f6ec; color: #1f7a3d; }
.or-stage.s-volunteer, .or-stage.s-teacher { background: var(--saffron-l); color: var(--saffron-d); }
.or-stage.s-interested, .or-stage.s-registered { background: #eef3fb; color: #2c5aa0; }
.or-due.hot { background: #fdecea; color: #c0392b; }
.or-funnel { display: flex; flex-direction: column; gap: 6px; }
.or-f-row { display: grid; grid-template-columns: 9.5em 1fr 2.2em; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; font-size: 13px; text-align: left; cursor: pointer; }
.or-f-bar { height: 12px; background: #f3f3f3; border-radius: 6px; overflow: hidden; }
.or-f-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f4a259, #e8772e); border-radius: 6px; min-width: 2px; }
.or-f-row b { text-align: right; }
.or-path { display: flex; justify-content: space-between; margin: 10px 0; font-size: 18px; }
.or-path span { opacity: 0.25; filter: grayscale(1); }
.or-path span.on { opacity: 1; filter: none; }
.or-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.or-quick .btn { margin: 0; flex: 1 1 auto; text-decoration: none; text-align: center; }
.or-sub { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.or-ftask { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.or-addtask, .or-note, .or-cfind { display: flex; gap: 6px; }
.or-addtask input, .or-note input, .or-cfind input { flex: 1; min-width: 0; }
.or-addtask input[type=date] { flex: 0 0 9.5em; }
.or-note select { flex: 0 0 auto; max-width: 8em; }
.or-tl { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow-y: auto; }
.or-ev { display: flex; gap: 8px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.or-ev > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.or-ev small { color: var(--muted); font-size: 11px; }
.or-notes { white-space: pre-wrap; background: #fafafa; border-radius: 10px; padding: 8px; }
.or-courses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.or-courses .chip { font-size: 12px; padding: 5px 10px; }
.or-form .tabs-inline .tab-btn { cursor: pointer; text-align: center; }
.or-text { width: 100%; font-size: 14px; line-height: 1.4; margin-top: 8px; }
.or-tpls .chip { font-size: 12px; }
.or-send { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.or-send .btn { margin: 0; flex: 1 1 30%; }
.or-tdet { margin: 8px 0; }
.or-tdet summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
.or-tpl { border-top: 1px solid var(--line); padding: 8px 0; position: relative; }
.or-tpl pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; margin: 4px 0 0; color: #444; }
.or-tpl [data-del] { position: absolute; right: 0; top: 6px; }
.or-c { display: flex; gap: 10px; align-items: flex-start; padding: 10px; margin-bottom: 6px; cursor: pointer; }
.or-c div { display: flex; flex-direction: column; }
.or-c small { color: var(--muted); font-size: 12px; }
.or-today { width: 100%; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; cursor: pointer; background: #fff8ec; border-color: #f5d4b8; margin: 8px 0; }
.or-today small { width: 100%; color: var(--muted); font-size: 12px; }

/* ---------- centres ---------- */
.ce-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.ce-roles .btn { margin: 0; }
.ce-p { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 6px; cursor: pointer; }
.ce-p > span { font-size: 22px; }
.ce-p div { flex: 1; display: flex; flex-direction: column; }
.ce-p small { color: var(--muted); font-size: 12px; }

/* ---------- donate ---------- */
.dn-hero { text-align: center; }
.dn-hero h3 { margin: 4px 0; color: var(--saffron-d); }
.dn-ico { font-size: 40px; }
.dn-note { background: #fff8ec; border-radius: 10px; padding: 8px; white-space: pre-wrap; }
.dn-upi { display: flex; flex-direction: column; gap: 10px; }
.dn-amts { display: flex; flex-wrap: wrap; gap: 6px; }
.dn-amts .chip { font-size: 15px; padding: 8px 14px; }
.dn-upi .btn { margin: 0; text-align: center; text-decoration: none; }
.dn-qr { display: flex; justify-content: center; }
.dn-qr svg { width: 200px; height: 200px; background: #fff; }
.dn-intl { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.dn-intl small { color: var(--muted); }
.dn-admin { border: 2px dashed #f5d4b8; }

/* player start / end times */
.pl-clock { text-align: center; font-size: 13px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.pl-times { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0; }
.pl-times div { display: flex; flex-direction: column; align-items: center; background: var(--saffron-l); border-radius: 12px; padding: 8px 14px; }
.pl-times small { color: var(--muted); font-size: 12px; }
.pl-times b { font-size: 20px; color: var(--saffron-d); }
.pl-times span { font-size: 20px; color: var(--muted); }
.ses-card { display: flex; flex-direction: column; gap: 8px; }
.ses-row { display: flex; gap: 10px; align-items: center; }
.ses-row div { display: flex; flex-direction: column; }
.ses-row small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- dincharya ---------- */
.rt-card { display: flex; flex-direction: column; gap: 6px; }
.rt-head { display: flex; justify-content: space-between; align-items: center; }
.rt-head span { color: var(--muted); font-size: 13px; }
.rt-head span b { color: var(--saffron-d); font-size: 16px; }
.rt-bar { height: 8px; background: #f3f3f3; border-radius: 5px; overflow: hidden; }
.rt-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f4a259, #2e9e57); border-radius: 5px; transition: width .3s; }
.rt-part { border-top: 1px solid var(--line); }
.rt-ph { width: 100%; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 0; font-weight: 700; font-size: 14px; cursor: pointer; color: inherit; }
.rt-ph small { color: var(--muted); font-weight: 500; }
.rt-ph span { margin-left: auto; color: var(--muted); }
.rt-row { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 2px; text-align: left; cursor: pointer; color: inherit; border-radius: 8px; }
.rt-row:active { background: var(--saffron-l); }
.rt-row.s-done .rt-t { opacity: .7; }
.rt-st { width: 22px; text-align: center; }
.rt-ic { width: 22px; text-align: center; font-size: 17px; }
.rt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.rt-t small { color: var(--muted); font-size: 12px; }
.rt-acts { display: flex; gap: 6px; margin-top: 4px; }
.rt-acts .btn { margin: 0; flex: 1; }
.rt-review h4 { margin: 12px 0 4px; }
.rt-score { text-align: center; margin: 6px 0; }
.rt-score b { font-size: 34px; color: var(--saffron-d); display: block; }
.rt-score small { color: var(--muted); }
.rt-rv { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rt-rv input { margin-top: 3px; padding: 4px 6px; font-size: 13px; max-width: 120px; }
.rt-btns { display: flex; gap: 3px; flex-shrink: 0; }
.rt-btns button, .rt-mood button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 5px 7px; font-size: 16px; opacity: .45; cursor: pointer; }
.rt-btns button.on, .rt-mood button.on { opacity: 1; border-color: var(--saffron); background: var(--saffron-l); }
.rt-mood { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.rt-mood button { font-size: 26px; padding: 4px 8px; }
.rt-ed { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; }
.rt-ed.off { opacity: .45; }
.rt-ed .chip { padding: 5px 9px; }
.rt-days { display: flex; flex-wrap: wrap; gap: 5px; }
.rt-days .chip { padding: 5px 10px; font-size: 12px; cursor: pointer; }
.rt-hist { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; align-items: end; height: 130px; padding: 10px 8px 6px; }
.rt-hb { border: 0; background: none; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; padding: 0; cursor: pointer; }
.rt-hb i { width: 100%; border-radius: 4px 4px 0 0; display: block; }
.rt-hb i.hi { background: #2e9e57; } .rt-hb i.mid { background: #f4a259; } .rt-hb i.lo { background: #e57373; } .rt-hb i.none { background: #e5e5e5; }
.rt-hb small { font-size: 10px; color: var(--muted); }

/* ---------- to-do ---------- */
.td-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; }
.td-add input { flex: 1; min-width: 0; }
.td-add .btn { margin: 0; padding: 9px 14px; }
.td-preview { width: 100%; }
.td-preview:empty { display: none; }
.td-tabs { display: flex; gap: 2px; background: var(--saffron-l); border-radius: 12px; padding: 3px; overflow-x: auto; margin-bottom: 8px; }
.td-tabs .sg-tab { flex: 1 0 auto; }
.td-search input { width: 100%; margin-bottom: 6px; }
.td-row { display: flex; align-items: flex-start; gap: 10px; background: #fff; border: 1px solid var(--line); border-left: 4px solid transparent; border-radius: 12px; padding: 10px; margin-bottom: 6px; transition: opacity .3s; }
.td-row.pr1 { border-left-color: #4a7fd4; } .td-row.pr2 { border-left-color: #f08a24; } .td-row.pr3 { border-left-color: #d63b3b; }
.td-row.done { opacity: .5; }
.td-row.done .td-title { text-decoration: line-through; }
.td-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #bbb; background: #fff; flex-shrink: 0; cursor: pointer; color: #fff; font-size: 13px; line-height: 1; padding: 0; margin-top: 1px; }
.td-row.done .td-check, .td-sub.done .td-check { background: #2e9e57; border-color: #2e9e57; }
.td-check.sm { width: 20px; height: 20px; font-size: 11px; }
.td-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.td-title { font-size: 15px; word-break: break-word; }
.td-main small { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.td-late { color: #c0392b; font-weight: 600; }
.td-star { border: 0; background: none; font-size: 18px; color: #bbb; cursor: pointer; padding: 0 2px; }
.td-star.on { color: #f0a500; }
.or-h.hot { color: #c0392b; }
.td-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.td-list { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; text-align: left; }
.td-list span { font-size: 20px; }
.td-list b { flex: 1; font-size: 14px; }
.td-list em { font-style: normal; color: var(--muted); font-size: 13px; }
.td-list.add { border-style: dashed; color: var(--saffron-d); }
.td-cal { padding: 10px; }
.td-cal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.td-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.td-cal-g > small { color: var(--muted); font-size: 11px; }
.td-cd { border: 0; background: #faf7f3; border-radius: 8px; min-height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 4px 0; cursor: pointer; color: inherit; }
.td-cd b { font-size: 13px; font-weight: 600; }
.td-cd i { font-style: normal; font-size: 11px; color: var(--saffron-d); line-height: 1; }
.td-cd.today { border: 2px solid var(--saffron); }
.td-cd.sel { background: var(--saffron); color: #fff; }
.td-cd.sel i { color: #fff; }
.td-cd.late i { color: #c0392b; }
.td-form textarea[name=title] { font-size: 16px; font-weight: 600; }
.td-subs { display: flex; flex-direction: column; gap: 6px; background: #faf7f3; border-radius: 12px; padding: 10px; }
.td-sub { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.td-sub span { flex: 1; }
.td-sub.done span { text-decoration: line-through; opacity: .6; }
.td-sub .chip { padding: 3px 8px; font-size: 11px; }
@media (max-width: 430px) { #ideasBtn span { display: none; } .top-actions .install-btn { padding-left: 10px; padding-right: 10px; } }
/* player: dark screen + help */
.pl-dark { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(24px + env(safe-area-inset-bottom)); cursor: pointer; }
.pl-dark-t { color: #222; font-size: 13px; animation: plDarkFade 6s forwards; }
@keyframes plDarkFade { 0% { color: #777; } 100% { color: #1a1a1a; } }
.pl-help p { margin: 8px 0; font-size: 14px; }
.pl-help ol { padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.rt-when { color: var(--saffron-d); font-weight: 600; }
.rt-pr { color: var(--saffron-d); font-weight: 600; margin-left: 6px; }
.rt-late { display: block; color: #c0392b; font-size: 12px; font-weight: 600; }
.rt-preview { background: var(--saffron-l); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.rt-preview:empty { display: none; }
/* backup */
.bk-info { display: flex; flex-direction: column; gap: 4px; }
.bk-top { margin-top: 8px; }
.bk-file { display: block; text-align: center; cursor: pointer; }
.bk-status:empty { display: none; }
.bk-move-card { max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.bk-move-card .btn { margin: 0; text-align: center; text-decoration: none; }
.bk-move-card ol { padding-left: 18px; margin: 0; }
