/* Frame dashboard, 1280x800 touch panel, Android WebView 106 (Chrome 106): no CSS nesting, :has(),
   oklch/color-mix, 4/8-digit hex colours or dvh units. The system is described in DESIGN.md:
   a gallery wall. One mat, one grid, real edges on every surface, a serif for words read aloud. */
:root {
  --bg: #15120F;
  --side-bg: #110F0C;
  --panel: #1E1A16;
  --panel2: #272219;
  --fg: #F3EEE6;
  --dim: #A79D90;
  --faint: #6F675C;
  --hair: rgba(255, 240, 220, 0.08);
  --hair2: rgba(255, 240, 220, 0.14);
  --hi: rgba(255, 240, 220, 0.06);
  --amber: #F0B35A;
  --amber-soft: rgba(240, 179, 90, 0.16);
  --rain: #7FB2F0;
  --snow: #DCE6F7;
  --good: #7CC58A;
  --bad: #E98A7A;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: Roboto, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mat: 40px;
  --side: 120px;
  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.28);
  --sh-2: 0 2px 6px rgba(0, 0, 0, 0.45), 0 26px 64px rgba(0, 0, 0, 0.6);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--sans);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: var(--side) 1fr;
  height: 100vh;
  background: radial-gradient(120% 90% at 50% 0%, #1B1713 0%, var(--bg) 60%);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.ti svg, .icon svg {
  display: block; width: 100%; height: 100%; fill: none; stroke: currentColor;
  stroke-linecap: round; stroke-linejoin: round;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- surfaces: hairline edge, inner top highlight (the emboss), resting shadow ---------- */
.calglance, .ticker, .gdrawer, .agcard, .ghrepo2, .wxhour, .wxdays, .stat, .sess, .ovcard, .arow.on, .search, .chip, .rcard, .scard, .seg, .brightpop, .empty {
  background: var(--panel);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 var(--hi), var(--sh-1);
}

/* ---------- the spine (sidebar) ---------- */
.side {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 12px 16px;
  background: var(--side-bg);
  border-right: 1px solid var(--hair);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.5);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 0 12px; border-radius: var(--r-lg); border: 1px solid transparent;
  color: var(--faint); font-size: 14px; letter-spacing: 0.2px;
}
.tab .ti { width: 30px; height: 30px; }
.tab .ti svg { stroke-width: 1.6; }
.tab.on { background: var(--panel2); color: var(--fg); border-color: var(--hair); box-shadow: inset 0 1px 0 var(--hi), var(--sh-1); }
.tab.on .ti { color: var(--amber); }
.badge {
  position: absolute; top: 8px; right: 16px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--good); color: #10200F; font-size: 13px; font-weight: 700; line-height: 20px; text-align: center;
}
.lightbtn { margin-top: auto; }
.lightbtn .ti { color: var(--amber); }
.sideclock { text-align: center; font-family: var(--serif); font-size: 24px; font-weight: 400; color: var(--dim); padding: 12px 0 2px; font-variant-numeric: tabular-nums; }

/* ---------- views ---------- */
main { position: relative; overflow: hidden; }
.view { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: none; }
.view.on { display: block; }
.status { position: fixed; right: var(--mat); bottom: 14px; font-size: 14px; color: var(--faint); }
.status.stale { color: var(--amber); }

/* ---------- home, clock + weather (shown when no photo album is set) ---------- */
.home { height: 100%; padding: var(--mat); display: grid; grid-template-rows: 1fr auto; gap: 24px; transition: opacity 3s ease; }
.night .home { opacity: 0.45; }
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; }
.clock { font-family: var(--serif); font-size: 112px; font-weight: 300; line-height: 1.02; letter-spacing: -1px; }
.date { margin-top: 18px; font-size: 26px; color: var(--dim); }
.place { margin-top: 6px; font-size: 20px; color: var(--faint); }
.now { display: grid; justify-items: end; text-align: right; gap: 6px; }
.nowrow { display: flex; align-items: center; gap: 14px; }
.temp { font-family: var(--serif); font-size: 124px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.cond { font-size: 32px; }
.hilo { font-size: 24px; color: var(--dim); font-variant-numeric: tabular-nums; }
.meta { font-size: 20px; color: var(--faint); }
.icon .s { stroke: var(--amber); }
.icon .r { stroke: var(--rain); }
.icon .n { stroke: var(--snow); }
.icon .b { stroke: var(--amber); }
.icon .f { stroke: var(--dim); }
.icon.big { width: 110px; height: 110px; }
.icon.big svg { stroke-width: 1.2; }
.forecast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; border-top: 1px solid var(--hair); padding-top: 22px; }
.day { display: grid; justify-items: center; gap: 6px; }
.day .name { font-size: 18px; color: var(--dim); }
.day .icon { width: 52px; height: 52px; }
.day .icon svg { stroke-width: 1.6; }
.day .hl { font-size: 26px; font-variant-numeric: tabular-nums; }
.day .lo { color: var(--faint); margin-left: 10px; }
.day .pop { font-size: 16px; color: var(--rain); min-height: 20px; }

