/* InFokus — dark, minimal, Oura-inspired.
 * Maarten (2026-11-24): dark background, light type, as few elements as possible, big touch targets,
 * everything advanced behind "⋯" / "More".  (This app is the one deliberate exception to the light-dashboard rule.) */
:root {
  /* v4.12 (2026-11-26): "Olive night" main view, picked on the design page. Was: bg #0E0D0C, cards #171614/#201E1B/#2A2723, gold #E3C38A */
  --bg: #181B16;
  --bg-top: #262A22;      /* the page fades from this at the top to --bg */
  --bg-rgb: 24,27,22;
  --s1: #2C3027;          /* cards */
  --card-rgb: 44,48,39;
  --s2: #343A2F;          /* raised / hover */
  --s3: #3E4438;
  --line: #3A3F34;
  --text: #F2EDE4;
  --text2: #C9C2B6;
  --muted: #8C857A;
  --faint: #5E5951;
  --gold: #C9D3A8;        /* the accent: sage now (the name stays so nothing else had to change) */
  --gold-dim: #9AA37E;
  --gold-rgb: 201,211,168;
  --on-gold: #1E211A;     /* text on an accent-coloured button */
  --btn: #D9DDBE;         /* the big Start button */
  --time: #DCE3BE;        /* running-timer digits */
  --danger: #E08A6E;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r: 22px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }   /* v4.53: the gradient's END colour, so below a short page it carries on (was --bg-top: a lighter band, Maarten 2026-12-05) */
/* v4.51 (Maarten 2026-12-05): pulling down at the very top made the top bar vanish on the iPhone — no rubber-band
   bounce, the page simply stops at the top (and the bottom) */
html, body { overscroll-behavior-y: none; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 80%) fixed var(--bg); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.mono { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 28px;
  background: rgba(38,42,34,.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 21px; text-decoration: none; letter-spacing: -.3px; }
.brand .star { color: var(--gold); }
/* the Mac copy only (app.py index): the real data is online since 2026-12-05 */
.is-test .topbar { box-shadow: inset 0 3px 0 #E8A65B; }  /* also when the brand is hidden (≤ 380px) */
.test-pill { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #181B16; background: #E8A65B; border-radius: 999px; padding: 2px 8px; margin-left: 2px; }
/* v4.50: on a phone the label pushed the ⋯ menu 54 px past the screen edge (the page wiggled sideways) — there the
   orange top line alone marks the test copy. tests/test_topbar_width.mjs */
@media (max-width: 640px) { .test-pill { display: none; } }
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tabs a { padding: 8px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 15px; }
.tabs a.active { color: var(--text); background: var(--s2); }
.runpill { margin-left: auto; display: flex; align-items: center; gap: 10px; border: 0; background: var(--s2); padding: 9px 16px 9px 13px;
  border-radius: 999px; font-size: 14px; max-width: 320px; color: var(--text); }
.runpill-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runpill-time { color: var(--gold); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.menu-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--text2); font-size: 22px; line-height: 1; }
.runpill[hidden] + .menu-btn { margin-left: auto; }
.menu-btn:hover { background: var(--s2); }

main { max-width: 680px; margin: 0 auto; padding: 36px 24px 140px; }
main.wide { max-width: 900px; }

/* ---------- headline ---------- */
.eyebrow { font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 9vw, 72px); line-height: 1; letter-spacing: -2.2px; margin: 10px 0 14px; color: var(--text); }
.sub { color: var(--muted); font-size: 16px; }
.sub b { color: var(--text2); font-weight: 500; }
.head { margin-bottom: 34px; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

/* ---------- big start / running ---------- */
.start-btn { width: 100%; height: 76px; border: 0; border-radius: 999px; background: var(--gold); color: var(--on-gold);
  font-size: 19px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 40px;
  box-shadow: 0 18px 50px -20px rgba(var(--gold-rgb),.55); transition: transform .12s ease; }
.start-btn:active { transform: scale(.985); }
.start-btn .tri { font-size: 15px; }
.running-card { position: relative; border-radius: var(--r); padding: 26px 26px 22px; margin-bottom: 40px; overflow: hidden; cursor: pointer;
  background: var(--s1); border: 1px solid rgba(var(--gold-rgb),.35); }
.running-card .rc-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .45; }
.running-card .rc-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--card-rgb),.95) 30%, rgba(var(--card-rgb),.5)); }
.running-card > *:not(.rc-bg) { position: relative; }
.rc-label { font-size: 14px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.rc-title { font-family: var(--serif); font-weight: 300; font-size: 28px; letter-spacing: -.6px; line-height: 1.15; margin: 6px 0 4px; }
.rc-time { font-family: var(--serif); font-weight: 300; font-size: 58px; letter-spacing: -2px; line-height: 1.05; color: var(--gold); }
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }  /* wrap: on a phone the 3rd button touched the card edge */

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 999px; padding: 0 18px; height: 44px; background: var(--s3); color: var(--text); font-weight: 500; font-size: 15px;
  white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: #34302B; }
.btn.gold { background: var(--gold); color: var(--on-gold); }
.btn.ghost { background: transparent; color: var(--text2); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid rgba(224,138,110,.3); }
.btn.small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .35; cursor: default; }
.link { background: none; border: 0; padding: 10px 0; color: var(--muted); font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.link:hover { color: var(--text2); }

/* ---------- plan list ---------- */
.section-label { font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 14px;
  display: flex; justify-content: space-between; align-items: baseline; }
.section-label span { letter-spacing: 0; text-transform: none; font-size: 13px; color: var(--faint); }
.card { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 14px 14px 14px 20px; border-radius: 20px; background: var(--s1);
  margin-bottom: 10px; position: relative; transition: background .15s; }
.card:hover { background: var(--s2); }
.card.running { box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb),.5); }
.card.dragging { opacity: .35; }
.card.drop-above { box-shadow: 0 -3px 0 var(--gold); }
.check { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; flex-shrink: 0; padding: 0;
  display: grid; place-items: center; color: transparent; font-size: 14px; }
.check:hover { border-color: var(--gold); color: var(--gold-dim); }
.card.done .check { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.card-main { flex: 1; min-width: 0; cursor: pointer; }
.card-title { font-size: 17px; line-height: 1.3; word-wrap: break-word; }
.card.done .card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.card-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-top: 3px; flex-wrap: nowrap; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); flex-shrink: 0; display: inline-block; }
.card-time { font-size: 14px; color: var(--text2); flex-shrink: 0; }
.play { width: 48px; height: 48px; border-radius: 50%; border: 0; flex-shrink: 0; background: var(--s3); color: var(--text); display: grid; place-items: center;
  font-size: 13px; padding: 0; }
.play:hover { background: var(--gold); color: var(--on-gold); }
.play.on { background: var(--gold); color: var(--on-gold); }
.ev-time { width: 54px; flex-shrink: 0; font-size: 17px; font-weight: 600; line-height: 1.1; color: var(--text); }
.ev-time small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.card.event { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.card.event.past { box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb),.4); }
.add-row { width: 100%; min-height: 68px; border-radius: 20px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted);
  font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
.add-row:hover { border-color: var(--gold-dim); color: var(--text2); }
.foot-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.empty { color: var(--faint); font-size: 15px; padding: 18px 2px; }

/* ---------- sheet (modal) ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .18s ease; }
.sheet-panel { position: relative; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow-y: auto; background: var(--s1);
  border-radius: 28px; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: rise .2s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.sheet h2 { font-family: var(--serif); font-weight: 300; font-size: 32px; letter-spacing: -.8px; margin: 0 0 6px; line-height: 1.1; }
.sheet .sheet-sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.sheet-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; min-height: 44px; }
.sheet-top .x { margin-left: auto; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--text2); display: grid; place-items: center; padding: 0; font-size: 18px; }
.iconbtn:hover { background: var(--s2); }
.big-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 24px; padding: 8px 2px 14px; outline: none;
  font-family: var(--serif); font-weight: 300; letter-spacing: -.4px; margin-bottom: 22px; }
.big-input:focus { border-color: var(--gold-dim); }
.big-input::placeholder { color: var(--faint); }
.field-label { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; font-weight: 500; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; min-height: 104px; border-radius: 20px; border: 0; overflow: hidden; background: var(--s2); text-align: left;
  padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--text); }
.tile .tile-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .9; transition: transform .4s ease; }
.tile:hover .tile-bg { transform: scale(1.05); }
.tile .tile-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--bg-rgb),0) 20%, rgba(var(--bg-rgb),.85)); }
.tile .tile-name { position: relative; font-size: 17px; font-weight: 500; line-height: 1.2; }
.tile .tile-sub { position: relative; font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.tile.area { min-height: 132px; }
.tile.area .tile-name { font-family: var(--serif); font-weight: 400; font-size: 21px; letter-spacing: -.4px; }
.sheet-panel { scrollbar-width: thin; scrollbar-color: var(--s3) transparent; }
.tile.plain { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line); }
.tile.plain:hover { background: var(--s3); }
.tile.sel { box-shadow: inset 0 0 0 2px var(--gold); }
.quest-star { color: var(--gold); }

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { min-height: 42px; border-radius: 999px; border: 1px solid var(--line); background: transparent; padding: 0 16px; font-size: 15px; color: var(--text2);
  display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { border-color: var(--faint); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.add { border-style: dashed; color: var(--muted); }

.next-up { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 20px; border: 0; background: var(--s2); text-align: left; margin-bottom: 8px; }
.next-up:hover { background: var(--s3); }
.next-up .nu-main { flex: 1; min-width: 0; }
.next-up .nu-k { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold); }
.next-up .nu-t { font-size: 17px; margin-top: 2px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.sheet-actions .spacer { flex: 1; }
.more-toggle { margin-top: 6px; }
.time-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
input.t { height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--s2); padding: 0 14px; width: 130px; outline: none; }
input.t:focus, input.tx:focus, select.sel:focus { border-color: var(--gold-dim); }
input.tx { height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--s2); padding: 0 14px; width: 100%; outline: none; }
input.num { width: 100px; }
select.sel { height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--s2); padding: 0 14px; outline: none; max-width: 100%; }
.menu-list { display: grid; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 18px; border-radius: 16px; border: 0; background: var(--s2); text-align: left; font-size: 16px; }
.menu-item:hover { background: var(--s3); }
.menu-item .mi-ico { width: 24px; text-align: center; color: var(--gold); }
.menu-item small { margin-left: auto; color: var(--muted); font-size: 13px; }
.kbd-list { color: var(--muted); font-size: 14px; line-height: 2; margin-top: 18px; }
kbd { font: 12px var(--sans); border: 1px solid var(--faint); border-radius: 6px; padding: 1px 6px; color: var(--text2); }

/* log entries */
.log-total { font-family: var(--serif); font-weight: 300; font-size: 54px; letter-spacing: -2px; line-height: 1; }
.split { display: flex; height: 6px; border-radius: 6px; overflow: hidden; background: var(--s3); margin: 16px 0 8px; }
.split span { display: block; height: 100%; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.entry { display: grid; grid-template-columns: 92px 3px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.entry:hover { background: var(--s2); }
.entry .when { font-size: 13px; color: var(--muted); }
.entry .bar { width: 3px; align-self: stretch; min-height: 30px; border-radius: 3px; background: var(--c); }
.entry .what { font-size: 15px; line-height: 1.3; }
.entry .what small { display: block; color: var(--muted); font-size: 12.5px; }
.entry .dur { font-size: 14px; color: var(--text2); }
.entry.live .dur { color: var(--gold); }
.entry-edit { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 4px 0 14px 106px; }

/* ---------- week ---------- */
.week-nav { display: flex; gap: 4px; }
.big-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.big-num { background: var(--s1); border-radius: var(--r); padding: 24px; }
.big-num .v { font-family: var(--serif); font-weight: 300; font-size: 52px; letter-spacing: -2px; line-height: 1.05; margin-top: 8px; }
.big-num .v small { font-size: 20px; color: var(--muted); letter-spacing: 0; }
.panel { background: var(--s1); border-radius: var(--r); padding: 24px; margin-bottom: 12px; }
.rings { display: flex; gap: 22px; flex-wrap: wrap; justify-content: space-around; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 120px; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 12px; align-items: end; height: 190px; }
.barcol { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.barstack { width: 100%; max-width: 40px; display: flex; flex-direction: column-reverse; border-radius: 10px; overflow: hidden; background: var(--s3); min-height: 4px; }
.barstack span { display: block; width: 100%; }
.barcol .lbl { font-size: 12px; color: var(--muted); }
.barcol .lbl.today { color: var(--text); font-weight: 600; }
.barcol .num { font-size: 12px; color: var(--text2); min-height: 18px; }
.prow { display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 4px 14px; align-items: center; padding: 14px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.prow:first-of-type { border-top: 0; }
.prow:hover { background: var(--s2); }
.prow .pname { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.prow .pname small { color: var(--muted); font-size: 13px; }
.prow .pv { text-align: right; font-size: 15px; color: var(--text2); }
.prow .ptrack { grid-column: 1 / -1; height: 4px; background: var(--s3); border-radius: 4px; overflow: hidden; position: relative; }
.prow .ptrack span { display: block; height: 100%; border-radius: 4px; }
.prow .ptrack i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text2); }
.prow.l2 { padding-left: 30px; }
.prow.l2 .pname { font-size: 15px; color: var(--text2); }
.typesplit { grid-column: 1 / -1; display: grid; gap: 6px; padding: 8px 0 2px 20px; }
.typesplit div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }

/* ---------- manage ---------- */
.area-block { background: var(--s1); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.area-cover { height: 110px; background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-end; padding: 18px 22px; }
.area-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--card-rgb),0), rgba(var(--card-rgb),.9)); }
.area-cover h3 { position: relative; margin: 0; font-family: var(--serif); font-weight: 300; font-size: 30px; letter-spacing: -.8px; }
.area-inner { padding: 8px 14px 18px; }
.mrow { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 8px; border-radius: 14px; cursor: pointer; }
.mrow:hover { background: var(--s2); }
.mrow .mname { flex: 1; font-size: 16px; }
.mrow .mname small { color: var(--muted); font-size: 13px; margin-left: 8px; }
.mrow .star { font-size: 20px; color: var(--faint); background: none; border: 0; width: 44px; height: 44px; }
.mrow .star.on { color: var(--gold); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background-size: cover; background-position: center; padding: 0; }
.swatch.on { border-color: var(--text); }

