/* SELVO (was Frost). Black and white, calm cards, Satoshi for text, Clash Display for titles, Tabular for numbers.
   The SELVO wordmark (Bespoke Stencil, drawn as paths in index.html) only in the header.
   Motion: things glide and build, nothing bounces or teleports (cubic-bezier .22,1,.36,1). */
@font-face { font-family: 'Satoshi'; src: url(../fonts/Satoshi-Variable.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url(../fonts/ClashDisplay-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Tabular'; src: url(../fonts/Tabular-Variable.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #050506; --fg: #f3f4f6; --mute: rgba(243, 244, 246, .56); --faint: rgba(243, 244, 246, .34);
  --p1: rgba(255, 255, 255, .055); --p2: rgba(255, 255, 255, .085); --p3: rgba(255, 255, 255, .13);
  --seg-on: rgba(255, 255, 255, .13); --sheet: #121214; --toast: #1d1d20;
  --acc: #86ccff; --acc-ink: #04121f; --acc-soft: rgba(134, 204, 255, .15);
  --warn: #ffb36b; --warn-soft: rgba(255, 179, 107, .16); --danger: #ff7b7b;
  --bar: rgba(8, 8, 10, .94);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 22px;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  /* tab bar: capsule height and its gap to the bottom edge (15 px on a 34 px inset: just above the home indicator, like iOS 26; 8 px without one) */
  --tabh: 64px; --tabb: max(8px, calc(var(--sb) - 19px));
  --glass: rgba(28, 28, 32, .74); --glass-edge: rgba(255, 255, 255, .12); --glass-pill: rgba(255, 255, 255, .1); --glass-pill-hi: rgba(255, 255, 255, .17);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f1f1f3; --fg: #0c0d0f; --mute: rgba(12, 13, 15, .56); --faint: rgba(12, 13, 15, .34);
  --p1: #ffffff; --p2: rgba(12, 13, 15, .055); --p3: rgba(12, 13, 15, .1);
  --seg-on: #ffffff; --sheet: #f7f7f8; --toast: #16171a;
  --acc: #1671d4; --acc-ink: #ffffff; --acc-soft: rgba(22, 113, 212, .11);
  --warn: #c86a12; --warn-soft: rgba(230, 130, 30, .13); --danger: #d63c3c;
  --bar: rgba(241, 241, 243, .94);
  --glass: rgba(255, 255, 255, .72); --glass-edge: rgba(0, 0, 0, .08); --glass-pill: rgba(12, 13, 15, .06); --glass-pill-hi: rgba(12, 13, 15, .11);
  color-scheme: light;
}
[data-theme="light"] .card.list, [data-theme="light"] .seg, [data-theme="light"] .ci, [data-theme="light"] .st, [data-theme="light"] .idea { background: var(--p1); }
[data-theme="light"] .seg > .ind { box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
[data-theme="light"] .seg { background: var(--p2); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg); }
body { color: var(--fg); font: 400 16px/1.42 'Satoshi', -apple-system, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; transition: opacity .22s, background-color .22s, color .22s; }
button:active, .btn:active, label.idr:active { opacity: .7; transition: opacity 0s; }
button:disabled { opacity: .4; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
/* Tabular only where a clock or a counter is the hero; mixed text like "9 h 30" stays in Satoshi */
.tn-times span:not(.tn-dur) b, .rg-in b, .st b, .next-t b, .slot-h .num, .cl b { font-family: 'Tabular', 'Satoshi', sans-serif; letter-spacing: -.02em; }
.mut { color: var(--mute); }
.small { font-size: 14px; line-height: 1.45; }
.small + .small { margin-top: 8px; }
.danger { color: var(--danger); }
.i { width: 22px; height: 22px; fill: currentColor; flex: none; }
.i.inl { width: 15px; height: 15px; vertical-align: -2px; }
.i.chev { width: 15px; height: 15px; color: var(--faint); margin-left: auto; }

/* ---------------------------------------------------------------- frame */
#app { position: fixed; inset: 0; }
#main { position: absolute; inset: 0; transition: transform .44s var(--ease); will-change: transform; }
#main::after { content: ''; position: absolute; inset: 0; background: #000; opacity: calc(var(--dim, 0) * .38); pointer-events: none; transition: opacity .44s var(--ease); z-index: 5; }
.view { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translate3d(0, 6px, 0); transition: opacity .18s var(--ease), transform .3s var(--ease), visibility 0s linear .3s; }
.view.on { opacity: 1; visibility: visible; transform: none; transition: opacity .28s var(--ease) .05s, transform .36s var(--ease) .05s, visibility 0s; }
.scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding: calc(var(--st) + 10px) 0 calc(var(--tabh) + var(--tabb) + 32px); }
.pad { padding: 0 16px; max-width: 560px; margin: 0 auto; }
.mini { position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: calc(var(--st) + 44px); padding-top: var(--st); display: grid; place-items: center; background: var(--bar); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); opacity: 0; transition: opacity .22s var(--ease); pointer-events: none; font-weight: 650; font-size: 16.5px; }
.view.scrolled .mini { opacity: 1; }

/* ---------------------------------------------------------------- headers */
.vh { padding: 6px 4px 0; margin-bottom: 18px; }
.vh-row { display: flex; align-items: center; justify-content: space-between; min-height: 38px; }
.vh-sub { color: var(--mute); font-size: 14.5px; font-weight: 500; }
.lt { font: 600 34px/1.08 'Clash Display', 'Satoshi', sans-serif; letter-spacing: 0; text-wrap: balance; margin-top: 2px; min-height: 37px; }
.write { display: block; overflow: visible; max-width: 100%; }
.write text { font: 600 34px 'Clash Display', 'Satoshi', sans-serif; fill: var(--fg); fill-opacity: 0; stroke: var(--fg); stroke-width: .9; stroke-dasharray: 160; stroke-dashoffset: 160; }
.write.go text { animation: draw 1.25s var(--ease) forwards, fillin .55s var(--ease) .85s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; stroke-opacity: 0; } }
.icb { width: 38px; height: 38px; border-radius: 50%; background: var(--p1); display: grid; place-items: center; color: var(--fg); }
.icb.sm { width: 32px; height: 32px; }
.icb .i { width: 20px; height: 20px; }
.lbl { font-size: 13.5px; font-weight: 650; color: var(--mute); margin: 26px 6px 9px; }

