/* Life Notebook app. Layout: a notebook with section tabs down the left (top strip on phones); each section is a prompt, a composer and a timeline of entries. */
:root {
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #E9EDF4;
  --ink: #1B2233;
  --muted: #5D6679;
  --line: #D9DFEA;
  --accent: #3B4FD8;
  --accent-ink: #FFFFFF;
  --danger: #B42318;
  --friends: #D9486B;
  --family: #15803D;
  --career: #2F7D5B;
  --hobbies: #7C4DD6;
  --health: #1F84A8;
  --inspiration: #B8860B;
  --relationships: #B03A8C;
  --ideas: #5E7D12;
  --thoughts: #3F6FA0;
  --goals: #A68A00;
  --finance: #0E8C82;
  --household: #C2410C;
  --food: #2F9E5E;
  --cleaning: #2B7FD6;
  --year: #B4235A;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11141C; --surface: #191E29; --surface-2: #232A38; --ink: #E8ECF4; --muted: #9AA3B6; --line: #2D3546;
    --accent: #8B9BFF; --accent-ink: #0E1220; --danger: #FF8A7A;
    --friends: #FF7E9C; --family: #6FD3A8; --career: #6CCB9F; --hobbies: #B79BFF; --health: #6FC6E6; --inspiration: #E8C25A; --relationships: #F08CD0; --ideas: #B5D46A; --thoughts: #8FB6E0; --goals: #E3C34F; --finance: #5FD3C6; --household: #FDBA74; --food: #7EDBA0; --cleaning: #8CC2FF; --year: #FF7BA6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11141C; --surface: #191E29; --surface-2: #232A38; --ink: #E8ECF4; --muted: #9AA3B6; --line: #2D3546;
  --accent: #8B9BFF; --accent-ink: #0E1220; --danger: #FF8A7A;
  --friends: #FF7E9C; --family: #6FD3A8; --career: #6CCB9F; --hobbies: #B79BFF; --health: #6FC6E6; --inspiration: #E8C25A; --relationships: #F08CD0; --ideas: #B5D46A; --thoughts: #8FB6E0; --goals: #E3C34F; --finance: #5FD3C6; --household: #FDBA74; --food: #7EDBA0; --cleaning: #8CC2FF; --year: #FF7BA6;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.15; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: env(safe-area-inset-top, 0px); align-self: start; height: 100vh; padding: 28px 16px 28px max(16px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; }
.brand h1 { font-size: 22px; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
nav { display: flex; flex-direction: column; gap: 2px; }
.tab { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 9px; text-align: left; font-weight: 500; color: var(--muted); }
.tab:hover { background: var(--surface-2); color: var(--ink); }
.tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.tab .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.side .status { margin-top: auto; font-size: 12px; color: var(--muted); }

main { padding-block: 32px 64px; padding-left: max(16px, 4vw); padding-right: max(16px, env(safe-area-inset-right, 0px), 4vw); min-width: 0; }
.wrap { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.head .eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--c, var(--accent)); font-weight: 600; }
.head h2 { font-size: clamp(28px, 4vw, 38px); margin-top: 4px; }
.head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.search { min-width: 0; flex: 0 1 240px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.notice[data-kind="error"] { color: var(--danger); }

/* Composer */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--c, var(--accent)); }
.composer .prompt { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row > * { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; }
.field label, .lbl { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.field input, .field select, textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--bg); padding: 6px 11px; border-radius: 999px; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--c, var(--accent)); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.scale { display: flex; gap: 6px; }
.scale button { width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-variant-numeric: tabular-nums; }
.scale button[aria-pressed="true"] { background: var(--c, var(--accent)); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.scale-hint { font-size: 12px; color: var(--muted); }
.drop { border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--surface-2); }
.drop img { max-height: 90px; border-radius: 8px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 9px; font-weight: 500; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: default; }
.saving { font-size: 13px; color: var(--muted); margin-right: auto; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--c, var(--accent)); box-shadow: inset 0 0 0 1px var(--c, var(--accent)); }

