/* Daybook — light, calm, made for one thumb on a phone. */
:root {
  --bg: #f3f4f8; --card: #ffffff; --ink: #1f2433; --ink-2: #4b5263; --muted: #6b7280; --line: #e4e6ee; --soft: #f6f7fb;
  --brand: #4f5bea; --brand-ink: #3d47c9; --brand-soft: #eceefe;
  --in: #1a9e6e; --in-t: #13805a; --in-soft: #e3f5ed;
  --out: #e0603a; --out-t: #c2481f; --out-soft: #fdece6;
  --warn: #9a6a00; --warn-soft: #fff4d6; --bad: #c4302b; --bad-soft: #fde8e7;
  --r: 14px; --r-s: 10px; --shadow: 0 1px 2px rgba(20, 24, 40, .05), 0 1px 8px rgba(20, 24, 40, .04);
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-ink); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { font-size: 15px; font-weight: 650; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hide { visibility: hidden; }
.i { flex: none; vertical-align: -3px; }
code { font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; }
input, select, textarea, button { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- frame ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(243, 244, 248, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 17px; margin-right: auto; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 750; font-size: 16px; flex: none; }
.logo.big { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; margin: 0 auto 10px; }
.side-nav { display: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 4px 16px calc(var(--nav-h) + var(--safe-b) + 24px); }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; color: var(--muted); font-size: 11.5px; font-weight: 550; min-height: var(--nav-h); justify-content: center; }
.bottom a.on { color: var(--brand); }
.bottom a.on .i { stroke-width: 2.2; }
@media (min-width: 900px) {
  .top { padding: 12px 28px; border-bottom-color: var(--line); background: rgba(255, 255, 255, .94); }
  .side-nav { display: flex; gap: 4px; margin-right: 8px; }
  .side-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 550; }
  .side-nav a:hover { background: var(--soft); }
  .side-nav a.on { background: var(--brand-soft); color: var(--brand-ink); }
  .bottom { display: none; }
  .wrap { padding: 20px 28px 48px; }
}