/* ---------------------------------------------------------------- surfaces */
.card { background: var(--p1); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.card.lead { padding: 18px; }
.card.tight { padding: 13px 15px; }
.card.quiet { background: var(--acc-soft); }
.card.list { padding: 5px 0; }
.card.dim { opacity: .55; }
.card, .ci, .st { transition: background-color .25s var(--ease), opacity .3s var(--ease); }
.line { font-size: 19px; line-height: 1.4; font-weight: 500; text-wrap: pretty; }
.note { font-size: 12.5px; color: var(--faint); margin: 18px 6px 0; line-height: 1.45; }
.foot { text-align: center; color: var(--faint); font-size: 12.5px; margin: 26px 0 6px; }
.empty { color: var(--mute); padding: 14px 16px; font-size: 15px; }
.inst { display: flex; gap: 12px; align-items: flex-start; }
.inst b { display: block; font-weight: 650; }
.inst p { color: var(--mute); font-size: 14.5px; margin-top: 3px; }
.inst .x { margin-left: auto; color: var(--mute); padding: 2px; }
.inst .x .i { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- check rows */
.chk, .pl, .idr, .hs { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 11px 16px; min-height: 52px; }
.txt { min-width: 0; flex: 1; text-align: left; }
.txt b { display: block; font-weight: 600; font-size: 16px; transition: color .25s var(--ease); }
.txt small { display: block; color: var(--mute); font-size: 13.5px; margin-top: 1px; line-height: 1.35; }
.box { width: 26px; height: 26px; border-radius: 50%; background: var(--p2); display: grid; place-items: center; flex: none; transition: background-color .22s var(--ease); }
.box.md { background: var(--acc-soft); }
.box.hi { background: var(--warn-soft); }
.ck { width: 18px; height: 18px; fill: none; stroke: var(--acc-ink); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.ck path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s var(--ease); }
.on > .box, .tk.on .box { background: var(--acc); }
.on > .box .ck path, .tk.on .box .ck path, .stp.on .ck path { stroke-dashoffset: 0; }
.chk.on .txt b, .pl.on .txt b, .tk.on .txt b { color: var(--mute); }
.box.plus { background: transparent; color: var(--acc); }
.box.plus .i { width: 20px; height: 20px; }
.pl-t { width: 42px; flex: none; font-size: 13.5px; color: var(--mute); }
.pl.add .txt b { color: var(--acc); font-weight: 600; }
.idr.add .txt b { color: var(--acc); }
.idr.add .chev { color: var(--acc); }

/* ---------------------------------------------------------------- today */
.cis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.ci { background: var(--p1); border-radius: 18px; padding: 12px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.ci .i { color: var(--mute); width: 22px; height: 22px; margin-bottom: 3px; transition: color .25s var(--ease); }
.ci b { font-size: 12.5px; font-weight: 650; }
.ci small { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 3px; }
.ci.on { background: var(--acc-soft); }
.ci.on .i { color: var(--acc); }
.next { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.next-i { width: 36px; height: 36px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; flex: none; }
.next-i .i { width: 19px; height: 19px; }
.next small { display: block; color: var(--mute); font-size: 12.5px; }
.next b { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.next-t { margin-left: auto; text-align: right; flex: none; }
.next-t b { font-size: 21px; font-weight: 500; }
.streaks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.streaks .st { grid-column: span 2; }
.streaks .st:nth-child(n + 4) { grid-column: span 3; }
.st { background: var(--p1); border-radius: 18px; padding: 12px 14px; }
.st b { display: block; font-size: 25px; font-weight: 500; line-height: 1.1; }
.st b i { font-style: normal; color: var(--faint); font-size: 17px; }
.st small { display: block; color: var(--mute); font-size: 12.5px; margin-top: 2px; }

/* ---------------------------------------------------------------- segmented + chips */
.seg { position: relative; display: flex; background: var(--p1); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.seg > button { position: relative; z-index: 1; flex: 1; min-width: 0; height: 36px; color: var(--mute); font-weight: 650; font-size: 14px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; transition: color .22s var(--ease); }
.seg > button.on { color: var(--fg); }
.seg > button:active { opacity: 1; color: var(--fg); }
.seg > .ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 10px; background: var(--seg-on); transition: transform .22s var(--ease), width .22s var(--ease); will-change: transform; }
.chips { display: flex; gap: 6px; margin: 4px 0 6px; }
.chip { flex: 1; height: 36px; border-radius: 11px; background: var(--p2); color: var(--mute); font-weight: 650; font-size: 13px; }
.chip.on { background: var(--acc-soft); color: var(--acc); }

/* strip calendar (plan) */
.seg.strip > button { height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.seg.strip small { font-size: 11px; font-weight: 600; }
.seg.strip b { font-size: 17px; font-weight: 500; line-height: 1.1; display: grid; place-items: center; height: 20px; }
.seg.strip b .i { width: 17px; height: 17px; }
.seg.strip i { width: 4px; height: 4px; border-radius: 50%; background: transparent; margin-top: 3px; transition: background-color .2s; }
.seg.strip i.has { background: var(--acc); }

/* ---------------------------------------------------------------- forms */
.form .fr { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 0; }
.form .fr > span { font-size: 15.5px; }
.fh { font-size: 13px; font-weight: 650; color: var(--mute); margin: 14px 0 8px; }
.form .fh:first-child { margin-top: 0; }
.tin { -webkit-appearance: none; appearance: none; border: 0; border-radius: 10px; background: var(--p2); color: var(--fg); font: 500 16.5px 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; padding: 7px 10px; min-width: 92px; min-height: 36px; text-align: center; }
.tin::-webkit-date-and-time-value { text-align: center; }
.tin:focus, .ti:focus, .ta:focus { outline: none; background: var(--p3); }
.ti, .ta { width: 100%; -webkit-appearance: none; appearance: none; border: 0; border-radius: 14px; background: var(--p2); color: var(--fg); font: 400 17px/1.4 'Satoshi', sans-serif; padding: 13px 14px; }
.ti.flat { padding: 10px 12px; font-size: 16px; }
.ta { resize: none; margin: 10px 0 4px; }
::placeholder { color: var(--faint); }
.tg { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--p3); position: relative; flex: none; margin: 0; transition: background-color .22s var(--ease); cursor: pointer; }
.tg::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .24s var(--ease); }
.tg:checked { background: var(--acc); }
.tg:checked::after { transform: translate3d(20px, 0, 0); }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 16px; min-height: 56px; }
.card.tight .sw-row { padding: 0; min-height: 0; }
.sw-row b { display: block; font-weight: 600; }
.sw-row small { display: block; font-size: 13.5px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 15px; background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 16px; white-space: nowrap; }
.btn .i { width: 19px; height: 19px; }
.btn.sm { height: 36px; padding: 0 15px; border-radius: 11px; font-size: 14.5px; }
.btn.ghost { background: var(--p2); color: var(--fg); }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.danger { background: var(--danger); color: #fff; }
label.btn { cursor: pointer; }
.link { color: var(--acc); font-weight: 650; font-size: 15px; padding: 12px 0 2px; }
.link.danger { color: var(--danger); display: block; margin: 6px auto 0; }
.rowx { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; }
.rowx > div { min-width: 0; }
.rowx b { display: block; font-weight: 600; font-size: 16px; }
.rowx small { display: block; font-size: 13.5px; margin-top: 1px; }
.rowx + .chips { margin-top: 14px; }
.rowb { display: flex; justify-content: space-between; margin-top: 4px; }
.rowb .link.danger { margin: 0; padding: 12px 0 2px; display: inline; }

/* ---------------------------------------------------------------- sleep */
.tn-times { display: flex; align-items: flex-end; gap: 12px; }
.tn-times small { display: block; color: var(--mute); font-size: 12.5px; font-weight: 600; }
.tn-times b { font-size: 31px; font-weight: 500; line-height: 1.1; }
.tn-arrow { color: var(--faint); padding-bottom: 6px; }
.tn-arrow .i { width: 16px; height: 16px; }
.tn-dur { margin-left: auto; text-align: right; }
.tn-dur b { color: var(--acc); font-size: 23px; }
.tn-status { color: var(--mute); margin: 12px 0 14px; font-size: 15px; }
.chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cl { background: var(--p1); border-radius: 14px; padding: 9px 12px; }
.cl b { display: block; font-size: 18px; font-weight: 500; }
.cl small { display: block; color: var(--mute); font-size: 12px; }
.cl.warn b { color: var(--warn); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar-bg { fill: var(--p1); }
.chart .bar { fill: var(--p3); }
.chart .bar.ok { fill: var(--acc); }
.chart .band { fill: var(--acc-soft); }
.chart .bx { fill: var(--mute); font: 600 11px 'Satoshi', sans-serif; }
.chart .bv { fill: var(--fg); font: 600 11px 'Satoshi', sans-serif; }
.chart-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13.5px; color: var(--mute); }
.chart-foot b { color: var(--fg); font-weight: 500; }
.leg { display: inline-flex; align-items: center; gap: 6px; }
.leg .sw { width: 12px; height: 12px; border-radius: 4px; background: var(--acc-soft); }
.tip { font-size: 17px; line-height: 1.45; text-wrap: pretty; }

/* ---------------------------------------------------------------- food */
.chk.cnt { padding-right: 12px; }
.ctr { display: flex; align-items: center; gap: 4px; flex: none; }
.cb { width: 34px; height: 34px; border-radius: 50%; background: var(--p2); display: grid; place-items: center; }
.cb .i { width: 17px; height: 17px; }
.cn { min-width: 46px; text-align: center; }
.cn b { font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.cn i { font-style: normal; color: var(--faint); font-size: 12.5px; }
.wk { display: grid; grid-template-columns: minmax(0, 1fr) repeat(7, 22px); gap: 11px 7px; align-items: center; }
.wk-d { text-align: center; color: var(--mute); font-size: 12px; font-weight: 650; }
.wk-d.now { color: var(--acc); }
.wk-h { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 13px; height: 13px; border-radius: 50%; background: var(--p2); justify-self: center; transition: background-color .25s var(--ease); }
.dot.on { background: var(--acc); }
.dot.fut { opacity: .45; }
.ideas { display: grid; gap: 8px; }
.idea { background: var(--p1); border-radius: 18px; padding: 14px 16px; }
.idea b { font-weight: 650; }
.idea p { color: var(--mute); font-size: 14.5px; margin-top: 3px; line-height: 1.45; }

/* ---------------------------------------------------------------- train */
.hero small { font-size: 13px; font-weight: 650; }
.hero-t { display: block; font: 600 25px/1.15 'Clash Display', 'Satoshi', sans-serif; margin: 4px 0 6px; }
.hero p { color: var(--mute); font-size: 15px; }
.mv { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 16px; }
.mv b { display: block; font-weight: 600; font-size: 15.5px; }
.mv small { display: block; color: var(--mute); font-size: 13px; line-height: 1.35; margin-top: 1px; }
.mv > .num { flex: none; font-size: 16px; }
.mv.head, .mv.foot { color: var(--mute); font-size: 13px; font-weight: 600; padding-top: 9px; padding-bottom: 7px; }
.mv.head .num { font-size: 13px; }
.lg { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; }
.lg b { display: block; font-weight: 600; }
.lg small { display: block; color: var(--mute); font-size: 13px; }
.lg-r { text-align: right; }
.felt.easy { color: var(--acc); }
.felt.hard { color: var(--warn); }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { position: relative; padding: 6px 0 6px 18px; font-size: 15px; line-height: 1.45; }
.rules li::before { content: ''; position: absolute; left: 2px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.doc { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); font-size: 14.5px; line-height: 1.45; }

/* workout player */
.screen.player .scroll { padding-bottom: calc(var(--sb) + 24px); }
.pl-wrap, .pl-done { text-align: center; padding-top: 4px; }
.pl-sec { display: flex; justify-content: space-between; color: var(--mute); font-size: 14px; font-weight: 600; }
.ring { position: relative; width: min(70vw, 290px); aspect-ratio: 1; margin: 20px auto 8px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rg-bg { fill: none; stroke: var(--p2); stroke-width: 11; }
.rg { fill: none; stroke: var(--acc); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.rest .rg { stroke: var(--mute); }
.rg-in { position: absolute; inset: 0; display: grid; place-content: center; }
.rg-in b { font-size: 66px; font-weight: 400; line-height: 1; }
.rg-in small { color: var(--mute); font-size: 14px; margin-top: 4px; }
.pl-name { font: 600 28px/1.15 'Clash Display', 'Satoshi', sans-serif; margin: 14px 0 6px; text-wrap: balance; }
.pl-cue { color: var(--mute); font-size: 16px; line-height: 1.45; max-width: 330px; margin: 0 auto; min-height: 46px; }
.pl-ctl { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 26px 0 12px; }
.cbtn { width: 60px; height: 60px; border-radius: 50%; background: var(--p2); display: grid; place-items: center; }
.cbtn.main { width: 78px; height: 78px; background: var(--acc); color: var(--acc-ink); }
.cbtn.main .i { width: 30px; height: 30px; }
.pl-nextup { color: var(--faint); font-size: 14px; }
.pl-done .big { display: block; font: 600 44px 'Clash Display', sans-serif; margin: 40px 0 8px; }
.pl-done p { color: var(--mute); margin-bottom: 22px; }

/* ---------------------------------------------------------------- skin */
.card.list .lh { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 16px 4px; }
.card.list .lh b { font: 600 18px 'Clash Display', 'Satoshi', sans-serif; }
.card.list .lh small { font-size: 13px; }
.card.list:not(.act) .lh b { color: var(--mute); }
.dots { display: inline-flex; gap: 4px; vertical-align: 1px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--p3); }
.dots i.on { background: var(--acc); }
.th { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--p2); flex: none; display: block; }
.th.none { display: block; }
.th.big { width: 76px; height: 76px; border-radius: 14px; }
.hs .sc { flex: none; }
.photo-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; }

/* ---------------------------------------------------------------- plan */
.qa { display: flex; gap: 8px; margin-bottom: 12px; }
.qa input { flex: 1; min-width: 0; -webkit-appearance: none; appearance: none; border: 0; border-radius: 15px; background: var(--p1); color: var(--fg); font: 400 17px 'Satoshi', sans-serif; padding: 0 15px; height: 50px; }
.qa input:focus { outline: none; background: var(--p2); }
.qa-b { width: 50px; height: 50px; border-radius: 15px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.tk { display: flex; align-items: center; gap: 13px; padding: 0 16px; min-height: 54px; transition: opacity .3s var(--ease); }
.tk > .box { width: 26px; height: 26px; }
.tk .txt { padding: 10px 0; }
.tk .txt small .i { width: 13px; height: 13px; vertical-align: -1px; }

/* ---------------------------------------------------------------- post */
.slot-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.slot-h b { display: block; font-weight: 650; }
.slot-h small { display: block; font-size: 13.5px; }
.slot-h .num { font-size: 21px; font-weight: 500; flex: none; }
.slot-h .num.late { color: var(--warn); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.stp { height: 38px; border-radius: 12px; background: var(--p2); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 14.5px; }
.stp .box { width: 20px; height: 20px; background: var(--p3); }
.stp .ck { width: 14px; height: 14px; }
.stp.on { background: var(--acc-soft); color: var(--acc); }
.stp.on .box { background: var(--acc); }

/* ---------------------------------------------------------------- tab bar (1.5.0)
   Five tabs on a floating glass capsule, the way iOS 26 does it: it sits above the home indicator (its gap
   follows env(safe-area-inset-bottom)), the content fades out under it, and the selected tab's pill glides.
   Each tab is a full-height column (about 74 x 56 pt at 390 wide), icon 26 pt, label 11 pt. */
.tabwrap { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding: 0 max(14px, env(safe-area-inset-left, 0px)) var(--tabb); pointer-events: none; transition: transform .44s var(--ease); }
.tabwrap::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tabh) + var(--tabb) + 30px); background: linear-gradient(to bottom, transparent, var(--bg) 52%); pointer-events: none; }
body.stacked .tabwrap { transform: translate3d(-25%, 0, 0); }
.seg.tabbar { pointer-events: auto; margin: 0 auto; max-width: 480px; height: var(--tabh); padding: 4px; border-radius: calc(var(--tabh) / 2); background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: inset 0 0 0 .5px var(--glass-edge), 0 8px 28px rgba(0, 0, 0, .28); }
.seg.tabbar > button { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border-radius: calc((var(--tabh) - 8px) / 2); color: var(--mute); font: 600 11px/1.1 var(--sys); letter-spacing: .01em; }
.seg.tabbar > button .i { width: 26px; height: 26px; }
.seg.tabbar > button.on { color: var(--acc); }
.seg.tabbar > button:active { opacity: 1; color: var(--fg); }
.seg.tabbar > button.on:active { color: var(--acc); }
.seg.tabbar > .ind { top: 4px; bottom: 4px; border-radius: calc((var(--tabh) - 8px) / 2); background: var(--glass-pill); box-shadow: none; transition: transform .34s var(--ease), width .34s var(--ease); }

/* ---------------------------------------------------------------- pushed screens */
#stack { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.screen { position: absolute; inset: 0; background: var(--bg); transform: translate3d(100%, 0, 0); transition: transform .44s var(--ease); pointer-events: auto; box-shadow: -14px 0 32px rgba(0, 0, 0, .28); }
.screen.open { transform: none; }
.screen .scroll { padding-top: calc(var(--st) + 58px); padding-bottom: calc(var(--sb) + 30px); }
.sbar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: calc(var(--st) + 50px); padding-top: var(--st); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: transparent; transition: background-color .22s var(--ease); }
.screen.scrolled .sbar { background: var(--bar); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); }
.back { justify-self: start; display: flex; align-items: center; gap: 1px; color: var(--acc); font-size: 17px; font-weight: 500; padding: 8px 12px 8px 6px; }
.back .i { width: 22px; height: 22px; }
.sbar-t { font-weight: 650; font-size: 16.5px; }

/* ---------------------------------------------------------------- sheets */
#sheets { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .34s var(--ease); }
.sheet-wrap.open .scrim { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: var(--kb, 0px); max-height: calc(100% - var(--st) - 20px); display: flex; flex-direction: column; background: var(--sheet); border-radius: 26px 26px 0 0; padding: 8px 18px calc(var(--sb) + 18px); transform: translate3d(0, 105%, 0); transition: transform .44s var(--ease); max-width: 640px; margin: 0 auto; }
.sheet-wrap.open .sheet { transform: none; }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--p3); margin: 0 auto 8px; flex: none; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.sh-t { font: 600 23px/1.2 'Clash Display', 'Satoshi', sans-serif; margin: 6px 0 4px; }
.sh-s { color: var(--mute); font-size: 14.5px; margin-bottom: 14px; }
.sheet .seg { background: var(--p2); }
.sheet .ti { margin: 8px 0 2px; }