/* Entries */
.list { display: flex; flex-direction: column; gap: 12px; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.entry.pinned { border-color: var(--c, var(--accent)); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 12px; font-weight: 500; }
.pill.sec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pill.example { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.entry h3 { font-size: 18px; }
.entry .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.entry img.pic { max-width: 100%; max-height: 420px; border-radius: 9px; object-fit: contain; align-self: flex-start; background: var(--surface-2); }
.entry blockquote { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.entry .src { color: var(--muted); font-size: 13px; }
.entry a { color: var(--accent); overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; color: var(--muted); }
.entry .tools { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.entry .tools button { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.entry .tools button:hover { background: var(--surface-2); color: var(--ink); }
.entry .tools .confirm { color: var(--danger); font-weight: 600; }
.scores { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.scores b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Inspiration board */
.board { columns: 2 260px; column-gap: 12px; }
.board .entry { break-inside: avoid; margin-bottom: 12px; }

/* Overview */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card .last { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); gap: 8px; }
.card.feature { grid-column: 1 / -1; border-left: 4px solid var(--inspiration); }
.card.feature blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(20px, 3vw, 26px); line-height: 1.3; overflow-wrap: anywhere; }
.card.feature img { max-height: 260px; border-radius: 9px; align-self: flex-start; }
.mood svg { width: 100%; height: 70px; display: block; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.section-title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; font-family: var(--font-body); }

/* Today, tasks, habits, goals */
.two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel > h3 { font-size: 17px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.addrow { display: flex; gap: 8px; flex-wrap: wrap; }
.addrow input[type="text"] { flex: 1 1 200px; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.addrow select, .addrow input[type="date"] { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.task .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task .x { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.task .x:hover { background: var(--surface-2); color: var(--ink); }
.task .when { font-size: 12px; color: var(--danger); }
.ev { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev .time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); padding-top: 1px; }
.ev .what { overflow-wrap: anywhere; font-weight: 500; }
.ev .where { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; font-weight: 400; }
.ev.past .what { color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }
.habits { overflow-x: auto; }
.habits table { border-collapse: collapse; width: 100%; min-width: 420px; }
.habits th, .habits td { padding: 6px 4px; text-align: center; font-size: 12.5px; }
.habits th { color: var(--muted); font-weight: 500; }
.habits td.name { text-align: left; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.habits th.today { color: var(--ink); font-weight: 700; }
.hb { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--accent-ink); font-weight: 700; }
.hb[aria-pressed="true"] { background: var(--goals); color: #fff; border-color: transparent; }
.app[data-layout="home"] .wrap, .app[data-layout="focus"] .wrap, .app[data-layout="tiles"] .wrap { max-width: 1060px; }
.streak { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.goal { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.goal .name { font-weight: 600; overflow-wrap: anywhere; }
.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 999px; }
.goal.done .name { text-decoration: line-through; color: var(--muted); }
.mic { display: inline-flex; align-items: center; gap: 6px; }
.mic[aria-pressed="true"] { background: var(--danger); color: var(--accent-ink); border-color: transparent; }
.mic .rec { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.partial { font-size: 13px; color: var(--muted); font-style: italic; min-height: 1em; }
.file-under { padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; }
.hlist { display: flex; flex-direction: column; gap: 10px; }
.hrow { background: var(--surface); border: 1px solid color-mix(in srgb, var(--goals) 22%, var(--line)); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hrow.compact { flex-direction: row; align-items: center; justify-content: space-between; padding: 8px 8px 8px 12px; }
.htop { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hname { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.hmeta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.streak-pill { background: color-mix(in srgb, var(--goals) 16%, var(--surface)); color: color-mix(in srgb, var(--goals) 85%, var(--ink)); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.hdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hday { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 50px; padding: 4px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-width: 0; }
.hrow.compact .hday { width: 64px; flex: none; }
.hday .dl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hday .dn { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hday.is-today { border: 2px solid var(--goals); }
.hday[aria-pressed="true"] { background: var(--goals); border-color: var(--goals); }
.hday[aria-pressed="true"] .dl, .hday[aria-pressed="true"] .dn { color: #fff; }
.hfoot { display: flex; gap: 12px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
/* Goals & reviews */
.ygoal { background: color-mix(in srgb, var(--year) 5%, var(--surface)); border: 1px solid color-mix(in srgb, var(--year) 24%, var(--line)); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ygoal.done .yname { text-decoration: line-through; color: var(--muted); }
.ygoal input, .ygoal textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.ytop { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.yname { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; min-width: 0; }
.ystatus button { font-size: 12px; padding: 4px 10px; }
.ycheckins { display: flex; flex-direction: column; gap: 6px; border-left: 3px solid color-mix(in srgb, var(--year) 45%, var(--line)); padding-left: 10px; }
.ycin { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; }
.ycin-date { color: var(--year); font-weight: 600; white-space: nowrap; font-size: 12.5px; }
.ycin-note { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.ycin .x, .yhl .x { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 0 6px; border-radius: 6px; }
.ymonth { background: color-mix(in srgb, var(--year) 4%, var(--surface)); border: 1px solid color-mix(in srgb, var(--year) 20%, var(--line)); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ymonth[open] { gap: 10px; }
.ymonth > * + * { margin-top: 10px; }
.ymonth.now { border-color: var(--year); border-width: 2px; }
.ymonth summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.ymonth summary::-webkit-details-marker { display: none; }
.ymonth summary::before { content: "▸"; color: var(--year); transition: transform .15s; }
.ymonth[open] summary::before { transform: rotate(90deg); }
.ymname { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.yhl { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.yhl li { overflow-wrap: anywhere; }
.yhl li span { margin-right: 4px; }
.yday { width: 74px; flex: 0 0 74px !important; padding: 9px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.ynote { width: 100%; min-height: 64px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.ygoal .tools { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.ygoal .tools button { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 8px; border-radius: 6px; }
.ygoal .tools button:hover { background: var(--surface-2); color: var(--ink); }
.ygoal .tools .confirm { color: var(--danger); font-weight: 600; }
.yearchip { font-variant-numeric: tabular-nums; font-weight: 600; }
/* Layout switcher */
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.layout-pick select { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--ink); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 12px; font-weight: 500; align-self: flex-start; }

/* Tabs on top, Home tiles, Daily focus: categories move to a bar across the top */
.app:not([data-layout="sidebar"]) { grid-template-columns: minmax(0, 1fr); }
.app:not([data-layout="sidebar"]) .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; height: auto; gap: 10px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.app:not([data-layout="sidebar"]) .brand p, .app:not([data-layout="sidebar"]) .side .status, .app:not([data-layout="sidebar"]) .tab-group { display: none; }
.app:not([data-layout="sidebar"]) .brand h1 { font-size: 19px; }
.app:not([data-layout="sidebar"]) nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.app:not([data-layout="sidebar"]) .tab { flex: none; padding: 7px 11px; }
.app:not([data-layout="sidebar"]) .tab .count { margin-left: 2px; }
.app:not([data-layout="sidebar"]) main { padding-block: 24px 64px; }
.app[data-layout="tiles"] nav, .app[data-layout="home"] nav { display: none; }
.app[data-layout="tiles"] .side, .app[data-layout="home"] .side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.app[data-layout="tiles"] .brand, .app[data-layout="home"] .brand { flex: 1 1 auto; }

/* Colour pass: every surface takes a tint of its section's colour */
.head { background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--accent)) 18%, var(--surface)), color-mix(in srgb, var(--c, var(--accent)) 6%, var(--surface))); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 22%, var(--line)); border-radius: 18px; padding: 20px; }
.head .eyebrow { color: color-mix(in srgb, var(--c, var(--accent)) 80%, var(--ink)); }
.entry { background: color-mix(in srgb, var(--c, var(--accent)) 5%, var(--surface)); border-color: color-mix(in srgb, var(--c, var(--accent)) 24%, var(--line)); }
.panel { background: color-mix(in srgb, var(--c, var(--accent)) 6%, var(--surface)); border-color: color-mix(in srgb, var(--c, var(--accent)) 26%, var(--line)); }
.panel > h3 { color: color-mix(in srgb, var(--c, var(--accent)) 75%, var(--ink)); }
.card { background: color-mix(in srgb, var(--c, var(--accent)) 7%, var(--surface)); border-color: color-mix(in srgb, var(--c, var(--accent)) 26%, var(--line)); }
.composer { background: color-mix(in srgb, var(--c, var(--accent)) 4%, var(--surface)); }
.pill { background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--surface-2)); }
.tile { background: linear-gradient(140deg, color-mix(in srgb, var(--c) 30%, var(--surface)), color-mix(in srgb, var(--c) 10%, var(--surface))); border-color: color-mix(in srgb, var(--c) 40%, var(--line)); }
.tile .dot { width: 12px; height: 12px; }
.tile .tc { align-self: flex-start; background: var(--surface); color: color-mix(in srgb, var(--c) 85%, var(--ink)); padding: 2px 9px; border-radius: 999px; }
.tile .ts { color: color-mix(in srgb, var(--ink) 70%, var(--c)); }
.app[data-layout="focus"] nav .tab:not([data-main]) { font-size: 13.5px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tile { text-align: left; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-height: 112px; min-width: 0; color: var(--ink); }
.tile:hover { border-color: var(--c); }
.tile .tn { font-family: var(--font-display); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.tile .ts { font-size: 12.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tile .tc { margin-top: auto; font-size: 12px; color: var(--c); font-weight: 600; font-variant-numeric: tabular-nums; }
.focus-quick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .focus-quick { grid-template-columns: minmax(0, 1fr); } }
.quickdump { padding: 10px 12px; }
.quickdump h3 { font-size: 14.5px; margin-bottom: 6px; }
.quickdump textarea { min-height: 52px; padding: 8px 10px; font-size: 14px; }
.quickdump .actions { margin-top: 6px; }
.quickdump .actions .btn { padding: 5px 12px; font-size: 13.5px; }

.tab-group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 2px; font-weight: 600; }

@media (max-width: 760px) {
  .tab-group { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; height: auto; flex-direction: column; gap: 10px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
  .brand p, .side .status { display: none; }
  .brand h1 { font-size: 18px; }
  nav { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .tab { flex: none; padding: 7px 10px; }
  .tab .count { margin-left: 2px; }
  main { padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .search { flex: 1 1 100%; }
  .app:not([data-layout="sidebar"]) nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 100px; padding: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .entry, .card { transition: border-color .15s; }
}

/* Event and task notes */
.ev { grid-template-columns: 74px minmax(0, 1fr) auto; }
.ev .evnbtn { font-size: 13px; align-self: start; white-space: nowrap; }
.task { flex-wrap: wrap; }
.task .notebox { flex: 1 1 100%; }
.notebox { display: flex; flex-direction: column; gap: 8px; padding: 10px; margin: 4px 0 10px; border-radius: 10px; background: color-mix(in srgb, var(--thoughts) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--thoughts) 24%, var(--line)); }
.notebox textarea { min-height: 110px; }
.notesum { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); }
.notesum ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.notesum .acts li { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.notesum .acts .linkish { font-size: 12.5px; }

/* Life review and money */
.rstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.rstat { background: color-mix(in srgb, var(--c) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); border-radius: 10px; padding: 10px 12px; }
.rstat .rv { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: color-mix(in srgb, var(--c) 80%, var(--ink)); font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.rstat .rl { font-size: 12.5px; color: var(--muted); }
.rh { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.rline { font-size: 14px; overflow-wrap: anywhere; }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rmonth { display: flex; flex-direction: column; gap: 10px; }
.rcat { border-left: 3px solid var(--c); padding: 2px 0 2px 10px; display: flex; flex-direction: column; gap: 4px; }
.rcat .yhl { font-size: 14px; }
.radvice { background: color-mix(in srgb, var(--year) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--year) 25%, var(--line)); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.radvice.leak { background: color-mix(in srgb, var(--danger) 6%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); }
.radvice ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.rbars { display: flex; flex-direction: column; gap: 5px; }
.rbar { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
button.rbar { border: 0; background: none; padding: 3px 4px; border-radius: 6px; text-align: left; }
button.rbar[aria-pressed="true"] { background: var(--surface-2); }
.rbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbt { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.rbf { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.rbn { font-variant-numeric: tabular-nums; color: var(--muted); }
.rtx summary { cursor: pointer; font-size: 13.5px; color: var(--muted); }
.txrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.txrow .txt { overflow-wrap: anywhere; }
.txrow .amt { font-variant-numeric: tabular-nums; }
.txrow .amt.in { color: var(--career); }
.txrow select { grid-column: 2 / -1; justify-self: start; font-size: 12.5px; padding: 3px 6px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); }
@media (max-width: 520px) { .ev { grid-template-columns: 56px minmax(0, 1fr); } .ev .evnbtn { grid-column: 2; justify-self: start; } }
details.rcat { border-left: 3px solid var(--c); border-radius: 0 9px 9px 0; padding: 6px 10px; background: color-mix(in srgb, var(--c) 6%, var(--surface)); }
details.rcat > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: 4px 8px; }
details.rcat > summary::-webkit-details-marker { display: none; }
.ymonth details.rcat > summary::before { content: none; }
details.rcat .rgn { font-weight: 600; font-size: 14px; }
details.rcat .rgc { font-size: 12px; font-weight: 600; padding: 0 7px; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--ink)); font-variant-numeric: tabular-nums; }
details.rcat .rgp { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.rcat[open] .rgp { display: none; }
details.rcat > ul { margin-top: 6px; }
.tilegroups { display: flex; flex-direction: column; gap: 14px; }
.tilegroup { display: flex; flex-direction: column; gap: 8px; }
.tile-head { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tilegroups:not(.bare) .tilegroup:first-child .tile:first-child { grid-column: 1 / -1; }

/* Places: countries with their cities */
.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.place { --c: var(--hobbies); display: flex; flex-direction: column; gap: 7px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 26%, var(--line)); min-width: 0; }
.place.home { --c: var(--health); }
.place-top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.place .flag { font-size: 24px; line-height: 1; }
.place-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }
.place-days { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: color-mix(in srgb, var(--c) 80%, var(--ink)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.place .rbf { background: var(--c); }
.place-months { display: flex; flex-wrap: wrap; gap: 4px; }
.mchip { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.place-cities { display: flex; flex-wrap: wrap; gap: 5px; }
.city { display: inline-flex; gap: 6px; align-items: baseline; font-size: 13px; padding: 3px 9px; border-radius: 8px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 20%, var(--line)); }
.city .cd { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.people-seen { display: flex; flex-wrap: wrap; gap: 6px; }
.person { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 10px; font-size: 13.5px; background: color-mix(in srgb, var(--friends) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--friends) 24%, var(--line)); }
.person .pm, .person .pw { font-size: 11.5px; color: var(--muted); }
.tripline { margin: 0; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--hobbies) 7%, var(--surface)); border-left: 3px solid var(--hobbies); }
.fitlist { display: flex; flex-direction: column; gap: 10px; }
.fitrow { --c: var(--career); display: flex; flex-direction: column; gap: 5px; }
.fittop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.fitn { font-family: var(--font-display); font-weight: 700; color: color-mix(in srgb, var(--career) 80%, var(--ink)); font-variant-numeric: tabular-nums; }
.fitrow .rbf { background: var(--career); }
.fitdays { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.fittop strong { font-size: 14.5px; }
.ucbox { display: flex; flex-direction: column; gap: 2px; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--goals) 8%, var(--surface)); border-left: 3px solid var(--goals); }
.triplist { display: flex; flex-direction: column; gap: 6px; }
.tripc { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--hobbies) 6%, var(--surface)); border-left: 3px solid var(--hobbies); }
.tripc-head { display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.tripc ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 26px; display: flex; flex-direction: column; gap: 2px; }
.tripc li { display: flex; gap: 8px; font-size: 14px; }
.tripc .tl-when { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.redflag { display: flex; flex-direction: column; gap: 4px; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-left: 3px solid var(--danger); }
.redflag > div { display: flex; flex-direction: column; gap: 2px; }
.person { position: relative; padding-right: 26px; } .person .x { position: absolute; top: 2px; right: 4px; }
details.fitrow > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
details.fitrow > summary::-webkit-details-marker { display: none; }
details.fitrow > summary::before { content: none !important; }
details.fitrow .fit-hint { margin-left: auto; }
details.fitrow .fit-hint::after { content: " ▸"; }
details.fitrow[open] .fit-hint::after { content: " ▾"; }
details.fitrow .fitdays { margin-top: 4px; }
.advgroups { display: flex; flex-direction: column; gap: 8px; }
.advgroup { border-left: 3px solid var(--c); padding-left: 10px; }
.advcat { font-weight: 700; font-size: 13.5px; color: color-mix(in srgb, var(--c) 75%, var(--ink)); margin-bottom: 2px; }
.fitnext { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fitnext li { display: flex; align-items: baseline; gap: 4px; font-size: 14px; padding: 6px 10px; border-radius: 9px; background: color-mix(in srgb, var(--career) 7%, var(--surface)); flex-wrap: wrap; }
.fitnext .tl-when { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.fitpanel .rstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.today-next { border-width: 2px; }
.section-title.home-h { font-size: 15px; letter-spacing: .06em; color: var(--ink); margin: 18px 0 2px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.tilegroups.bare .ts { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tripc-head .tl-when { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.fitmini { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--career) 26%, var(--line)); background: color-mix(in srgb, var(--career) 7%, var(--surface)); color: var(--ink); font: inherit; cursor: pointer; }
.fitmini .fm-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fitmini .fm-s b { color: var(--ink); }
.fm-list { display: flex; flex-direction: column; gap: 6px; }
.fm-none { padding-left: 2px; }
.cc-day { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.cc-row.done, .cc-row.cx { background: var(--surface); border-left-color: var(--line); }
.cc-row.cx b { text-decoration: line-through; color: var(--muted); }
.cc-ok { font-size: 13px; font-weight: 600; color: var(--career); align-self: center; padding: 0 4px; }
.fitmini .fm-t { font-weight: 700; white-space: nowrap; }
.fitmini .fm-s { flex: 1; font-size: 13.5px; color: var(--muted); min-width: 0; }
.fitmini .fm-go { font-size: 20px; color: var(--muted); }
.ev .evbtns { grid-column: 2 / -1; display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px; margin-top: -6px; }
.ev .evbtns .evnbtn { font-size: 12.5px; }
.today-next .ev { padding: 6px 0; gap: 8px; }
.btn.sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.ev.cancelled .what { text-decoration: line-through; color: var(--muted); }
.mailnote { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); } .mailnote span { flex: 1 1 180px; }
.classcheck { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.cc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--career) 9%, var(--surface)); border-left: 3px solid var(--career); font-size: 14px; }
.cc-row.late { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.cc-row > div:first-child { flex: 1 1 140px; font-size: 13.5px; }
.cc-btns { display: flex; gap: 6px; flex-wrap: nowrap; }
/* Small habits strip at the bottom of Your day */
.panel.hmini { padding: 10px 12px; }
.panel.hmini h3 { font-size: 14px; margin-bottom: 6px; }
.hmini .hlist { display: flex; flex-wrap: wrap; gap: 6px; }
.hmini .hrow.compact { padding: 3px 3px 3px 10px; border-radius: 999px; gap: 6px; font-size: 13px; flex: 0 1 auto; }
.hmini .hrow.compact .hday { width: auto; min-width: 30px; padding: 2px 8px; border-radius: 999px; }
.hmini .hrow.compact .hday .dl { display: none; }
.fm-next { font-size: 14.5px; color: var(--ink); padding: 6px 10px; border-radius: 10px; background: var(--surface); border-left: 3px solid var(--career); }
.fm-next .fm-when { color: var(--career); }
.notebox .actions { flex-wrap: wrap; gap: 8px; }
.fitmini .fm-head { flex-wrap: wrap; row-gap: 2px; }
.fitmini .fm-head .fm-t { flex: 1; font-size: 15.5px; }
.fitmini .fm-head .fm-s { order: 3; flex: 1 1 100%; font-size: 14px; }
/* Summary and advice under an entry */
.insight { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); display: flex; flex-direction: column; gap: 6px; }
.insight .ins-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.insight .ins-head strong { font-size: 15px; }
.insight .rh { font-weight: 700; font-size: 13.5px; margin-top: 4px; }
.insight .ins-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.insight .ins-list.acts li { display: list-item; }
.insight .ins-list.acts li .linkish { margin-left: 6px; font-size: 12.5px; }
.upl { gap: 10px; }
.subh { font-weight: 700; font-size: 13.5px; margin: 8px 0 2px; color: var(--ink); }
details.radvice > summary { cursor: pointer; list-style: revert; }
.donut { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 6px 0 10px; }
.dlegend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; flex: 1 1 180px; }
.dlegend li { display: flex; gap: 6px; align-items: center; } .dlegend li b { margin-left: auto; font-weight: 600; }
.dlegend .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
details.upd > summary { cursor: pointer; list-style: none; }
details.upd > summary::-webkit-details-marker { display: none; }
details.upd > summary::before { content: "▸ "; color: var(--muted); }
details.upd[open] > summary::before { content: "▾ "; }
.shots { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.shots img { width: 72px; height: 128px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #ddd); }
.bal-hero { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: flex-end; padding: .75rem 1rem; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, transparent); margin: .5rem 0; }
.bal-big { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.bal-mid { font-size: 1.25rem; font-weight: 700; }
.bal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin: .5rem 0 .75rem; }
.bal-card { padding: .6rem .75rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); display: flex; flex-direction: column; gap: .15rem; }
.bal-card b { font-size: 1.1rem; }
.bal-card.cash { border-style: dashed; }
.bal-panel { padding-top: .6rem; padding-bottom: .6rem; }
.bal-panel .bal-hero { padding: .5rem .75rem; margin: .35rem 0; gap: .25rem 1rem; }
.bal-panel .bal-big { font-size: 1.6rem; }
.bal-panel .bal-mid { font-size: 1.1rem; }
.bal-panel .bal-grid { gap: .35rem; margin: .35rem 0 .5rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.bal-panel .bal-card { padding: .4rem .6rem; }
.bal-panel .subh { margin-top: .35rem; }
.bal-panel .yhl { margin: .2rem 0; }
.bal-panel .yhl li { margin: .1rem 0; }
details.fsec { border-top: 1px solid color-mix(in srgb, var(--c, #888) 20%, transparent); padding: .35rem 0; }
details.fsec > summary { cursor: pointer; font-weight: 700; list-style: none; padding: .15rem 0; }
details.fsec > summary::-webkit-details-marker { display: none; }
details.fsec > summary::before { content: "▸ "; color: var(--muted); }
details.fsec[open] > summary::before { content: "▾ "; }
details.fsec > .rcat, details.fsec > .radvice { margin-top: .35rem; }
.catchips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 .6rem; }
.catchip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 999px; font-size: .85rem; background: color-mix(in srgb, var(--c) 16%, transparent); }
.catchip .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--c); display: inline-block; }
.fin-year details.fsec { border-top: 0; padding: 0; }

/* Customise: looks and theme panel */
:root[data-look="pastel"] .tile { background: color-mix(in srgb, var(--c) 32%, var(--surface)); border-color: transparent; border-radius: 22px; }
:root[data-look="pastel"] .tile .tc { background: var(--surface); color: color-mix(in srgb, var(--c) 45%, var(--ink)); }
:root[data-look="pastel"] .panel, :root[data-look="pastel"] .card { border-radius: 20px; }
:root[data-look="bold"] .tile { background: var(--c); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); color: #fff; }
:root[data-look="bold"] .tile .tc { background: rgba(255,255,255,.92); color: #111; }
:root[data-look="bold"] .tile .ts, :root[data-look="bold"] .tile * { color: inherit; }
.cust { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cust h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.swrow { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.custsec { display: grid; grid-template-columns: minmax(110px, 9rem) 1fr; gap: 6px 12px; align-items: center; }
.custsec .sw { width: 24px; height: 24px; }
@media (max-width: 480px) { .custsec { grid-template-columns: 1fr; } }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 13.5px; text-align: left; }
.preset[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.pdots { display: flex; gap: 4px; } .pdots i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.brand-row .brand-logo { width: 30px; height: 30px; flex: none; display: inline-flex; }
.brand-logo svg, .logo-opt .lg svg { width: 100%; height: 100%; display: block; }
.logos { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; width: 92px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12.5px; }
.logo-opt .lg { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: block; }
.logo-opt[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-row .brand-logo + h1 { flex: 1; }
.gate-email { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; }
.gate-email input { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.gate-or { font-size: 13px; color: var(--muted); text-align: center; }
.cust-top { display: flex; justify-content: space-between; align-items: center; position: sticky; top: env(safe-area-inset-top, 0px); background: var(--surface); padding: 4px 0; z-index: 2; }
.gate-logo { width: 96px; height: 96px; display: block; margin: 0 auto 6px; filter: drop-shadow(0 6px 16px rgba(20,20,50,.25)); }
.water { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wtop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wtot { font-weight: 700; font-variant-numeric: tabular-nums; color: color-mix(in srgb, #3E9BD6 70%, var(--ink)); }
.wbar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .wbar i { display: block; height: 100%; background: linear-gradient(90deg, #8FD3F5, #3E9BD6); border-radius: 99px; transition: width .3s; }
.wbtns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .wbtns .btn { font-size: 13px; padding: 6px 10px; }
.brand-icon { width: 30px; height: 30px; border-radius: 8px; flex: none; } .brand-row .brand-icon + h1 { flex: 1; }
.bugbox { display: flex; flex-direction: column; gap: 10px; } .bugbox textarea { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); } .bugrow { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; } .bugrow.done { opacity: .55; }
.btn-del { color: var(--danger); border: 1.5px solid color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); font-weight: 600; }
.welcome ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; } .welcome p { margin: 0; }
.shoplist { display: flex; flex-direction: column; }
.shoprow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.shoprow .shopname { flex: 1; min-width: 0; } .shoprow.done .shopname { text-decoration: line-through; color: var(--muted); }
.shopchk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--c); background: var(--surface); color: var(--c); font-weight: 700; flex: none; padding: 0; }
.shopchk[aria-pressed="true"] { background: var(--c); color: var(--surface); }
.dishes { display: flex; flex-direction: column; gap: 12px; }
.dish { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: color-mix(in srgb, var(--c) 5%, var(--surface)); }
.dishtop { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ingchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); font-size: 13.5px; }
.ingchip.on { outline: 1.5px solid var(--c); }
.ingchip button { border: 0; background: none; padding: 0 4px; color: var(--muted); font-size: 12px; }
.proj { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c, var(--ideas)) 35%, var(--line)); background: color-mix(in srgb, var(--c, var(--ideas)) 6%, var(--surface)); display: flex; flex-direction: column; gap: 10px; } .projtop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.serves { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .serves .btn { padding: 2px 10px; }
.croom { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; } .croomname { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.crow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); } .ctask { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.cpill.due { background: color-mix(in srgb, #E0A25A 30%, var(--surface)); } .cpill.over { background: color-mix(in srgb, var(--danger) 20%, var(--surface)); color: var(--danger); }
.cadd { flex-wrap: wrap; } .cadd input { min-width: 140px; flex: 1; }
.hhtabs { display: flex; gap: 8px; flex-wrap: wrap; } .hhtabs button { flex: 1; min-width: 150px; padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.hhtabs button[aria-pressed="true"] { background: var(--c); color: #fff; }
.cleanwrap { display: flex; flex-direction: column; gap: 14px; }
.csumrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } @media (max-width: 420px) { .csumrow { grid-template-columns: repeat(2, 1fr); } }
.cstat { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; background: color-mix(in srgb, var(--cleaning) 10%, var(--surface)); }
.cstat strong { font-size: 22px; font-family: var(--font-display); font-variant-numeric: tabular-nums; } .cstat span { font-size: 12px; color: var(--muted); }
.cstat.over strong { color: var(--danger); } .cstat.due strong { color: #C77B1E; } .cstat.ok strong { color: color-mix(in srgb, var(--cleaning) 80%, var(--ink)); }
.crow .cevery { font-size: 12.5px; padding: 3px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.crow.over { background: color-mix(in srgb, var(--danger) 5%, transparent); } .crow .ctname { font-weight: 600; }
.rooms { display: flex; flex-direction: column; gap: 8px; } .rsum { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cpill.ok { background: color-mix(in srgb, var(--cleaning) 14%, var(--surface)); }
.cideas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 8px; } .addchip { border: 1px dashed color-mix(in srgb, var(--c) 60%, var(--line)); background: var(--surface); padding: 4px 10px; cursor: pointer; }
/* compact Home lists */
.cleanwrap .panel { padding: 12px; gap: 8px; }
.crow { padding: 5px 0; gap: 6px; font-size: 14px; } .crow .small { font-size: 12px; } .crow .shopchk { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.crow .cpill { font-size: 11.5px; padding: 1px 8px; } .crow .cevery { font-size: 11.5px; padding: 2px 4px; }
.cstat { padding: 6px 4px; } .cstat strong { font-size: 18px; }
.rooms details.fsec summary { padding: 6px 10px; }
.shoprow { padding: 5px 0; font-size: 14px; } .shoprow .shopchk { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.dish { padding: 10px; gap: 6px; } .ingchip { font-size: 12.5px; padding: 2px 4px 2px 8px; }
.cideas { gap: 4px; padding-top: 6px; } .addchip { padding: 2px 8px; font-size: 12.5px; } .addchip.on { background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-style: solid; }
.small-add input, .small-add select, .small-add .btn { font-size: 13px; padding: 5px 8px; }
.hhtabs button { padding: 8px 10px; font-size: 14px; }
.caddpanel { display: flex; flex-direction: column; gap: 6px; }
.cstep { font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--cleaning) 75%, var(--ink)); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.caddpanel .cadd { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 6px; } @media (max-width: 520px) { .caddpanel .cadd { grid-template-columns: 1fr 1fr; } }
.caddpanel .cadd input, .caddpanel .cadd select { min-width: 0; font-size: 13.5px; padding: 7px 9px; }
.cleanwrap > details.fsec > summary { font-weight: 700; color: color-mix(in srgb, var(--cleaning) 80%, var(--ink)); }
.buyagain { margin: 6px 0; }
.buyagain .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.buyagain .chip { border: 1px solid var(--food); background: transparent; color: inherit; border-radius: 999px; padding: 3px 10px; font-size: .85em; cursor: pointer; }
.aisle { font-size: 12px; font-weight: 700; color: var(--muted); margin: 8px 0 2px; text-transform: none; }
.mealgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-bottom: 8px; }
.mealday { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.mealday select { width: 100%; }
.nudge { background: color-mix(in srgb, var(--food) 18%, transparent); border-radius: 10px; padding: 6px 10px; margin-bottom: 6px; font-weight: 600; }
.mealbds { display: grid; gap: 8px; margin-top: 10px; }
.mealbd { border-left: 4px solid var(--food); padding: 4px 10px; border-radius: 6px; background: color-mix(in srgb, var(--food) 8%, transparent); }
.mealbd.have { border-color: #7EDBA0; } .mealbd.list { border-color: var(--muted); }
.mealbd ul { margin: 4px 0 0; padding-left: 18px; }
.fhow { background: color-mix(in srgb, var(--food) 10%, transparent); border-radius: 10px; padding: 8px 12px; margin: 6px 0 10px; line-height: 1.45; }
.fstep { font-weight: 700; margin: 14px 2px 4px; color: var(--food); }
.inglist { display: grid; gap: 4px; margin: 6px 0; }
.ingrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 8px; border-radius: 8px; background: color-mix(in srgb, var(--food) 7%, transparent); cursor: grab; }
.ingrow .ingname { flex: 1; min-width: 120px; }
.ingrow.have { opacity: .7; } .ingrow.have .ingname { text-decoration: line-through; }
.ingrow.on { border-left: 3px solid var(--food); }
.shopdrop.over { outline: 2px dashed var(--food); outline-offset: 2px; }
/* Home spacing tidy (2026-11-26) */
.section-title.home-h { margin: 10px 0 0; padding-bottom: 4px; }
.task .t { flex: 1 1 calc(100% - 48px); }
.task .x:first-of-type { margin-left: 28px; }
.task .x { padding: 2px 8px 2px 0; }
.tiles { gap: 8px; }
@media (max-width: 600px) {
  .panel { padding: 12px 14px; gap: 10px; }
  .tile { padding: 12px; }
  .hero, .page-head { padding-top: 14px; padding-bottom: 14px; }
}
.mealday select { min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.cadd { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.cfld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cfld > span:first-child { font-weight: 600; }
.cfld input, .cfld select { width: 100%; }
.cfld select + input { margin-top: 4px; }
.cadd > button { grid-column: 1 / -1; }
@media (max-width: 420px) { .cadd { grid-template-columns: 1fr; } }
.cadd { grid-template-columns: 1fr !important; align-items: stretch; }
.cadd .cfld input, .cadd .cfld select { height: auto; min-height: 40px; flex: none; }
.notextras { display: grid; gap: 8px; }
.notextra { display: grid; gap: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.notextras > .btn { justify-self: start; }
.tile-head { display: flex; align-items: center; }
.tile-head .tarr { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13px; }
.tile.arranging { min-height: 0; outline: 2px dashed color-mix(in srgb, var(--c) 50%, transparent); }
.tmove { display: flex; gap: 6px; }
.tmove .btn { padding: 4px 12px; }
.mealweek { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; } .mealweek input { min-height: 36px; }
.tile.arranging { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tile.arranging.dragging { opacity: .85; transform: scale(1.04); box-shadow: 0 8px 20px rgba(0,0,0,.18); cursor: grabbing; z-index: 2; }
.shoprow { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.shopmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shopname { font-weight: 600; font-size: 15px; }
.shopfor { font-size: 12px; color: var(--muted); }
.shopacts { display: flex; gap: 6px; flex: none; }
.sbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.sbtn.have { border-color: var(--food); color: var(--food); font-weight: 600; }
.sbtn.del { padding: 5px 9px; }
.undo-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #2A2F4A; color: #fff; padding: 10px 14px; border-radius: 12px; display: flex; gap: 14px; align-items: center; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; max-width: calc(100vw - 32px); }
.undo-toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-toast button { background: #FFD27A; color: #2A2F4A; border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.homesearch { display: grid; gap: 6px; margin: 4px 0 6px; }
.homesearch input { min-height: 44px; border-radius: 12px; }
.sresults { display: grid; gap: 4px; }
.sres { display: flex; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; color: var(--ink); }
.sres .pill { flex: none; font-size: 11px; }
.msum { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; line-height: 1.6; }
.msumh { display: block; margin-bottom: 6px; }
.msumchips { display: grid; gap: 6px; }
.msumchip { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); background: color-mix(in srgb, var(--c) 12%, var(--surface)); border-radius: 10px; padding: 8px 10px; color: var(--ink); font-size: 14px; }
.msumchip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.msumchip strong { color: var(--c); }
.ingrow { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; }
.ingrow .ingname { font-weight: 600; }
.ingacts { display: flex; flex-wrap: wrap; gap: 6px; }
.sbtn.on { background: color-mix(in srgb, var(--food) 14%, var(--surface)); }
.sbtn:disabled { opacity: .75; cursor: default; }
.ingacts .sbtn { padding: 5px 9px; }
.foodtabs { margin: 4px 0 8px; } .fhint { margin: 0 2px 6px; } .dishes { display: grid; gap: 6px; }
.dishes .dishtop > strong, .dishes .dishtop > .small { display: none; }
.dishes .dishtop { justify-content: flex-end; }
.csum .csumrow { grid-template-columns: repeat(4, 1fr) !important; gap: 6px; }
.csum .cstat { padding: 6px 4px; }
.csum .cstat strong { font-size: 18px; }
.csum .cstat span { font-size: 11px; }
.shopdrop .row .btn { padding: 6px 10px; font-size: 13px; }
.foodtabs { flex-wrap: wrap; }
.fsum3 .csumrow { grid-template-columns: repeat(3, 1fr) !important; }
.fline { padding: 4px 4px 8px; font-size: 15px; color: var(--muted); } .fline strong { color: var(--food); font-size: 17px; }
.cline strong { color: var(--danger, #C0392B); } .cline.ok strong { color: var(--cleaning); }
.hday.locked { opacity: .55; cursor: not-allowed; }
.hday.locked[aria-pressed="true"] { opacity: .8; }
.hmini .hlist { display: grid; gap: 8px; }
.hcheck { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid color-mix(in srgb, var(--goals) 25%, var(--line)); border-radius: 12px; padding: 10px 12px; color: var(--ink); cursor: pointer; }
.hcheck .hname { font-weight: 600; flex: 1; }
.hcheck .hbox { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--goals); display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.hcheck.on .hbox { background: var(--goals); }
.hcheck.on .hname { color: var(--muted); }
.water.compact { display: grid; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.water.compact .wbar { height: 8px; }
.water.compact .wbtns .btn { padding: 6px 10px; font-size: 13px; }
.goal { display: grid; gap: 8px; }
.goal .top .name { font-weight: 700; font-size: 15px; }
.gtools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gtools input[type=range] { flex: 1 1 140px; accent-color: var(--c, var(--goals)); }
.goalform { display: grid; gap: 8px; padding-top: 6px; }
.goalform .cfld input, .goalform .cfld select { width: 100%; min-height: 40px; }
.goalform .cfld input, .goalform .cfld select { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, var(--surface)); padding: 8px 10px; }
.letterbanner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 14px; padding: 14px 16px; background: linear-gradient(135deg, #FFE3A3, #FFC2D4); color: #2A2F4A; box-shadow: 0 6px 18px rgba(0,0,0,.12); cursor: pointer; margin: 6px 0; }
.letterbanner .lbicon { font-size: 28px; }
.letteropen .letterbody { white-space: pre-wrap; font-size: 16px; line-height: 1.6; background: var(--surface); border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.letters textarea { width: 100%; }
.waterpanel { --c: #2E9BD6; background: linear-gradient(160deg, #E6F6FF, #D3EEFF) !important; border-color: #A9DBF7 !important; }
.waterpanel h3 { color: #1E7DB8; }
.waterpanel .water .hname { display: none; }
.waterpanel .water.compact { border-bottom: 0; padding-bottom: 0; }
.waterpanel .wtot { color: #1E7DB8; font-weight: 700; }
.waterpanel .wbar { background: #fff; height: 10px; border-radius: 999px; }
.waterpanel .wbar i { background: linear-gradient(90deg, #6CC9F5, #2E9BD6); border-radius: 999px; }
.waterpanel .wbtns .btn { background: #fff; border-color: #A9DBF7; color: #1E6E9F; }
.drops { display: flex; gap: 6px; flex-wrap: wrap; }
.drops .drop { width: 16px; height: 20px; background: #fff; border: 2px solid #8FD0F2; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform: rotate(180deg); }
.drops .drop.on { background: #2E9BD6; border-color: #2E9BD6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .waterpanel { background: linear-gradient(160deg, #0F2A3A, #123447) !important; border-color: #1E5A7A !important; } }
.drops .drop { width: 16px; height: 16px; border-radius: 0 50% 50% 50%; transform: rotate(45deg); margin: 4px 3px; }
.waterpanel.wsmall { padding: 10px 12px; gap: 6px; }
.waterpanel.wsmall h3 { font-size: 15px; }
.waterpanel.wsmall .drop { width: 11px; height: 11px; margin: 2px; border-width: 1.5px; }
.waterpanel.wsmall .wtop { display: none; }
.waterpanel.wsmall .wbtns .btn { padding: 4px 9px; font-size: 12.5px; }
.waterpanel.wsmall .water > .small { display: none; }
.wreset { font-size: 11.5px; opacity: .8; }
.wweek { display: grid; gap: 8px; margin-top: 4px; }
.wweek strong { color: #1E7DB8; }
.wbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; }
.wbarcol { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; }
.wcol { width: 100%; height: 70px; background: #fff; border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; border: 1px solid #A9DBF7; }
.wcol i { display: block; width: 100%; background: #9AD7F5; }
.wbarcol.hit .wcol i { background: #2E9BD6; }
.wbarcol.today .wd { font-weight: 700; color: #1E7DB8; }
.wv { color: var(--muted); }
.hmini h3 { align-items: baseline; }
.hprog { height: 6px; background: color-mix(in srgb, var(--goals) 15%, var(--surface)); border-radius: 999px; overflow: hidden; }
.hprog i { display: block; height: 100%; background: var(--goals); border-radius: 999px; transition: width .3s; }
.hcheck { justify-content: space-between; padding: 12px 14px; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.hcheck .hinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hcheck .hname { font-size: 15.5px; }
.hcheck .hsub { font-size: 12px; color: var(--muted); }
.hcheck .hbox { width: 30px; height: 30px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--goals) 60%, var(--line)); font-size: 16px; }
.hcheck.on { background: color-mix(in srgb, var(--goals) 10%, var(--surface)); border-color: color-mix(in srgb, var(--goals) 45%, var(--line)); }
.hcheck.on .hname { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--goals) 60%, transparent); }
.tile.arranging { animation: wiggle .35s ease-in-out infinite alternate; }
.tile.arranging:nth-child(2n) { animation-delay: .17s; }
@keyframes wiggle { from { transform: rotate(-0.8deg); } to { transform: rotate(0.8deg); } }
.tile.tplace { animation: none; opacity: 1; background: transparent !important; border: 2px dashed color-mix(in srgb, var(--c) 60%, var(--line)) !important; }
.tile.tplace > * { visibility: hidden; }
.tghost { animation: none !important; transform: scale(1.06) rotate(2deg); box-shadow: 0 14px 30px rgba(0,0,0,.25); opacity: .97; }
@media (prefers-reduced-motion: reduce) { .tile.arranging { animation: none; } }
.yday-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.yday-h .tarr { font-size: 14px; font-weight: 600; }
.pillrows { display: flex; flex-direction: column; gap: 6px; }
.pillrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: color-mix(in srgb, var(--health) 10%, transparent); }
.pillrow.taken { opacity: .7; }
.pillmain { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.pillmain strong { font-size: 15px; }
.pillchips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pillchip { border: 1.5px solid var(--health); background: var(--surface, #fff); color: inherit; border-radius: 99px; padding: 5px 11px; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 32px; }
.pillchip.on { background: var(--health); border-color: var(--health); color: #fff; }
.pillchip.late { border-color: #F0A257; background: color-mix(in srgb, #F0A257 18%, transparent); }
.pillhint { margin-top: 6px; }
.pillpanel h3 { margin-bottom: 4px; }
.pillweek { margin-top: 12px; }
.pilldots { display: flex; justify-content: space-between; margin-top: 8px; }
.pilldot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.pilldot i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--health); }
.pilldot.some i { background: color-mix(in srgb, var(--health) 45%, transparent); }
.pilldot.all i { background: var(--health); }
.pilldot.today span { font-weight: 700; }
.pushrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pilltimes { display: flex; flex-direction: column; gap: 6px; }
.pilltime { display: flex; align-items: center; gap: 8px; }
.pilltime input { flex: 1; min-height: 40px; }
.pillall { margin-top: 8px; width: 100%; }
.waterpanel.wsmall .water > .small { display: none; }
.waterpanel .fold { margin-top: 2px; }
/* Layout pass 26 Nov */
.foodtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.foodtabs button { white-space: normal; text-align: center; line-height: 1.2; padding: 8px 10px; font-size: 13px; }
.waterpanel.wsmall .water.compact { margin-top: -6px; gap: 8px; }
.lseal { font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--thoughts) 10%, transparent); }
.tmrw { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); } .tmrw .rh { margin: 0 0 4px; }
.dishall { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); } .dishall .btn { width: 100%; }
.evgone { display:flex; flex-wrap:wrap; gap:4px 10px; margin-bottom:6px; }
.bugfoot { text-align:center; margin: 24px 0 8px; }
.pillsmall { padding: 10px 12px; } .pillsmall h3 { font-size: 15px; } .pillsmall .pillrow { padding: 5px 8px; }
.pilltimes { display:flex; flex-wrap:wrap; gap:6px; }
.nextf { flex-basis: 100%; }
.composer .seg + .row, .composer .row { gap: 10px; }
.ev.done .what { text-decoration: line-through; opacity: .6; }
.evtick { width: 20px; height: 20px; flex: 0 0 auto; margin: 2px 8px 0 0; accent-color: var(--health); }
.ev.tk { grid-template-columns: 22px 46px minmax(0, 1fr); gap: 6px; align-items: start; padding: 7px 0; }
.ev.tk .evtick { margin: 0; width: 18px; height: 18px; }
.ev.tk .evbtns { grid-column: 3 / -1; margin-top: -4px; gap: 12px; }
.ev.tk .time { font-size: 12.5px; padding-top: 2px; }
.evdrag .time { cursor: grab; }
.evdrag .time::before { content: "⠿ "; color: var(--muted); opacity: .6; }
.evghost { position: fixed; z-index: 999; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.18); opacity: .95; }
.dropover { outline: 2px dashed var(--health); outline-offset: 2px; border-radius: 10px; }
.evdate { display: inline-flex; gap: 6px; align-items: center; } .evdate input { font-size: 13px; padding: 2px 4px; }
.yday-arr { grid-template-columns: 1fr 1fr !important; }
.ydgrid { columns: 2; column-gap: 16px; }
.ydw { break-inside: avoid; margin-bottom: 16px; display: block; }
.ydw { min-width: 0; }
.ydw.full { column-span: all; }
@media (max-width: 700px) { .ydgrid { columns: 1; } }
.ydgrid .ydw.tile.arranging { padding: 4px; background: color-mix(in srgb, var(--accent) 7%, transparent); border: 0; border-radius: calc(var(--radius) + 4px); min-height: 0; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent), 0 4px 14px rgba(0,0,0,.06); }
.ydgrid.editing .ydw > :not(.ydbar) { pointer-events: none; opacity: .85; }
.ydbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; }
.ydh { cursor: grab; touch-action: none; font-weight: 600; flex: 1; user-select: none; }
@keyframes ydwig { from { transform: rotate(-.3deg); } to { transform: rotate(.3deg); } }
.tile.arranging:not(.ydw) { border-style: solid; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent); }
.ydue { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ydue.due { color: var(--year); font-weight: 600; }
.ysched { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.ysched select { font-size: 12.5px; padding: 2px 6px; width: auto; }
.panel .tmrw > .rh:first-child { display: none; }
.calnav { align-items: center; }
.calday { padding: 12px 14px; }
.calday h3 { margin: 0 0 6px; font-size: 15px; }
.calday.now { border-left: 3px solid var(--accent); }
.calev { display: block; padding: 6px 0; }
.calev summary { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 8px; cursor: pointer; list-style: none; }
.calev summary::-webkit-details-marker { display: none; }
.calev .where, .calev .caldesc, .calev a { margin: 4px 0 0 104px; display: block; }
@media (max-width: 520px) { .calev summary { grid-template-columns: 78px minmax(0,1fr); } .calev .where, .calev .caldesc, .calev a { margin-left: 86px; } }
.goalform .cfld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.goalform .cfld > span:first-child { font-weight: 600; font-size: 14px; }
.pilltime { display: flex; }
.pilltimein { width: 100%; max-width: 220px; font-size: 16px; padding: 10px 12px; }
.pilltimes { flex-direction: row !important; flex-wrap: wrap; gap: 8px; }
.pilltimes:empty { display: none; }
.pillchip.on { background: color-mix(in srgb, var(--health) 18%, var(--surface)); border-color: var(--health); font-weight: 600; font-variant-numeric: tabular-nums; }
.pilltlist { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.pilltrow { display: grid; grid-template-columns: 64px minmax(0, 200px); align-items: center; gap: 10px; }
.timepick { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--health) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--health) 35%, var(--line)); border-radius: 999px; padding: 4px 12px; width: fit-content; }
.timepick select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 4px 2px; width: auto; color: var(--ink); text-align: center; cursor: pointer; }
.timepick b { font-size: 18px; }
.tp-ico { margin-right: 4px; }
.pilltrow { grid-template-columns: 64px auto; }
.lowrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.lowrow input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
.lowrow input[type=number] { width: 56px !important; flex: 0 0 auto; padding: 4px 6px; text-align: center; }
.pilllow { background: color-mix(in srgb, #E5484D 12%, var(--surface)); border: 1px solid color-mix(in srgb, #E5484D 40%, var(--line)); color: var(--ink); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; font-weight: 600; margin: 4px 0 8px; }
/* tidy pass 27 Nov */
.ev .evbtns { flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 2px; }
.ev .evbtns > * { flex: 0 0 auto; }
.evdate input { font-size: 12.5px !important; padding: 1px 4px !important; min-height: 0 !important; height: 24px; width: auto !important; border-radius: 6px; }
.evdate .small { font-size: 12.5px; }
.homesearch input { border: 1px solid var(--line) !important; box-shadow: none; }
.homesearch input:focus { border-color: var(--accent) !important; outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.ydw .panel .linkish { align-self: flex-start; }
.ev .evbtns .evdate { order: 3; flex-basis: 100%; }