/* ---------- focus ---------- */
.focus { position: fixed; inset: 0; z-index: 50; color: var(--text); display: grid; place-items: center; background: #0A0908; }
.focus-bg { position: absolute; inset: 0; background: url(/static/img/focus.webp) center/cover no-repeat; opacity: .8; }
.focus-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(10,9,8,.3), rgba(10,9,8,.9)); }
/* v4.52 (Maarten 2026-12-05): top 22px put the ✕ under the iPhone status bar in the home-screen app (hidden, not tappable) */
.focus-close { position: absolute; top: calc(env(safe-area-inset-top) + 14px); right: calc(env(safe-area-inset-right) + 18px); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(242,237,228,.2); background: transparent; color: inherit; }
.focus-inner { position: relative; z-index: 1; text-align: center; padding: 24px; width: min(640px, 100%); }
.focus .crumb { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(242,237,228,.6); display: inline-flex; gap: 8px; align-items: center; }
.focus h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 5vw, 46px); letter-spacing: -1px; margin: 14px 0 26px; line-height: 1.1; }
.focus-clock { margin: 8px auto 34px; width: min(420px, 86vw); }
.focus-clock .t { font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 12vw, 86px); letter-spacing: -2px; line-height: 1; font-variant-numeric: tabular-nums; }
.focus-clock .s { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(242,237,228,.5); margin-top: 12px; }
.focus .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.focus .btn { background: rgba(242,237,228,.08); border: 1px solid rgba(242,237,228,.2); height: 54px; padding: 0 28px; }
.focus .btn.gold { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.focus .next { margin-top: 34px; font-size: 14px; color: rgba(242,237,228,.5); }
.focus .next b { color: rgba(242,237,228,.85); font-weight: 500; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 13px 22px; border-radius: 999px;
  font-size: 15px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .topbar { padding: 7px 14px; gap: 6px; }
  .brand-name { display: none; }
  .brand { font-size: 24px; }
  .tabs { margin-left: 0; }
  .runpill { max-width: 46vw; padding: 9px 12px; }
  main { padding: 24px 16px 120px; }
  .head { margin-bottom: 26px; }
  .start-btn { height: 68px; margin-bottom: 30px; }
  .card { padding-left: 16px; gap: 12px; }
  .hide-sm { display: none; }
  .card.event .btn.small { width: 48px; height: 48px; padding: 0; font-size: 17px; }
  /* v4.51 (Maarten 2026-12-05): every popup like the plan popup — the full page, its ✕ just below the status bar —
     and always inside the part of the screen you can see: when the keyboard opens, iOS slides the page up, which put
     the expense popup's ✕ under the status bar (not tappable). --vv-top / --vv-h follow visualViewport (app.js) */
  /* v4.53 (Maarten 2026-12-05): every popup like the plan popup, down to the very bottom of the phone — also the ones
     that open the keyboard (expense, quick task): only the TOP follows the keyboard, the bottom stays at the screen's edge */
  .sheet { align-items: flex-end; inset: auto 0; top: var(--vv-top, 0px); bottom: 0; height: auto; }
  .sheet-panel { width: 100%; height: calc(100% - max(env(safe-area-inset-top) + 12px, 8vh)); max-height: none;
    border-radius: 28px 28px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .tiles { grid-template-columns: 1fr 1fr; }
  .big-nums { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 74px 3px minmax(0,1fr) auto; gap: 10px; }
  .entry-edit { padding-left: 0; }
  .bars { gap: 6px; }
}

/* Area headings over the project chips (task + log sheets) */
.area-group { margin-bottom: 14px; }
.area-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text2); margin: 0 0 8px 2px; }
.area-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* Paused timer card: same card, quieter */
.running-card.paused .rc-time { color: var(--text2); }
.running-card.paused .rc-bg { opacity: .25; }
.paused-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb),.4); border-radius: 999px; padding: 2px 8px; }

/* Plan sheet: every project › area › activity at once */
.plan-proj { margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.plan-proj:last-of-type { border-bottom: 0; }
.plan-proj .area-head { font-size: 15px; color: var(--text); margin-bottom: 10px; }
.add-act { margin-left: auto; font-size: 13px; color: var(--muted); padding: 4px 0; }
.plan-row { margin: 0 0 12px; }
.plan-row-name { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 2px; }
.chip.pick { min-height: 42px; }
.newtype-row { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; }
.newtype-row .tx { flex: 1; min-width: 0; }

/* "General" option: always first, its own colour (gold tint) */
.chip.general { border-color: rgba(var(--gold-rgb),.35); color: var(--gold); background: rgba(var(--gold-rgb),.06); }
.chip.general:hover { border-color: var(--gold); color: var(--gold); }
.chip.general.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.tile.plain.general { background: rgba(var(--gold-rgb),.07); box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb),.3); }
.tile.plain.general .tile-name { color: var(--gold); }

/* Done today: stays in the plan, struck through and faded */
#view .card.done { opacity: .5; }
#view .card.done:hover { opacity: .8; }

/* Plan tomorrow / Back to today, right under the add row */
.add-row.secondary { min-height: 52px; margin-top: 10px; border: 0; background: var(--s1); color: var(--text2); font-size: 15px; }
.add-row.secondary:hover { background: var(--s2); color: var(--text); }

/* paused session in the top pill */
.runpill.paused .pulse { display: none; }
.runpill.paused .runpill-time { color: var(--text2); }