/* ---------------------------------------------------------------- toast, pull to refresh */
#toast { position: fixed; z-index: 50; left: 50%; bottom: calc(var(--tabh) + var(--tabb) + 14px); transform: translate3d(-50%, 8px, 0); background: var(--toast); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .3s var(--ease); max-width: calc(100% - 40px); text-align: center; }
#toast.show { opacity: 1; transform: translate3d(-50%, 0, 0); }
.ptr { position: relative; height: 0; }
.ptr svg { position: absolute; left: 50%; top: -48px; width: 26px; height: 26px; margin-left: -13px; transform: rotate(-90deg); opacity: var(--p, 0); }
.ptr circle { fill: none; stroke: var(--acc); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0) * .85); }
.ptr.spin svg { animation: spin .7s linear infinite; opacity: 1; }
@keyframes spin { to { transform: rotate(270deg); } }

/* ---------------------------------------------------------------- motion */
.enter { animation: rise .56s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
.m-in { animation: fade .34s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translate3d(0, 6px, 0); } }
@media (prefers-reduced-motion: reduce) {
  .enter, .m-in { animation: none; }
  .write.go text { animation: none; fill-opacity: 1; stroke-opacity: 0; }
  .view, .view.on, .screen, .sheet, #main, .tabwrap { transition-duration: .12s; }
}
/* ================================================================ iOS controls (v1.2)
   System font for controls, inset grouped lists with inset separators, gliding segmented pill, 51x31 switch,
   finger-drag sliders, steppers, time pills + wheel pickers, action sheets. Frost's dark ground + accent stay. */
:root {
  --sys: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Satoshi', sans-serif;
  --fill: rgba(118, 118, 128, .24); --fill2: rgba(118, 118, 128, .32);
  --sepc: rgba(84, 84, 88, .55); --hl: rgba(255, 255, 255, .09);
  --seg-pill: #636366; --sl-bg: rgba(120, 120, 128, .36); --as-bg: #252528;
  --thumb-sh: 0 .5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04);
}
[data-theme="light"] {
  --fill: rgba(118, 118, 128, .12); --fill2: rgba(118, 118, 128, .2);
  --sepc: rgba(60, 60, 67, .22); --hl: rgba(0, 0, 0, .06);
  --seg-pill: #ffffff; --sl-bg: rgba(120, 120, 128, .2); --as-bg: #f9f9fb;
}
@property --slp { syntax: '<number>'; inherits: true; initial-value: 0; }

/* inset grouped lists: rows edge to edge inside the rounded card, hairlines inset to the text */
.card.list { padding: 0; overflow: hidden; }
.card.list > * { position: relative; }
.card.list > * + *::before { content: ''; position: absolute; top: 0; left: var(--si, 16px); right: 0; height: 1px; transform: scaleY(.5); transform-origin: 0 0; background: var(--sepc); pointer-events: none; }
.card.list > .lh + *::before, .card.list > .mv.head + *::before { display: none; }
.card.list > .chk, .card.list > .tk { --si: 55px; }
.card.list > .pl { --si: 110px; }
.card.list > .hs { --si: 73px; }
/* the iOS tap highlight: a row darkens at once and fades back on release; no scale, no bounce */
.card.list > button, .card.list > label { transition: background-color .32s ease; }
.card.list > button:active, .card.list > label:active { opacity: 1; background: var(--hl); transition: background-color 0s; }
.gr { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding: 7px 16px; text-align: left; }
.gr-l { font-size: 16px; min-width: 0; }
.gr-l small { display: block; color: var(--mute); font-size: 13px; margin-top: 1px; line-height: 1.35; }
.gr-l.acc { color: var(--acc); font-weight: 600; font-size: 15px; }
.gr.col { flex-direction: column; align-items: stretch; gap: 0; padding: 11px 16px 9px; }
.gr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gr-v { font: 600 17px var(--sys); font-variant-numeric: tabular-nums; }
.gr-hint { display: block; color: var(--mute); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.card.list.in-sheet { background: var(--p2); margin: 6px 0 6px; border-radius: 14px; }
.fh.out { margin: 4px 6px 8px; }
.warn-t { color: var(--warn) !important; }

/* switch: 51x31, white knob slides in 200 ms */
.tg { width: 51px; height: 31px; border-radius: 16px; background: var(--fill2); transition: background-color .2s ease; }
.tg::after { top: 2px; left: 2px; width: 27px; height: 27px; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform .2s var(--ease); }
.tg:checked { background: var(--acc); }
.tg:checked::after { transform: translate3d(20px, 0, 0); }
.tg:active { opacity: 1; }

/* segmented control: grey track, one raised pill that glides */
.seg:not(.tabbar):not(.strip):not(.fc-seg) { background: var(--fill); border-radius: 9px; padding: 2px; }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > button { height: 30px; border-radius: 7px; font: 500 13.5px var(--sys); color: var(--fg); letter-spacing: -.01em; }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > button.on { font-weight: 600; }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > .ind { top: 2px; bottom: 2px; border-radius: 7px; background: var(--seg-pill); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }

/* slider: 4 px track, accent fill, 28 px white thumb, 44 px touch target, finger anywhere on the track */
.ios-sl { position: relative; height: 44px; touch-action: none; cursor: pointer; outline: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: --slp .2s var(--ease); }
.ios-sl.drag { transition: none; }
.ios-sl .sl-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--sl-bg); }
.ios-sl .sl-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--acc); width: calc(14px + var(--slp) * (100% - 28px)); }
.ios-sl .sl-track i { position: absolute; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
[data-theme="light"] .ios-sl .sl-track i { background: rgba(0, 0, 0, .16); }
.ios-sl .sl-thumb { position: absolute; top: 50%; left: calc(var(--slp) * (100% - 28px)); width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; background: #fff; box-shadow: var(--thumb-sh); will-change: left; }
.ios-sl:focus-visible .sl-thumb { outline: 2px solid var(--acc); outline-offset: 2px; }
.ios-sl input.sl-native[type=range] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; flex: none; }

/* stepper: one grey capsule, minus | plus */
.stepper { display: inline-flex; align-items: center; height: 32px; border-radius: 9px; background: var(--fill); flex: none; }
.stepper button { width: 47px; height: 32px; display: grid; place-items: center; color: var(--fg); border-radius: 9px; transition: background-color .3s ease, opacity .2s; }
.stepper button:active { opacity: 1; background: var(--fill); transition: background-color 0s; }
.stepper button:disabled { opacity: .3; }
.stepper .i { width: 17px; height: 17px; }
.stepper i { width: 1px; height: 18px; background: var(--sepc); }
.ctr { gap: 10px; }
.cn { min-width: 38px; text-align: right; }
.cn b { font: 600 18px var(--sys); font-variant-numeric: tabular-nums; }
.chk.cnt { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 2px; }
.cnt-top { display: flex; align-items: center; gap: 13px; }
.chk.cnt .ios-sl { margin: 0 0 0 39px; }
.chk.cnt.on .cnt-top > .box { background: var(--acc); }
.chk.cnt.on .cnt-top > .box .ck path { stroke-dashoffset: 0; }

/* time pill (opens the wheel) */
.tpill { flex: none; min-width: 74px; height: 34px; padding: 0 11px; border-radius: 8px; background: var(--fill); color: var(--fg); font: 400 17px var(--sys); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* wheel picker */
.wh { position: relative; display: flex; justify-content: center; align-items: center; gap: 2px; height: 180px; margin: 4px 0 6px; font-family: var(--sys); -webkit-mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent); }
.wh-band { position: absolute; left: 6px; right: 6px; top: 72px; height: 36px; border-radius: 9px; background: var(--fill); pointer-events: none; }
.wh-col { position: relative; z-index: 1; width: 78px; height: 180px; padding: 72px 0; overflow-y: scroll; overflow-x: hidden; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; perspective: 380px; }
.wh-col::-webkit-scrollbar { display: none; }
.wh-it { height: 36px; line-height: 36px; text-align: center; font-size: 23px; color: var(--mute); scroll-snap-align: center; font-variant-numeric: tabular-nums; backface-visibility: hidden; transition: color .12s; cursor: pointer; }
.wh-it.c { color: var(--fg); }
.wh-colon { position: relative; z-index: 1; font-size: 23px; font-weight: 600; padding-bottom: 3px; }
.wh-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.wh-btns .btn { width: 100%; }

/* action sheet: one floating group + a separate Cancel */
.sheet-wrap.as .sheet { background: transparent; padding: 0 8px calc(var(--sb) + 8px); border-radius: 0; }
.sheet-wrap.as .grab { display: none; }
.as-grp, .as-cancel { background: var(--as-bg); border-radius: 14px; overflow: hidden; -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6); }
.as-h { padding: 14px 18px 13px; text-align: center; font-family: var(--sys); }
.as-h b { display: block; font-size: 13.5px; font-weight: 600; color: var(--mute); }
.as-h small { display: block; font-size: 13px; color: var(--mute); margin-top: 3px; line-height: 1.35; }
.as-b { position: relative; display: block; width: 100%; height: 57px; font: 400 20px var(--sys); color: var(--acc); letter-spacing: -.01em; }
.as-grp > * + .as-b::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; transform: scaleY(.5); background: var(--sepc); }
.as-b.danger { color: var(--danger); }
.as-b:active { opacity: 1; background: var(--hl); }
.as-cancel { margin-top: 8px; font-weight: 600; }

/* large titles collapse on scroll (app.js sets opacity/transform) */
.vh .lt { transform-origin: 0 50%; will-change: opacity, transform; }

/* Today: wake-up line + bed countdown */
.sstrip { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; }
.sstrip small { display: block; color: var(--mute); font-size: 12.5px; }
.ss-a b { display: block; font-weight: 650; font-size: 17px; }
.ss-b { text-align: right; flex: none; }
.ss-b b { display: block; font: 500 21px 'Tabular', 'Satoshi', sans-serif; letter-spacing: -.02em; }
.ss-b b.warn { color: var(--warn); }

/* Sleep: the honest line, what-if, jet lag */
.tn-honest { font-weight: 600; font-size: 16px; margin-top: 12px; text-wrap: pretty; }
.tn-honest + .tn-status { margin-top: 4px; }
.wi-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wi-h span { font-weight: 600; }
.wi-h b { font: 500 24px 'Tabular', 'Satoshi', sans-serif; letter-spacing: -.02em; }
.wi .ios-sl { margin: 2px 0; }
.wi-res { color: var(--mute); font-size: 14.5px; line-height: 1.45; transition: color .2s; }
.wi-res.short { color: var(--warn); }
.jl { color: var(--mute); font-size: 13.5px; line-height: 1.45; margin-top: 10px; }