/* ---------- blocks ---------- */
.page-head { margin: 14px 0 14px; display: flex; flex-direction: column; gap: 4px; }
.page-head.row-between { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
.page-head p { margin: 2px 0 0; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; margin-left: -4px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; border: 1px solid rgba(20, 24, 40, .04); min-width: 0; }
.card > h2 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
section > .card-head { margin: 6px 2px 10px; }
.sub-h { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; }
.grid2 { display: grid; gap: 0 14px; }
.grid2.tight { gap: 12px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.row { display: flex; gap: 8px; }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-gap.end, .end-row { justify-content: flex-end; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.row-gap.center { justify-content: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.empty { color: var(--muted); margin: 6px 0; }
.plain { margin: 0 0 12px; padding-left: 20px; }
.plain li { margin: 4px 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.small-link { color: var(--brand-ink); font-size: 14px; font-weight: 550; display: inline-flex; align-items: center; gap: 4px; }
.as-link { background: none; border: 0; padding: 0; cursor: pointer; }
.flash { padding: 11px 14px; border-radius: var(--r-s); margin: 10px 0; background: var(--in-soft); color: #0f5a40; font-weight: 500; }
.flash.bad { background: var(--bad-soft); color: #8f1f1b; }
.flash.warn { background: var(--warn-soft); color: #6d4a00; }
.bad-t { color: var(--bad); }
.in { color: var(--in-t); }
.out { color: var(--out-t); }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 16px; border-radius: 11px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--brand-ink); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.ib { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.ib:hover { background: var(--soft); }
.ib.soft { color: #9aa0ad; width: 34px; height: 34px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.pill.in { background: var(--in-soft); color: var(--in-t); }
.pill.out { background: var(--out-soft); color: var(--out-t); }
.pill.big { padding: 9px 15px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: rgba(20, 24, 40, .06); font-size: 12px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.chip.due { background: var(--warn-soft); color: var(--warn); }
.chip.ok { background: var(--in-soft); color: var(--in-t); }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d9dce6; border-radius: 10px; background: #fff; font-size: 16px; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 91, 234, .15); }
input[type=color] { width: 44px; height: 44px; padding: 3px; border: 1px solid #d9dce6; border-radius: 10px; background: #fff; flex: none; cursor: pointer; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.fld.inline { flex-direction: row; align-items: center; gap: 8px; }
.fld.inline > span { white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.form { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form { grid-template-columns: 1fr 1fr; } .form .wide { grid-column: 1 / -1; } }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.inline-form input:not([type=color]):not([type=file]) { flex: 1; min-width: 0; }
details > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid #9aa0ad; border-bottom: 2px solid #9aa0ad; transform: rotate(45deg); margin: -3px 2px 0 auto; transition: transform .15s; }
details[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
details.form-card[open] > summary, details.card[open] > summary { margin-bottom: 14px; }
details.mini { margin-top: 12px; }
details.mini > summary { font-size: 14px; color: var(--ink-2); }
details.mini[open] > summary { margin-bottom: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--soft); padding: 4px; border-radius: 12px; }
.seg label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted); text-align: center; font-size: 14px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: #fff; box-shadow: var(--shadow); }
.seg .seg-in:has(input:checked) { color: var(--in-t); }
.seg .seg-out:has(input:checked) { color: var(--out-t); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.file-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px dashed #c4c8d4; border-radius: 10px; cursor: pointer; color: var(--ink-2); font-weight: 550; max-width: 100%; }
.file-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumb img { max-height: 160px; border-radius: 10px; display: block; margin-bottom: 6px; }
.photo-fld { gap: 8px; align-items: flex-start; }

/* ---------- navigation chips, toolbars ---------- */
.chips-nav { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; }
.chips-nav::-webkit-scrollbar { display: none; }
.chips-nav a { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 550; font-size: 14px; }
.chips-nav a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (min-width: 900px) { .chips-nav { margin: 0 0 16px; padding: 0; flex-wrap: wrap; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select, .toolbar input[type=month] { width: auto; flex: 1 1 150px; }
.toolbar .search { flex: 1 1 240px; }
.search { position: relative; display: block; }
.search .i { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.search input { padding-left: 38px !important; }
.month-nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.month-nav input { flex: 1; min-width: 0; }
.month-nav b { padding: 0 6px; white-space: nowrap; }
.seg-links { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg-links a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 550; font-size: 14px; white-space: nowrap; }
.seg-links a.on { background: var(--brand-soft); color: var(--brand-ink); }
.toolbar.period { justify-content: space-between; }

/* ---------- Today: the voice box ---------- */
.vbox { padding: 12px; border: 1px solid #dfe2fb; }
.vbox-form { display: flex; gap: 8px; align-items: flex-end; }
.vbox-form textarea { flex: 1; min-height: 52px; max-height: 200px; resize: none; border-radius: 14px; padding: 14px; font-size: 16px; }
.mic { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; cursor: pointer; box-shadow: 0 4px 14px rgba(79, 91, 234, .35); }
.mic.on { background: var(--out); box-shadow: 0 0 0 0 rgba(224, 96, 58, .5); animation: pulse 1.3s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(224, 96, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 96, 58, 0); } }
.vbox-form .btn { min-height: 52px; border-radius: 14px; }
.hints { display: flex; gap: 6px; overflow-x: auto; margin: 10px -12px 0; padding: 0 12px 2px; scrollbar-width: none; }
.hints::-webkit-scrollbar { display: none; }
.hints button { flex: none; border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.vitems { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.vitems .v-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.vitem { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; background: #fff; }
.vitem.off { opacity: .45; }
.vitem .v-top { display: flex; align-items: center; gap: 8px; }
.vitem .v-top .check input { width: 20px; height: 20px; }
.vitem .v-said { color: var(--muted); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtype { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; flex: none; }
.vtype.task { background: var(--brand-soft); color: var(--brand-ink); }
.vtype.money-in { background: var(--in-soft); color: var(--in-t); }
.vtype.money-out { background: var(--out-soft); color: var(--out-t); }
.vtype.udhaar { background: #f3e8ff; color: #6b3fb0; }
.vtype.habit, .vtype.goal { background: var(--warn-soft); color: var(--warn); }
.vtype.note { background: #eef0f4; color: var(--ink-2); }
.v-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v-fields .full { grid-column: 1 / -1; }
.v-fields input, .v-fields select, .v-fields textarea { min-height: 40px !important; padding: 8px 10px !important; font-size: 15px !important; }
.v-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 0; }
.v-hint { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.v-hint.warn { color: var(--warn); font-weight: 600; }
@media (min-width: 700px) { .v-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- lists ---------- */
.tasks, .entries, .items, .people, .list-rows, .budgets, .biz-rows, .hbars, .bars { list-style: none; margin: 0; padding: 0; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.tick-form { flex: none; }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #c3c7d2; background: #fff; color: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; margin-top: 1px; }
.tick:hover { border-color: var(--brand); }
.done > .tick-form .tick, .done > form .tick { background: var(--in); border-color: var(--in); color: #fff; }
.task.late .tick { border-color: #e7a19c; }
.task-body { flex: 1; min-width: 0; color: var(--ink); display: flex; flex-direction: column; gap: 1px; padding-top: 3px; }
.task-title { font-weight: 550; overflow-wrap: anywhere; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.tasks.soft .task-title { font-weight: 450; }
.kind { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--soft); text-transform: uppercase; letter-spacing: .03em; }
.kind.k-call { background: #e3f0fc; color: #1d5f9e; }
.kind.k-bill { background: var(--warn-soft); color: var(--warn); }
.note-rem { display: flex; align-items: center; gap: 6px; padding: 9px 10px; margin-top: 8px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); font-size: 14px; }
.entry a, .entry .e-row, .people a { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--ink); border-bottom: 1px solid var(--line); }
.entry:last-child a, .entry:last-child .e-row, .people li:last-child a { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.e-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.e-main b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { font-weight: 650; white-space: nowrap; text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.amt small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.list-rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list-rows li:last-child { border-bottom: 0; }
.list-rows { margin: 10px 0; }

/* ---------- sums, stats ---------- */
.sums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.sums.three { grid-template-columns: repeat(3, 1fr); }
.sums > div { background: var(--soft); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; min-width: 0; }
.sums small { color: var(--muted); font-size: 12.5px; }
.sums b { font-size: 17px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: var(--r); padding: 13px 15px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat > small:first-child { color: var(--muted); font-weight: 550; }
.stat b { font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.stats.in-card { margin: 0; }
.stats.in-card .stat { background: var(--soft); box-shadow: none; }
.budget-alert { margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--warn-soft); font-size: 14px; }
.budget-alert.over { background: var(--bad-soft); }
.meter { height: 8px; border-radius: 99px; background: #eceef4; overflow: hidden; margin: 6px 0 4px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter.big { height: 12px; }
.budgets li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.budgets li:last-child { border-bottom: 0; }
.budgets li.near .meter i { background: #e0a100; }
.budgets li.over .meter i { background: var(--bad); }
.budget-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }

/* ---------- notes ---------- */
.note-grid { columns: 2 160px; column-gap: 12px; }
@media (min-width: 900px) { .note-grid { columns: 4 200px; } }
.note { break-inside: avoid; display: flex; flex-direction: column; gap: 6px; padding: 13px; margin: 0 0 12px; border-radius: var(--r); background: #fff; color: var(--ink); box-shadow: var(--shadow); border: 1px solid rgba(20, 24, 40, .07); position: relative; }
.n-title { font-weight: 650; padding-right: 18px; overflow-wrap: anywhere; }
.n-body { white-space: pre-line; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.n-items { display: flex; flex-direction: column; font-size: 14px; color: var(--ink-2); }
.n-items .ok { text-decoration: line-through; color: var(--muted); }
.n-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.n-meta:empty { display: none; }
.pin-mark { position: absolute; top: 10px; right: 10px; color: var(--muted); }
.c-white { background: #ffffff; } .c-yellow { background: #fff4c2; } .c-green { background: #dcf5e1; } .c-blue { background: #dbeafe; }
.c-pink { background: #ffe1ea; } .c-purple { background: #ece4ff; } .c-orange { background: #ffe5cc; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(20, 24, 40, .15); position: relative; cursor: pointer; display: inline-grid; place-items: center; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.sw:has(input:checked), .sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.sw.all { width: auto; padding: 0 10px; border-radius: 99px; font-size: 13px; color: var(--ink-2); background: #fff; }
.note-edit { display: flex; flex-direction: column; gap: 10px; }
.note-edit input, .note-edit textarea { background: rgba(255, 255, 255, .6) !important; }
.n-title-in { font-size: 18px !important; font-weight: 650; }
.mic-wrap { position: relative; }
.mic-wrap textarea { padding-right: 48px; }
.mic-small { position: absolute; right: 4px; top: 4px; }
.mic-small.on { color: var(--out); background: var(--out-soft); }
.note-opts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.items li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items .i-text { flex: 1; overflow-wrap: anywhere; }
.items li.done .i-text { text-decoration: line-through; color: var(--muted); }
.comment { position: relative; padding: 10px 40px 10px 12px; margin-bottom: 8px; background: var(--soft); border-radius: 12px; overflow-wrap: anywhere; }
.comment form { position: absolute; right: 2px; top: 2px; }

/* ---------- habits ---------- */
.habit-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.habit-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.habit-chip .i { color: #c3c7d2; }
.habit-chip.on { background: var(--in-soft); border-color: #bfe6d4; color: var(--in-t); }
.habit-chip.on .i { color: var(--in-t); }
.habit.paused { opacity: .6; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #c2671f; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week form { display: contents; }
.day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0; border-radius: 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.day small { font-size: 11px; color: var(--muted); }
.day.today { border-color: var(--brand); }
.day.on { background: var(--in); border-color: var(--in); color: #fff; }
.day.on small { color: rgba(255, 255, 255, .85); }

/* ---------- money pages ---------- */
.biz-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.biz-grid > .card { margin: 0; }
.biz { border-top: 4px solid var(--bc, var(--brand)); }
.left-big { margin: 4px 0 12px; display: flex; flex-direction: column; }
.left-big small { color: var(--muted); }
.left-big b { font-size: 26px; font-variant-numeric: tabular-nums; }
.bars li { display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.bars li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars li i { height: 8px; border-radius: 0 4px 4px 0; display: block; }
.bars li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.biz .row-gap { margin-top: 12px; }
.biz-left { margin: 0; font-size: 14px; color: var(--muted); }
.biz-left.warn { color: var(--warn); font-weight: 600; }
.center-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.big-amt { font-size: 32px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.center-card .meter { width: 100%; max-width: 420px; }
.center-card .row-gap { margin-top: 10px; }
.goal { color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.goal.done { opacity: .7; }
.goal h2 { font-size: 16px; }
.day-card .card-head { margin-bottom: 2px; }
.day-card .card-head small { display: flex; gap: 8px; font-weight: 600; }

/* ---------- reports ---------- */
.legend { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.key.in { background: var(--in); } .key.out { background: var(--out); }
.vchart { position: relative; margin: 6px 0 0; height: 220px; display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.vgrid { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); padding-bottom: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.vgrid span { transform: translateY(-50%); }
.vgrid span:last-child { transform: translateY(50%); }
.vcols { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: end; height: 100%; padding-bottom: 20px;
  background: linear-gradient(#eceef4, #eceef4) 0 0 / 100% 1px no-repeat, linear-gradient(#eceef4, #eceef4) 0 calc(50% - 10px) / 100% 1px no-repeat, linear-gradient(#c9cdd8, #c9cdd8) 0 calc(100% - 20px) / 100% 1px no-repeat; }
.vcol { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 1px; cursor: default; outline: none; }
.vcol:hover, .vcol:focus-visible, .vcol.tip-on { background: rgba(79, 91, 234, .07); border-radius: 6px 6px 0 0; }
.vb { width: min(40%, 14px); border-radius: 4px 4px 0 0; min-height: 0; }
.vb.in { background: var(--in); } .vb.out { background: var(--out); }
.vcol small { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.vcol.future { opacity: .35; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto 36px; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; border-radius: 6px; outline: none; }
.hbars li:hover, .hbars li:focus-visible, .hbars li.tip-on { background: var(--soft); }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 10px; display: block; }
.hb-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hb-track i.out { background: var(--out); } .hb-track i.in { background: var(--in); } .hb-track i.brand { background: var(--brand); }
.hbars b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbars small { text-align: right; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }
.tbl a { color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.tip { position: fixed; z-index: 60; background: var(--ink); color: #fff; font-size: 13px; padding: 7px 10px; border-radius: 8px; pointer-events: none; max-width: 260px; box-shadow: 0 6px 20px rgba(20, 24, 40, .2); }

/* ---------- settings ---------- */
.jump { position: sticky; top: 56px; z-index: 10; background: var(--bg); padding-top: 6px; padding-bottom: 8px; }
@media (min-width: 900px) { .jump { top: 66px; } }
.tone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.tone-row { display: flex; gap: 6px; align-items: center; }
.tone-row .ib { background: var(--brand-soft); color: var(--brand-ink); }
.biz-rows li { display: flex; align-items: center; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.biz-rows li.paused .biz-edit input[name=name] { color: var(--muted); }
.biz-edit { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.biz-edit input[type=color] { width: 38px; height: 38px; }
.biz-edit input[name=name] { font-size: 15px !important; padding: 8px 10px !important; min-height: 40px !important; }
.biz-edit .check { font-size: 13px; gap: 5px; }
.biz-edit .btn { min-height: 38px; padding: 6px 11px; font-size: 14px; }
@media (max-width: 520px) { .hide-s { display: none; } }
.move { display: flex; flex-direction: column; }
.move .ib { height: 26px; font-size: 15px; }
.steps { margin: 6px 0 10px; padding-left: 20px; }
.steps li { margin: 6px 0; }
.copy { display: block; margin: 6px 0; padding: 9px 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; cursor: pointer; }
.push-status { margin: 6px 0 10px; font-weight: 550; }
.push-status.ok { color: var(--in-t); }
.push-status.bad { color: var(--warn); }

/* ---------- lock, setup ---------- */
.bare-main { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.lock-card { width: 100%; max-width: 380px; text-align: center; padding: 28px 22px; }
.lock-card h1 { margin-bottom: 4px; }
.lock-card form { margin-top: 16px; text-align: left; }
.lock-card.setup { max-width: 440px; }
.pin { text-align: center; font-size: 26px !important; letter-spacing: .5em; padding-left: .5em !important; }
.lock-card .small-link { margin-top: 14px; }

/* ---------- toast, ring ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 70; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-weight: 550; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(20, 24, 40, .25); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.ring { position: fixed; inset: 0; z-index: 80; background: rgba(20, 24, 40, .35); display: grid; place-items: center; padding: 16px; }
.ring-box { background: #fff; border-radius: 18px; padding: 22px; width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: 0 20px 60px rgba(20, 24, 40, .3); }
.ring-box > .i { color: var(--brand); animation: shake .6s 2; }
.ring-box b { font-size: 18px; overflow-wrap: anywhere; }
.ring-box .row { margin-top: 10px; }
@keyframes shake { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.pg-settings .card { scroll-margin-top: 128px; }
@media (min-width: 900px) { .pg-settings .card { scroll-margin-top: 140px; } }

/* ---------- 1.1: Book views ---------- */
.book-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.book-head .month-nav { flex: 0 1 auto; gap: 2px; }
.nav-label { font-size: 20px; font-weight: 700; min-width: 100px; text-align: center; margin: 0; white-space: nowrap; }
h2.nav-label { font-size: 18px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.chip-btn.on { background: var(--brand-soft); border-color: #cfd3fb; color: var(--brand-ink); }
.filter-btn { position: relative; }
.filter-btn.on { color: var(--brand); background: var(--brand-soft); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.vtabs { display: flex; border-bottom: 1px solid var(--line); margin: 0 -16px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
.vtabs::-webkit-scrollbar { display: none; }
.vtabs a { flex: 1 0 auto; text-align: center; padding: 10px 8px 9px; color: var(--muted); font-weight: 600; font-size: 14.5px; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.vtabs a.on { color: var(--ink); border-bottom-color: var(--brand); }
@media (min-width: 900px) { .vtabs { margin: 0; padding: 0; } .vtabs a { flex: 0 0 auto; padding: 10px 20px; } }
.totals3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin: 12px 0 14px; padding: 10px 2px; }
.totals3 > div { display: flex; flex-direction: column; min-width: 0; padding: 0 4px; }
.totals3 > div + div { border-left: 1px solid var(--line); }
.totals3 small { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.totals3 b { font-size: 16.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; font-size: 14px; color: var(--ink-2); }
.day-head { display: flex; align-items: center; gap: 8px; color: var(--ink); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dnum { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.wd { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--soft); color: var(--ink-2); }
.wd.sun { background: var(--out-soft); color: var(--out-t); }
.day-sums { margin-left: auto; display: flex; gap: 10px; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 14px; }
.day-add { margin-left: auto; }
.day-card { padding-top: 12px; padding-bottom: 6px; }
.e-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); display: inline-grid; place-items: center; font-size: 19px; flex: none; position: relative; line-height: 1; }
.entry .e-ic::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--bc, #94a3b8); border: 2px solid #fff; }
.e-ic.sm { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
.amt.tr { color: var(--ink-2); }
.cal { padding: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-w { text-align: center; font-size: 12px; font-weight: 650; color: var(--muted); padding: 4px 0 6px; }
.cal-w.sun { color: var(--out-t); }
.cal-d { min-height: 62px; border-radius: 8px; padding: 4px 4px 3px; display: flex; flex-direction: column; color: var(--ink); background: var(--soft); overflow: hidden; text-align: right; }
.cal-d.blank { background: transparent; }
.cal-d .n { font-size: 13px; font-weight: 650; text-align: left; line-height: 22px; height: 22px; }
.cal-d.sun .n { color: var(--out-t); }
.cal-d small { font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-d.today .n { background: var(--brand); color: #fff; border-radius: 999px; width: 22px; text-align: center; }
.cal-d.sel { box-shadow: inset 0 0 0 2px var(--brand); background: #fff; }
.cal-d:not(.blank):hover { background: var(--brand-soft); }
@media (min-width: 700px) { .cal-d { min-height: 84px; padding: 6px 7px; } .cal-d small { font-size: 12.5px; } .cal-d .n { font-size: 14px; } }
.period-rows { display: flex; flex-direction: column; }
.pr { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-variant-numeric: tabular-nums; font-size: 14px; }
.pr > span, .pr > b { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr > span:first-child { text-align: left; font-weight: 600; }
.pr.head { font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; padding-top: 0; }
.pr.now { background: var(--brand-soft); border-radius: 8px; }
.pr.zero { color: var(--muted); }
.pr.zero .in, .pr.zero .out { color: var(--muted); }
.pr:last-child { border-bottom: 0; }
@media (max-width: 420px) { .pr { font-size: 13px; gap: 4px; padding: 10px 2px; } .pr .chip { display: none; } }
.acc-rows { list-style: none; margin: 0; padding: 0; }
.acc-rows a { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.acc-rows li:last-child a { border-bottom: 0; }
.acc-rows > li > a > .i { color: #b0b5c1; }
.acc-rows .chip { vertical-align: 1px; }
.acc-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill.tr { background: var(--brand-soft); color: var(--brand-ink); }
.hbars.ic .hb-label .ic { margin-right: 1px; }
.hb-track i.bad { background: var(--bad); }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 25; width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(79, 91, 234, .4); }
.fab:hover { background: var(--brand-ink); }
body:has(.fab) .wrap { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 92px); }
@media (min-width: 900px) { .fab { bottom: 32px; right: max(28px, calc((100vw - 1080px) / 2 - 24px)); } body:has(.fab) .wrap { padding-bottom: 100px; } }

/* ---------- 1.1: add screen ---------- */
.entry-head { flex-wrap: nowrap; max-width: 620px; margin-left: auto; margin-right: auto; }
.entry-head h1 { flex: 1; text-align: center; font-size: 19px; }
.star-btn { color: #c98a00; }
.entry2 { max-width: 620px; margin: 0 auto 14px; padding: 14px 16px; }
.tabs3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.tabs3 label { position: relative; text-align: center; padding: 10px 4px; border-radius: 11px; border: 1.5px solid var(--line); font-weight: 650; color: var(--muted); cursor: pointer; }
.tabs3 input { position: absolute; opacity: 0; pointer-events: none; }
.tabs3 .t-in:has(input:checked) { border-color: var(--in); color: var(--in-t); background: var(--in-soft); }
.tabs3 .t-out:has(input:checked) { border-color: var(--out); color: var(--out-t); background: var(--out-soft); }
.tabs3 .t-transfer:has(input:checked) { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.tabs3 label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.rowf { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 54px; border-bottom: 1px solid var(--line); }
.rowf .rl { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.rowf > input, .rowf > select, .rowf .rv input[type=date] { border: 0 !important; box-shadow: none !important; padding: 10px 0 !important; background: transparent !important; border-radius: 0 !important; }
.rowf:focus-within { border-bottom-color: var(--brand); }
.rowf:focus-within .rl { color: var(--brand-ink); }
.rv { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; padding: 6px 0; }
.date-row input[type=date] { flex: 1 1 120px; min-width: 0; width: auto !important; }
.amount-row .amount-in { font-size: 24px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.entry2:has(.t-in input:checked) .amount-in { color: var(--in-t); }
.entry2:has(.t-out input:checked) .amount-in { color: var(--out-t); }
.entry2:not(:has(.t-in input:checked)) .only-in, .entry2:not(:has(.t-out input:checked)) .only-out,
.entry2:not(:has(.t-transfer input:checked)) .only-tr, .entry2:has(.t-transfer input:checked) .not-tr { display: none; }
.photo-row { border-bottom: 0; }
.photo-row .file-btn { padding: 8px 12px; }
.repeat-info { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 550; }
.entry2 .biz-left:empty { display: none; }
.entry2 .biz-left { margin-top: 8px; }
.save-row { margin-top: 14px; }
.save-row .btn { flex: 1 1 160px; min-height: 50px; font-size: 16px; }
.entry2:has(.t-in input:checked) .save-btn { background: var(--in-t); border-color: var(--in-t); }
.entry2:has(.t-out input:checked) .save-btn { background: var(--out-t); border-color: var(--out-t); }
.pick-src.enhanced { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pick { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 8px 0; border: 0; background: transparent; text-align: left; cursor: pointer; font-size: 16px; color: var(--ink); min-width: 0; }
.pick .pk-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .pk-ic { font-size: 19px; width: 26px; text-align: center; flex: none; }
.pick .pk-sub { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pick::after { content: ""; width: 7px; height: 7px; border-right: 2px solid #b0b5c1; border-bottom: 2px solid #b0b5c1; transform: rotate(-45deg); margin: 0 6px 0 auto; flex: none; }
.pick:has(.pk-sub)::after { margin-left: 6px; }
.pk-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

/* ---------- 1.1: sheets that slide up ---------- */
body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 75; background: rgba(20, 24, 40, .32); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { background: #fff; width: 100%; max-width: 560px; max-height: 86vh; max-height: 86dvh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(20, 24, 40, .18); animation: sheet-up .18s ease-out; padding-bottom: var(--safe-b); margin: 0; }
@keyframes sheet-up { from { transform: translateY(28px); opacity: .5; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); background: var(--soft); border-radius: 18px 18px 0 0; flex: none; }
.sheet-head b { flex: 1; font-size: 16px; }
.sheet-body { padding: 14px 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 700px) { .sheet { align-items: center; padding: 24px; } .sheet-box { border-radius: 18px; } }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; min-height: 84px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: center; font-size: 13.5px; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; line-height: 1.25; }
.tile .t-ic { font-size: 24px; line-height: 1; }
.tile small { color: var(--muted); font-size: 11.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tile.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.tile:hover { background: var(--soft); }
.tile.on:hover { background: var(--brand-soft); }
.tile.add { border-style: dashed; color: var(--brand-ink); }
.tile-group + .tile-group { margin-top: 16px; }
.tile-group h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pick-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; font-size: 15.5px; font-weight: 550; color: var(--ink); }
.pick-row:last-child { border-bottom: 0; }
.pick-row .i { margin-left: auto; color: var(--brand); visibility: hidden; }
.pick-row.on { background: var(--brand-soft); }
.pick-row.on .i { visibility: visible; }
.opt-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 550; }
.opt:last-child { border-bottom: 0; }
.opt input { width: 18px; height: 18px; accent-color: var(--brand); }
.opt:has(input:checked) { background: var(--brand-soft); }
#sheet-repeat:has(input[name=repeat_every][value=""]:checked) .rep-more { display: none; }
.fav-list { list-style: none; margin: 0 0 12px; padding: 0; }
.fav-list li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.fav-list a { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink); min-width: 0; }
.check-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 4px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.check-row:last-child { border-bottom: 0; }
.check-row input { width: 19px; height: 19px; accent-color: var(--brand); flex: none; }
.check-row .grow { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row small { display: flex; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet .sub-h:first-child { margin-top: 0; }
.seg.four { grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; }
.seg.four label { padding: 9px 2px; font-size: 13.5px; }
.seg.four label:has(input:checked) { color: var(--brand-ink); }
.search-fld { margin-bottom: 14px; }

/* ---------- 1.1: charts ---------- */
.lchart { margin: 6px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 170px auto; column-gap: 8px; }
.lgrid { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.lgrid span:first-child { transform: translateY(-50%); }
.lgrid span:last-child { transform: translateY(50%); }
.lplot { position: relative; background: linear-gradient(#eceef4, #eceef4) 0 0 / 100% 1px no-repeat, linear-gradient(#eceef4, #eceef4) 0 50% / 100% 1px no-repeat, linear-gradient(#eceef4, #eceef4) 0 100% / 100% 1px no-repeat; }
.lplot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lline { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.larea { fill: rgba(79, 91, 234, .08); }
.l0 { stroke: #c9cdd8; stroke-width: 1; }
.lpt { position: absolute; width: 28px; height: 28px; transform: translate(-50%, -50%); border-radius: 50%; outline: none; }
.lpt::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; border: 2.5px solid var(--brand); }
.lpt.last::after { background: var(--brand); }
.lpt:hover::after, .lpt:focus-visible::after, .lpt.tip-on::after { inset: 7px; }
.lval { position: absolute; transform: translate(-100%, -170%); font-size: 12px; font-weight: 700; color: var(--brand-ink); background: rgba(255, 255, 255, .9); padding: 0 4px; border-radius: 4px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lval.below { transform: translate(-100%, 70%); }
.lx { grid-column: 2; position: relative; height: 22px; margin-top: 6px; }
.lx span { position: absolute; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.donut-wrap { display: grid; gap: 16px; align-items: center; }
@media (min-width: 640px) { .donut-wrap { grid-template-columns: 220px minmax(0, 1fr); } }
.donut { position: relative; margin: 0 auto; width: 200px; max-width: 64vw; }
.donut svg { display: block; width: 100%; height: auto; }
.d-seg { fill: none; stroke-width: 7; }
.d-bg { fill: none; stroke: #eceef4; stroke-width: 7; }
.donut figcaption { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut figcaption small { color: var(--muted); font-size: 12.5px; }
.donut figcaption b { font-size: 22px; font-variant-numeric: tabular-nums; }
.d-list { list-style: none; margin: 0; padding: 0; }
.d-list li { display: grid; grid-template-columns: 12px 42px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); border-radius: 6px; outline: none; font-size: 14.5px; }
.d-list li:last-child { border-bottom: 0; }
.d-list li:hover, .d-list li:focus-visible, .d-list li.tip-on { background: var(--soft); }
.d-key { width: 12px; height: 12px; border-radius: 4px; }
.d-pct { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-2); }
.d-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-list b { font-weight: 600; font-variant-numeric: tabular-nums; }
.seg-links.small a { padding: 5px 10px; font-size: 13.5px; }
@media (max-width: 420px) { .tbl { font-size: 13px; } .tbl th, .tbl td { padding: 8px 4px; } }