/* ---------- v4 (2026-11-25): to-dos, plan tree, lists ---------- */
.quick { display: flex; gap: 12px; align-items: center; margin: 0 0 28px; }
.quick .tx { flex: 1; min-width: 0; }
.inbox-link { white-space: nowrap; }
.inbox-link b { color: var(--gold); font-weight: 600; }
.plan-item { margin-bottom: 12px; }
.plan-item .card { margin-bottom: 0; }
.plan-item.dragging { opacity: .35; }
.plan-item.drop-above { box-shadow: 0 -3px 0 var(--gold); border-radius: 20px; }
.rolled { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--s3); color: var(--text2); font-size: 11px; }
/* tasks sit indented under their activity: smaller, a thin line on the left */
.subtasks { margin: 4px 0 0 34px; padding-left: 14px; border-left: 1px solid var(--line); }
.subtasks.orphan { margin: 4px 0 14px 0; }
.sub-head { font-size: 12px; color: var(--muted); margin: 6px 0 2px; }
.done-subs { opacity: .5; margin-bottom: 12px; }
.todo { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 4px 4px 0; border-radius: 12px; }
.todo.running .todo-title { color: var(--gold); }
.todo-title { flex: 1; min-width: 0; font-size: 15px; color: var(--text2); line-height: 1.3; word-wrap: break-word; }
.todo.done .todo-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.tcheck { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; color: transparent; font-size: 12px; padding: 0; flex-shrink: 0; display: grid; place-items: center; }
.tcheck:hover { border-color: var(--gold); color: var(--gold-dim); }
.todo.done .tcheck { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.todo-time { font-size: 13px; color: var(--muted); }
.tplay { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.tplay:hover, .tplay.on { background: var(--gold); color: var(--on-gold); }
.mini { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.mini:hover { color: var(--text); border-color: var(--faint); }
.mini.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.todo-wrap { display: flex; align-items: center; gap: 8px; }
.todo-wrap .todo { flex: 1; min-width: 0; }
.iconbtn.sm { width: 34px; height: 34px; font-size: 13px; flex-shrink: 0; }
.link.small { font-size: 13px; padding: 6px 0; }

/* plan tree */
.pl-proj { border-bottom: 1px solid var(--line); }
.pl-head { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 6px; border: 0; background: transparent; color: var(--text); font-size: 17px; text-align: left; }
.pl-head .dot, .pick-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.pl-head.on .pl-name { color: var(--gold); }
.pl-name { flex: 1; }
.pl-count { font-size: 13px; color: var(--gold-dim); }
.chev { color: var(--muted); font-size: 14px; width: 18px; text-align: center; }
.pl-rowwrap { margin: 0 0 6px 20px; }
.pl-row { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text2); font-size: 15px; text-align: left; }
.pl-row:hover { border-color: var(--faint); }
.pl-row.general { color: var(--gold); border-color: rgba(var(--gold-rgb),.35); background: rgba(var(--gold-rgb),.06); }
.pl-row.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pl-row.general.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.pl-row.on .chev { color: inherit; }
.pl-acts { padding: 10px 0 8px 12px; }
.pl-hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.picks-list { display: flex; flex-direction: column; gap: 2px; }
.pick-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.pick-name { flex: 1; min-width: 0; font-size: 15px; }
.pick-row .link.small { color: var(--gold-dim); }

/* task adder */
.adder { display: flex; gap: 8px; align-items: center; }
.adder .tx { flex: 1; min-width: 0; }
.ac-list { display: flex; flex-direction: column; margin-top: 4px; }
.ac-list:empty { display: none; }
.ac-item { text-align: left; border: 0; background: var(--s2); color: var(--text2); padding: 10px 14px; font-size: 15px; border-radius: 0; }
.ac-item:first-child { border-radius: 12px 12px 0 0; }
.ac-item:last-child { border-radius: 0 0 12px 12px; }
.ac-item:only-child { border-radius: 12px; }
.ac-item:hover { background: var(--s3); color: var(--text); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font-size: 13px; }
.pill:hover { color: var(--text); border-color: var(--faint); }
.sheet-actions.wrap { flex-wrap: wrap; }

/* lists */
.inbox-item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--s1); margin-bottom: 8px; }
.inbox-item .todo-title { color: var(--text); flex: 1 1 200px; }
.ib-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lists-proj { margin: 0 0 26px; padding: 6px; border-radius: 18px; }
.area-head.big { font-size: 16px; color: var(--text); margin-bottom: 10px; }
.area-head.big .add-act { margin-left: auto; }
.lists-group { margin: 0 0 12px 16px; padding: 4px 6px; border-radius: 14px; }
.lists-head { width: 100%; display: flex; justify-content: space-between; border: 0; background: transparent; color: var(--text2); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 0; }
.lists-head .n { color: var(--muted); letter-spacing: 0; text-transform: none; }
.drop-hover { box-shadow: inset 0 0 0 1.5px var(--gold); background: rgba(var(--gold-rgb),.05); }
.empty.small { font-size: 13px; padding: 4px 16px; }
[data-todo].dragging { opacity: .35; }