/* ---------------------------------------------------------------- app icons (1.2.1)
   Tiles get the iOS corner (22.5 %) and a hairline so a black tile still reads on the dark ground. Switching
   White/Black: the pill glides, the pictures fade out, change while hidden and fade back in. */
a.btn { text-decoration: none; }
.c { text-align: center; }
.ic-swap { transition: opacity .17s var(--ease); }
.ic-swap.out { opacity: 0; }
.ic-row img, .ic img, .ic-big img { border-radius: 22.5%; background: var(--p2); box-shadow: 0 0 0 .5px var(--sepc); }
.ic-row { display: flex; gap: 10px; margin-bottom: 16px; }
.ic-row img { width: 46px; height: 46px; display: block; }
.ic-h { font: 600 22px/1.2 'Clash Display', 'Satoshi', sans-serif; text-wrap: balance; margin-bottom: 4px; }
.ic-hero .btn.wide { margin-top: 16px; }
.ic-steps > .ic-st { --si: 42px; }
.ic-st { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; font-size: 15px; line-height: 1.4; }
.ic-n { flex: none; width: 14px; color: var(--mute); font-weight: 650; text-align: center; }
.ic-p { color: var(--mute); font-size: 14px; line-height: 1.45; margin: 0 6px 10px; }
.ic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px; padding: 18px 8px 14px; }
.ic { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.ic img { width: 60px; height: 60px; display: block; }
.ic span { font-size: 12px; color: var(--mute); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-all { margin: 0 0 4px; }
.card.list > .wp { --si: 59px; }
.wp-t { width: 30px; height: 65px; flex: none; border-radius: 7px; object-fit: cover; background: var(--p2); box-shadow: 0 0 0 .5px var(--sepc); }
/* sheets: the picture big, Save to Photos, and a long press that works (the body turns callouts off) */
.ic-big { width: 168px; margin: 8px auto 14px; }
.wp-big { width: 128px; margin: 8px auto 14px; }
.ic-big img, .wp-big img, .pv img { display: block; width: 100%; height: auto; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.ic-big img { aspect-ratio: 1; box-shadow: 0 0 0 .5px var(--sepc), 0 10px 28px rgba(0, 0, 0, .22); }
.wp-big img { aspect-ratio: 1179 / 2556; border-radius: 18px; box-shadow: 0 0 0 .5px var(--sepc), 0 10px 28px rgba(0, 0, 0, .22); }
.ic-sh .sh-s { margin-bottom: 4px; }
.ic-sh .btn.wide + .btn.wide { margin-top: 10px; }
.ic-sh .note.c { margin: 12px 6px 0; }
.pv-sh .sheet-body { display: flex; flex-direction: column; }
.pv { display: grid; place-items: center; padding: 6px 0 4px; }
.pv img { width: auto; max-width: 100%; max-height: 62vh; border-radius: 12px; }
.pv-h { text-align: center; color: var(--mute); font-size: 14.5px; margin-top: 12px; }

/* ---------------------------------------------------------------- 1.5.0 organised
   Health's section switch is a bigger iOS segmented control right under the title; Today's "Up next" is one
   grouped list (bed countdown + next reminder) with round icons and separators inset to the text. */
.seg.hseg:not(.tabbar):not(.strip):not(.fc-seg) { margin: -6px 0 20px; border-radius: 10px; }
.seg.hseg:not(.tabbar):not(.strip):not(.fc-seg) > button { height: 34px; border-radius: 8px; font-size: 14.5px; }
.seg.hseg:not(.tabbar):not(.strip):not(.fc-seg) > .ind { border-radius: 8px; }
.hsec > :first-child.lbl { margin-top: 0; }
.urow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 11px 16px; text-align: left; }
.card.list > .urow { --si: 64px; }
.sstrip .ss-a { flex: 1; min-width: 0; }
.note.top { margin: 2px 6px 0; }
.gr.col > .chips { margin-top: 9px; }

/* 1.5.1 press-and-drag (ios.js): the segment under the finger lights up, the tab bar's pill brightens while
   held; a switch knob follows the finger (--tgx) and glides home when let go */
.seg > button.hot { color: var(--fg); }
.seg.tabbar > button.hot { color: var(--acc); }
.seg.pressing > button.on:not(.hot) { color: var(--mute); }
.seg.tabbar > .ind { transform-origin: 50% 50%; }
.seg.tabbar.pressing > .ind { background: var(--glass-pill-hi); }
.tg.tg-drag::after, .tog.tg-drag::after { transform: translate3d(var(--tgx, 0px), 0, 0); transition: none; }
.tg, .tog { touch-action: pan-y; }
.screen.settings .pad > .card:first-child { margin-top: 8px; }

.fatal { position: fixed; inset: auto 10px 100px; z-index: 99; background: #300; color: #fcc; padding: 10px; font-size: 11px; white-space: pre-wrap; border-radius: 10px; }
@media (min-width: 700px) { .lt { font-size: 38px; } }

/* ================================================================ Video saver (1.3.0) */
.vs-in { display: flex; gap: 8px; margin-bottom: 12px; }
.vs-in .ti { flex: 1; min-width: 0; height: 50px; padding: 0 14px; border-radius: 15px; background: var(--p1); }
.vs-in .ti:focus { background: var(--p2); }
.vs-in .ti:disabled { opacity: .55; }
.vs-pb { flex: none; height: 50px; padding: 0 16px; font-weight: 650; }
.vs-err { color: var(--danger); font-size: 14.5px; line-height: 1.4; }
.vs-err.out { margin: -2px 6px 12px; }
.vs-pin { display: flex; gap: 14px; align-items: center; padding: 12px; }
.vs-th { flex: none; display: block; width: 76px; aspect-ratio: 9 / 16; max-height: 136px; border-radius: 10px; background: var(--p2); overflow: hidden; }
.vs-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vs-pin .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vs-pin .txt b { font-weight: 600; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vs-pin .txt small { color: var(--mute); font-size: 14px; }
/* loading: grey blocks that breathe, no sweep */
.vs-skel .vs-th, .vs-skel .txt i { animation: vs-breathe 1.4s ease-in-out infinite; }
.vs-skel .txt { flex: 1; gap: 9px; }
.vs-skel .txt i { display: block; height: 12px; width: 82%; border-radius: 6px; background: var(--p2); }
.vs-skel .txt i.s { width: 38%; }
@keyframes vs-breathe { 50% { opacity: .45; } }
.vs-seg { margin-bottom: 10px; }
.vs-out { font-size: 15px; margin: 0 6px; min-height: 21px; }
.vs-note { margin-top: 6px; }
.vs-go { margin-top: 18px; }
.vs-job { margin-top: 18px; }
.vs-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vs-row b { font-weight: 600; font-size: 16px; }
.vs-row .num { font-size: 15px; }
.vs-bar { position: relative; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 12px 0 9px; }
.vs-bar i { position: absolute; inset: 0; border-radius: 3px; background: var(--acc); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .9s var(--ease); }
.vs-eta { min-height: 20px; }
.vs-job .btn.wide { margin-top: 12px; }
.vs-done .vs-save { height: 54px; font-size: 17px; }
.vs-done .note.c { margin: 10px 6px 0; }
.vs-again { display: block; margin: 8px auto 0; }
.vs-h { font: 600 21px/1.25 'Clash Display', 'Satoshi', sans-serif; text-wrap: balance; margin-bottom: 6px; }
.vs-code { display: flex; gap: 8px; margin-top: 16px; }
.vs-code .ti { flex: 1; min-width: 0; height: 50px; padding: 0 14px; font: 600 19px 'Tabular', 'Satoshi', sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.vs-code .btn { flex: none; }
.vs-bigcode { font: 600 40px/1 'Tabular', 'Satoshi', sans-serif; letter-spacing: .1em; text-align: center; margin: 18px 0 12px; -webkit-user-select: text; user-select: text; }
.vs-bigcode span { display: inline-block; width: .5em; }
@media (prefers-reduced-motion: reduce) { .vs-skel .vs-th, .vs-skel .txt i { animation: none; } .vs-bar i { transition-duration: .2s; } }.vs-code .ti::placeholder { font: 400 17px 'Satoshi', sans-serif; letter-spacing: 0; text-transform: none; }

/* Video saver 1.4: the list of pins */
.vs-list { margin-bottom: 8px; }
.vs-list > .vs-row { --si: 76px; }
.vs-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; min-height: 64px; }
.vs-row .vs-th { width: 48px; max-height: 86px; border-radius: 8px; }
.vs-th.sk { aspect-ratio: 9 / 16; animation: vs-breathe 1.4s ease-in-out infinite; }
.vs-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vs-row .txt b { font-weight: 600; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-row .txt small { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.vs-row .txt small.vs-err { display: block; color: var(--danger); }
.vs-row .txt i.sk { display: block; height: 11px; width: 70%; border-radius: 6px; background: var(--p2); animation: vs-breathe 1.4s ease-in-out infinite; }
.vs-row .txt i.sk.s { width: 40%; }
.vs-bar.sm { height: 4px; border-radius: 2px; margin: 4px 0 0; }
.vs-bar.sm i { border-radius: 2px; }
.vs-x { flex: none; background: var(--p2); color: var(--mute); }
.vs-x .i { width: 15px; height: 15px; }
.vs-rs { flex: none; }
.vs-count { font-size: 13px; margin: 0 6px 4px; }
.vs-hint { margin-top: 2px; }
.vs-out + .vs-out { margin-top: 8px; }
.vs-out.mut { font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .vs-th.sk, .vs-row .txt i.sk { animation: none; } }
/* ================================================================ 1.6.0: form sheets (forms.js)
   One editor everywhere: bar (Cancel, title) fixed on top, sections scroll, Save pinned at the bottom. */
.sheet-wrap.fs-sheet .sheet { padding: 0 0 calc(var(--sb) + 10px); max-height: calc(100% - var(--st) - 14px); }
.sheet-wrap.fs-sheet .grab { position: absolute; left: 50%; top: 6px; margin: 0 0 0 -19px; z-index: 2; }
.sheet-wrap.fs-sheet .sheet-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden; padding: 0; }
.fs { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.fs-bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding: 8px 8px 0; }
.fs-x { justify-self: start; color: var(--acc); font: 400 17px var(--sys); padding: 10px 10px; }
.fs-t { font: 600 17px var(--sys); text-align: center; max-width: 58vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 16px 18px; }
.fs-foot { flex: none; padding: 10px 16px 0; background: linear-gradient(to bottom, transparent, var(--sheet) 14px); margin-top: -14px; position: relative; }
.fs-foot .btn.wide { margin-top: 0; height: 52px; font-size: 17px; }
.fs-h { font: 500 13px var(--sys); color: var(--mute); margin: 18px 16px 7px; letter-spacing: 0; }
.fs-scroll > .fs-h:first-child { margin-top: 6px; }
.fs-scroll > .card.list.in-sheet { margin: 0 0 4px; border-radius: 12px; }
.fs-scroll > .card.list.in-sheet:first-child { margin-top: 6px; }
.fs-n { font-size: 13px; color: var(--mute); line-height: 1.4; margin: 7px 16px 0; }
.fs-del { margin-top: 26px !important; }
.fs-del .gr { justify-content: center; }
.fs-del .gr-l { font-weight: 500; }
.fs-in { width: 100%; -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: var(--fg); font: 400 17px/1.35 var(--sys); padding: 0; min-height: 30px; }
.fs-in:focus { outline: none; }
.fs-ta { resize: none; padding: 4px 0; }
.gr.fs-tx { padding-top: 10px; padding-bottom: 10px; }
.fs-v { -webkit-appearance: none; appearance: none; border: 0; border-radius: 8px; background: var(--fill); color: var(--fg); font: 400 17px var(--sys); font-variant-numeric: tabular-nums; padding: 5px 10px; min-height: 34px; min-width: 0; max-width: 58%; text-align: right; }
.fs-v[type=text] { text-align: right; background: transparent; padding-right: 0; }
.fs-v[type=text]::placeholder { color: var(--faint); }
.fs-v:focus { outline: none; }
.fs-v.sm { width: 78px; }
.fs-v.sel { text-align: left; padding-right: 26px; }
.fs-unit { display: inline-flex; align-items: center; gap: 7px; color: var(--mute); font: 400 16px var(--sys); flex: none; }
.fs-text p { font-size: 16px; line-height: 1.5; margin: 10px 4px 0; text-wrap: pretty; }
.fs-card { padding: 6px 16px 8px; border-radius: 12px; background: var(--p2); margin: 0; }
.gr.col > .seg { margin: 9px 0 3px; }
.gr.col > .chips { margin: 9px 0 3px; }
.gr .gr-v { display: inline-flex; align-items: center; gap: 7px; font: 400 16px var(--sys); color: var(--mute); text-align: right; flex: none; max-width: 62%; justify-content: flex-end; }
.gr.photo-row { justify-content: flex-start; cursor: pointer; }
.card.list.in-sheet .gr-l.acc, .card.list .gr-l.acc { font-weight: 500; font-size: 16px; }
.acc { color: var(--acc); }

/* ================================================================ 1.6.0: Ride */
.sseg.seg:not(.tabbar):not(.strip):not(.fc-seg) { margin: 0; width: 112px; flex: none; }
.sseg.seg:not(.tabbar):not(.strip):not(.fc-seg) > button { height: 26px; font-size: 13px; }
.mapbox { position: relative; height: min(56vh, 480px); border-radius: var(--r); overflow: hidden; background: var(--p1); margin-bottom: 10px; isolation: isolate; }
.mapbox.ride { height: min(44vh, 360px); }
.mapwrap, .mapel { position: absolute; inset: 0; }
.mapel { background: #dfe3e6; }
[data-theme="dark"] .mapel .leaflet-tile-pane { filter: brightness(.88) contrast(1.04); }
.mapel.leaflet-container { font: 500 11px var(--sys); }
.leaflet-container .leaflet-control-attribution { background: rgba(255, 255, 255, .78); color: #333; font-size: 9.5px; line-height: 1.4; padding: 1px 6px; border-radius: 8px 0 0 0; max-width: 78%; }
.leaflet-container .leaflet-control-attribution a { color: #1659b3; text-decoration: none; }
.map-ctl { position: absolute; z-index: 500; top: 10px; right: 10px; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); }
.map-b { width: 44px; height: 44px; display: grid; place-items: center; color: var(--acc); }
.map-b + .map-b { box-shadow: inset 0 .5px 0 var(--sepc); }
.map-b .i { width: 20px; height: 20px; }
.map-load { position: absolute; z-index: 500; top: 12px; left: 12px; padding: 7px 11px; border-radius: 10px; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font: 500 13px var(--sys); opacity: 0; transform: translate3d(0, -4px, 0); transition: opacity .24s var(--ease), transform .3s var(--ease); pointer-events: none; }
.map-load.on { opacity: 1; transform: none; }
.map-card { position: absolute; z-index: 500; left: 10px; right: 10px; bottom: 26px; border-radius: 16px; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity .24s var(--ease), transform .34s var(--ease); pointer-events: none; }
.map-card.on { opacity: 1; transform: none; pointer-events: auto; }
.mc { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; text-align: left; }
.screen.mapfull .scroll { padding: 0; overflow: hidden; }
.screen.mapfull .pad { max-width: none; padding: 0; height: 100%; }
.screen.mapfull .sbar { background: var(--bar); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); }
.mapbox.full { position: absolute; inset: calc(var(--st) + 50px) 0 0; height: auto; border-radius: 0; margin: 0; }
.mapbox.full .map-card { bottom: calc(var(--sb) + 26px); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 2px 6px 4px; font: 500 12.5px var(--sys); color: var(--mute); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 4px; border-radius: 2px; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .35); }
.dotc { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.tag { flex: none; display: inline-block; padding: 3px 8px; border-radius: 7px; background: var(--acc-soft); color: var(--acc); font: 600 12px var(--sys); text-transform: capitalize; }
.idr.sp .tag { margin-left: 4px; text-transform: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.unv { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font: 600 11px var(--sys); vertical-align: 1px; white-space: nowrap; }
.card.list > .lh + .idr::before { display: none; }
.sp-h { padding: 4px 4px 0; margin-bottom: 14px; }
.sp-t { font: 600 30px/1.1 'Clash Display', 'Satoshi', sans-serif; text-wrap: balance; margin-top: 3px; }
.sp-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.sp-a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 2px 9px; border-radius: 16px; background: var(--p1); color: var(--acc); font: 600 12.5px var(--sys); text-decoration: none; transition: background-color .22s var(--ease), color .22s var(--ease); }
.sp-a .i { width: 22px; height: 22px; }
.sp-a.on { background: var(--acc-soft); }
.sp-note { font-size: 15px; line-height: 1.45; margin-top: 10px; }
.sp-cd { color: var(--mute); font-size: 14px; margin-top: 4px; }
.mbar { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; text-align: center; font: 600 11px var(--sys); color: var(--faint); }
.mbar i { display: block; height: 8px; border-radius: 3px; background: var(--p2); margin-bottom: 5px; }
.mbar .on { color: var(--fg); }
.mbar .on i { background: var(--acc); }
.mbar .now { color: var(--acc); }
.dbar { display: flex; gap: 3px; height: 10px; border-radius: 5px; overflow: hidden; margin: 4px 0 8px; }
.dbar i { display: block; min-width: 4px; }
.dleg { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 14px var(--sys); color: var(--mute); }
.dleg b { color: var(--fg); font-weight: 600; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-now > b { font: 600 40px/1 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; }
.wx-now span b { display: block; font-weight: 600; }
.wx-now small { display: block; font-size: 13px; }
.wx-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.wx-d { background: var(--p1); border-radius: 12px; padding: 8px 8px 7px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wx-d b { font: 650 18px 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; }
.wx-d small { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fine { font-size: 12px; color: var(--faint); margin-top: 10px; line-height: 1.4; }
.rec .rec-h { display: flex; align-items: center; gap: 8px; color: var(--mute); font: 600 13px var(--sys); }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff5a4f; animation: recp 1.6s ease-in-out infinite; }
@keyframes recp { 50% { opacity: .35; } }
.rec-big { font: 500 50px/1.05 'Tabular', 'Satoshi', sans-serif; letter-spacing: -.02em; margin: 6px 0 10px; }
.rec-st { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rec-st span { background: var(--p1); border-radius: 14px; padding: 9px 11px; min-width: 0; }
.rec-st b { display: block; font: 650 16.5px 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-st small { display: block; color: var(--mute); font-size: 12px; }
.rec-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rec-btns .btn { width: 100%; }
.recs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recs .st { text-align: left; }
.recs .st b { font: 650 19px 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.g { background: var(--p1); border-radius: 16px; padding: 11px 12px 10px; min-width: 0; }
.g b { display: block; font: 650 17px 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g small { display: block; color: var(--mute); font-size: 12px; margin-top: 1px; }
.run { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.card.list > .run { --si: 52px; }
.run-n { width: 24px; height: 24px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font: 600 12.5px var(--sys); flex: none; }
.bk-t { font: 600 24px/1.15 'Clash Display', 'Satoshi', sans-serif !important; margin-top: 2px; }
.svc { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; min-height: 62px; }
.svc > .txt { display: block; text-align: left; }
.svc.due .txt small { color: var(--warn); }
.pbar { display: block; position: relative; height: 4px; border-radius: 2px; background: var(--fill); margin-top: 7px; overflow: hidden; }
.pbar i { position: absolute; inset: 0; border-radius: 2px; background: var(--acc); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .5s var(--ease); }
.svc.due .pbar i { background: var(--warn); }
.icb.ghosted { background: transparent; }
.card.list > .svc { --si: 16px; }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
[data-theme="light"] .sheet-wrap.fs-sheet .sheet { background: #f2f2f6; }
[data-theme="light"] .fs-foot { background: linear-gradient(to bottom, transparent, #f2f2f6 14px); }
[data-theme="light"] .card.list.in-sheet, [data-theme="light"] .fs-card { background: #ffffff; }

/* ================================================================ 1.7.0 */
.btn.wide.sp-plan { margin: 4px 0 2px; }
.lp { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; padding: 5px 0; }
.lp-n { display: inline-flex; align-items: center; gap: 7px; font: 400 15px var(--sys); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-n i { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.lp .pbar { margin: 0; }
.lp b { font: 600 14px var(--sys); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.pbar.out i { background: var(--warn); }
.gr.col > .pbar { margin-top: 6px; }
.goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.goal { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--p1); text-align: left; min-width: 0; }
.goal .txt b { font: 650 16px var(--sys); font-variant-numeric: tabular-nums; }
.goal .txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring-s { width: 44px; height: 44px; flex: none; transform: rotate(-90deg); }
.ring-s .rg-bg, .ring-s .rg { stroke-width: 7; }
.ring-s .rg { transition: stroke-dashoffset .6s var(--ease); }
.goal.done .ring-s .rg { stroke: var(--acc); }
.goal.add .gplus { width: 44px; height: 44px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; flex: none; }
.goal.add .txt b { color: var(--acc); }
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mth { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--p2); display: grid; place-items: center; color: var(--acc); cursor: pointer; }
.mth img, .mth video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mth .vtag { position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.mth .vtag .i { width: 12px; height: 12px; }
.mth.add .i { width: 24px; height: 24px; }
.card .btn.wide.ghost { margin-top: 12px; }
.pv video { width: 100%; max-height: 60vh; border-radius: 12px; background: #000; }
.les { --si: 74px; }
.card.list > .les { --si: 74px; }
.les-t { width: 46px; flex: none; font: 600 15px var(--sys); }
.les-t small { display: block; font-weight: 400; font-size: 12.5px; color: var(--mute); }
.les.live .les-t, .les.live .txt small { color: var(--acc); }
.mnav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.mnav b { font: 600 17px var(--sys); }
.mnav .icb:disabled { opacity: .3; }
.chk > b.num.mut { margin-left: auto; font: 600 15px var(--sys); }a.idr, a.sp-a { color: inherit; text-decoration: none; }
a.sp-a { color: var(--acc); }
.card:not(.list) > .gr { padding-left: 0; padding-right: 0; }

/* ================================================================ 1.8.0: spots, simple map, photos, bike diagram */
.pin-w { background: none; border: 0; }
.pin { display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0, 0, 0, .3); }
.pin .i { width: 58%; height: 58%; }
.pin.fav { box-shadow: 0 0 0 3px #ffb020, 0 2px 6px rgba(0, 0, 0, .3); }
.pin.been { filter: saturate(.75) brightness(.85); }
.pin.sm { flex: none; box-shadow: none; }
.clu { display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c, #3d4248); color: #fff; font: 700 12.5px var(--sys); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 2px 8px rgba(0, 0, 0, .3); }
.tchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 2px -16px 8px; padding: 2px 16px; }
.tchips::-webkit-scrollbar { display: none; }
.tchip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border-radius: 10px; background: var(--p1); color: var(--mute); font: 600 13.5px var(--sys); transition: background-color .22s var(--ease), color .22s var(--ease); }
.tchip .i { width: 18px; height: 18px; color: var(--mute); transition: color .22s var(--ease); }
.tchip.on { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--fg); }
.tchip.on .i { color: var(--c); }
.idr.sp { --si: 59px; }
.card.list > .idr.sp { --si: 59px; }
.mapwrap.simple .mapel { background: #eef0eb; }
[data-theme="dark"] .mapwrap.simple .mapel { background: #16191c; }
.mapwrap.simple .leaflet-tile-pane { filter: none; }
.leaflet-pane.leaflet-pinsPane-pane, .leaflet-pinsPane-pane { z-index: 620; }
/* photos */
.ph-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px 4px; padding: 0 16px; }
.ph-strip::-webkit-scrollbar { display: none; }
.ph { flex: none; width: 74%; max-width: 360px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--p2); scroll-snap-align: start; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.sk { animation: vs-breathe 1.4s ease-in-out infinite; }
.ph-none p { font-size: 14.5px; line-height: 1.45; }
.pv-full { position: fixed; inset: 0; z-index: 60; background: #000; opacity: 0; transition: opacity .25s var(--ease); }
.pv-full.on { opacity: 1; }
.pv-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-slide { flex: none; width: 100%; height: 100%; margin: 0; display: grid; place-items: center; scroll-snap-align: center; overflow: hidden; }
.pv-slide img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: 50% 50%; transition: transform .25s var(--ease); touch-action: none; }
.pv-bar { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--st) + 8px) 12px 8px; display: flex; align-items: center; justify-content: space-between; color: #fff; }
.pv-bar button { width: 40px; height: 40px; border-radius: 50%; background: rgba(40, 40, 44, .7); color: #fff; display: grid; place-items: center; }
.pv-n { font: 600 14px var(--sys); }
.pv-cap { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sb) + 12px); padding: 12px 14px; border-radius: 14px; background: rgba(28, 28, 32, .82); color: #fff; opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity .22s var(--ease), transform .3s var(--ease); pointer-events: none; }
.pv-cap.on { opacity: 1; transform: none; pointer-events: auto; }
.pv-cap b { display: block; font-size: 15px; }
.pv-cap small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .7); margin-top: 3px; }
.pv-cap a { color: #8fc6ff; }
/* bike */
.bike-card .bk-photo { margin: -18px -18px 14px; border-radius: var(--r) var(--r) 0 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--p2); }
.bike-card .bk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bike-dia { margin: 10px -6px 0; }
.bike-svg { width: 100%; height: auto; display: block; overflow: visible; }
.bike-svg .ty { fill: none; stroke: var(--p3); stroke-width: 7; }
.bike-svg .rim { fill: none; stroke: var(--sepc); stroke-width: 1.5; }
.bike-svg .rot { fill: none; stroke: var(--faint); stroke-width: 2; }
.bike-svg .hub { fill: var(--faint); }
.bike-svg .fr, .bike-svg .fk, .bike-svg .drp, .bike-svg .bar { stroke: var(--fg); stroke-width: 6; stroke-linecap: round; opacity: .82; }
.bike-svg .fk { stroke: var(--acc); opacity: .9; }
.bike-svg .drp { stroke-width: 4; opacity: .6; }
.bike-svg .bar { stroke-width: 4; }
.bike-svg .shk { stroke: var(--acc); stroke-width: 7; stroke-linecap: round; opacity: .9; }
.bike-svg .ring { fill: none; stroke: var(--faint); stroke-width: 3; }
.bike-svg .chain { fill: none; stroke: var(--faint); stroke-width: 1.6; }
.bike-svg .sad { fill: var(--fg); opacity: .82; }
.bike-svg .hs { cursor: pointer; }
.bike-svg .hit { fill: transparent; }
.bike-svg .dotm { fill: var(--bg); stroke: var(--mute); stroke-width: 2; }
.bike-svg .bad { stroke: var(--bg); stroke-width: 2.5; }
.bike-svg .due .bad { fill: #e5484d; }
.bike-svg .soon .bad { fill: #f0a020; }
.bike-svg .hs text { fill: #fff; font: 800 13px var(--sys); pointer-events: none; }
.bk-r .gr-l small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-r.on .gr-l { color: var(--acc); }
#bk-res:empty { display: none; }
/* ================================================================ SELVO 1.9.0
   The app took the SELVO name and look (frostyh.com/selvo/): pure black, or Apple grey in light mode, white or ink
   as the only accent, calm solid cards, capsule segmented controls whose thumb glides, capsule buttons. Colour is
   kept for status only (due, wet, muddy). Every token is set in both themes, so this block wins in both. */
:root {
  --bg: #000000; --fg: #f5f5f7; --mute: rgba(245, 245, 247, .6); --faint: rgba(245, 245, 247, .38);
  --p1: #161617; --p2: #232325; --p3: #2f2f32;
  --seg-on: #f5f5f7; --sheet: #161617; --toast: #2a2a2c;
  --acc: #f5f5f7; --acc-ink: #000000; --acc-soft: rgba(245, 245, 247, .1);
  --bar: rgba(0, 0, 0, .8);
  --glass: rgba(29, 29, 31, .8); --glass-edge: rgba(255, 255, 255, .1); --glass-pill: rgba(255, 255, 255, .13); --glass-pill-hi: rgba(255, 255, 255, .2);
  --fill: #2a2a2c; --fill2: #3a3a3c; --seg-pill: #f5f5f7; --seg-ink: #000000; --as-bg: #232325;
  --hl: rgba(255, 255, 255, .08); --sepc: rgba(255, 255, 255, .1); --tg-knob-on: #000000;
  --st-dry: rgba(245, 245, 247, .1); --st-dry-t: #f5f5f7; --st-tacky: rgba(48, 209, 88, .16); --st-tacky-t: #4cd97b;
  --st-wet: rgba(100, 170, 255, .16); --st-wet-t: #8ec0ff; --st-mud: rgba(255, 179, 107, .17); --st-mud-t: #ffb86b;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f5f7; --fg: #1d1d1f; --mute: rgba(29, 29, 31, .6); --faint: rgba(29, 29, 31, .4);
  --p1: #ffffff; --p2: #ececf0; --p3: #dedee3;
  --seg-on: #ffffff; --sheet: #f5f5f7; --toast: #1d1d1f;
  --acc: #1d1d1f; --acc-ink: #ffffff; --acc-soft: rgba(29, 29, 31, .07);
  --bar: rgba(245, 245, 247, .84);
  --glass: rgba(255, 255, 255, .8); --glass-edge: rgba(0, 0, 0, .07); --glass-pill: rgba(29, 29, 31, .07); --glass-pill-hi: rgba(29, 29, 31, .12);
  --fill: #e8e8ed; --fill2: #d2d2d7; --seg-pill: #ffffff; --seg-ink: #1d1d1f; --as-bg: #f9f9fb;
  --hl: rgba(0, 0, 0, .06); --sepc: rgba(0, 0, 0, .1); --tg-knob-on: #ffffff;
  --st-dry: rgba(29, 29, 31, .07); --st-dry-t: #1d1d1f; --st-tacky: rgba(36, 160, 70, .13); --st-tacky-t: #1d7a37;
  --st-wet: rgba(10, 100, 200, .11); --st-wet-t: #0a5cb8; --st-mud: rgba(200, 106, 18, .13); --st-mud-t: #a65408;
  color-scheme: light;
}
[data-theme="light"] .card.list.in-sheet { background: #ffffff; }

/* header: the wordmark, then the date, then the large title */
.vh .wm { display: block; width: 124px; height: 36px; color: var(--fg); } /* the kit's minimum: 120 px wide */
.vh-date { margin-top: 12px; }

/* capsule segmented controls like the site: grey track, one solid thumb that glides, ink text on the thumb */
.seg:not(.tabbar):not(.strip):not(.fc-seg), .seg.hseg:not(.tabbar):not(.strip):not(.fc-seg) { background: var(--fill); border-radius: 980px; padding: 3px; }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > button, .seg.hseg:not(.tabbar):not(.strip):not(.fc-seg) > button { border-radius: 980px; color: var(--mute); font-weight: 600; transition: color .22s var(--ease); }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > button.on, .seg:not(.tabbar):not(.strip):not(.fc-seg) > button.hot { color: var(--seg-ink); }
.seg.pressing:not(.tabbar):not(.strip):not(.fc-seg) > button.on:not(.hot) { color: var(--mute); }
.seg:not(.tabbar):not(.strip):not(.fc-seg) > .ind, .seg.hseg:not(.tabbar):not(.strip):not(.fc-seg) > .ind { top: 3px; bottom: 3px; border-radius: 980px; background: var(--seg-pill); box-shadow: 0 2px 8px rgba(0, 0, 0, .14), 0 0 1px rgba(0, 0, 0, .1); }
.sheet .seg:not(.tabbar):not(.strip):not(.fc-seg) { background: var(--fill); }
[data-theme="light"] .sheet .seg:not(.tabbar):not(.strip):not(.fc-seg) { background: #e3e3e8; }

/* capsule buttons; the switch keeps its knob readable on a white (dark mode) or ink (light mode) track */
.btn, .btn.sm { border-radius: 980px; font-weight: 650; }
.tg:checked::after { background: var(--tg-knob-on); }

/* setup calculators */
.calc-r { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 14.5px; line-height: 1.4; }
.calc-r span { flex: 1 1 180px; min-width: 0; }
.calc-big { flex: none; font: 700 28px/1.1 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; }
.calc-big.off { color: var(--warn); }
.calc-h { font-size: 13px; line-height: 1.4; margin-top: 4px; }
.calc-tp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.calc-tp span { background: var(--p2); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.calc-tp small { display: block; color: var(--mute); font-size: 12.5px; }
.calc-tp b { display: block; font: 700 26px/1.15 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; }

/* trail conditions: a quiet tinted label, no border */
.tcw { flex: none; margin-left: auto; padding: 4px 10px; border-radius: 8px; font: 600 13px var(--sys); background: var(--st-dry); color: var(--st-dry-t); }
.tcw-tacky { background: var(--st-tacky); color: var(--st-tacky-t); }
.tcw-wet { background: var(--st-wet); color: var(--st-wet-t); }
.tcw-muddy { background: var(--st-mud); color: var(--st-mud-t); }
.tcw-snow { background: var(--st-wet); color: var(--fg); }
.idr .tcw + .chev { margin-left: 8px; }

/* pre-ride M-check: one stroke fills as he ticks */
.mc-path { margin: 2px 0 10px; }
.mpath { display: block; width: 100%; height: 58px; }
.mpath path { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.mp-bg { stroke: var(--p3); }
.mp-fg { stroke: var(--fg); stroke-dasharray: 1; transition: stroke-dashoffset .5s var(--ease); }

/* skills list rows carry a progress bar */
.idr.sk .txt { flex: 1; min-width: 0; }

/* stats: weekly bars */
.wk-chart { display: block; width: 100%; height: auto; }
.wk-b { fill: var(--p3); transform-box: fill-box; transform-origin: 50% 100%; animation: wkgrow .6s var(--ease) both; }
.wk-b.now { fill: var(--fg); }
.wk-base { stroke: var(--sepc); stroke-width: 1; }
.wk-leg { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mute); margin-top: 6px; }
@keyframes wkgrow { from { transform: scaleY(0); } }

/* SELVO bikes: the concept line-up */
.selvo-h .wm-big { display: block; width: 176px; height: 51px; color: var(--fg); margin: 4px 0 10px; }
.sv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.sv { display: flex; flex-direction: column; min-width: 0; background: var(--p1); border-radius: 18px; overflow: hidden; color: inherit; text-decoration: none; transition: background-color .22s var(--ease); }
.sv:active { background: var(--p2); }
.sv-ph { display: block; aspect-ratio: 16 / 10; background: #ececf0; }
.sv-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sv-t { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.sv-t b { font: 600 18px/1.15 'Clash Display', 'Satoshi', sans-serif; }
.sv-t small { color: var(--mute); font-size: 12px; line-height: 1.35; }
.sv-t .sv-l { margin-top: 3px; }
@media (prefers-reduced-motion: reduce) { .wk-b { animation: none; } .mp-fg { transition-duration: .12s; } }

/* ================================================================ SELVO 1.10.0
   Light by default, Liquid Glass bars, the bottom bar at the real bottom of the installed app, iPad layout.
   Bottom inset: --sb is env(safe-area-inset-bottom). On some iOS versions an installed app with a translucent
   status bar gets a web view that ends above the screen's bottom edge, while env() still reports the full 34 px,
   so the bar was lifted twice. app.js measures that gap (screen height minus window height, standalone only) into
   --vgap, and everything at the bottom uses --sbe, the part of the inset that is really inside the page. */
:root {
  --sbe: max(0px, calc(var(--sb) - var(--vgap, 0px)));
  --tabh: 62px; --tabb: max(8px, calc(var(--sbe) - 20px));
  --spring: cubic-bezier(.2, .9, .24, 1);
  --lg-fill: rgba(38, 38, 42, .56); --lg-edge: rgba(255, 255, 255, .13); --lg-hi: rgba(255, 255, 255, .16); --lg-lo: rgba(255, 255, 255, .05);
  --lg-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3); --lg-sheen: rgba(255, 255, 255, .07);
  --lens: rgba(255, 255, 255, .14); --lens-edge: rgba(255, 255, 255, .16); --lens-hi: rgba(255, 255, 255, .2);
  --bar-glass: rgba(0, 0, 0, .62); --sheet-glass: rgba(22, 22, 24, .9); --side: 0px;
}
[data-theme="light"] {
  --lg-fill: rgba(255, 255, 255, .6); --lg-edge: rgba(0, 0, 0, .07); --lg-hi: rgba(255, 255, 255, .95); --lg-lo: rgba(255, 255, 255, .4);
  --lg-shadow: 0 10px 30px rgba(0, 0, 0, .1), 0 1px 4px rgba(0, 0, 0, .06); --lg-sheen: rgba(255, 255, 255, .55);
  --lens: rgba(29, 29, 31, .075); --lens-edge: rgba(255, 255, 255, .7); --lens-hi: rgba(255, 255, 255, .85);
  --bar-glass: rgba(245, 245, 247, .7); --sheet-glass: rgba(248, 248, 250, .9);
}
html, body { height: 100%; }
#app { position: fixed; inset: 0; }

/* the tab bar: a floating glass capsule inside the safe area, the selected tab in a glass lens that glides */
.tabwrap { padding-bottom: var(--tabb); }
.tabwrap::before { height: calc(var(--tabh) + var(--tabb) + 22px); background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 78%, transparent)); }
.seg.tabbar { max-width: 460px; height: var(--tabh); padding: 5px; border-radius: calc(var(--tabh) / 2); background: var(--lg-fill); -webkit-backdrop-filter: blur(22px) saturate(1.9) brightness(1.03); backdrop-filter: blur(22px) saturate(1.9) brightness(1.03); box-shadow: inset 0 0 0 .5px var(--lg-edge), inset 0 1px 0 var(--lg-hi), inset 0 -1px 0 var(--lg-lo), var(--lg-shadow); isolation: isolate; }
.seg.tabbar::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; background: radial-gradient(120% 70% at 30% -10%, var(--lg-sheen), transparent 60%); }
.seg.tabbar > button { gap: 1px; border-radius: calc((var(--tabh) - 10px) / 2); font: 600 10.5px/1.1 var(--sys); letter-spacing: .01em; color: var(--mute); transition: color .3s var(--ease); }
.seg.tabbar > button .i { width: 25px; height: 25px; }
.seg.tabbar > button.on { color: var(--acc); }
.seg.tabbar > .ind { top: 5px; bottom: 5px; border-radius: calc((var(--tabh) - 10px) / 2); background: var(--lens); box-shadow: inset 0 0 0 .5px var(--lens-edge), inset 0 1px 0 var(--lens-hi), 0 2px 8px rgba(0, 0, 0, .06); transition: transform .5s var(--spring), width .5s var(--spring), height .5s var(--spring), background-color .2s; }
.seg.tabbar.pressing > .ind { background: var(--glass-pill-hi); }

/* top bars and sheets get the same quiet glass; text stays on a near-solid fill so it reads */
.mini, .screen.scrolled .sbar { background: var(--bar-glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 .5px 0 var(--sepc); }
.sheet { background: var(--sheet-glass); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6); box-shadow: inset 0 1px 0 var(--lg-hi), 0 -8px 30px rgba(0, 0, 0, .12); }
[data-theme="light"] .sheet-wrap.fs-sheet .sheet, .sheet-wrap.fs-sheet .sheet { background: var(--sheet-glass); }
.sheet-wrap.as .sheet { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.fs-foot { background: linear-gradient(to bottom, transparent, var(--sheet-glass) 14px); }
#toast { bottom: calc(var(--tabh) + var(--tabb) + 14px); background: color-mix(in srgb, var(--toast) 88%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.scroll { padding-bottom: calc(var(--tabh) + var(--tabb) + 32px); }
.screen .scroll { padding-bottom: calc(var(--sbe) + 30px); }
.sheet { padding-bottom: calc(var(--sbe) + 18px); }
.sheet-wrap.fs-sheet .sheet { padding-bottom: calc(var(--sbe) + 10px); }
.sheet-wrap.as .sheet { padding-bottom: calc(var(--sbe) + 8px); }

/* photo placeholder when Commons has nothing that is really this place */
.ph-map { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 16px; background: var(--p2); margin-bottom: 10px; filter: brightness(.8) saturate(.9); }
[data-theme="light"] .ph-map { filter: none; }

/* keyboard and mouse (iPad with a keyboard, desktop) */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 10px; }
@media (hover: hover) and (pointer: fine) {
  .card.list > button:hover, .card.list > label:hover, .urow:hover, .idr:hover, .pl:hover, .gr[data-a]:hover { background-color: var(--hl); }
  .seg.tabbar > button:not(.on):hover { color: var(--fg); }
  .ci:hover, .st:hover, .icb:hover { background-color: var(--p2); }
  .btn:hover { filter: brightness(1.06); }
}

/* iPad and wide windows: the tabs become a glass sidebar, content runs in two columns */
@media (min-width: 768px) and (min-height: 500px) {
  :root { --side: 96px; }
  .tabwrap { top: 0; right: auto; width: var(--side); padding: calc(var(--st) + 16px) 0 calc(var(--sbe) + 16px) max(12px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; }
  .tabwrap::before { display: none; }
  body.stacked .tabwrap { transform: none; }
  .seg.tabbar { flex-direction: column; justify-content: flex-start; height: auto; width: calc(var(--side) - 16px); max-width: none; margin: 0; padding: 8px; gap: 4px; border-radius: 30px; }
  .seg.tabbar > button { flex: none; height: 64px; width: 100%; border-radius: 22px; font-size: 11px; }
  .seg.tabbar > .ind { top: 0; bottom: auto; left: 8px; right: 8px; width: auto; border-radius: 22px; }
  #main, #stack { left: var(--side); }
  #main { transform: none !important; }
  .screen { box-shadow: -10px 0 28px rgba(0, 0, 0, .14); }
  .scroll { padding-bottom: calc(var(--sbe) + 32px); }
  .pad { max-width: 1080px; padding: 0 28px; }
  #toast { left: calc(50% + var(--side) / 2); bottom: calc(var(--sbe) + 24px); }
  .fc-dock { bottom: calc(var(--sbe) + 8px); }
  #v-create .scroll { padding-bottom: calc(var(--sbe) + 100px); }
  .sheet { border-radius: 26px; bottom: calc(var(--kb, 0px) + 16px); max-height: calc(100% - var(--st) - 40px); left: var(--side); }
  .sheet-wrap.as .sheet { max-width: 460px; }
  /* two columns on Today and the Health and Plan sections; titles, switches and the widget board span both */
  #v-today .pad, #v-health .hsec, #v-plan .hsec { column-count: 2; column-gap: 20px; }
  #v-today .pad > *, #v-health .hsec > *, #v-plan .hsec > * { break-inside: avoid; }
  #v-today .pad > .vh, #v-today .pad > .card.lead, #v-today .pad > .cis, #v-today .pad > .wb, #v-today .pad > .now, #v-today .pad > .card.quiet, #v-plan .hsec > .qa, #v-plan .hsec > .seg { column-span: all; }
  #v-today .lbl, #v-health .lbl, #v-plan .lbl { break-after: avoid; }
  #v-today .pad > .lbl, #v-health .hsec > .lbl, #v-plan .hsec > .lbl { margin-top: 18px; }
  #v-ride .pad { max-width: 920px; }
  .sv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) and (min-height: 500px) {
  :root { --side: 232px; }
  .seg.tabbar { padding: 10px; }
  .seg.tabbar > button { height: 50px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 16px; font: 600 15px/1 var(--sys); border-radius: 18px; }
  .seg.tabbar > button .i { width: 23px; height: 23px; }
  .seg.tabbar > .ind { left: 10px; right: 10px; border-radius: 18px; }
  .sv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .seg.tabbar > .ind { transition-duration: .16s; } }

/* ---------------------------------------------------------------- 1.10.0 Now card and widget board */
.card.now { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; }
.card.now.lead { display: block; }
.now-i { width: 40px; height: 40px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; flex: none; }
.now-i .i { width: 20px; height: 20px; }
.now-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.now-t small { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.now-t small.mut { font-weight: 500; }
.now-t b { font: 600 19px/1.25 'Clash Display', 'Satoshi', sans-serif; text-wrap: balance; }
.wb { margin: 0 0 6px; }
.wb .lbl { margin-top: 18px; }
.wb-h { display: flex; align-items: center; justify-content: space-between; }
.wb-h .lbl { margin-left: 6px; }
.wb-e { margin: 18px 4px 9px; font: 600 14px var(--sys); color: var(--acc); padding: 4px 8px; }
.wb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 72px; gap: 12px; grid-auto-flow: row dense; }
.wg { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: var(--p1); color: var(--fg); padding: 13px 14px 12px; overflow: hidden; transition: background-color .25s var(--ease), color .25s var(--ease), opacity .2s var(--ease); }
.wg-s { grid-column: span 2; grid-row: span 2; }
.wg-m { grid-column: span 4; grid-row: span 2; }
.wg-l { grid-column: span 4; grid-row: span 4; }
.wg-white { background: #ffffff; color: #1d1d1f; --mute: rgba(29, 29, 31, .6); --p3: #dedee3; --fg: #1d1d1f; --acc: #1d1d1f; }
.wg-black { background: #0b0b0c; color: #f5f5f7; --mute: rgba(245, 245, 247, .62); --p3: #2f2f32; --fg: #f5f5f7; --acc: #f5f5f7; }
[data-theme="light"] .wg-white { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
[data-theme="dark"] .wg-black { background: #1a1a1c; }
.wg-in { position: absolute; inset: 0; z-index: 0; display: flex; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 13px 14px; border-radius: inherit; }
.wg-hd { display: flex; align-items: center; gap: 6px; font: 600 12.5px var(--sys); color: var(--mute); }
.wg-hd .i { width: 15px; height: 15px; }
.wg-body { position: relative; z-index: 1; margin-top: 24px; flex: 1; min-height: 0; display: flex; flex-direction: column; pointer-events: none; }
.wg-body button { pointer-events: auto; }
.wg-big { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.wg-big b { font: 600 34px/1 'Tabular', 'Satoshi', sans-serif; letter-spacing: -.02em; }
.wg-big small { font-size: 13px; color: var(--mute); font-weight: 600; }
.wg-big .tcw { margin-left: 0; font-size: 15px; padding: 6px 12px; }
.wg-l1 { font-size: 13.5px; font-weight: 600; line-height: 1.3; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-h2 { font-size: 12.5px; color: var(--mute); font-weight: 600; margin: -2px 0 4px; }
.wg-empty { font-size: 13.5px; color: var(--mute); line-height: 1.35; margin-top: auto; }
.wg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.wg-list li { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 14px; font-weight: 600; }
.wg-list li.live .wg-x::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); margin-left: 6px; vertical-align: 2px; }
.wg-list .wg-t { flex: none; width: 44px; font-family: 'Tabular', 'Satoshi', sans-serif; color: var(--mute); }
.wg-list .wg-x { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-list small { flex: none; color: var(--mute); font-size: 12.5px; font-weight: 500; }
.wg-list .tcw { padding: 2px 8px; font-size: 12px; }
.wg-ck { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--p3); transition: background-color .2s; }
.wg-ck.hi { box-shadow: inset 0 0 0 2px var(--warn); }
.wg-more { font-size: 12.5px; color: var(--mute); margin-top: 6px; }
.wg-wx { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.wg-m .wg-wx, .wg-l .wg-wx { margin-top: 0; }
.wg-wx > b { font: 650 34px/1 'Satoshi', sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wg-wx span { display: flex; flex-direction: column; min-width: 0; }
.wg-wx span b { font-size: 14px; }
.wg-wx span small { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-hrs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: auto; }
.wg-l .wg-hrs { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 10px; }
.wg-hrs span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wg-hrs small { font-size: 11px; color: var(--mute); }
.wg-hrs b { font-size: 15px; }
.wg-goals { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; }
.wg-goals span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1 1 70px; }
.wg-goals b { font-size: 14px; }
.wg-goals small { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wg-ring { width: 36px; height: 36px; transform: rotate(-90deg); }
.wg-ring circle { fill: none; stroke-width: 4.5; }
.wg-ring .rg-bg { stroke: var(--p3); }
.wg-ring .rg { stroke: var(--fg); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.warn-t { color: var(--warn); }
.wg-add { align-items: center; justify-content: center; gap: 8px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--p3); color: var(--mute); font: 600 14px var(--sys); }
.wg-add span { width: 36px; height: 36px; border-radius: 50%; background: var(--p2); display: grid; place-items: center; color: var(--fg); }
.wg.editing .wg-body { opacity: .45; }
.wg-ed { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 16px; background: var(--lg-fill); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); box-shadow: inset 0 0 0 .5px var(--lg-edge), inset 0 1px 0 var(--lg-hi); color: var(--fg); }
.wg-white .wg-ed { background: rgba(29, 29, 31, .06); }
.wg-black .wg-ed { background: rgba(255, 255, 255, .1); }
.wg-b { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.wg-b .i { width: 17px; height: 17px; }
.wg-st { width: auto; padding: 0 8px; font: 600 12px var(--sys); }
.wg-rm { margin-left: auto; color: var(--danger); }
.wg-sz { display: flex; border-radius: 10px; background: var(--fill); padding: 2px; }
.wg-sz button { width: 24px; height: 26px; border-radius: 8px; font: 700 11.5px var(--sys); color: var(--mute); }
.wg-sz button.on { background: var(--seg-pill); color: var(--seg-ink); }
.wg-s .wg-ed { display: grid; grid-template-columns: 30px 30px 1fr auto; row-gap: 4px; }
.wg-s .wg-sz { grid-column: 1 / 4; grid-row: 2; justify-self: start; }
.wg-s .wg-st { grid-column: 4; grid-row: 2; }
.wg-s .wg-rm { grid-column: 4; grid-row: 1; justify-self: end; margin-left: 0; }
.wg-black .wg-ed { --fill: #3a3a3c; --seg-pill: #f5f5f7; --seg-ink: #000000; }
.wg-white .wg-ed { --fill: #e8e8ed; --seg-pill: #ffffff; --seg-ink: #1d1d1f; }
.wg.editing .wg-body { opacity: .22; }
.wg-out { opacity: 0; translate: 0 6px; transition: opacity .2s var(--ease), translate .2s var(--ease); }
.wg-new { animation: fade .4s var(--ease) both; }
.rep-next .gr-l small { white-space: normal; line-height: 1.4; }
@media (min-width: 768px) and (min-height: 500px) {
  .wb-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .wg-out { transition-duration: .1s; } }

/* ================================================================ SELVO 1.12.0: finding things, simple reminders, settings in groups */
/* text size (Settings > Appearance): the content scales, the tab bar stays */
.view .pad, .screen .pad, .sheet-body { zoom: var(--ts, 1); }
/* glass intensity: Less is a denser fill, Solid has no see-through at all */
[data-glass="less"] { --lg-fill: color-mix(in srgb, var(--p1) 88%, transparent); --bar-glass: color-mix(in srgb, var(--bg) 94%, transparent); --sheet-glass: color-mix(in srgb, var(--sheet) 97%, transparent); }
[data-glass="solid"] { --lg-fill: var(--p1); --bar-glass: var(--bg); --sheet-glass: var(--sheet); }
[data-glass="solid"] .seg.tabbar, [data-glass="solid"] .mini, [data-glass="solid"] .sbar, [data-glass="solid"] .sheet, [data-glass="solid"] #toast { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
[data-glass="solid"] .seg.tabbar::after { display: none; }
[data-theme="dark"][data-glass="solid"] .seg.tabbar { background: #1c1c1e; }
/* tap targets: 44 pt like iOS */
.icb { width: 44px; height: 44px; }
.icb.sm { width: 36px; height: 36px; }
.seg.tabbar > button:not(.on) { color: color-mix(in srgb, var(--fg) 66%, transparent); }
.vh-btns { display: flex; align-items: center; gap: 8px; }
.vh-btns .icb { position: relative; }
.vh-btns .fx-new { position: absolute; top: 6px; right: 6px; }

/* Everything, More grids, pins */
.fx-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff453a; box-shadow: 0 0 0 2px var(--p1); }
.fx-h { display: flex; align-items: center; justify-content: space-between; }
.fx-all { font: 600 14px var(--sys); color: var(--acc); padding: 12px 6px 4px; min-height: 44px; }
.fx-more { margin-top: 10px; }
.fx-gh { font: 600 13px var(--sys); color: var(--mute); margin: 14px 6px 8px; }
.fx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fx-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 84px; padding: 10px 4px 9px; border-radius: 18px; background: var(--p1); text-align: center; transition: background-color .2s var(--ease); -webkit-touch-callout: none; }
.fx-tile b { font: 600 12px/1.2 var(--sys); color: var(--fg); overflow-wrap: anywhere; }
.fx-ic { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); flex: none; }
.fx-ic .i { width: 19px; height: 19px; }
.fx-ic .fx-new { position: absolute; top: -1px; right: -1px; }
.fx-pins { margin-bottom: 12px; }
.fx-pins .lbl { margin-top: 0; }
.fx-hub .lbl { display: flex; align-items: center; gap: 6px; }
.fx-row { display: flex; align-items: center; min-height: 60px; }
.fx-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; text-align: left; min-height: 60px; -webkit-touch-callout: none; }
.fx-go .txt { display: flex; flex-direction: column; min-width: 0; }
.fx-go b { font-weight: 600; font-size: 15.5px; }
.fx-go small { color: var(--mute); font-size: 13px; line-height: 1.3; }
.fx-pin { width: 44px; height: 44px; display: grid; place-items: center; color: var(--faint); flex: none; margin-right: 6px; }
.fx-pin.on { color: var(--warn); }
.fx-pin .i { width: 20px; height: 20px; }
.fx-search { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; background: var(--fill); color: var(--mute); font: 400 16px var(--sys); text-align: left; margin-bottom: 4px; }
.fx-search span { flex: 1; }
.fx-search kbd { font: 600 12px var(--sys); padding: 2px 7px; border-radius: 6px; background: var(--p1); color: var(--mute); }
/* search palette */
.sheet-wrap.fx-sheet .sheet { max-height: calc(100% - var(--st) - 40px); height: calc(100% - var(--st) - 40px); }
.fx-pal { display: flex; flex-direction: column; min-height: 0; }
.fx-q { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px; }
.fx-q > .i { color: var(--mute); }
.fx-q input { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 12px; background: var(--fill); color: var(--fg); font: 400 17px var(--sys); padding: 0 12px; -webkit-appearance: none; appearance: none; }
.fx-q input:focus { outline: none; }
.fx-results { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.fx-res { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border-radius: 14px; text-align: left; transition: background-color .15s var(--ease); }
.fx-res.on { background: var(--hl); }
.fx-res .txt { display: flex; flex-direction: column; min-width: 0; }
.fx-res b { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-res small { color: var(--mute); font-size: 13px; }
.fx-none { padding: 18px 6px; }
/* tour */
.fx-tour { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 4px 6px; }
.fx-tour-i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.fx-tour-i .i { width: 28px; height: 28px; }
.fx-tour-p { font-size: 17px; line-height: 1.45; color: var(--fg); }
.fx-dots { position: relative; display: flex; gap: 8px; margin: 18px 4px 4px; }
.fx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--p3); position: relative; }
.fx-dot::before { content: ''; position: absolute; inset: -17px; }
.fx-dot-ind { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); z-index: 1; pointer-events: none; transition: transform .3s var(--ease); }

/* reminders */
.rm-today { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin: -2px 0 12px; }
.rm-today .btn { height: 50px; }
.rm-big .i, .rm-add .i { width: 20px; height: 20px; }
.rm-tpl { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; margin: 4px -16px 0; padding-inline: 16px; scrollbar-width: none; }
.rm-tpl::-webkit-scrollbar { display: none; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px; }
.rm-chips.sm { padding: 0; }
.rm-chip { min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--fill); color: var(--fg); font: 600 14.5px var(--sys); white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.rm-chip.on { background: var(--seg-ink, var(--fg)); color: var(--seg-pill, var(--bg)); }
[data-theme="light"] .rm-chip.on { background: #1d1d1f; color: #ffffff; }
[data-theme="dark"] .rm-chip.on { background: #f5f5f7; color: #000000; }
.rm-chip.ghost { background: var(--p1); flex: none; }
.rm-sum { margin-top: 10px; padding: 14px 16px; border-radius: 14px; display: flex; flex-direction: column; gap: 4px; }
.rm-sum b { font: 600 18px/1.3 'Satoshi', sans-serif; }
.rm-sum small { color: var(--mute); font-size: 13.5px; line-height: 1.4; }
.rm-step { display: inline-flex; align-items: center; gap: 10px; }
.rm-step b { min-width: 24px; text-align: center; font-size: 18px; }
.rm-win { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); }
.rm-row { display: flex; align-items: center; min-height: 62px; padding: 0 4px 0 14px; gap: 10px; -webkit-touch-callout: none; }
.rm-done { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--p3); flex: none; position: relative; }
.rm-done::before { content: ''; position: absolute; inset: -9px; }
.rm-ic { width: 26px; height: 26px; display: grid; place-items: center; color: var(--mute); flex: none; }
.rm-ic .i { width: 18px; height: 18px; }
.rm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; padding: 10px 0; min-height: 44px; }
.rm-main b { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-main small { color: var(--mute); font-size: 13px; line-height: 1.35; }
.rm-stop { flex: none; min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--fill); color: var(--danger); font: 600 13px var(--sys); }
.rm-more { width: 44px; height: 44px; display: grid; place-items: center; color: var(--mute); flex: none; }
.rm-more .i { width: 17px; height: 17px; }
.rm-add { margin: 0 0 6px; }

/* settings */
.set-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--fill); margin-bottom: 14px; color: var(--mute); }
.set-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: 400 17px var(--sys); -webkit-appearance: none; appearance: none; height: 100%; }
.set-search input:focus { outline: none; }
.set-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); flex: none; margin-right: 12px; }
.set-ic .i { width: 18px; height: 18px; }
.screen.settings .idr { min-height: 56px; }

@media (min-width: 768px) and (min-height: 500px) {
  .fx-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #v-today .pad > .fx-pins, #v-today .pad > .rm-today, #v-today .pad > .fx-more, #v-ride .pad > .fx-more, #v-health .pad > .fx-more, #v-plan .pad > .fx-more { column-span: all; }
  .rm-today { max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) { .fx-dot-ind, .fx-tile, .fx-res, .rm-chip { transition-duration: .01s; } }