/* ---------- home, the matted print (Google Photos) ---------- */
.photohome { position: absolute; inset: 0; background: #0E0C0A; overflow: hidden; }
/* the echo: the same photo at 96 px wide, upscaled and darkened; no blur filter needed */
.pbg { position: absolute; inset: -24px; background-position: center; background-size: cover; opacity: 0; transition: opacity 1.4s ease; }
.pbg.on { opacity: 1; }
.pbg::after { content: ""; position: absolute; inset: 0; background: rgba(12, 10, 8, 0.6); }
.pslide {
  position: absolute; top: var(--mat); right: var(--mat); bottom: var(--mat); left: var(--mat); z-index: 1;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.pslide.on { opacity: 1; }
.pslide img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 240, 220, 0.1), var(--sh-2);
}
/* a soft shelf of shadow at the foot so the clock reads on any print */
.photohome::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 300px; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 8, 6, 0.74), rgba(10, 8, 6, 0));
}
.pclock { position: absolute; left: var(--mat); bottom: 34px; z-index: 3; color: var(--fg); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.pctime { font-family: var(--serif); font-size: 96px; font-weight: 300; line-height: 1.02; letter-spacing: -1.5px; max-width: 760px; }
.pcdate { font-size: 26px; color: rgba(243, 238, 230, 0.86); margin-top: 12px; }
.pcweather { font-size: 24px; color: rgba(243, 238, 230, 0.78); margin-top: 8px; max-width: 680px; }
.calglance {
  position: absolute; top: var(--mat); right: var(--mat); z-index: 3; width: 400px;
  padding: 18px 22px 14px; border-radius: var(--r-xl);
  background: rgba(22, 19, 16, 0.76);
  text-align: left; color: var(--fg);
}
.cghead { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 26px; font-weight: 400; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hair2); }
.cghead .cgtitle { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cgnav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hair2); background: rgba(255, 240, 220, 0.06); color: var(--fg); display: grid; place-items: center; flex: none; }
.cgnav:disabled { opacity: 0.28; }
.cgnav .ti { width: 20px; height: 20px; display: block; }
.cgnav .ti svg { stroke-width: 2; }
.cglist { max-height: 530px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cgmore { font-size: 16px; color: var(--faint); padding: 6px 0 2px; }
.cgrow { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: baseline; gap: 14px; padding: 7px 0; }
.cgtime { font-size: 18px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cgtitle { font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cgempty { font-size: 20px; color: var(--dim); padding: 6px 0; }
/* a small stock ticker, floating in the print's bottom-right corner */
.ticker {
  position: absolute; right: var(--mat); bottom: 34px; z-index: 3;
  display: flex; align-items: baseline; gap: 10px; padding: 8px 16px 9px;
  border-radius: var(--r-md, 12px); background: rgba(22, 19, 16, 0.76); color: var(--fg);
  font-size: 18px; white-space: nowrap;
}
.ticker .tsym { font-weight: 500; letter-spacing: 0.4px; color: rgba(243, 238, 230, 0.86); }
.ticker .tpx { font-family: var(--serif); font-size: 25px; font-variant-numeric: tabular-nums; }
.ticker .tch { font-size: 17px; font-variant-numeric: tabular-nums; }
.ticker .tch.up { color: var(--good); }
.ticker .tch.down { color: var(--bad); }
.ticker .twhen { font-size: 15px; color: var(--faint); margin-left: 2px; }

/* ---------- shared bits ---------- */
.empty { padding: 48px 40px; text-align: center; color: var(--dim); font-size: 22px; line-height: 1.5; border-radius: var(--r-xl); }
.empty b { color: var(--fg); font-weight: 500; }
.empty code { font-size: 16px; color: var(--amber); }
.pill { display: inline-block; padding: 5px 12px; border-radius: var(--r-sm); font-size: 15px; background: var(--panel2); color: var(--dim); border: 1px solid var(--hair); }
.pill.working { background: rgba(124, 197, 138, 0.14); color: var(--good); }
.pill.running { background: var(--amber-soft); color: var(--amber); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 6px; background: var(--faint); flex: none; }
.dot.working { background: var(--good); box-shadow: 0 0 0 4px rgba(124, 197, 138, 0.18); }
.dot.running { background: var(--amber); }

/* ---------- weather tab ---------- */
.wx { height: 100%; overflow-y: auto; padding: var(--mat); display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; }
.wxnow { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(300px, 400px); gap: 28px; align-items: center; padding-bottom: 6px; }
.wxnow .wicon { width: 140px; height: 140px; }
.wxnow .wicon svg { stroke-width: 1.15; }
.wxnow .wtemp { font-family: var(--serif); font-size: 124px; font-weight: 300; line-height: 1; letter-spacing: -2px; }
.wxnow .wcond { font-family: var(--serif); font-size: 36px; font-weight: 400; margin-top: 2px; }
.wxnow .wmeta { font-size: 21px; color: var(--dim); margin-top: 8px; }
.wxnow .wwear { font-family: var(--serif); font-size: 24px; line-height: 1.32; padding-left: 28px; border-left: 1px solid var(--hair2); }
.wxh { min-width: 0; }
.wxhead { font-family: var(--serif); font-size: 24px; margin-bottom: 14px; }
.wxhours { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; -webkit-overflow-scrolling: touch; }
.wxhour { flex: none; width: 94px; border-radius: var(--r-md); padding: 14px 0 15px; display: grid; justify-items: center; gap: 8px; }
.wxhour .ht { font-size: 15px; color: var(--dim); font-variant-numeric: tabular-nums; }
.wxhour .hic { width: 40px; height: 40px; }
.wxhour .hic svg { stroke-width: 1.7; }
.wxhour .htemp { font-size: 23px; font-variant-numeric: tabular-nums; }
.wxhour .hpop { font-size: 13px; color: var(--rain); min-height: 17px; }
.wxdays { display: grid; border-radius: var(--r-lg); overflow: hidden; }
.wxday { display: grid; grid-template-columns: 150px 48px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 24px; border-top: 1px solid var(--hair); }
.wxday:first-child { border-top: 0; }
.wxday .dname { font-size: 22px; }
.wxday .dic { width: 42px; height: 42px; }
.wxday .dic svg { stroke-width: 1.7; }
.wxday .dpop { font-size: 16px; color: var(--rain); }
.wxday .dtemp { font-size: 23px; font-variant-numeric: tabular-nums; text-align: right; }
.wxday .dtemp .lo { color: var(--faint); margin-left: 16px; }
.wxsrc { font-size: 14px; color: var(--faint); }

/* ---------- agents ---------- */
.agents { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100%; }
.alist { padding: var(--mat) 16px var(--mat) var(--mat); border-right: 1px solid var(--hair); overflow-y: auto; display: grid; align-content: start; gap: 6px; }
.arow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid transparent; text-align: left; }
.arow.on { background: var(--panel2); }
.arow .an { font-size: 20px; }
.arow .as { font-size: 14px; color: var(--faint); margin-top: 2px; }
.adetail { padding: var(--mat); overflow-y: auto; }
.ahead { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.ahead h2 { margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 400; }
.ahead .upd { margin-left: auto; font-size: 15px; color: var(--faint); }
.spend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { border-radius: var(--r-lg); padding: 16px 20px; }
.stat .sl { font-size: 14px; color: var(--faint); }
.stat .sv { font-size: 32px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sn { font-size: 13px; color: var(--faint); margin-top: 4px; }
.sessions { display: grid; gap: 12px; }
.sess { border-radius: var(--r-lg); padding: 16px 20px; }
.sess .st { display: flex; align-items: center; gap: 12px; }
.sess .stt { font-size: 21px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sess .sw { font-size: 14px; color: var(--faint); white-space: nowrap; }
.sess .sm { font-size: 14px; color: var(--faint); margin-top: 6px; }
.sess .sp { font-size: 17px; color: var(--dim); margin-top: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ovgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ovcard { border-radius: var(--r-lg); padding: 18px 20px; text-align: left; }
.ovcard .oh { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.ovcard .om { font-size: 15px; color: var(--faint); margin-top: 10px; line-height: 1.5; }

/* ---------- recipes ---------- */
.recipes { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100%; }
.rbar { padding: 28px var(--mat) 14px; border-bottom: 1px solid var(--hair); }
.search {
  display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 8px 0 18px; border-radius: var(--r-md);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--hi);
}
.search .ti { width: 24px; height: 24px; color: var(--faint); flex: none; }
.search .ti svg { stroke-width: 2; }
.search input {
  flex: 1; height: 100%; background: none; border: 0; outline: none; color: var(--fg);
  font: inherit; font-size: 22px; -webkit-user-select: text; user-select: text;
}
.search input::-webkit-search-decoration, .search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.qclear { width: 42px; height: 42px; border-radius: var(--r-sm); padding: 11px; color: var(--dim); flex: none; }
.qclear svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.chips { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; padding: 2px 2px 6px; }
.chip { flex: none; padding: 9px 16px; border-radius: var(--r-md); color: var(--dim); font-size: 16px; white-space: nowrap; box-shadow: inset 0 1px 0 var(--hi); }
.chip.on { background: var(--amber-soft); color: var(--amber); border-color: rgba(240, 179, 90, 0.35); }
.chip .cnt { margin-left: 8px; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.on .cnt { color: rgba(240, 179, 90, 0.72); }
.rmain { overflow-y: auto; }
.rcount { padding: 18px var(--mat) 2px; font-size: 14px; color: var(--faint); }
.rshelves { padding: 4px 0 28px; }
.shelf { margin-top: 20px; }
.shelfhead { display: flex; align-items: baseline; gap: 12px; padding: 0 var(--mat) 12px; }
.shelfhead .sn { font-family: var(--serif); font-size: 26px; font-weight: 400; }
.shelfhead .sc { font-size: 15px; color: var(--faint); }
.shelfhead .seeall { margin-left: auto; font-size: 16px; color: var(--amber); }
.shelfrow { display: flex; gap: 14px; overflow-x: auto; padding: 4px var(--mat) 14px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-padding-left: var(--mat); }
.scard { flex: none; width: 224px; scroll-snap-align: start; border-radius: var(--r-lg); overflow: hidden; text-align: left; }
.scard .cimg { display: block; width: 100%; height: 150px; object-fit: cover; }
.scard .ct { padding: 12px 14px 4px; font-size: 18px; line-height: 1.25; height: 68px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scard .cm { padding: 0 14px 14px; font-size: 14px; color: var(--faint); }
.rgrid { padding: 10px var(--mat) 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 236px; gap: 14px; }
.rcard { border-radius: var(--r-lg); overflow: hidden; text-align: left; display: flex; flex-direction: column; content-visibility: auto; contain-intrinsic-size: 236px; }
.rimg, .cimg { background: var(--panel2); }
.rimg { display: block; width: 100%; height: 146px; object-fit: cover; flex: none; }
.rimg.none, .cimg.none { display: flex; align-items: center; justify-content: center; padding: 0 14px; text-align: center; color: var(--faint); font-family: var(--serif); font-size: 17px; }
.cimg.none { height: 150px; }
.rbody { padding: 11px 15px 12px; min-height: 0; }
.rt { font-size: 18px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .rs { font-size: 13px; color: var(--amber); margin-top: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rcard .rm { font-size: 14px; color: var(--faint); margin-top: 4px; }
.rmore { grid-column: 1 / -1; text-align: center; color: var(--faint); font-size: 16px; padding: 20px; }
.rdetail { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: var(--bg); overflow-y: auto; padding: 30px var(--mat) 44px; }
.rdtop { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 26px; }
.rdtop.noimg { grid-template-columns: minmax(0, 1fr); }
.rdimg { display: block; width: 360px; height: 260px; object-fit: cover; border-radius: var(--r-lg); background: var(--panel2); box-shadow: 0 0 0 1px var(--hair), var(--sh-2); }
.rdimg.none { display: flex; align-items: center; justify-content: center; color: var(--faint); font-family: var(--serif); font-size: 18px; }
.rdsrc { font-size: 15px; color: var(--amber); margin-top: 6px; }
.rdh { display: flex; align-items: flex-start; gap: 20px; }
.rdh h2 { flex: 1; margin: 0; font-family: var(--serif); font-size: 40px; font-weight: 400; line-height: 1.15; }
.close { width: 54px; height: 54px; border-radius: 27px; background: var(--panel2); border: 1px solid var(--hair); box-shadow: inset 0 1px 0 var(--hi); padding: 15px; flex: none; }
.close svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--fg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rdmeta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.rddesc { font-size: 19px; color: var(--dim); line-height: 1.5; margin: 10px 0 0; }
.rdcols { display: grid; grid-template-columns: 2fr 3fr; gap: 34px; }
.rdcols h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); }
.rdcols ul, .rdcols ol { margin: 0; padding-left: 24px; font-size: 19px; line-height: 1.45; }
.rdcols li { margin-bottom: 9px; }

/* ---------- traffic ---------- */
.traffic { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; height: 100%; }
.tbar { display: flex; align-items: center; gap: 22px; padding: 28px var(--mat) 16px; }
.ttitle { font-family: var(--serif); font-size: 32px; font-weight: 400; }
.seg { display: flex; border-radius: var(--r-md); padding: 4px; }
.seg button { padding: 9px 18px; border-radius: var(--r-sm); font-size: 16px; color: var(--dim); border: 1px solid transparent; }
.seg button.on { background: var(--panel2); color: var(--fg); border-color: var(--hair); box-shadow: inset 0 1px 0 var(--hi); }
.tsum { margin-left: auto; text-align: right; font-size: 15px; color: var(--faint); line-height: 1.45; }
.tsum b { color: var(--fg); font-size: 22px; font-weight: 500; }
.tlist {
  padding: 4px var(--mat) var(--mat); overflow-y: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(13, auto);
  column-gap: 28px; align-content: start;
}
.trow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 150px 92px 64px; align-items: center; gap: 10px; height: 46px; border-top: 1px solid var(--hair); }
.trow .rk { font-size: 14px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.trow .nm { font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.trow .sk { height: 32px; }
.trow .sk svg { display: block; width: 150px; height: 32px; }
.trow .vv { font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.trow .ch { font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.up { color: var(--good); }
.down { color: var(--bad); }

/* ---------- brightness: a screen-wide dimmer and a slider reachable from any tab ---------- */
.dim { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 50; transition: opacity 0.15s linear; }
.brightpop {
  position: fixed; left: calc(var(--side) + 16px); bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; width: 420px;
  border-radius: var(--r-xl); background: var(--panel2); box-shadow: inset 0 1px 0 var(--hi), var(--sh-2);
}
.brightpop .ti { width: 30px; height: 30px; flex: none; }
.brightpop .bdim { color: var(--faint); }
.brightpop .bbright { color: var(--amber); }
.brightpop input[type="range"] { flex: 1; height: 44px; -webkit-appearance: none; appearance: none; background: transparent; }
.brightpop input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: rgba(255, 240, 220, 0.14); }
.brightpop input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; margin-top: -11px; width: 32px; height: 32px; border-radius: 16px; background: var(--fg); border: 0; box-shadow: var(--sh-1); }

/* ---------- grocery, the shared list ---------- */
.grocery { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto minmax(0, 1fr); gap: 16px 28px; padding: var(--mat); }
.ghead { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 22px; }
.ghead h1 { font-family: var(--serif); font-size: 44px; font-weight: 300; line-height: 1; margin: 0; letter-spacing: -0.5px; }
.gcount { font-size: 20px; color: var(--dim); }
.gcount b { font-family: var(--serif); font-size: 30px; font-weight: 400; color: var(--fg); margin-right: 4px; }
.gupd { margin-left: auto; font-size: 14px; color: var(--faint); }
.glist { min-height: 0; overflow-y: auto; padding: 0 6px 24px 0; -webkit-overflow-scrolling: touch; }
.gcat { margin-bottom: 16px; }
.gcath { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 8px; border-bottom: 1px solid var(--hair2); margin-bottom: 2px; font-family: var(--serif); font-size: 22px; color: var(--dim); }
.gcath span { font-family: var(--sans); font-size: 14px; color: var(--faint); font-variant-numeric: tabular-nums; }
.grow { display: flex; align-items: center; min-height: 66px; border-bottom: 1px solid var(--hair); }
.grow:last-child { border-bottom: 0; }
.ghit { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 14px; padding: 0 8px 0 4px; text-align: left; color: var(--fg); background: none; border: 0; font: inherit; }
.gbox { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; color: transparent; box-shadow: inset 0 0 0 2px var(--hair2); transition: background 0.2s, transform 0.2s; }
.gbox svg { width: 22px; height: 22px; stroke-width: 2.6; }
.gname { flex: 1; min-width: 0; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gqty { display: flex; align-items: center; border-radius: 999px; background: var(--panel2); box-shadow: inset 0 1px 0 var(--hi); margin-left: 6px; }
.gqty .gq { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--dim); background: none; border: 0; }
.gqty .gq svg { width: 20px; height: 20px; stroke-width: 2.2; }
.gqty .gq:active { background: var(--hair2); }
.gqty .n { min-width: 24px; text-align: center; font-size: 21px; font-variant-numeric: tabular-nums; }
.grow.checking .gbox { background: var(--amber); color: var(--bg); box-shadow: none; transform: scale(1.08); }
.grow.checking .gname { color: var(--faint); text-decoration: line-through; }
.grow.checking .gqty { opacity: 0.3; }
.gempty { font-family: var(--serif); font-size: 38px; font-weight: 300; color: var(--dim); text-align: center; padding: 90px 0 40px; line-height: 1.2; }
.gempty i { display: block; font-size: 20px; font-style: normal; font-family: var(--sans); color: var(--faint); margin-top: 10px; }
.gdrawer { margin-top: 14px; border-radius: var(--r-lg); overflow: hidden; }
.gdrawerh { width: 100%; min-height: 60px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 19px; color: var(--dim); background: none; border: 0; font: inherit; }
.gdrawerh b { color: var(--fg); font-weight: 500; }
.ggot { width: 100%; min-height: 54px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 19px; color: var(--faint); text-decoration: line-through; background: none; border: 0; font: inherit; border-top: 1px solid var(--hair); }
.ggot span { text-decoration: none; font-size: 14px; color: var(--dim); }
.gclear { margin: 10px 20px 16px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--hair2); background: none; color: var(--dim); font-size: 16px; }
.gside { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.gadd { flex: none; }
.gsub { font-size: 14px; color: var(--faint); padding: 4px 2px 0; }
.gsuggest { min-height: 0; overflow-y: auto; }
.gusuals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gtile { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 72px; padding: 12px 14px; border-radius: var(--r-md); text-align: left; color: var(--fg); background: var(--panel); border: 0; font: inherit; }
.gtile b { font-size: 18px; font-weight: 500; line-height: 1.1; }
.gtile span { font-size: 13px; color: var(--faint); }
.gtile:active { transform: scale(0.96); }
.gtile.on { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 1px rgba(240, 179, 90, 0.35); }
.gtile.on span { color: inherit; opacity: 0.8; }
.gac { display: flex; flex-direction: column; gap: 8px; }
.gacrow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 16px 0 20px; border-radius: var(--r-md); text-align: left; color: var(--fg); background: var(--panel); border: 0; font: inherit; }
.gacrow b { flex: 1; min-width: 0; font-size: 20px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gacrow span { font-size: 14px; color: var(--faint); white-space: nowrap; }
.gacrow .ti { width: 24px; height: 24px; color: var(--amber); flex: none; }
.gacrow .ti svg { stroke-width: 2.2; }
.gacrow.new { background: transparent; box-shadow: inset 0 0 0 1px var(--hair2); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 20px; padding: 14px 22px; border-radius: var(--r-lg); background: #2A241D; color: var(--fg); font-size: 18px; border: 1px solid var(--hair2); box-shadow: var(--sh-2); max-width: 760px; }
.toast button { background: none; border: 0; color: var(--amber); font: inherit; font-weight: 500; padding: 4px 2px; }
.toast[hidden] { display: none; }

/* ---------- agents, cards ---------- */
.agentsv { height: 100%; overflow-y: auto; padding: var(--mat); -webkit-overflow-scrolling: touch; }
.aghead { display: flex; align-items: baseline; gap: 20px; margin-bottom: 18px; }
.aghead h1 { font-family: var(--serif); font-size: 44px; font-weight: 300; margin: 0; line-height: 1; letter-spacing: -0.5px; }
.agupd { margin-left: auto; font-size: 14px; color: var(--faint); }
.agupd.down { color: var(--amber); }
.aggrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 20px; }
.agcard { border-radius: var(--r-lg); padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.agtop { display: flex; align-items: center; gap: 10px; }
.agname { font-family: var(--serif); font-size: 24px; flex: 1; min-width: 0; }
.agplan { font-size: 13px; color: var(--faint); }
.agbig { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.agbig b { font-family: var(--serif); font-size: 42px; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.agbig span { font-size: 14px; color: var(--dim); }
.agrow3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.agrow3 b { display: block; font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.agrow3 span { font-size: 12px; color: var(--faint); }
.agchartwrap svg { width: 100%; height: auto; display: block; }
.agchart rect { fill: rgba(240, 179, 90, 0.42); }
.agchart rect.today { fill: var(--amber); }
.agchart rect.zero { fill: var(--hair2); }
.agchart text { fill: var(--faint); font-size: 12px; font-family: var(--sans); }
.agchart text.v { fill: var(--dim); font-size: 11px; }
.agmodels { display: flex; flex-wrap: wrap; gap: 6px; }
.agmodels span { font-size: 12px; color: var(--dim); padding: 4px 9px; border-radius: var(--r-sm); background: var(--panel2); }
.agsess { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--hair); padding-top: 10px; }
.agsrow { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.agsf { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.agsw { color: var(--faint); font-size: 13px; white-space: nowrap; }
.agnone { font-size: 14px; color: var(--faint); border-top: 1px solid var(--hair); padding-top: 10px; }
.gstores { margin-left: 6px; }
.gstores button { padding: 8px 13px; font-size: 15px; white-space: nowrap; }
.gstores button .n { margin-left: 6px; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.gstores button.on .n { color: var(--dim); }
.gname small { font-size: 13px; color: var(--faint); margin-left: 10px; font-weight: 400; }
.gstore { flex: none; margin-left: 8px; padding: 7px 11px; border-radius: var(--r-sm); font-size: 13px; color: var(--dim); background: var(--panel2); white-space: nowrap; }
.gstore.none { color: var(--amber); background: none; border: 1px dashed rgba(240, 179, 90, 0.5); }

/* ---------- github ---------- */
.githubv { height: 100%; overflow: hidden; padding: var(--mat); display: flex; flex-direction: column; }
.ghhead { display: flex; align-items: baseline; gap: 20px; margin-bottom: 16px; flex: none; }
.ghhead h1 { font-family: var(--serif); font-size: 44px; font-weight: 300; margin: 0; line-height: 1; letter-spacing: -0.5px; }
.ghsum { font-size: 18px; color: var(--dim); }
.ghsum b { font-family: var(--serif); font-size: 28px; color: var(--fg); font-weight: 400; margin-right: 4px; }
.ghupd { margin-left: auto; font-size: 14px; color: var(--faint); }
.ghbody { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
.ghtl { min-height: 0; overflow-y: auto; padding-right: 6px; -webkit-overflow-scrolling: touch; }
.ghday { font-family: var(--serif); font-size: 22px; color: var(--dim); padding: 16px 4px 8px; border-bottom: 1px solid var(--hair2); margin-bottom: 2px; }
.ghday:first-child { padding-top: 0; }
.ghrow { display: grid; grid-template-columns: 50px 150px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--hair); }
.ght { font-size: 14px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 4px; }
.ghrepo { font-size: 13px; color: var(--dim); background: var(--panel2); padding: 4px 9px; border-radius: var(--r-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; justify-self: start; max-width: 150px; }
.ghmsg { font-size: 18px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ghmsg small { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }
.ghrow.merged .ghmsg { color: var(--good); }
.ghrow.pr .ghmsg { color: var(--amber); }
.ghrepos { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ghrh { font-size: 14px; color: var(--faint); padding: 0 4px 8px; }
.ghrepo2 { border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px; }
.ghrn { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.ghpriv { font-size: 11px; color: var(--faint); border: 1px solid var(--hair2); border-radius: var(--r-sm); padding: 2px 6px; }
.ghrm { font-size: 14px; color: var(--dim); margin-top: 3px; }
.ghrp { font-size: 13px; color: var(--faint); margin-top: 2px; }