/* focus: next tasks */
.focus-next { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fn-k { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.fn-item { border: 0; background: rgba(242,237,228,.06); color: var(--text2); padding: 10px 18px; border-radius: 999px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.fn-item span { color: var(--gold); font-size: 11px; }
.fn-item:hover { background: rgba(242,237,228,.12); color: var(--text); }
@media (max-width: 560px) {
  .quick { flex-wrap: wrap; }
  .quick .tx { flex-basis: 100%; }
  .subtasks { margin-left: 18px; }
  .mini { padding: 0 9px; }
}

/* v4.1 (2026-11-25): drop line above/below, ↑↓ on touch screens, Focus with two clocks */
.plan-item.drop-below { box-shadow: 0 3px 0 var(--gold); border-radius: 20px; }
.todo.drop-above { box-shadow: 0 -2px 0 var(--gold); }
.todo.drop-below { box-shadow: 0 2px 0 var(--gold); }
.todo.dragging { opacity: .35; }
.movers { display: none; flex-direction: column; gap: 2px; flex-shrink: 0; }
.movers button { width: 34px; height: 26px; border: 0; border-radius: 8px; background: var(--s3); color: var(--text2); font-size: 13px; padding: 0; line-height: 1; }
.movers button:active { background: var(--gold); color: var(--on-gold); }
.movers.sm { flex-direction: row; }
.movers.sm button { width: 30px; height: 30px; background: transparent; color: var(--muted); }
@media (pointer: coarse), (max-width: 560px) { .movers { display: flex; } }
.focus h2 { margin-bottom: 10px; }
.focus .crumb.under { margin-bottom: 26px; }
.task-clock { display: flex; gap: 10px; align-items: baseline; justify-content: center; margin: -14px 0 24px; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(242,237,228,.5); }
.task-clock b { font-family: var(--serif); font-weight: 300; font-size: 30px; letter-spacing: -.5px; text-transform: none; color: var(--gold); }
.rc-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }
.rc-sub .mono { color: var(--text); }

/* v4.2: arrows everywhere, done items faded, Undo */
.movers { display: none; }
@media (pointer: coarse), (max-width: 560px) { .movers { display: flex; } }
.movers i { display: block; width: 34px; height: 26px; }
.movers.sm i { width: 30px; height: 30px; }
.todo.done { opacity: .5; }
.done-subs { opacity: 1; }
.fn-row { display: flex; align-items: center; gap: 6px; }
.focus .movers.sm button { color: rgba(242,237,228,.5); }
.focus-done { margin-top: 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .5; }
.fn-done { border: 0; background: transparent; color: var(--text2); font-size: 14px; text-decoration: line-through; display: flex; gap: 8px; align-items: center; padding: 4px 10px; }
.fn-done span { color: var(--gold); text-decoration: none; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-undo { border: 0; background: var(--bg); color: var(--gold); font-weight: 600; padding: 7px 14px; border-radius: 999px; font-size: 14px; }

/* v4.3: smaller Start, plan buttons on top */
.start-btn { width: auto; min-width: 200px; height: 44px; padding: 0 30px; margin: 0 auto 28px; font-size: 15px; gap: 9px; box-shadow: 0 10px 30px -16px rgba(var(--gold-rgb),.55); }
.start-btn .tri { font-size: 11px; }
@media (max-width: 560px) { .start-btn { height: 44px; margin-bottom: 24px; } }
.plan-btns { display: flex; gap: 10px; margin-bottom: 26px; }
.plan-btns .add-row { flex: 1; min-height: 52px; margin: 0; font-size: 15px; }

/* v4.4: Focus rows drag, per-area activity chips, project's own activities in the plan popup */
.fn-row.drop-above { box-shadow: 0 -2px 0 var(--gold); }
.fn-row.drop-below { box-shadow: 0 2px 0 var(--gold); }
.fn-row[draggable="true"] { cursor: grab; }
.fn-row.dragging, .todo.dragging { opacity: .4; }
.m-acts .chip { font-size: 13px; }
.pl-own { padding-top: 4px; }

/* v4.5: projects are a plain colour; Manage shows areas indented under their project */
.swatches { gap: 12px; }
.swatch { width: 38px; height: 38px; border: 3px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.swatch.on { border-color: var(--text); box-shadow: inset 0 0 0 3px var(--s1); }
.tile .tile-bg.tint { background: var(--c); opacity: .32; }
.tile .tile-bg.tint.soft { opacity: .2; }
.tile .tile-bg.tint::after { display: none; }
.tile.area:has(.tint) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #fff) 40%, transparent); }
.area-block { border-left: 4px solid var(--c); }
.m-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 6px; cursor: pointer; }
.m-head h3 { margin: 0; flex: 1; font-family: var(--serif); font-weight: 300; font-size: 30px; letter-spacing: -.8px; }
.m-swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.m-edit { font-size: 13px; color: var(--muted); }
.m-head:hover .m-edit, .mrow:hover .m-edit { color: var(--text2); }
.m-label { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 14px 8px 8px; }
.m-acts { padding: 0 8px 6px; }
.m-areas { margin-left: 22px; padding-left: 14px; border-left: 1px solid var(--line); }
.m-area { margin-bottom: 6px; }
.m-area .m-acts { padding-left: 30px; }
.m-add .mname { color: var(--muted); }
.nac-wrap { position: relative; flex: 1; min-width: 0; }
.newtype-row .nac-wrap .tx { width: 100%; }

/* v4.6: plan popup area rows with a fold button; Inbox tree */
.pl-rowline { display: flex; align-items: center; gap: 6px; }
.pl-rowline .pl-row { flex: 1; }
.pl-row .pl-count { margin-left: auto; margin-right: 4px; }
.pl-row.on .pl-count { color: inherit; opacity: .7; }
.pl-fold { width: 40px; height: 46px; border: 0; background: transparent; color: var(--muted); font-size: 16px; border-radius: 12px; }
.pl-fold:hover { background: var(--s2); color: var(--text); }
.quick-wrap { margin: 0 0 28px; }
.quick-wrap .quick { margin: 0; }
.quick-ac { margin-top: 6px; }
.inbox-drop { margin-left: 0; padding: 8px 8px 4px; }
.ib-area { margin: 0 0 8px 16px; }
.ib-area .lists-group { margin: 0 0 4px; }
.ib-areahead .lists-head span:first-child { color: var(--text); }
.ib-acts { margin-left: 18px; padding-left: 12px; border-left: 1px solid var(--line); }
.ib-act .lists-head { text-transform: none; letter-spacing: 0; font-size: 14px; }
.lists-head { cursor: default; }

/* v4.7: Inbox view switch */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--s1); margin: 22px 0 18px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 14px; padding: 8px 16px; border-radius: 999px; }
.seg button.on { background: var(--s3); color: var(--text); }

/* v4.8: Today toolbar — Start working · Quick task · Plan today · Plan tomorrow on one line */
.toolbar { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto auto; gap: 8px; align-items: center; }
.toolbar.no-start { grid-template-columns: minmax(120px, 1fr) auto auto; }
.tb-btn { height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); color: var(--text2);
  font-size: 14.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tb-btn:hover { background: var(--s2); color: var(--text); }
.tb-btn.gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; box-shadow: 0 10px 30px -16px rgba(var(--gold-rgb),.55); }
.tb-btn.gold:hover { background: var(--gold); filter: brightness(1.06); }
.tb-btn.ghost { background: transparent; }
.tb-btn .tri { font-size: 10px; }
.toolbar .tb-quick { height: 44px; width: 100%; min-width: 0; min-height: 0; display: block; border-radius: 999px; padding: 0 18px; font-size: 14.5px; cursor: text; }
.plan-toggle-wrap { margin-top: 64px; }
.plan-toggle { border: 0; background: none; padding: 6px 0; color: var(--muted); opacity: .6; font-size: 14px; }
.plan-toggle:hover { opacity: 1; color: var(--text2); }
.plan-toggle-wrap + .section-label { margin-top: 18px; }
.plan-item.drop-hover { border-radius: 20px; }
@media (max-width: 560px) {
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .toolbar .tb-btn, .toolbar .tb-quick { width: 100%; min-width: 0; padding: 0 12px; }
  .plan-toggle-wrap { margin-top: 44px; }
}
/* v4.8: Inbox compact view — areas with their activities as pills, many per line */
.ibc-proj { margin: 0 0 18px; }
.ibc-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--text); margin: 0 0 8px 2px; }
.ibc-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ibc-area { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px 16px; align-items: center; }
.ibc-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--text2); background: var(--s1); border: 1px solid var(--line); }
.ibc-pill.area { color: var(--text); font-weight: 500; border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.ibc-pill b { font-weight: 600; font-size: 12px; color: var(--gold); }
.ibc-pill.drop-hover { border-color: var(--gold); background: rgba(var(--gold-rgb),.12); color: var(--text); }

/* v4.9: home = Quick task + Start working; Plan page; fixed times; task pills in the Inbox */
.home-btns { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 8px auto 0; width: min(380px, 100%); }
.home-btns .home-quick { width: 100%; height: 36px; border-radius: 999px; text-align: center; font-size: 13.5px; cursor: pointer; } /* smaller again (v4.23) */
.home-start { width: 100%; height: 58px; border: 0; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-size: 17px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 16px 40px -18px rgba(var(--gold-rgb),.6); }
.home-start:hover { filter: brightness(1.05); }
.home-start .tri { font-size: 12px; }
.plan-toggle-wrap { text-align: center; }
.plan-bar { display: flex; gap: 10px; margin: 0 0 30px; flex-wrap: wrap; }
.clock-ico { flex-shrink: 0; vertical-align: -2px; }
.card.event { border-left: 3px solid var(--gold-dim); }
.ev-when { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 15px; white-space: nowrap; }
.ev-when small { color: var(--muted); font-size: 12.5px; }
.t-when { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: 13px; white-space: nowrap; }
.t-when small { color: var(--muted); font-size: 12px; }
.todo-title[data-act] { cursor: pointer; }
.todo-title[data-act]:hover { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.daychoice { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.time-row .dur { width: auto; }
.time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h2 .clock-ico { width: 22px; height: 22px; color: var(--gold); vertical-align: -3px; }
.inbox-top { height: 8px; }
.inbox-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox-pills .inbox-item { display: inline-flex; width: auto; max-width: 100%; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 7px 6px 7px 14px; border-radius: 999px; background: var(--s2); }
.inbox-pills .inbox-item .todo-title { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-x { border: 0; background: transparent; color: var(--muted); width: 24px; height: 24px; border-radius: 50%; font-size: 12px; padding: 0; flex-shrink: 0; }
.ib-x:hover { background: var(--s3); color: var(--text); }

.cal { margin: 12px 0 4px; padding: 12px; border-radius: 16px; background: var(--s2); max-width: 340px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; color: var(--text); }
.cal-head button { border: 0; background: transparent; color: var(--text2); width: 34px; height: 30px; border-radius: 10px; font-size: 18px; }
.cal-head button:disabled { opacity: .25; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-grid i { font-style: normal; font-size: 11px; color: var(--muted); padding: 2px 0 4px; }
.cal-grid button { border: 0; background: transparent; color: var(--text); height: 34px; border-radius: 10px; font-size: 14px; }
.cal-grid button:hover:not(:disabled) { background: var(--s3); }
.cal-grid button:disabled { color: var(--faint); }
.cal-grid button.today { box-shadow: inset 0 0 0 1px var(--gold-dim); }
.cal-grid button.on { background: var(--gold); color: var(--on-gold); font-weight: 600; }

/* v4.10: Plan tabs, Inbox filter, our own dialogs */
.plan-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 30px; }
.plan-tabs button { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--s1); color: var(--text2); font-size: 14.5px; font-weight: 500; }
.plan-tabs button:hover { color: var(--text); background: var(--s2); }
.plan-tabs button.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
html { scrollbar-gutter: stable; } /* pages with and without a scrollbar line up, so the tabs never jump */
.ib-viewbar { display: flex; align-items: center; gap: 10px; }
.ib-viewbar .seg { margin-right: auto; }
.ib-filter { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--s1); color: var(--text2); display: grid; place-items: center; padding: 0; }
.ib-filter:hover, .ib-filter.on { color: var(--gold); border-color: var(--gold-dim); }
.ib-filter i { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.ib-filtered { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.cal-clear { margin-top: 8px; }
.dlg { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.dlg-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .15s ease; }
.dlg-panel { position: relative; width: min(420px, 100%); background: var(--s1); border: 1px solid var(--line); border-radius: 24px; padding: 26px 24px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.dlg-panel h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.5px; line-height: 1.2; margin: 0 0 10px; color: var(--text); }
.dlg-panel p { color: var(--text2); font-size: 15px; line-height: 1.5; margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.btn.danger-solid { background: #C45B4E; color: #fff; border-color: #C45B4E; }
.btn.danger-solid:hover { filter: brightness(1.08); }

/* ---------- v4.11 (2026-11-26) ---------- */
/* desired duration: a bar instead of the old hourly ring */
.goal { margin-top: 12px; max-width: 420px; }
.goal-bar { height: 6px; border-radius: 6px; background: rgba(242,237,228,.12); overflow: hidden; }
.goal-bar span { display: block; height: 100%; border-radius: 6px; background: var(--gold); transition: width .9s linear; }
.goal-meta { font-size: 12.5px; color: var(--text2); margin-top: 6px; }
.goal.hit .goal-bar span { background: #9DC9A0; }
.goal.hit .goal-meta::after { content: " ✓"; color: #9DC9A0; }
.focus-clock .goal { margin: 22px auto 0; text-align: left; }
.goal-chip { margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; white-space: nowrap; }
.todo .goal-chip { font-size: 11px; }
.add-opts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; }
.add-opt { font-size: 14px; padding: 6px 0; }
.unit { height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); color: var(--text); font-size: 14px; min-width: 64px; }
.unit:hover { background: var(--s3); }
.goal-in { width: 110px; }
.t-when.missed { color: var(--danger); }
/* Start button: names what it starts, may wrap to two lines */
.home-start { height: auto; min-height: 58px; padding: 12px 24px; line-height: 1.3; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.home-start .hs-txt { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pt-sep { color: var(--faint); margin: 0 10px; }
/* any day's time */
.log-nav { display: flex; align-items: center; gap: 6px; margin-right: 56px; }
.log-nav .eyebrow { min-width: 110px; text-align: center; }
.log-nav .iconbtn:disabled { opacity: .25; cursor: default; }
.barcol { cursor: pointer; border-radius: 10px; }
.barcol:hover .barstack { filter: brightness(1.15); }
.barcol .sw { font-size: 11px; color: var(--muted); min-height: 15px; margin-top: -4px; }
/* today's wins */
.wins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 10px; }
.wins > div { background: var(--s2); border-radius: 18px; padding: 14px 12px; text-align: center; }
.wins b { display: block; font-family: var(--serif); font-weight: 300; font-size: 30px; letter-spacing: -1px; line-height: 1.1; color: var(--gold); }
.wins span { font-size: 12px; color: var(--muted); letter-spacing: .4px; }
.wins-note { font-size: 14px; color: var(--text2); }
.wins-note span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.wrow { display: grid; grid-template-columns: minmax(0, 150px) 1fr 48px; gap: 12px; align-items: center; padding: 7px 0; font-size: 15px; }
.wrow .pname { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wrow .ptrack { height: 5px; background: var(--s3); border-radius: 5px; overflow: hidden; }
.wrow .ptrack span { display: block; height: 100%; border-radius: 5px; }
.wrow .mono { text-align: right; color: var(--text2); }
.win-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.win-item:first-of-type { border-top: 0; }
.win-item small { display: block; color: var(--muted); font-size: 12.5px; }
.wi-check { color: var(--gold); }
@media (max-width: 560px) { .wins { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wrow { grid-template-columns: minmax(0, 1.3fr) 1fr 40px; } }
.plan-toggle-wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
@media (max-width: 560px) { .pt-sep { display: none; } .plan-toggle-wrap { flex-direction: column; gap: 2px; } }
.dlg-actions { flex-wrap: wrap; }
.dlg-panel h3 { overflow-wrap: anywhere; }
@media (max-width: 420px) { .runpill { min-width: 0; } .runpill .runpill-name { display: none; } .topbar { gap: 10px; } }

/* ---------- v4.12 (2026-11-26): Olive night + frosted-glass popups ---------- */
.start-btn, .home-start { background: var(--btn); box-shadow: none; }
.rc-time, .runpill-time { color: var(--time); }
/* popups and dialogs: see-through, blurred, light text; their accent stays warm gold */
.sheet-panel, .dlg-panel {
  --text: #F7F3EC; --text2: rgba(247,243,236,.82); --muted: rgba(247,243,236,.65); --faint: rgba(247,243,236,.42);
  --line: rgba(255,255,255,.2); --s1: rgba(255,255,255,.08); --s2: rgba(255,255,255,.12); --s3: rgba(255,255,255,.18);
  --gold: #F0D4A0; --gold-dim: #C9AE7E; --gold-rgb: 240,212,160; --on-gold: #1A1916;
  color: var(--text); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.sheet-backdrop, .dlg-backdrop { background: rgba(0,0,0,.25); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sheet-panel .btn.gold, .dlg-panel .btn.gold, .sheet-panel .tb-btn.gold { background: rgba(255,255,255,.9); border-color: transparent; color: #1A1916; box-shadow: none; }
.sheet-panel select option { background: #2C3027; color: #F2EDE4; }

/* ---------- v4.13 (2026-11-27): InFokus — the home Start button ----------
   Maarten: "more elegant, more modern… maybe with a gradient". Says only "Start working"; focus-ring icon in a dark disc;
   pale gold → sage gradient, a glass highlight on top, a soft glow under it, and a light sheen that sweeps across on hover. */
.home-start { position: relative; overflow: hidden; isolation: isolate; min-height: 62px; padding: 10px 30px 10px 10px; gap: 14px;
  justify-content: center; text-align: center; font-size: 17.5px; font-weight: 600; letter-spacing: .2px; color: #1E211A;
  background: linear-gradient(115deg, #F3E7C4 0%, #E2E3B8 42%, #BFCB9A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.12),
              0 1px 2px rgba(0,0,0,.25), 0 -14px 32px -16px rgba(214,214,160,.24); /* glow goes UP (v4.22, Maarten): downward it covered the button below */
  transition: transform .18s ease, box-shadow .25s ease, filter .25s ease; }
.home-start::before { content: ""; position: absolute; inset: 0 0 50% 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0)); }
.home-start::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg);
  transition: left .7s ease; }
.home-start:hover { filter: none; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(0,0,0,.12),
              0 1px 2px rgba(0,0,0,.25), 0 -18px 38px -16px rgba(214,214,160,.32); } /* glow softer again (v4.24, Maarten: 'even a bit more') */
.home-start:hover::after { left: 120%; }
.home-start:active { transform: translateY(0) scale(.985); }
.home-start:focus-visible { outline: 2px solid rgba(243,231,196,.8); outline-offset: 3px; }
.home-start .hs-ico { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: #23271F; color: #F3E7C4; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.25);
  transition: transform .4s ease; }
.home-start:hover .hs-ico { transform: rotate(45deg); }
.home-start .hs-txt { flex: 1; padding-right: 14px; display: block; }
@media (prefers-reduced-motion: reduce) { .home-start, .home-start::after, .home-start .hs-ico { transition: none; } }

/* ---------- v4.14 (2026-11-27): Start page = date + two buttons + time tracked today ---------- */
.home-head { margin-bottom: 56px; text-align: center; } /* date centred above the two buttons (2026-11-27) */
@media (max-width: 560px) { .home-head { margin-bottom: 44px; } }
.home-tracked { text-align: center; margin-top: 22px; }
.home-tracked .link { color: var(--muted); font-size: 15px; gap: 5px; }
.home-tracked b { color: var(--text2); font-weight: 500; }

/* ---------- v4.15 (2026-11-27): Plan page date smaller + centred; "To do" / "Done" captions ---------- */
.plan-head { text-align: center; margin-bottom: 26px; }
.plan-head h1 { font-size: clamp(34px, 6.5vw, 50px); letter-spacing: -1.4px; margin: 8px 0 10px; }
.plan-head .sub { font-size: 14px; }
.section-label.done-label { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- v4.15: Calendar ---------- */
main.cal-wide { max-width: 1180px; padding-top: 24px; padding-bottom: 40px; }
.cal-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-family: var(--serif); font-weight: 300; font-size: 28px; letter-spacing: -.6px; margin: 0; flex: 1; min-width: 180px; }
.cal-right { display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; background: var(--s1); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 999px; font-size: 14px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--s3); color: var(--text); }
.iconbtn.add { font-size: 18px; }
@media (max-width: 640px) { .cal-title { order: -1; flex-basis: 100%; font-size: 24px; } .cal-right { margin-left: auto; } .seg button { padding: 7px 10px; font-size: 13px; } }
@media (max-width: 380px) { .cal-right { gap: 6px; } .seg button { padding: 7px 8px; } }   /* v4.50: the ＋ stuck out 4 px at 360 px */

/* time grid (Day + Week) */
.cg { --gut: 52px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(var(--card-rgb), .35); }
.cg-scroll { height: calc(100vh - 190px); min-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.cg-head, .cg-body { display: grid; grid-template-columns: var(--gut) repeat(var(--n), minmax(0, 1fr)); }
.cg-head { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.cg-dh { padding: 8px 4px 6px; text-align: center; border-left: 1px solid var(--line); min-width: 0; }
.cg-date { border: 0; background: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 12px; }
.cg-date span { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.cg-date b { font-family: var(--serif); font-weight: 300; font-size: 24px; line-height: 1.1; color: var(--text); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.cg-date:hover b { background: var(--s2); }
.cg-dh.today .cg-date b { background: var(--gold); color: var(--on-gold); }
.cg-dh.today .cg-date span { color: var(--gold); }
.cg-more { display: block; margin: 4px auto 0; border: 0; background: var(--s2); color: var(--text2); font-size: 12px; padding: 3px 9px; border-radius: 999px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-more:hover { background: var(--s3); color: var(--text); }
.cg-more.none { background: none; height: 22px; padding: 0; }
.cg-gut { position: relative; }
.cg-hour { height: var(--h); position: relative; }
.cg-hour span { position: absolute; top: -8px; right: 8px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cg-col { position: relative; height: calc(var(--h) * 24); border-left: 1px solid var(--line); cursor: cell;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--h) - 1px), var(--line) calc(var(--h) - 1px), var(--line) var(--h)); }
.cg-col.today { background-color: rgba(var(--gold-rgb), .035); }
.cg-now { position: absolute; left: 0; right: 0; height: 2px; background: #E8756A; z-index: 3; pointer-events: none; }
.cg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #E8756A; }
.cev { position: absolute; z-index: 2; border-radius: 8px; padding: 4px 7px; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  background: color-mix(in srgb, var(--c) 30%, #1d2019); border-left: 3px solid var(--c); color: var(--text); font-size: 12.5px; line-height: 1.3;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25); transition: box-shadow .15s; }
.cev:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent); }
.cev-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev-m { font-size: 11.5px; color: var(--text2); }
.cev.short { padding-top: 1px; padding-bottom: 1px; }
.cev.done, .cev.skipped { opacity: .5; }
.cev.skipped .cev-t { text-decoration: line-through; }
.cev.missed { border-left-style: dashed; background: color-mix(in srgb, var(--c) 14%, #1d2019); }
.cev.ro { cursor: default; }
.cev.dragging { z-index: 6; opacity: .92; box-shadow: 0 10px 30px -8px rgba(0,0,0,.6), 0 0 0 1px var(--c); cursor: grabbing; }
.cev.copying { cursor: copy; } /* v4.42: ⌥ Option-drag duplicates */
.mc-ghost { opacity: .85; box-shadow: 0 0 0 1px var(--c); pointer-events: none; } /* v4.43: Month — the copy being dragged */
.mc.drop { background: color-mix(in srgb, var(--gold) 8%, transparent); cursor: copy; }
.cev-rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.cg-ghost { position: absolute; left: 2px; right: 2px; z-index: 4; border-radius: 8px; background: rgba(var(--gold-rgb), .28); border: 1px solid var(--gold);
  font-size: 12px; padding: 3px 7px; color: var(--text); pointer-events: none; }
@media (max-width: 640px) { .cg { --gut: 40px; } .cg-hour span { right: 4px; font-size: 10px; } .cg-date b { font-size: 18px; width: 30px; height: 30px; }
  .cev { padding: 2px 4px; font-size: 11px; } .cev-m { display: none; } .cg-more { font-size: 10.5px; padding: 2px 5px; } }

/* month */
.month { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.mh, .mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mh i { font-style: normal; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.mc { min-height: 118px; padding: 6px 6px 8px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.mc:nth-child(7n+1) { border-left: 0; }
.mc:nth-child(-n+7) { border-top: 0; }
.mc:hover { background: rgba(255,255,255,.025); }
.mc.out { opacity: .4; }
.mc-n { font-size: 13px; color: var(--text2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 2px; }
.mc.today .mc-n { background: var(--gold); color: var(--on-gold); font-weight: 600; }
.mc-ev { border: 0; text-align: left; font-size: 12px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 26%, transparent); color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mc-ev .mono { color: var(--text2); }
.mc-ev.done { opacity: .5; }
.mc-more { font-size: 11.5px; color: var(--muted); padding-left: 6px; }
.mc-items { align-self: flex-start; border: 0; background: none; color: var(--muted); font-size: 11.5px; padding: 1px 6px; border-radius: 6px; }
.mc-items:hover { background: var(--s2); color: var(--text); }
@media (max-width: 640px) { .mc { min-height: 76px; padding: 4px 2px; } .mc-ev .mono { display: none; } .mc-ev { font-size: 10.5px; padding: 1px 3px; } .mh i { padding: 8px 4px; } .mc-items, .mc-more { font-size: 10px; padding: 0 3px; } }

/* year */
.year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 30px; }
.ym-name { border: 0; background: none; color: var(--gold); font-family: var(--serif); font-size: 19px; font-weight: 400; padding: 0 0 8px; }
.ym-name:hover { color: var(--text); }
.ym-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.ym-grid i { font-style: normal; font-size: 10px; color: var(--faint); text-align: center; padding-bottom: 3px; }
.ym-grid button { border: 0; background: none; color: var(--text2); font-size: 12px; aspect-ratio: 1; border-radius: 50%; padding: 0; position: relative; font-variant-numeric: tabular-nums; }
.ym-grid button:hover { background: var(--s2); color: var(--text); }
.ym-grid button.it::after, .ym-grid button.ev::after { content: ""; position: absolute; bottom: 1px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--muted); }
.ym-grid button.ev::after { background: var(--gold); }
.ym-grid button.today { background: var(--gold); color: var(--on-gold); font-weight: 600; }
.ym-grid button.today::after { background: var(--on-gold); }
.year-key { display: flex; gap: 20px; justify-content: center; margin-top: 28px; font-size: 12.5px; color: var(--muted); }
.year-key i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; vertical-align: 2px; background: var(--muted); }
.year-key i.ev { background: var(--gold); }
@media (max-width: 900px) { .year { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .year { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; } }

/* "+X items" popup */
.cd-list { margin-top: 10px; }
.cd-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; cursor: pointer; }
.cd-row:not([data-act]) { cursor: default; }
.cd-row[data-act]:hover { background: var(--s2); }
.cd-row.sub { padding-left: 34px; font-size: 14.5px; color: var(--text2); }
.cd-row.done .cd-t { color: var(--muted); }
.cd-row small { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.cd-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* month fills the screen (6 equal rows), like Google / Apple */
.month .mg { height: calc(100vh - 200px); min-height: 480px; grid-template-rows: repeat(6, minmax(0, 1fr)); }
.month .mc { min-height: 0; overflow: hidden; }
@media (max-width: 640px) { .month .mg { height: calc(100vh - 230px); min-height: 420px; } }
.cal-right .tb-btn { height: 38px; padding: 0 16px; }
@media (max-width: 640px) {
  .cal-bar { gap: 8px 4px; margin-bottom: 12px; }
  .cal-title { order: -1; flex: 1 1 auto; flex-basis: auto; min-width: 0; font-size: 22px; }
  .cal-nav .iconbtn { width: 38px; height: 38px; }
  .cal-right { flex-basis: 100%; margin-left: 0; justify-content: space-between; gap: 6px; }
  .cal-right .tb-btn { padding: 0 12px; }
  .cg-more .w, .mc-items .w { display: none; }
}

/* ---------- v4.16 (2026-11-27): Inbox "Pick day" bubble — the rest of the week + Later ---------- */
.daypop { position: fixed; z-index: 60; display: flex; gap: 4px; padding: 5px; border-radius: 16px;
  background: rgba(44,48,39,.92); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 14px 40px -12px rgba(0,0,0,.6);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); animation: daypop-in .12s ease-out; }
@keyframes daypop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.daypop button { border: 0; background: none; color: var(--text2); border-radius: 11px; min-width: 44px; height: 46px; padding: 0 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.daypop button b { font-weight: 500; font-size: 13px; }
.daypop button small { font-size: 11px; color: var(--muted); }
.daypop button:hover { background: rgba(255,255,255,.1); color: var(--text); }
.daypop button.on { background: var(--gold); color: var(--on-gold); }
.daypop button.on small { color: var(--on-gold); opacity: .75; }
.daypop .later { border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 11px 11px 0; margin-left: 2px; padding-left: 9px; }
.daypop .later svg { margin-bottom: 1px; }
@media (prefers-reduced-motion: reduce) { .daypop { animation: none; } }

/* ---------- v4.17 (2026-11-27): Goals — the 5th tab ---------- */
.goals-head { align-items: flex-end; }
.gcard { background: var(--s1); border-radius: var(--r); padding: 20px 22px 16px; margin-bottom: 16px; border-left: 3px solid var(--c); }
.g-top { display: flex; align-items: flex-start; gap: 10px; }
.g-main { flex: 1; min-width: 0; }
.g-where { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.g-title { font-family: var(--serif); font-weight: 300; font-size: 26px; letter-spacing: -.5px; line-height: 1.2; margin-top: 4px; cursor: pointer; }
.g-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 8px; font-size: 14px; color: var(--muted); }
.g-stats b { color: var(--text); font-weight: 600; }
.g-due.late { color: var(--danger); }
.g-bar { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; margin-bottom: 10px; }
.g-bar span { display: block; height: 100%; border-radius: 6px; background: var(--c); transition: width .4s ease; }
.g-steps .todo { padding-left: 0; }
.g-add { display: flex; gap: 8px; margin-top: 8px; }
.g-add .tx { flex: 1; height: 40px; font-size: 14.5px; }
.g-alldone { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(var(--gold-rgb), .1); font-size: 14.5px; }
.g-reached-toggle { display: flex; width: 100%; border: 0; background: none; padding: 0; margin-top: 30px; cursor: pointer; }
.g-reached { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-top: 1px solid var(--line); cursor: pointer; font-size: 15px; }
.g-reached:hover { background: rgba(255,255,255,.02); }
.g-check { color: var(--gold); }
.g-rt small { display: block; color: var(--muted); font-size: 12.5px; }
.goal-flag { color: var(--gold); font-size: 11px; margin-left: 6px; vertical-align: 1px; }
@media (max-width: 560px) { .gcard { padding: 16px 14px 12px; } .g-title { font-size: 22px; } .goals-head .tb-btn { height: 38px; padding: 0 14px; } }

/* 5 tabs on a phone: a bit tighter, the star logo hides on the narrowest screens */
@media (max-width: 430px) { .tabs { margin-left: 0; gap: 0; } .tabs a { padding: 8px 9px; font-size: 14px; } }
@media (max-width: 380px) { .topbar .brand { display: none; } }
/* narrow screens: a task row with day buttons puts them on a second line, so the name keeps the full width
   (before: the buttons took all the room and the name wrapped one letter per line — Inbox "With tasks", Goals) */
@media (max-width: 560px) {
  .todo:has(.daychoice) { flex-wrap: wrap; row-gap: 6px; padding-bottom: 8px; }
  .todo:has(.daychoice) .todo-title { flex: 1 1 0; }
  .todo:has(.daychoice) .daychoice { order: 5; flex-basis: calc(100% - 34px); margin-left: 34px; }
}

/* ---------------------------------------------------------------- Finance (v4.18) */
.fin-month { display: flex; align-items: center; gap: 4px; margin-left: -10px; }
.fin-month .iconbtn:disabled { opacity: .25; cursor: default; }
.fin-head h1 { margin-top: 6px; }
.fin-cats { margin-bottom: 30px; }
.fin-cat { display: grid; grid-template-columns: minmax(0, 190px) 1fr auto; align-items: center; gap: 14px; padding: 7px 0; font-size: 15px; }
.fc-name { color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-bar { height: 8px; border-radius: 8px; background: var(--s1); overflow: hidden; }
.fc-bar span { display: block; height: 100%; border-radius: 8px; background: var(--gold-dim); }
.fc-v { text-align: right; min-width: 88px; }
.fc-v small { color: var(--faint); margin-left: 8px; font-size: 12.5px; display: inline-block; min-width: 30px; }
.fin-subs-label { display: flex; justify-content: space-between; }
.fin-list { background: var(--s1); border-radius: var(--r); padding: 4px 0; margin-bottom: 22px; overflow: hidden; }
.fin-row { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; background: none; color: var(--text); text-align: left;
  padding: 12px 18px; font-size: 15.5px; cursor: pointer; border-top: 1px solid var(--line); }
.fin-row:first-child { border-top: 0; }
.fin-row:hover { background: var(--s2); }
.fin-row.paused { opacity: .5; }
.fr-ico { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.fr-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fr-main small, .fr-amt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fr-sub { font-size: 12px; }
.fr-amt { text-align: right; white-space: nowrap; font-weight: 500; }
.fin-list .add-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; min-height: 52px; font-size: 15px; }
.fin-list .add-row:first-child { border-top: 0; }
.fin-day { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 0 4px 8px; }
.fin-cats-link { margin-top: 6px; }
.fin-amount { font-size: 40px; }
.fin-curs { margin-top: 14px; align-items: center; }
/* v4.49 (Maarten 2026-12-05): the expense popup — currencies close under the amount, "Add expense" right under them,
   day / note / subscription behind "More options …" */
.fin-exp-top .fin-amount { padding-bottom: 8px; margin-bottom: 0; }
.fin-exp-top + .fin-curs { margin-top: 12px; }
.fin-add-row { display: flex; justify-content: center; margin-top: 14px; }   /* v4.50: same button as the bottom one, centred */
.fin-exp-actions { justify-content: center; }
@media (min-width: 641px) { .fin-add-bottom { display: none; } }   /* the bottom one: phone only (and only after More options) */
.fin-exp-morelink { display: inline-block; margin: 20px 0 0; padding: 6px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fin-exp-morelink:hover { color: var(--text2); }
.fin-eur { color: var(--text2); font-size: 15px; margin-left: 6px; }
.fin-eur small { color: var(--faint); font-size: 12.5px; }
.fin-note, .fin-sub-amount { width: 100%; height: 48px; }
.fin-cat-edit { display: flex; gap: 14px; }
.fin-emoji { width: 70px; flex: none; text-align: center; }
@media (max-width: 560px) {
  .fin-cat { grid-template-columns: minmax(0, 120px) 1fr auto; gap: 10px; font-size: 14px; }
  .fin-row { padding: 12px 14px; gap: 12px; }
  .fin-head .tb-btn { height: 38px; padding: 0 14px; }
  .fin-amount { font-size: 34px; }
}
/* six tabs (v4.18) still fit next to ⋯ on a phone */
@media (max-width: 430px) { .tabs a { padding: 8px 5px; font-size: 13px; } .menu-btn { flex-shrink: 0; } }
@media (max-width: 370px) { .tabs a { padding: 8px 3px; font-size: 12.5px; } }

/* Finance v4.19: subcategories */
button.fin-cat { width: 100%; border: 0; background: none; color: inherit; text-align: left; font: inherit; font-size: 15px; cursor: default; }
button.fin-cat.can-open { cursor: pointer; }
button.fin-cat.can-open:hover .fc-name { color: var(--text); }
.fc-tri { font-style: normal; color: var(--faint); margin-left: 6px; font-size: 12px; }
.fc-subrow { font-size: 13.5px; padding: 4px 0; }
.fc-subrow .fc-name { padding-left: 30px; color: var(--muted); }
.fc-subrow .fc-bar { height: 5px; }
.fc-subrow .fc-bar span { background: var(--faint); }
.fc-subrow .fc-v { color: var(--text2); font-size: 13.5px; }
.chip-tri { font-style: normal; font-size: 10px; margin-left: 7px; opacity: .55; }
.subpop { flex-wrap: wrap; max-width: calc(100vw - 16px); z-index: 70; }   /* one row as long as it fits (v4.20) */
.subpop button { height: 36px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
.subpop .later { border-left: 0; border-radius: 11px; margin-left: 0; padding-left: 12px; font-size: 18px; color: var(--muted); }
.fc-subs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px 58px; }
.fc-chip { border: 1px solid var(--line); background: none; color: var(--text2); border-radius: 999px; height: 32px; padding: 0 12px; font-size: 13px; cursor: pointer; }
.fc-chip:hover { border-color: var(--faint); color: var(--text); }
.fc-chip.add { border-style: dashed; color: var(--muted); }
.fc-chip.paused { opacity: .45; text-decoration: line-through; }
@media (max-width: 560px) { .fc-subs { padding-left: 52px; } .fc-subrow .fc-name { padding-left: 18px; } }

/* Finance v4.21: like the Start page — two buttons, the category split, the rest behind "More…" */
.fin-head { text-align: center; margin-bottom: 40px; }
.fin-head .fin-month { justify-content: center; margin-left: 0; }
.fin-arrow-gap { display: inline-block; width: 34px; }
.fin-btns { margin-bottom: 40px; }
.fin-start:hover .hs-ico { transform: rotate(-12deg); }
/* v4.23: Start's Quick task and Finance's Subscription are the same button (hover included) */
button.quick-btn { display: block; border: 1px solid var(--line); background: var(--s2); padding: 0 14px; color: #757575; font: inherit; font-size: 13.5px; cursor: pointer; }
button.quick-btn:hover { color: var(--text2); border-color: var(--faint); }
.fin-cats { margin-bottom: 8px; }
.fin-more-link { text-align: center; margin: 14px 0 6px; }
.fin-more-link .link { color: var(--muted); font-size: 14px; }
.fin-more-link .link:hover { color: var(--text2); }
.fin-count { color: var(--muted); font-size: 14px; margin: 18px 4px 10px; }
.fin-count b { color: var(--text2); font-weight: 600; }
.fin-dayrow { display: flex; justify-content: space-between; padding: 5px 18px; font-size: 12.5px; color: var(--muted);
  background: rgba(255,255,255,.025); border-top: 1px solid var(--line); }
.fin-dayrow:first-child { border-top: 0; }
@media (max-width: 560px) { .fin-dayrow { padding: 5px 14px; } .fin-head { margin-bottom: 32px; } }

/* v4.23: the subcategory bubble fades like InKontext's word card (finance.js subHover) */
.subpop.seen { animation: none; }
.subpop.fading { animation: subpop-fade 1s linear forwards; }
@keyframes subpop-fade { 0%, 40% { opacity: .5; } 100% { opacity: 0; } }
/* v4.23: Expense ↔ Subscription switch at the bottom of a new expense / subscription */
.fin-toggle { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; padding: 0; border: 0; background: none; color: var(--text2); font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.fin-toggle .ft-track { width: 42px; height: 24px; border-radius: 999px; background: var(--s3, rgba(255,255,255,.12)); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background .2s ease, border-color .2s ease; }
.fin-toggle .ft-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text2); transition: transform .2s ease, background .2s ease; }
.fin-toggle.on .ft-track { background: var(--gold); border-color: var(--gold); }
.fin-toggle.on .ft-knob { transform: translateX(18px); background: var(--on-gold); }
.fin-toggle .ft-label small { display: block; font-size: 12px; color: var(--muted); }
.fin-toggle:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .fin-toggle .ft-track, .fin-toggle .ft-knob { transition: none; } }

/* v4.23: sort + filter in Finance's "More…" — the Inbox's filter icon opens a popup with the options */
.fin-countbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.fin-countbar .fin-count { margin: 0 4px; }
.fin-search { height: 44px; border-radius: 999px; margin-top: 14px; }
.fin-reset { margin-left: 8px; color: var(--gold-dim); }
.fin-none { color: var(--muted); font-size: 14px; padding: 18px 4px; }

/* v4.24 (Maarten, 2026-12-01): popup title on the same line as ✕ (renderSheet moves the h2 into .sheet-top) */
.sheet-top h2 { flex: 1; min-width: 0; margin: 0; font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
.sheet-top:has(h2) { align-items: center; margin-bottom: 8px; }
.sheet-top:has(h2) + .sheet-sub { margin-top: 2px; }
.sheet-top .big-input { flex: 1; min-width: 0; padding: 4px 2px 10px; }   /* v4.25: the task popup's editable name, same row as ✕ */
.sheet-top:has(.big-input) { margin-bottom: 8px; }
.sheet-top .log-nav { margin-right: 0; }   /* v4.25: ‹ Today › of the time popup, on the ✕ row */
/* v4.24: the main button at the bottom of a popup (Save / Add / Done) looks like nothing else in it — the Start button's
   gold → sage gradient with a glass highlight, so it never reads as a selected chip (those are plain white). */
.sheet-panel .btn.gold, .dlg-panel .btn.gold, .sheet-panel .tb-btn.gold {
  position: relative; overflow: hidden; min-width: 150px; height: 46px; padding: 0 24px;   /* v4.49: was 52 / 30 (Maarten 2026-12-05: smaller buttons, same text) */ font-weight: 600; font-size: 15.5px; letter-spacing: .2px;
  color: #1E211A; border: 0; background: linear-gradient(115deg, #F3E7C4 0%, #E2E3B8 42%, #BFCB9A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(0,0,0,.12), 0 6px 18px -10px rgba(0,0,0,.55);
  transition: transform .15s ease, filter .2s ease; }
.sheet-panel .btn.gold:hover, .dlg-panel .btn.gold:hover, .sheet-panel .tb-btn.gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
.sheet-panel .btn.gold:active, .dlg-panel .btn.gold:active { transform: translateY(0) scale(.985); }

/* v4.28 (Maarten 2026-12-03): "General" (= the area itself) looks different from real projects everywhere:
   gold, a stacked-layers icon, a bit bigger, always first; real projects below it are indented with a guide line. */
.gen-ico { flex-shrink: 0; vertical-align: -2px; }
.chip.general, .pl-row.general, .ibc-pill.gen { display: inline-flex; align-items: center; gap: 7px; }
.subproj { margin: 6px 0 4px 14px; padding-left: 12px; border-left: 1px solid var(--line); }
/* Inbox */
.ibc-pill.gen { color: var(--gold); border-color: rgba(var(--gold-rgb),.4); background: rgba(var(--gold-rgb),.07); font-size: 14.5px; padding: 7px 14px; font-weight: 500; }
.ibc-proj > .subproj .ibc-area { margin-left: 0; }
.ib-areahead.gen .lists-head span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); font-size: 14px; }
.lists-proj > .subproj .ib-area { margin-left: 0; }
/* Start */
.gen-tile { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 20px; margin-bottom: 6px; border-radius: 20px;
  border: 1px solid rgba(var(--gold-rgb),.35); background: rgba(var(--gold-rgb),.08); color: var(--gold); font-size: 18px; font-weight: 500; text-align: left; }
.gen-tile:hover { background: rgba(var(--gold-rgb),.14); border-color: var(--gold); }
.gen-tile .gen-ico { width: 18px; height: 18px; }
.gen-tile small { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--gold-dim); }
/* Plan */
.pl-row.general { font-size: 16px; font-weight: 500; }
.pl-rname { display: inline-flex; align-items: center; gap: 7px; }
.pl-proj > .subproj { margin-left: 20px; }
.pl-proj > .subproj .pl-rowwrap { margin-left: 0; }
/* Log time + Goals: General chip on its own line, projects indented below */
.area-group > .subproj, .sheet-panel .subproj { margin-top: 8px; }
/* Week */
.prow.gen .pname { color: var(--gold); font-weight: 500; }
.prow.l3 { padding-left: 52px; }
/* Areas page */
.m-label.m-gen { display: flex; align-items: center; gap: 6px; color: var(--gold-dim); }
.ibc-proj > .subproj, .lists-proj > .subproj { margin-left: 24px; }
/* "With tasks" view: a project heading carries its dot and some air above, so it never reads like one of General's activities */
.lists-proj > .subproj { margin-left: 16px; padding-left: 10px; }
.ib-areahead.proj { margin-top: 14px; }
.ib-areahead.proj .lists-head span:first-child { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.ib-areahead.proj .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
/* v4.29: Inbox — the area's name is the drop target for tasks on the area itself; the highlight hugs the name */
.area-drop { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; margin-left: -12px; border-radius: 999px; }
.area-drop .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.area-drop b { font-weight: 600; font-size: 12px; color: var(--gold); }
.area-drop.drop-hover { box-shadow: inset 0 0 0 1.5px var(--gold); background: rgba(var(--gold-rgb),.1); }
.ibc-head .area-drop { margin-left: -10px; }
.ib-areatasks { margin-left: 16px; }
.ib-areaacts { margin-left: 16px; padding-left: 0; border-left: 0; }
/* v4.30: no "General" — the area itself is picked by its own name */
.area-tile { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 20px; margin-bottom: 8px; border-radius: 20px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); font-family: var(--serif); font-size: 20px; text-align: left; }
.area-tile:hover { background: color-mix(in srgb, var(--c) 28%, transparent); }
.area-tile .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.area-chip { gap: 8px; font-size: 16px; color: var(--text); font-weight: 500; }
.area-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.subproj .tiles { margin-top: 2px; }
/* v4.32: plan an area / project / activity itself from the Inbox */
.ibc-pill, .area-drop, .lh-name { cursor: pointer; }
.ibc-pill:hover, .area-drop:hover { border-color: var(--faint); }
.lh-name:hover { color: var(--text); }
.plan-tag { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--on-gold); background: var(--gold); border-radius: 999px; padding: 1px 8px; margin-left: 2px; }
.lists-head { align-items: center; gap: 10px; }
.lists-head .n { margin-left: auto; }
.lists-head .daychoice { text-transform: none; letter-spacing: 0; }
.area-head.big { gap: 10px; }
.area-head.big .ah-days { margin-left: auto; }
@media (max-width: 640px) { .lists-head, .area-head.big { flex-wrap: wrap; } .lists-head .daychoice, .area-head.big .ah-days { flex-basis: 100%; margin-left: 0; } }
/* v4.32b (Maarten 2026-12-03): a heading's day chips show only while the mouse is on that heading, or when it already
   has a day. visibility (not display) on desktop, so nothing shifts when they appear. On a touch screen (no hover)
   they are left out unless planned — tap the heading's name instead: its popup has "Plan it". */
.lists-head .hd-days:not(.planned), .area-head.big .ah-days:not(.planned) { visibility: hidden; }
.lists-head:hover .hd-days, .area-head.big:hover .ah-days, .lists-head:focus-within .hd-days, .area-head.big:focus-within .ah-days { visibility: visible; }
@media (hover: none) {
  .lists-head .hd-days:not(.planned), .area-head.big .ah-days:not(.planned) { display: none; }
}
/* v4.40 (Maarten 2026-12-03): the same for a TASK in the Schedule view — Today / Tomorrow / Pick day only when the task
   has a day (also once its day was taken off again); with the mouse on the row they show, so a day can still be set.
   On a touch screen: tap the task, its popup has the day buttons. */
.lists-proj .todo .daychoice:not(.planned) { display: none; }
@media (hover: hover) { .lists-proj .todo:hover .daychoice, .lists-proj .todo:focus-within .daychoice { display: inline-flex; } }

/* v4.33b (Maarten 2026-12-03): Schedule rows were too tall — tighter rows, smaller chips, minimal gaps */
.lists-proj { margin-bottom: 16px; padding: 4px 6px; }
.lists-proj .area-head.big { margin-bottom: 2px; }
.lists-proj .lists-group { margin-bottom: 2px; padding: 0 6px; }
.lists-proj .lists-head { padding: 2px 0; min-height: 28px; }
.lists-proj .todo { min-height: 32px; padding: 1px 4px 1px 0; }
.lists-proj .check { width: 24px; height: 24px; }
.lists-proj .mini { min-height: 24px; padding: 0 9px; font-size: 12px; }
.lists-proj .daychoice { gap: 3px; row-gap: 3px; }
.lists-proj .subproj { margin-top: 2px; margin-bottom: 2px; }
.lists-proj .ib-area { margin-bottom: 4px; }
@media (max-width: 640px) {
  .lists-proj .todo:has(.daychoice) { row-gap: 3px; padding-bottom: 4px; }
  .lists-proj .todo:has(.daychoice) .daychoice { flex-basis: calc(100% - 34px); margin-left: 34px; }
  .lists-proj .lists-head, .lists-proj .area-head.big { row-gap: 3px; }
}

/* v4.34: tasks under each pick in the Plan popup */
.pick-tasks { display: flex; flex-direction: column; gap: 1px; margin: -6px 0 6px 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.pick-task { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 6px 0 0; border: 0; background: transparent; color: var(--text2); font-size: 14px; text-align: left; cursor: pointer; border-radius: 8px; }
.pick-task .ck { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--faint); display: inline-grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.pick-task.on { color: var(--text); }
.pick-task.on .ck { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.pick-task .pt-title { flex: 1; min-width: 0; }

/* v4.35 (Maarten 2026-12-03): the drop mark is a gold line IN THE GAP between two rows — not a glow on a card's edge */
.drop-above, .drop-below { position: relative; box-shadow: none !important; }
.drop-above::before, .drop-below::after { content: ''; position: absolute; left: 6px; right: 6px; height: 2px; border-radius: 2px; background: var(--gold); pointer-events: none; z-index: 5; }
.drop-above::before { top: calc(-1 * var(--dg, 1px) - 1px); }
.drop-below::after { bottom: calc(-1 * var(--dg, 1px) - 1px); }
.plan-item { --dg: 6px; }

/* v4.35: the focus view's band is as quiet as on the boxed card; "Up next" sits on the boxed card */
.focus-bg { opacity: .3; }
.focus-bg::after { background: radial-gradient(ellipse at center, rgba(10,9,8,.55), rgba(10,9,8,.92)); }
.rc-next { margin-top: 14px; font-size: 13px; color: var(--muted); }
.rc-next b { color: var(--text2); font-weight: 500; }

/* v4.36 (Maarten 2026-12-03): focus mode in the boxed card's colours — not near-black */
.focus { background: var(--s1); }
.focus-bg { opacity: .4; }
.focus-bg::after { background: radial-gradient(ellipse at center, rgba(var(--card-rgb),.55), rgba(var(--card-rgb),.95)); }
/* v4.36: a plan item with tasks is a plain heading; its general work is a row like the tasks */
.head-card { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
.gen-row .todo-title { color: var(--text); }
/* v4.36: every row's day chips end on the same right edge in the Schedule view */
.lists-proj .todo { padding-right: 0; }
.lists-proj .area-head.big { padding-right: 6px; }

/* v4.37: the open area's name is itself a pill — white when the area is picked */
.pl-arow { justify-content: flex-start; gap: 10px; font-size: 17px; color: var(--text); border-color: transparent; padding: 0 12px 0 10px; margin-left: -4px; }
.pl-arow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.pl-aline { margin-top: 6px; }
.pl-aacts { padding-top: 6px; }
.pl-arow .pl-count { margin-left: auto; font-size: 13px; }

/* v4.39: calendar — small line above the block's name: the level right above it */
.cev-sup { font-size: 10.5px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.cd-sup { display: block; font-size: 11px; color: var(--muted); }

/* v4.44: repeating events */
.rep-row { gap: 6px; margin-top: 8px; align-items: center; }
.rep-row:first-of-type { margin-top: 0; }
.rep-lbl { font-size: 13px; color: var(--muted); }
input.t.rep-n { width: 84px; height: 34px; }
input.t.rep-d { width: 160px; height: 34px; }
.rep-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text2); }
.rep-now .muted { color: var(--muted); }
.rep-ico { font-size: .95em; opacity: .8; }
.dlg-actions .btn { white-space: nowrap; }

/* home-screen app (2026-12-05): the top bar clears the iPhone's status bar (black-translucent); 0 everywhere else */
.topbar { padding-top: calc(10px + env(safe-area-inset-top)); }   /* v4.49: lower top bar (Maarten 2026-12-05; was 16 / 12) */
@media (max-width: 640px) { .topbar { padding-top: calc(7px + env(safe-area-inset-top)); } }
/* offline: the last saved copy is shown (static/sw.js) */
.offline-bar { position: relative; margin: 0 auto; max-width: 720px; padding: 8px 14px; border-radius: 0 0 12px 12px;
  background: rgba(232,166,91,.16); color: #F2C996; font-size: 14px; text-align: center; }

/* v4.53 (Maarten 2026-12-05): the expense popup — the currency in our own drop-down to the right of a shorter amount field */
.fin-exp-top { display: flex; align-items: flex-end; gap: 14px; }
.fin-exp-top .fin-amount { flex: 1; min-width: 0; max-width: 260px; }
.cur-dd { position: relative; z-index: 30; flex-shrink: 0; margin-bottom: 6px; }
.cur-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 16px; border-radius: 999px; font: inherit; font-size: 15px;
  font-weight: 600; color: var(--text); background: var(--s2); border: 1px solid var(--line); cursor: pointer; }
.cur-btn:hover, .cur-dd.open .cur-btn { background: var(--s3); }
.cur-caret { font-size: 11px; color: var(--muted); transition: transform .15s ease; }
.cur-dd.open .cur-caret { transform: rotate(180deg); }
.cur-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 150px; padding: 6px; border-radius: 16px;
  background: #2C3027; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 18px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fade .12s ease; }
.cur-opt { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px;
  background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.cur-opt:hover { background: var(--s2); }
.cur-opt.on { color: var(--gold); }
.fin-eur-row { margin: 8px 0 0 2px; min-height: 0; }
.fin-eur-row:empty { display: none; }
/* v4.53 (Maarten 2026-12-05): a ✕ at the right of every finished entry in "tracked today" */
.dur-x { display: inline-flex; align-items: center; gap: 4px; }
.entry-x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--faint); font-size: 14px; cursor: pointer; }
.entry-x:hover { color: #E29A8B; background: var(--s2); }
/* v4.54 (Maarten 2026-12-05): filter / sort buttons are just the icon — no circle, no background */
.ib-filter { border: 0; background: transparent; border-radius: 10px; color: var(--text2); }
.ib-filter:hover { background: var(--s1); }
.ib-filter i { top: 6px; right: 5px; }
/* v4.54 (Maarten 2026-12-05): every button only slightly rounded, like the active main-menu tab (10px) — was a full pill.
   Round icon buttons (✕, ▶, ⋯, the tick circles) stay round */
.start-btn, .home-start, .btn, .chip, .mini, .pill, .fn-item, .tb-btn, .toolbar .tb-quick, .home-btns .home-quick, .plan-tabs button,
.seg button, .cg-more, .fc-chip, .cur-btn, .toast-undo, .ibc-pill, .inbox-pills .inbox-item, .area-drop, .menu-item, .add-row,
.sheet-panel .btn.gold, .dlg-panel .btn.gold, .sheet-panel .tb-btn.gold, .card.event .btn.small { border-radius: 10px; }
.seg { border-radius: 12px; }
.seg button { border-radius: 8px; }
/* v4.56 (Maarten 2026-12-05): the two big yellow buttons (Start working, Add Expense) halfway between the old pill and 10px */
.home-start, .start-btn { border-radius: 20px; }
/* ---------- v4.57 (Maarten 2026-12-05): the Inbox ---------- */
/* the two sections apart: more room between the Inbox pills and the view toggle; filter right next to the toggle */
.ib-viewbar { margin-top: 40px; gap: 6px; }
.ib-viewbar .seg { margin-right: 0; }
/* Schedule = the same chips as Areas & activities, plus the tasks; every level a step further right */
.ibs-area { margin: 0 0 22px; }
.ibs-row { display: flex; align-items: center; gap: 10px; min-height: 36px; margin: 2px 0; }
.ibs-area > .ibs-row .area-drop { font-size: 15px; font-weight: 500; color: var(--text); }
.ibs-kids { margin-left: 16px; }
.ibs-kids > .subproj { margin-left: 0; }
.ibs-node { margin: 4px 0 6px; }
.ibs-tasks { margin: 0 0 4px 14px; }
.ibs-tasks .todo { min-height: 34px; padding: 1px 0; }
.ibs-tasks .tcheck { width: 22px; height: 22px; }
.ibs-tasks .tcheck.ghost { border-style: dashed; visibility: hidden; }
.ibs-tasks .todo-title { cursor: text; }
input.td-rename-in, .ib-add-in { flex: 1; min-width: 0; height: 30px; padding: 0 8px; font-size: 15px; border-radius: 8px; }
/* hover tools: ＋ Task · [Today Tomorrow Pick day] · ✕ — the three day pills sit close together, the others apart */
.ib-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ib-tools .daychoice { gap: 3px; flex-wrap: nowrap; }
.ib-tools .mini { min-height: 26px; padding: 0 9px; font-size: 12px; }
.ib-add { border: 1px dashed var(--line); background: transparent; color: var(--muted); font-size: 12px; min-height: 26px; padding: 0 10px; border-radius: 10px; cursor: pointer; }
.ib-add:hover { color: var(--text); border-color: var(--faint); }
.ib-del { width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); font-size: 12px; padding: 0; cursor: pointer; }
.ib-del:hover { color: #E29A8B; background: var(--s2); }
.ib-tools > :where(.ib-add, .ib-del, .daychoice:not(.planned)) { visibility: hidden; }   /* :where = low weight, so every 'show' rule below wins */
.ibs-row:hover .ib-tools > *, .ibs-tasks .todo:hover .ib-tools > *, .ib-tools.open > *, .ib-tools:focus-within > * { visibility: visible; }
@media (hover: none) { /* a phone: the options of the row you tapped (and a planned day) only */
  .ib-tools:not(.open) > .ib-add, .ib-tools:not(.open) > .ib-del, .ib-tools:not(.open) > .daychoice:not(.planned) { display: none; }
  .ibs-row, .ibs-tasks .todo { flex-wrap: wrap; }
  .ib-tools.open { flex-basis: 100%; justify-content: flex-start; margin-left: 0; }
}
/* the drop highlight hugs the chip, slightly rounded like the chips (was a full-width, round box) */
.ibc-pill.drop-hover, .area-drop.drop-hover { border-radius: 10px; }
.ibs-row .ibc-pill { cursor: default; }
/* v4.58 (Maarten 2026-12-06): an Inbox pill being renamed — the field sits inside the pill, as wide as its text */
.inbox-pills .inbox-item .todo-title { cursor: text; }
/* v4.59 (Maarten 2026-12-06): renaming changes nothing in the pill's look — only a cursor appears in the text */
.td-rename-in.pill-ce { outline: none; cursor: text; caret-color: var(--gold); min-width: 1ch; }
/* v4.59 (Maarten 2026-12-06): Structure — a click on an area's name folds it; the caret says it can */
.ibc-head .area-drop { cursor: pointer; }
.fold-caret { margin-left: 4px; font-size: 12px; color: var(--muted); font-weight: 400; }
.ibc-proj.folded { margin-bottom: 10px; }
/* v4.60 (Maarten 2026-12-06, idea 14 of the design page): every project is a mid-grey panel holding its activities
   and tasks — the different background is what shows what belongs together. And each level a clear step further right. */
.ib-projpanel { background: #33352F; border: 1px solid #44463F;   /* v4.62: quite a bit darker (Maarten 2026-12-06; v4.61 #40423E, v4.60 #4A4C48) */ border-radius: 12px; margin: 8px 0; }
.ibs-node.ib-projpanel { padding: 6px 12px 8px; }
.ibc-area.ib-projpanel { padding: 6px 8px; margin-left: 0; }
.ib-projpanel > .ibc-pill.area, .ib-projpanel > .ibs-row > .ibc-pill.area { background: none; border: 1px solid transparent; padding: 3px 8px; margin-left: -8px;
  font-size: 14px; font-weight: 600; color: var(--text); }
.ib-projpanel .ibc-pill:not(.area) { background: #272924; border-color: #55574F; color: #E7E3DA; }   /* v4.62: chips stay darker than the panel */
.ib-projpanel .tcheck { border-color: #8E8B84; }
.ib-projpanel .ibc-pill.drop-hover { border-color: var(--gold); background: rgba(var(--gold-rgb),.14); }
/* the panels replace the thin guide line under an area */
.ibs-kids > .subproj, .ibc-proj > .subproj { border-left: 0; padding-left: 0; margin-left: 0; }
/* deeper indents: area › its content 28px, chip › its tasks 24px, inside a project panel 22px */
.ibs-kids { margin-left: 28px; }
.ibs-tasks { margin-left: 24px; }
.ib-projpanel > .ibs-kids { margin-left: 22px; }
.ibc-proj > .ibc-area, .ibc-proj > .subproj { margin-left: 28px; }
.ibc-proj > .subproj .ibc-area.ib-projpanel { margin-left: 0; }
@media (max-width: 640px) { .ibs-kids { margin-left: 18px; } .ibs-tasks { margin-left: 16px; } .ib-projpanel > .ibs-kids { margin-left: 14px; } .ibc-proj > .ibc-area, .ibc-proj > .subproj { margin-left: 18px; } }

/* v4.64 (Maarten 2026-12-06, Mac copy first): every AREA is a box too, holding its activities and project panels.
   Three steps of light: page #181B16 < area box #22251F < project panel #33352F. */
.ibc-proj, .ibs-area { background: #22251F; border: 1px solid #2D3029; border-radius: 14px; padding: 12px 14px 6px; }
.ibc-proj.folded { padding-bottom: 12px; }
@media (max-width: 640px) { .ibc-proj, .ibs-area { padding: 10px 10px 4px; } }
/* v4.65: ⋯ after an area's name in the Tasks view — phones only (on a computer, hover shows the tools) */
.ib-more { display: none; background: none; border: 0; color: var(--muted); font-size: 16px; padding: 0 8px; cursor: pointer; }
@media (hover: none) { .ib-more { display: inline-block; } }
/* v4.65: on a phone a task's name keeps its width; a set day (Today / Tomorrow / Pick day) wraps to its own line below it
   (was: the day pills squeezed the name to a letter or two per line) */
@media (hover: none) { .ibs-tasks .todo .todo-title { flex: 1 1 150px; min-width: 0; } .ibs-tasks .todo .ib-tools { order: 5; flex-basis: 100%; margin-left: 32px; } .ibs-tasks .todo .ib-tools:not(.open):not(:has(.planned)) { display: none; } }
