/* JOHN OS — executive notebook styling */
:root {
  --bg: #f6f5f3; --panel: #ffffff; --panel2: #fbfaf8; --ink: #1c1917; --ink2: #44403c; --muted: #78716c; --faint: #a8a29e;
  --line: #e7e5e4; --line2: #f0eeec; --acc: #c2410c; --acc-soft: #fff1e8; --acc-ink: #9a3412;
  --side: #1c1917; --side-ink: #d6d3d1; --side-mute: #8a837e; --side-hover: #292524; --side-act: #33302d;
  --ok: #15803d; --ok-soft: #e9f7ee; --warn: #b45309; --warn-soft: #fdf4e3; --bad: #b91c1c; --bad-soft: #fdecec; --info: #1d4ed8; --info-soft: #ebf1fe;
  --violet: #6d28d9; --violet-soft: #f1ecfd; --teal: #0f766e; --teal-soft: #e6f5f3;
  --r: 12px; --r2: 8px; --shadow: 0 1px 2px rgba(28,25,23,.05), 0 4px 16px rgba(28,25,23,.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141210; --panel: #1c1a18; --panel2: #211f1c; --ink: #f5f5f4; --ink2: #d6d3d1; --muted: #a8a29e; --faint: #78716c;
  --line: #2f2c29; --line2: #262320; --acc: #f97316; --acc-soft: #3a2113; --acc-ink: #fdba74;
  --side: #0f0e0d; --side-hover: #1c1a18; --side-act: #26231f;
  --ok: #4ade80; --ok-soft: #13291b; --warn: #fbbf24; --warn-soft: #2e2410; --bad: #f87171; --bad-soft: #321616; --info: #93c5fd; --info-soft: #172338;
  --violet: #c4b5fd; --violet-soft: #241c38; --teal: #5eead4; --teal-soft: #0f2a27;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 14.5px/1.45 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { height: 100vh; display: grid; place-items: center; font-size: 28px; letter-spacing: .04em; color: var(--muted); }
.boot b { color: var(--acc); }
.num, .money { font-variant-numeric: tabular-nums; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 10px 40px; scrollbar-width: thin; }
.logo { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px 14px; font-size: 19px; font-weight: 800; letter-spacing: .03em; color: #fafaf9; text-decoration: none; }
.logo b { color: var(--acc); }
.logo small { font-size: 10.5px; font-weight: 500; letter-spacing: .02em; color: var(--side-mute); margin-left: auto; }
.side .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--side-mute); padding: 14px 10px 5px; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--side-ink); font-size: 14px; }
.side a.nav:hover { background: var(--side-hover); }
.side a.nav.on { background: var(--side-act); color: #fff; }
.side a.nav.on .ic { opacity: 1; }
.side .ic { width: 18px; text-align: center; opacity: .85; font-size: 14px; }
.side .cnt { margin-left: auto; font-size: 11px; background: var(--acc); color: #fff; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.side .more, .side a.nav.more { display: none; }
.side.showmore .more, .side.showmore a.nav.more { display: flex; }
.side .moretog { background: none; border: 0; color: var(--side-mute); padding: 7px 10px; font-size: 13px; cursor: pointer; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .menu { display: none; }
.top h1 { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .search { margin-left: auto; position: relative; width: min(360px, 40vw); }
.top .search input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); outline: none; }
.top .search input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.top .search::before { content: "⌕"; position: absolute; left: 11px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 16px; }
.focusbar { background: var(--acc); color: #fff; padding: 7px 24px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.focusbar b { font-weight: 700; }
.focusbar button { margin-left: auto; background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.view { padding: 20px 24px 120px; max-width: 1320px; width: 100%; }
.bottombar { display: none; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 550; font-size: 13.5px; white-space: nowrap; text-decoration: none; line-height: 1.3; }
.btn:hover { border-color: var(--faint); }
.btn.pri { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.acc { background: var(--acc); color: #fff; border-color: var(--acc); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { width: 32px; height: 32px; padding: 0; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); font-size: 16px; flex: none; }
.iconbtn:hover { background: var(--line2); color: var(--ink); }
.addbtn { background: var(--acc); color: #fff; border: 0; border-radius: 9px; padding: 8px 14px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- headings & cards */
.ph { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ph h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.ph .sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.ph .btnrow { margin-left: auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card h3 .r { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.card h3 a { text-decoration: none; color: var(--acc); font-size: 12.5px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.stack > * + * { margin-top: 14px; }
.cols > *, .stack > *, .grid > * { min-width: 0; }
.empty { color: var(--faint); font-size: 13.5px; padding: 10px 2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- stats */
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; text-decoration: none; display: block; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 550; }
.stat .v { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12px; color: var(--muted); margin-top: 1px; }
.stat.bad .v { color: var(--bad); } .stat.ok .v { color: var(--ok); } .stat.acc .v { color: var(--acc); }
a.stat:hover { border-color: var(--faint); }

/* ---------- chips */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 7px; border-radius: 20px; background: var(--line2); color: var(--ink2); white-space: nowrap; line-height: 18px; font-weight: 550; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.chip.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.acc { background: var(--acc-soft); color: var(--acc-ink); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.chip.teal { background: var(--teal-soft); color: var(--teal); }
.chip.out { background: none; border: 1px solid var(--line); }
a.chip { text-decoration: none; }
a.chip:hover { filter: brightness(.95); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* ---------- item rows */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line2); position: relative; }
.row:last-child { border-bottom: 0; }
.row .body { flex: 1; min-width: 0; cursor: pointer; }
.row .t { font-weight: 560; overflow-wrap: anywhere; }
.row .t.done { text-decoration: line-through; color: var(--faint); font-weight: 450; }
.row .meta { margin-top: 3px; }
.row .right { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.row .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.row .tm { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; width: 46px; flex: none; padding-top: 2px; }
.row:hover { background: var(--panel2); }
.listcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px; }
.check { width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--faint); flex: none; cursor: pointer; display: grid; place-items: center; background: none; padding: 0; margin-top: 1px; color: transparent; font-size: 12px; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.sq { border-radius: 6px; }
.prio-Critical { --p: var(--bad); } .prio-High { --p: var(--warn); } .prio-Medium { --p: var(--info); } .prio-Low { --p: var(--faint); } .prio-Someday { --p: var(--line); }
.row.pbar::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--p, transparent); }
.secthead { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 6px; }
.secthead .n { background: var(--line2); color: var(--ink2); border-radius: 10px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.secthead:first-child { margin-top: 0; }

/* ---------- Today */
.hero { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.hero .date { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--acc); font-weight: 700; }
.hero h2 { margin: 2px 0 0; font-size: 30px; letter-spacing: -.025em; }
.top3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.top3 .p { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; min-height: 64px; }
.top3 .p .n { font-size: 22px; font-weight: 800; color: var(--acc); line-height: 1; width: 18px; }
.top3 .p .x { flex: 1; min-width: 0; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.top3 .p.done .x { text-decoration: line-through; color: var(--faint); }
.top3 .p.blank .x { color: var(--faint); font-weight: 500; }
.tl { position: relative; }
.money-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }

/* ---------- forms */
.modal-back { position: fixed; inset: 0; background: rgba(12,10,9,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .12s ease-out; }
.modal { background: var(--panel); border-radius: 16px; width: min(680px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: pop .14s ease-out; position: relative; }
.modal.wide { width: min(980px, 100%); }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { margin: 0; font-size: 17px; flex: 1; }
.modal .mb { padding: 16px 20px; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); border-radius: 0 0 16px 16px; }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f label { font-size: 12px; font-weight: 650; color: var(--ink2); }
.f label .req { color: var(--acc); }
.inp, .f input, .f select, .f textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); outline: none; min-height: 40px; }
.f textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
.f textarea.big { min-height: 260px; font-family: var(--font); }
.inp:focus, .f input:focus, .f select:focus, .f textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.f input[type=color] { padding: 3px; height: 40px; }
.f .boolrow { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.f .boolrow input { width: auto; min-height: 0; }
.more-toggle { grid-column: 1 / -1; background: none; border: 0; color: var(--acc); font-weight: 600; cursor: pointer; text-align: left; padding: 4px 0; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-pick button { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 4px 11px; font-size: 13px; cursor: pointer; }
.chips-pick button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cl-item { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.cl-item input[type=text] { flex: 1; border: 0; border-bottom: 1px solid var(--line2); border-radius: 0; padding: 4px 2px; min-height: 0; }
.cl-item input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--ok); }
.inline-input { display: flex; gap: 8px; }
.inline-input input, .inline-input textarea { flex: 1; }
.capture { display: flex; gap: 8px; margin-bottom: 14px; }
.capture input { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); outline: none; font-size: 15px; }
.capture input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }

/* ---------- filters / tabs */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filters select, .filters input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-height: 34px; max-width: 190px; font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 9px 12px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--acc); }
.tabs button .n { font-size: 11px; color: var(--faint); margin-left: 3px; }
.seg { display: inline-flex; background: var(--line2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--panel2); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tblwrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }

/* ---------- progress */
.prog { height: 7px; background: var(--line2); border-radius: 5px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--acc); border-radius: 5px; }
.prog.ok > i { background: var(--ok); }
.stages { display: flex; gap: 3px; margin: 6px 0 2px; }
.stages span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.stages span.on { background: var(--acc); }
.stages span.cur { background: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
.stage-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }

/* ---------- detail */
.dhead { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.dhead .ico { font-size: 26px; width: 48px; height: 48px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.dhead h2 { margin: 0; font-size: 25px; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.dhead .kind { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.kv dd a { color: var(--acc); }
.longtext { white-space: pre-wrap; overflow-wrap: anywhere; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { text-decoration: none; color: var(--muted); } .crumb a:hover { color: var(--acc); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline .ev { position: relative; padding: 4px 0 10px; }
.timeline .ev::before { content: ""; position: absolute; left: -17px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--acc); }
.timeline .ev .w { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.roadmap .day { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.roadmap .day .dd { font-weight: 700; font-size: 13px; color: var(--acc); padding-top: 9px; }
.roadmap .day.past .dd { color: var(--faint); }
.fin { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.fin .stat .v { font-size: 18px; }
.md h1, .md h2, .md h3 { margin: .6em 0 .3em; letter-spacing: -.01em; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md p { margin: .4em 0; } .md ul { margin: .3em 0; padding-left: 1.3em; }
.md table { border-collapse: collapse; margin: .5em 0; } .md td, .md th { border: 1px solid var(--line); padding: 4px 9px; }
.md .ck { list-style: none; margin-left: -1.3em; }
.md a { color: var(--acc); }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--line2); padding: 1px 5px; border-radius: 4px; }

/* ---------- calendar */
.calhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.calhead h3 { margin: 0 8px; font-size: 19px; min-width: 170px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); gap: 1px; }
.month .dow { background: var(--panel2); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 6px 8px; font-weight: 650; }
.month .cell { background: var(--panel); min-height: 112px; padding: 5px 6px; cursor: pointer; min-width: 0; }
.month .cell.other { background: var(--panel2); }
.month .cell.other .dn { color: var(--faint); }
.month .cell .dn { font-size: 12.5px; font-weight: 650; margin-bottom: 3px; }
.month .cell.today .dn { background: var(--acc); color: #fff; border-radius: 10px; display: inline-block; padding: 0 7px; }
.ev-pill { display: block; font-size: 11.5px; padding: 1px 5px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--line2); color: var(--ink2); border-left: 3px solid var(--ec, var(--faint)); }
.ev-pill.done { opacity: .5; text-decoration: line-through; }
.ev-more { font-size: 11px; color: var(--muted); }
.ty-task { --ec: var(--info); } .ty-routine { --ec: var(--faint); } .ty-meeting { --ec: var(--violet); } .ty-followup { --ec: var(--warn); }
.ty-collection { --ec: var(--ok); } .ty-payment { --ec: var(--bad); } .ty-emi { --ec: var(--bad); } .ty-debt { --ec: var(--bad); }
.ty-investment { --ec: var(--teal); } .ty-deadline, .ty-milestone, .ty-launch { --ec: var(--acc); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week .wd { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 260px; min-width: 0; }
.week .wd.today { border-color: var(--acc); }
.week .wd h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 650; cursor: pointer; }
.week .wd.today h4 { color: var(--acc); }
.year { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mini { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.mini h4 { margin: 0 0 6px; font-size: 13px; cursor: pointer; }
.mini .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 10.5px; text-align: center; }
.mini .g span { padding: 2px 0; border-radius: 4px; cursor: pointer; }
.mini .g span.h1 { background: var(--acc-soft); } .mini .g span.h2 { background: color-mix(in srgb, var(--acc) 35%, transparent); } .mini .g span.h3 { background: var(--acc); color: #fff; }
.mini .g span.td { outline: 2px solid var(--acc); }
.daytl .slot { display: grid; grid-template-columns: 54px 1fr; border-top: 1px solid var(--line2); min-height: 38px; }
.daytl .slot .h { font-size: 11.5px; color: var(--muted); padding: 3px 0; font-variant-numeric: tabular-nums; }

/* ---------- kanban (ideas, products) */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.board .col { background: var(--line2); border-radius: var(--r); padding: 8px; min-height: 120px; }
.board .col h4 { margin: 2px 4px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: flex; justify-content: space-between; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 7px; cursor: pointer; }
.kcard .t { font-weight: 600; margin-bottom: 4px; }
.kcard:hover { border-color: var(--faint); }

/* ---------- tiles (companies, systems, sketches) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; cursor: pointer; text-decoration: none; display: block; position: relative; }
.tile:hover { border-color: var(--faint); box-shadow: var(--shadow); }
.tile .tt { font-weight: 700; font-size: 15px; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.tile .bar { position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--acc)); }
.tile img.th { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; background: #fff; border: 1px solid var(--line2); margin-bottom: 8px; display: block; }
.sys { display: flex; align-items: center; gap: 12px; }
.sys .em { font-size: 24px; width: 44px; height: 44px; border-radius: 11px; background: var(--line2); display: grid; place-items: center; flex: none; }

/* ---------- popover / toast */
.pop { position: fixed; z-index: 200; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 5px; min-width: 210px; max-height: 70vh; overflow-y: auto; animation: pop .1s ease-out; }
.pop button { display: flex; width: 100%; gap: 10px; align-items: center; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; }
.pop button:hover { background: var(--line2); }
.pop .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.pop .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; padding: 6px 10px 2px; }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 550; pointer-events: auto; display: flex; gap: 12px; align-items: center; max-width: 90vw; animation: pop .15s ease-out; }
.toast.err { background: var(--bad); color: #fff; }
.toast button { background: none; border: 0; color: var(--acc); font-weight: 700; cursor: pointer; }
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qa-grid button { border: 1px solid var(--line); background: var(--panel); border-radius: 11px; padding: 12px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.qa-grid button span { font-size: 20px; }
.qa-grid button:hover { border-color: var(--acc); background: var(--acc-soft); }

/* ---------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--side); }
.login form { background: var(--panel); border-radius: 18px; padding: 32px 28px; width: min(400px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login h1 { margin: 0; font-size: 30px; letter-spacing: .02em; } .login h1 b { color: var(--acc); }
.login p { color: var(--muted); margin: 4px 0 22px; }
.login .f { margin-bottom: 12px; }
.login .btn { width: 100%; padding: 12px; margin-top: 8px; font-size: 15px; }
.login .err { color: var(--bad); font-size: 13.5px; min-height: 20px; }

/* ---------- setup assistant */
.tpl-stage { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.tpl-stage .sh { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel2); font-weight: 700; }
.tpl-stage .sh .c { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.tpl-item { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-top: 1px solid var(--line2); }
.tpl-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--acc); flex: none; }
.tpl-item .nm { flex: 1; }
.tpl-item input[type=date] { border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; font-size: 12.5px; background: var(--panel); }
.tpl-item.off { opacity: .45; }

/* ---------- drawing */
.draw-wrap { position: fixed; inset: 0; z-index: 150; background: var(--bg); display: flex; flex-direction: column; }
.draw-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.draw-bar .grp { display: flex; gap: 3px; padding: 0 6px; border-right: 1px solid var(--line); align-items: center; }
.draw-bar .grp:last-child { border-right: 0; }
.draw-bar button { min-width: 36px; height: 36px; border: 1px solid transparent; background: none; border-radius: 9px; cursor: pointer; font-size: 16px; display: grid; place-items: center; padding: 0 7px; white-space: nowrap; }
.draw-bar button.on { background: var(--acc-soft); border-color: var(--acc); }
.draw-bar button:hover { background: var(--line2); }
.draw-bar .sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; flex: none; padding: 0; min-width: 0; }
.draw-bar .sw.on { outline: 2px solid var(--acc); outline-offset: 2px; }
.draw-bar input[type=range] { width: 80px; accent-color: var(--acc); }
.draw-bar .title { font-weight: 700; padding: 0 8px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.draw-stage { flex: 1; position: relative; overflow: hidden; background: #e7e5e4; touch-action: none; }
:root[data-theme="dark"] .draw-stage { background: #0c0a09; }
.draw-stage canvas { position: absolute; left: 0; top: 0; touch-action: none; }
.draw-pages { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px; box-shadow: var(--shadow); font-size: 13px; }
.draw-txt { position: absolute; z-index: 5; min-width: 160px; min-height: 40px; font: 18px/1.35 var(--font); padding: 6px 8px; border: 2px dashed var(--acc); background: rgba(255,255,255,.95); color: #1c1917; outline: none; resize: both; }

/* ---------- audio */
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad); display: inline-block; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
audio, video { max-width: 100%; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin { grid-template-columns: repeat(3, 1fr); }
  .money-strip { grid-template-columns: repeat(2, 1fr); }
  .year { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 120; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s ease; padding-top: max(16px, env(safe-area-inset-top)); }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .side .more, .side a.nav.more { display: flex; }
  .side .moretog { display: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 110; }
  .top { padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .top .menu { display: inline-grid; }
  .top .search { width: auto; flex: 1; max-width: none; }
  .top h1 { display: none; }
  .top .addbtn { display: none; }
  .view { padding: 14px 12px 110px; }
  .focusbar { padding: 7px 12px; }
  .cols, .g2, .g3 { grid-template-columns: 1fr; }
  .top3 { grid-template-columns: 1fr; }
  .capture { flex-wrap: wrap; }
  .capture input { flex: 1 1 100%; }
  .capture .btn { flex: 1; }
  .dhead .btnrow { width: 100%; }
  .dhead h2 { font-size: 22px; }
  .hero .btnrow { margin-left: 0 !important; }
  .calhead h3 { min-width: 0; font-size: 17px; }
  .bottombar { display: flex; position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 6px max(6px, env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; }
  .bottombar a, .bottombar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; font-weight: 600; text-decoration: none; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; }
  .bottombar a.on { color: var(--acc); }
  .bottombar .i { font-size: 19px; line-height: 1.2; }
  .bottombar .plus { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--acc); color: #fff; font-size: 28px; line-height: 1; margin-top: -22px; box-shadow: 0 6px 18px rgba(194,65,12,.4); display: grid; place-items: center; }
  .ph h2 { font-size: 22px; }
  .hero h2 { font-size: 24px; }
  .month .cell { min-height: 74px; padding: 3px; }
  .month .ev-pill { font-size: 10px; padding: 0 3px; }
  .week { grid-template-columns: 1fr; }
  .week .wd { min-height: 0; }
  .year { grid-template-columns: repeat(2, 1fr); }
  .modal-back { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .modal .mf { border-radius: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .fgrid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dt { margin-top: 8px; font-size: 12px; }
  .qa-grid { grid-template-columns: repeat(3, 1fr); }
  .fin { grid-template-columns: repeat(2, 1fr); }
  .f input, .f select, .f textarea, .capture input { font-size: 16px; } /* stop iOS zoom */
  .tbl.resp thead { display: none; }
  .tbl.resp tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .tbl.resp td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 10px; }
  .tbl.resp td::before { content: attr(data-l); color: var(--muted); font-size: 12px; }
  .tbl.resp .r { text-align: right; }
}
@media (hover: none) { .row:hover { background: none; } }
@media print { .side, .top, .bottombar, .btn, .iconbtn { display: none !important; } .shell { display: block; } }

/* ================================================================ v1.1 additions */
/* sidebar groups & apps */
.side .grp.gtog { cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.side .grp.gtog span { font-size: 10px; }
.side .grp.gtog:hover { color: var(--side-ink); }
.side .ngrp.col { display: none; }
.side a.nav.app { color: #fde7d9; }
.side a.nav .ext { margin-left: auto; font-size: 11px; color: var(--side-mute); }
.aibtn-top { color: var(--acc); font-weight: 650; }
/* stat strip */
.statstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
button.stat { text-align: left; font: inherit; cursor: pointer; width: 100%; color: inherit; }
button.stat:hover { border-color: var(--faint); }
.stat.sel { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
.stat.warn .v { color: var(--warn); }
/* empty state & tips */
.emptystate { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r); padding: 32px 20px; text-align: center; color: var(--muted); }
.emptystate .ei { font-size: 36px; margin-bottom: 6px; }
.emptystate b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.emptystate p { margin: 0 auto 12px; max-width: 460px; font-size: 13.5px; }
.tip { background: var(--acc-soft); color: var(--acc-ink); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.5; }
/* row inline actions */
.rowacts { display: flex; gap: 5px; flex: none; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rowacts .btn.sm { padding: 3px 9px; }
.rowacts .btn.star { color: var(--acc); font-size: 15px; padding: 1px 9px; }
.rowacts .btn.pri { background: var(--ok); border-color: var(--ok); color: #fff; }
.listcard.alertcard { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bad-soft) 45%, var(--panel)); }
.dayhead { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--acc); padding: 12px 4px 4px; border-bottom: 1px solid var(--line2); }
.dayhead span { color: var(--muted); font-weight: 600; }
.dayhead.big { font-size: 15px; color: var(--ink); border: 0; padding: 18px 0 6px; }
/* guided day pages */
.dayhero { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.dayhero .date { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--acc); font-weight: 700; }
.dayhero h2 { margin: 2px 0 6px; font-size: 26px; letter-spacing: -.02em; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps span { font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 20px; background: var(--line2); color: var(--muted); }
.steps span.on { background: var(--acc-soft); color: var(--acc-ink); }
.stephead { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }
.stephead .sn { width: 26px; height: 26px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.stephead b { font-size: 15px; }
details.review { padding: 0; overflow: hidden; }
details.review > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-weight: 650; }
details.review > summary::-webkit-details-marker { display: none; }
details.review > summary .n { background: var(--line2); border-radius: 10px; padding: 0 9px; font-size: 12px; color: var(--ink2); }
details.review[open] > summary { border-bottom: 1px solid var(--line2); }
details.review > :not(summary) { margin: 0 12px; }
details.review > .empty { padding: 10px 4px 14px; }
.sticky { position: sticky; top: 70px; }
.t3row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.t3row .n { font-size: 20px; font-weight: 800; color: var(--faint); width: 18px; }
.t3row.filled .n { color: var(--acc); }
.t3row.filled .inp { border-color: var(--acc); background: var(--acc-soft); font-weight: 600; }
.btn.big { padding: 13px; font-size: 15px; }
.movebar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line2); }
/* meetings */
.mcard { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line2); }
.mcard:last-child { border-bottom: 0; }
.mcard.cancel { opacity: .55; }
.mcard .mtime { width: 58px; flex: none; text-align: center; background: var(--violet-soft); color: var(--violet); border-radius: 9px; padding: 6px 2px; line-height: 1.15; }
.mcard .mtime b { display: block; font-size: 15px; }
.mcard .mtime span { font-size: 11px; font-weight: 650; }
.mcard .body { flex: 1; min-width: 0; cursor: pointer; }
.mcard .t { font-weight: 650; margin-bottom: 3px; }
/* delegated */
.personhead { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); display: grid; place-items: center; font-weight: 800; flex: none; }
/* problems */
.pcard { border-left: 4px solid var(--info); }
.pcard.imp-Critical { border-left-color: var(--bad); } .pcard.imp-High { border-left-color: var(--warn); } .pcard.imp-Low { border-left-color: var(--line); }
/* decisions */
.timeline.dec .ev::before { top: 4px; }
.dcard { cursor: pointer; padding: 12px 14px; margin-top: 4px; }
.dcard:hover { border-color: var(--faint); }
/* apps */
.appsbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.appchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 13.5px; }
.appchip:hover { border-color: var(--acc); }
.appchip i { font-style: normal; color: var(--muted); font-size: 12px; }
.appchip.ghost { background: none; border-style: dashed; color: var(--muted); }
.tiles.apps { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); margin-bottom: 16px; }
.app-tile { cursor: default; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.importcard { border: 2px dashed var(--acc); background: var(--acc-soft); margin-bottom: 14px; }
/* JOHN AI */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; font-size: 24px; color: #fff;
  background: linear-gradient(135deg, #c2410c, #7c3aed); box-shadow: 0 8px 24px rgba(124,58,237,.35); }
.ai-fab.hide { display: none; }
.ai-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 140; }
.ai-panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(440px, 100vw); z-index: 141; background: var(--bg); border-left: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.2); animation: slidein .18s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.ai-panel .aih { display: flex; align-items: center; gap: 8px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--panel); }
.ai-panel .aih b { flex: 1; font-size: 16px; }
.ai-panel .aibox { flex: 1; min-height: 0; display: flex; }
.aichat { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.ai-cols .aibox { display: flex; height: calc(100vh - 210px); min-height: 460px; }
.aimsgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.aimsg { display: flex; }
.aimsg.user { justify-content: flex-end; }
.aimsg .bub { max-width: 86%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: 14.5px; }
.aimsg.user .bub { background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.aimsg.assistant .bub { background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.aimsg .bub .md p:first-child, .aimsg .bub .md h1:first-child, .aimsg .bub .md h2:first-child { margin-top: 0; }
.aimsg .bub .md p:last-child { margin-bottom: 0; }
.aimsg.typing .bub span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin: 0 2px; animation: blink 1s infinite; }
.aimsg.typing .bub span:nth-child(2) { animation-delay: .2s; } .aimsg.typing .bub span:nth-child(3) { animation-delay: .4s; }
.aisave { display: flex; gap: 4px; margin-top: 6px; }
.aiwelcome { text-align: center; color: var(--muted); padding: 24px 10px; margin: auto 0; }
.aiwelcome b { color: var(--ink); font-size: 17px; display: block; margin: 6px 0; }
.aiwelcome p { max-width: 420px; margin: 6px auto; font-size: 14px; }
.aiprompts { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; scrollbar-width: none; border-top: 1px solid var(--line2); }
.aiprompts .chip { cursor: pointer; font-size: 12.5px; padding: 4px 10px; flex: none; max-width: none; background: var(--panel); }
.aiinput { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.aiinput textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); outline: none; max-height: 160px; font-size: 15px; line-height: 1.4; }
.aiinput textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.aiinput .mic.on { background: var(--bad-soft); color: var(--bad); animation: blink 1s infinite; }
@media (max-width: 900px) {
  .ai-fab { bottom: calc(78px + env(safe-area-inset-bottom)); right: 14px; width: 48px; height: 48px; font-size: 21px; }
  .aibtn-top { display: none; }
  .sticky { position: static; }
  .ai-cols .aibox { height: calc(100vh - 330px); min-height: 380px; }
  .statstrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rowacts .btn.opt { display: none; }
  .mcard { flex-wrap: wrap; }
  .mcard .rowacts { width: 100%; justify-content: flex-start; padding-left: 70px; }
  .aiinput textarea { font-size: 16px; }
}
