/* Liz — soft and clean. Every group is a box: a filled cap joined to its body.
   v0.2 (2026-09-28): no brown, tighter corners, rose accent. */

:root {
  --bg: #f6f7f9; --surface: #ffffff; --sunk: #f0f1f4; --ink: #111318; --muted: #626773;
  --line: #e3e5ea; --ok: #2f9a5f; --err: #d23a4a; --warn: #c7862a;
  --shadow: 0 1px 2px rgba(10, 12, 18, .05), 0 4px 14px rgba(10, 12, 18, .06);
  --r: 4px; --r-sm: 3px;
  --head: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--head);
  color-scheme: light;
}
/* Near-black like tbn, Explore and C³ (Leo, 2026-09-28: "still dont like colors"). */
html[data-theme="dark"] {
  --bg: #08090b; --surface: #121318; --sunk: #0d0e12; --ink: #e9eaee; --muted: #8b8f98;
  --line: #24262e; --ok: #47ce90; --err: #ff6b5a; --warn: #e4b862;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #08090b; --surface: #121318; --sunk: #0d0e12; --ink: #e9eaee; --muted: #8b8f98;
    --line: #24262e; --ok: #47ce90; --err: #ff6b5a; --warn: #e4b862;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

/* The accent pairs, one per person (Settings): the main colour, the second
   one, and the ink that sits on the main colour. Taken from his projects. */
html[data-accent="tbn"]  { --accent: #f53560; --accent2: #3493f2; --accent-ink: #fff; }
html[data-accent="lime"] { --accent: #6f8a00; --accent2: #d8496a; --accent-ink: #fff; }
html[data-accent="gold"] { --accent: #c7801a; --accent2: #f53560; --accent-ink: #fff; }
html[data-accent="rose"] { --accent: #d24f76; --accent2: #f0a2b8; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="lime"] { --accent: #c6e738; --accent-ink: #0a0a0a; }
html[data-theme="dark"][data-accent="gold"] { --accent: #f1b142; --accent-ink: #2a0510; }
html[data-theme="dark"][data-accent="rose"] { --accent: #ef7c9c; --accent2: #8e4760; --accent-ink: #1a0d12; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"][data-accent="lime"] { --accent: #c6e738; --accent-ink: #0a0a0a; }
  html[data-theme="auto"][data-accent="gold"] { --accent: #f1b142; --accent-ink: #2a0510; }
  html[data-theme="auto"][data-accent="rose"] { --accent: #ef7c9c; --accent2: #8e4760; --accent-ink: #1a0d12; }
}

.c-rose { --tone: #e0457a } .c-coral { --tone: #ec6a3f } .c-amber { --tone: #e39b1d } .c-olive { --tone: #86a51f }
.c-sage { --tone: #2fae6e } .c-teal { --tone: #14a3a0 } .c-sky { --tone: #3493f2 } .c-lavender { --tone: #8a6cf0 }
.c-plum { --tone: #b547a3 } .c-sand { --tone: #b0936a }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
a { color: inherit; }
h1, h2 { font-family: var(--head); font-weight: 700; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.1rem; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.i.sm { width: 15px; height: 15px; }
.inline { display: inline; margin: 0; }
.muted { color: var(--muted); }

/* ---------- the mark: two L's make a rectangle ---------- */
.logo { width: 21px; height: 35px; flex: none; }
.logo .l1 { fill: var(--accent); }
.logo .l2 { fill: var(--accent2); }

/* ---------- boxes: cap and body ---------- */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin: 0 0 16px; }
.box > .cap, .sheet .cap {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; min-height: 50px;
  background: color-mix(in oklab, var(--accent) 9%, var(--surface)); border-bottom: 1px solid var(--line);
}
.box > .cap > .i, .sheet .cap > .i { color: var(--accent); }
.box > .cap h1, .box > .cap h2, .sheet .cap h2 { flex: 1; min-width: 0; }
.capnote { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap.warn { background: color-mix(in oklab, var(--err) 12%, var(--surface)); }
.cap.warn > .i { color: var(--err); }
.box > .body, .sheet .body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.box.sub { box-shadow: none; margin: 0; }
.box.sub > .cap { min-height: 42px; background: var(--sunk); }
.box.sub > .cap h2 { font-size: 1rem; }
.cap-act { margin-left: auto; }
.cap-act + .cap-act { margin-left: 0; }
.tag { font-style: normal; font-size: .72rem; padding: 1px 8px; border-radius: 3px; background: var(--sunk); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; font-weight: 600; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(14px, 4vw, 32px); max-width: 1100px; width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font: 800 1.35rem var(--head); letter-spacing: -.02em; }
.acts { display: flex; gap: 4px; align-items: center; }

/* icon buttons, with tooltips */
.ib {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; position: relative; flex: none; padding: 0;
}
.ib:hover, .ib:focus-visible { background: var(--sunk); border-color: var(--line); outline: none; }
.ib.on { background: color-mix(in oklab, var(--accent) 14%, var(--surface)); color: var(--accent); }
.ib:disabled { opacity: .35; cursor: default; background: transparent; border-color: transparent; }
[data-tip] { position: relative; }

/* ---------- page ---------- */
.page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 4px clamp(14px, 4vw, 32px) 20px; flex: 1; }
.page.narrow { max-width: 760px; }
.hello { font-size: clamp(1.5rem, 5vw, 2rem); margin: 4px 2px 16px; }
.empty { color: var(--muted); margin: 0; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); }

.flash, .msg { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-sm); padding: 10px 14px; border: 1px solid; }
.flash { max-width: 1036px; width: calc(100% - 2 * clamp(14px, 4vw, 32px)); margin: 0 auto 14px; }
.flash.ok, .msg.ok { background: color-mix(in oklab, var(--ok) 11%, var(--surface)); border-color: color-mix(in oklab, var(--ok) 40%, var(--surface)); }
.flash.warn, .msg.err { background: color-mix(in oklab, var(--err) 10%, var(--surface)); border-color: color-mix(in oklab, var(--err) 40%, var(--surface)); }
.flash.ok .i, .msg.ok .i { color: var(--ok); } .flash.warn .i, .msg.err .i { color: var(--err); }
.msg code { font-size: .82rem; word-break: break-word; display: block; margin-top: 4px; }

/* ---------- forms ---------- */
.fl { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.fl > span:first-child { font-size: .84rem; font-weight: 600; color: var(--muted); }
.fl em { font-weight: 400; font-style: normal; }
.fl.end { justify-content: flex-end; }
.in {
  width: 100%; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg);
  min-height: 44px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent); }
textarea.in { resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.grid2.tight { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.lead { margin: 0; } .fine { margin: 0; color: var(--muted); font-size: .88rem; }
.fine .i { width: 16px; height: 16px; }
.plain { margin: 0; padding: 10px 0; }
.row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.row .left { margin-right: auto; }
.split { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.passset { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.passset .in { flex: 1; }
code.url { display: block; padding: 10px 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); word-break: break-all; font-size: .85rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; min-height: 44px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--sunk); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.slim { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.btn.slim .i { width: 17px; height: 17px; }
.quiet { color: var(--muted); font-size: .9rem; text-align: center; }

/* segmented radios */
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--sunk); padding: 4px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.seg label { flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border-radius: 3px; cursor: pointer; white-space: nowrap; font-size: .92rem; }
.seg span .i { width: 18px; height: 18px; }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

/* on/off toggles that look like chips */
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; font-size: .92rem; background: var(--bg); }
.tog span .i { width: 18px; height: 18px; color: var(--muted); }
.tog input:checked + span { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, var(--surface)); color: var(--accent); font-weight: 600; }
.tog input:checked + span .i { color: var(--accent); }
.tog input:focus-visible + span { outline: 2px solid var(--accent); }

/* colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw span { display: block; width: 32px; height: 32px; border-radius: 3px; background: var(--tone); cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.sw input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.sw input:focus-visible + span { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* icon picker */
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.icons input { position: absolute; opacity: 0; pointer-events: none; }
.icons span { display: grid; place-items: center; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.icons input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.icons input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- gate pages ---------- */
body.gate { justify-content: center; }
.gatewrap { width: 100%; max-width: 420px; margin: 0 auto; padding: 30px 16px 10px; }
.gatewrap.wide { max-width: 760px; }
.gatebox > .cap { padding: 14px 16px; }
.gatebox > .cap h1 { font-size: 1.45rem; }
.langs { display: flex; justify-content: center; gap: 16px; padding: 14px 0 calc(24px + env(safe-area-inset-bottom)); font-size: .88rem; }
.langs a { color: var(--muted); text-decoration: none; }
.langs a.on { color: var(--accent); font-weight: 600; }

/* ---------- welcome ---------- */
.welcome > .cap h1 { flex: 0 1 auto; }
.welcome > .cap .capnote { margin-left: auto; }
.wgrid { display: grid !important; grid-template-columns: 1fr minmax(260px, 330px); gap: 18px; align-items: start; }
@media (max-width: 760px) { .wgrid { grid-template-columns: 1fr; } }
.wleft { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.message {
  position: relative; padding: 16px 48px 14px 18px; border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--accent) 7%, var(--surface)); border-left: 3px solid var(--accent);
}
.mtext { font: 1.12rem/1.55 var(--serif); }
.message.empty .mtext { font: .95rem var(--sans); color: var(--muted); }
.mby { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.mby:empty { display: none; }
.medit { position: absolute; top: 6px; right: 6px; }
.minihead { display: flex; align-items: center; gap: 8px; font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.minihead .i { width: 16px; height: 16px; }

/* a list of dated things */
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.agenda li > a, .agenda li > button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; text-decoration: none; cursor: pointer;
  padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
}
.agenda li > a:hover, .agenda li > button:hover { background: var(--sunk); }
.agenda .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda small { color: var(--muted); font-size: .8rem; }
.agenda .enotes { color: var(--muted); font-size: .85rem; white-space: pre-line; margin-top: 2px; }
.agenda li.empty { color: var(--muted); padding: 4px 2px; }
.agenda .i { color: var(--tone); }
.agenda .bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--tone); flex: none; }
.dbadge { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-sm); flex: none;
  background: color-mix(in oklab, var(--tone) 16%, var(--surface)); color: var(--ink); line-height: 1; }
.dbadge b { font-size: 1.15rem; }
.dbadge small { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; color: var(--muted); }
.agenda li.imp .dbadge { background: var(--tone); color: #fff; }
.agenda li.imp .dbadge small { color: rgba(255, 255, 255, .85); }

/* ---------- apps ---------- */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.app {
  display: flex; flex-direction: column; min-width: 0; text-decoration: none; border-radius: var(--r); overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--tone) 30%, var(--line)); background: var(--surface); transition: transform .15s, box-shadow .15s;
}
a.app:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.acap { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in oklab, var(--tone) 15%, var(--surface)); }
.acap > .i { width: 34px; height: 34px; padding: 7px; border-radius: var(--r-sm); background: var(--tone); color: #fff; box-sizing: border-box; }
.acap strong { font: 600 1.05rem/1.2 var(--serif); flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acount { font-weight: 700; color: var(--tone); font-size: .95rem; }
.abody { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 12px; font-size: .9rem; min-height: 54px; }
.aline { display: flex; gap: 7px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aline .i { color: var(--tone); }
.soon-app { opacity: .75; }

/* ---------- link cards: icon and title on one row ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.tile, .card { min-width: 0; }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 10px 12px 11px;
  border-radius: var(--r); border: 1px solid color-mix(in oklab, var(--tone) 28%, var(--line));
  background: linear-gradient(180deg, color-mix(in oklab, var(--tone) 11%, var(--surface)), var(--surface) 75%);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--tone); }
a.tile:active { transform: scale(.98); }
.tcap { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--tone); color: #fff; flex: none; }
.ticon { width: 19px; height: 19px; }
.ttitle { font: 600 1rem/1.2 var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsub { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 41px; }
.tcap .i.text { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 520px) { .tsub { padding-left: 0; } }

/* ---------- list cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; align-items: start; }
.card {
  display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r); overflow: hidden;
  background: var(--surface); border: 1px solid color-mix(in oklab, var(--tone) 30%, var(--line));
  transition: transform .15s, box-shadow .15s;
}
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ccap { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: color-mix(in oklab, var(--tone) 16%, var(--surface)); }
.ccap .i { color: var(--tone); }
.ccap strong { font: 600 1.03rem var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccap .pinned { width: 16px; height: 16px; }
.cbody { display: flex; flex-direction: column; gap: 8px; padding: 11px 13px; font-size: .92rem; }
.peek { display: flex; flex-direction: column; gap: 3px; }
.pk { display: flex; gap: 8px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pk i { width: 13px; height: 13px; border: 1.6px solid var(--muted); border-radius: 3px; flex: none; }
.pk.more { color: var(--muted); padding-left: 21px; }
.notepeek { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.count { font-size: .8rem; color: var(--muted); }
.by { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.by .i { width: 14px; height: 14px; }
.addcard {
  align-items: center; justify-content: center; gap: 8px; min-height: 100px; cursor: pointer; flex-direction: row;
  background: transparent; border: 2px dashed var(--line); color: var(--muted); font-weight: 600;
}
.addcard:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- a list ---------- */
.listbox > .cap.tone { background: color-mix(in oklab, var(--tone) 18%, var(--surface)); padding-left: 14px; }
.listbox > .cap.tone > .i { color: var(--tone); }
.title-in { flex: 1; min-width: 0; border: 0; background: transparent; font: 600 1.2rem var(--serif); padding: 6px 4px; border-radius: 3px; outline: none; }
.title-in:focus { background: var(--surface); }
.listbox > .body { gap: 10px; }
.addrow { display: flex; gap: 8px; }
.addrow textarea { flex: 1; min-height: 44px; height: 44px; resize: none; overflow: hidden; }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 4px; padding: 1px 0; border-radius: 3px; background: var(--surface); }
.item.dragging { box-shadow: var(--shadow); opacity: .95; position: relative; z-index: 5; }
.item .grip { cursor: grab; color: var(--muted); touch-action: none; width: 34px; }
.item .tx { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 6px; border-radius: 3px; outline: none; font-size: 1rem; }
.item .tx:focus { background: var(--sunk); }
.item.done .tx { text-decoration: line-through; color: var(--muted); }
.item .ind { width: 30px; height: 30px; color: var(--muted); opacity: .55; }
.item .ind .i { width: 16px; height: 16px; }
.item:hover .ind, .item .ind:focus-visible, .item.lvl1 .ind { opacity: 1; }
.item.lvl1 { margin-left: 30px; }
.item .rm { opacity: .5; } .item:hover .rm, .item .rm:focus-visible { opacity: 1; }
.tick { display: inline-grid; place-items: center; width: 40px; height: 40px; cursor: pointer; flex: none; border: 0; background: transparent; padding: 0; }
.tick span { width: 22px; height: 22px; border-radius: 3px; border: 2px solid color-mix(in oklab, var(--tone) 70%, var(--muted)); display: grid; place-items: center; }
.tick .i { width: 16px; height: 16px; stroke-width: 3; opacity: 0; color: #fff; }
.item.done .tick span { background: var(--tone); border-color: var(--tone); }
.item.done .tick .i { opacity: 1; }
.donehead { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.donehead .grow { flex: 1; }
.donehead .btn { min-height: 34px; padding: 5px 11px; font-size: .85rem; }
.note-in { min-height: 50vh; line-height: 1.6; font-size: 1.02rem; background: var(--surface); border-color: transparent; padding: 4px 2px; }
.note-in:focus { box-shadow: none; border-color: transparent; }
.lfoot { display: flex; justify-content: space-between; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--sunk); font-size: .8rem; color: var(--muted); }
.lfoot > span { display: flex; align-items: center; gap: 6px; }
.lfoot .i { width: 14px; height: 14px; }
#state.bad { color: var(--err); }

/* ---------- the calendar ---------- */
.calcap .caltitle { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.yearbtn { border: 1px solid transparent; background: transparent; font: inherit; color: var(--accent); cursor: pointer; padding: 0 6px; border-radius: 3px; }
.yearbtn:hover { border-color: var(--line); background: var(--surface); }
.caltools { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 0; }
.caltools .primary { margin-left: auto; }
.cal .wk, .cal .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal .wk span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 0 8px; }
.cal .d {
  position: relative; border: 0; background: transparent; cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center;
  border-radius: var(--r-sm); min-width: 0;
}
.cal .d .n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; font-size: .92rem; font-variant-numeric: tabular-nums; }
.cal .d:hover .n { background: var(--sunk); }
.cal .d.out .n { color: color-mix(in oklab, var(--muted) 60%, transparent); }
/* The four things a day can say, and nothing else (Leo, 2026-09-28). */
.cal .d.has .n { background: color-mix(in oklab, var(--accent2) 22%, var(--surface)); box-shadow: inset 0 -3px 0 var(--accent2); font-weight: 600; }
.cal .d.off .n { box-shadow: inset 0 0 0 1.5px var(--ok); color: var(--ok); font-weight: 700; }
.cal .d.off.has .n { box-shadow: inset 0 0 0 1.5px var(--ok), inset 0 -3px 0 var(--accent2); }
.cal .d.today .n { background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); }
.cal .d.sel { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal .d.blank { visibility: hidden; }
/* "+" to add to that day: shown on hover (and on keyboard focus). */
.cal .addday {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); cursor: pointer;
  opacity: 0; transform: scale(.8); transition: opacity .12s, transform .12s;
}
.cal .addday .i { width: 14px; height: 14px; stroke-width: 2.6; }
@media (hover: hover) { .cal .d:hover .addday, .cal .d:focus-within .addday { opacity: 1; transform: none; } }
.cal .d:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the full month: tall cells with the first titles in them */
.cal.full .days { gap: 2px; }
.cal.full .d { min-height: 62px; align-items: center; justify-content: center; padding: 4px; border-radius: 4px; }
.cal.full .d .n { width: 40px; height: 40px; font-size: 1rem; }
@media (max-width: 600px) { .cal.full .d .n { width: 34px; height: 34px; } }
.cal.full .d .n { align-self: center; }
@media (max-width: 600px) { .cal.full .d { min-height: 50px; padding: 2px; } }

/* the year: three months across, the neighbouring years' quarters dimmed */
.cal .ygrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
.cal .ym { min-width: 0; }
.cal .ym.other { opacity: .5; }
.cal .ymt { display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; font: 600 .95rem var(--serif); padding: 2px 4px 4px; border-radius: 3px; color: var(--ink); }
.cal .ymt small { font: 500 .72rem var(--sans); color: var(--muted); }
.cal .ymt:hover { background: var(--sunk); }
.cal .ym .wk span { font-size: .6rem; padding: 0 0 2px; }
.cal .ym .d .n { width: 100%; height: auto; aspect-ratio: 1; max-width: 28px; font-size: .7rem; border-radius: 3px; }
.cal .ym .d.has .n { box-shadow: inset 0 -2px 0 var(--accent2); }
.cal.full .ym .days { gap: 0; }
.cal.full .ym .d { min-height: 0; padding: 1px 0; border: 0; align-items: center; }
@media (max-width: 520px) { .cal .ygrid { gap: 12px 6px; } .cal .ym .d .n { font-size: .62rem; } }

/* the home's small month */
.cal.mini { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 8px 10px; background: var(--surface); }
.cal.mini .mhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal.mini .mhead a { font: 600 1rem var(--serif); text-decoration: none; }
.cal.mini .mhead .ib { width: 34px; height: 34px; }
.cal.mini .d { padding: 1px 0; position: relative; }
.cal.mini .d .n { width: 100%; max-width: 34px; }

.dayagenda .agenda li > button { align-items: stretch; }
.yearnav { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ---------- install card ---------- */
.install .ios-steps { display: flex; flex-direction: column; gap: 8px; }
.install .ios-steps p { margin: 0; display: flex; gap: 10px; align-items: center; }
.install .ios-steps .i { color: var(--accent); }
.install .btn { align-self: flex-start; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 6px; margin: 4px 0 16px; overflow-x: auto; padding-bottom: 2px; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-sm); text-decoration: none; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; font-weight: 600; font-size: .92rem; }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.rows .grow small { flex-basis: 100%; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows > li > .i { color: var(--muted); }
.rows li > small { color: var(--muted); white-space: nowrap; font-size: .8rem; }
.rows li.dim { opacity: .55; }
.rows li.bad > .i { color: var(--err); }
.dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--tone); color: #fff; flex: none; }
.rowacts { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) {
  .linkrows li { flex-wrap: wrap; }
  .linkrows .rowacts { flex-basis: 100%; justify-content: flex-start; padding-left: 50px; }
}
.linkedit { display: grid !important; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
.linkedit .fields { display: flex; flex-direction: column; gap: 14px; }
.linkedit .preview { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 6px; }
.linkedit .msg, .linkedit .row { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .linkedit { grid-template-columns: 1fr; }
  .linkedit .preview { position: static; order: -1; max-width: 260px; }
}
.log li { font-size: .92rem; }

/* ---------- sheets (never a browser pop-up) ---------- */
.sheet {
  border: 1px solid var(--line); border-radius: var(--r); padding: 0; background: var(--surface); color: var(--ink);
  width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.sheet::backdrop { background: rgba(15, 18, 25, .45); backdrop-filter: blur(2px); }
.sheet form { margin: 0; }
.sheet .cap { position: sticky; top: 0; z-index: 2; }
.sheet p { margin: 0; }
@media (max-width: 560px) {
  .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--r) var(--r) 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
.mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--accent); color: var(--accent-ink); flex: none; }
.mark .i { width: 21px; height: 21px; }
.message .qmark { display: none; }

/* ---------- welcome, v0.2.1 ---------- */
.today-line { color: var(--muted); font-size: .9rem; margin-bottom: -4px; }
.wx { margin-left: auto; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.wx .i { color: var(--accent); width: 24px; height: 24px; }
.wx b { font-size: 1.15rem; }
.wx small { color: var(--muted); font-size: .8rem; }

/* this week, one row of squares (tbn's strip) */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 8px; text-decoration: none;
  border-radius: 3px; border: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums;
}
.wd b { font-size: .68rem; color: var(--muted); letter-spacing: .06em; font-weight: 700; }
.wd span { font-size: 1.15rem; font-weight: 700; }
.wd:hover { border-color: var(--accent); }
.wd.has { background: color-mix(in oklab, var(--accent2) 16%, var(--surface)); box-shadow: inset 0 -3px 0 var(--accent2); }
.wd.off { border-color: var(--ok); }
.wd.off span { color: var(--ok); }
.wd.today { background: var(--accent); border-color: var(--accent); }
.wd.today b, .wd.today span { color: var(--accent-ink); }

.message { border-left-color: var(--accent); background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.mtext { font: 1.08rem/1.55 var(--sans); }

.countdown {
  display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 10px 14px; border-radius: var(--r);
  border: 1px solid color-mix(in oklab, var(--tone) 45%, var(--line)); background: color-mix(in oklab, var(--tone) 10%, var(--surface));
}
.countdown .cdn { display: flex; flex-direction: column; align-items: center; min-width: 54px; line-height: 1; }
.countdown .cdn b { font-size: 2rem; font-weight: 800; color: var(--tone); }
.countdown .cdn .i { width: 30px; height: 30px; color: var(--tone); }
.countdown .cdn small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.countdown .grow { display: flex; flex-direction: column; min-width: 0; }
.countdown .grow small { color: var(--muted); font-size: .8rem; }
.countdown strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.soonhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.soonhead .minihead { margin: 0; flex: 1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.stepper .ib { width: 32px; height: 32px; }
.stepper .ib .i { width: 16px; height: 16px; }
.stepper b { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.soon-all { margin-top: 6px; }
.agenda .dbadge { border-radius: 3px; }
.agenda li.holiday { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--ok); color: var(--ok); }
.agenda li.holiday .i { color: var(--ok); }

/* the calendar inside Apps */
.appcal { grid-column: span 2; }
@media (max-width: 620px) { .appcal { grid-column: auto; } }
.appcal .acap { text-decoration: none; }
.appcal .acap .go { width: 18px; height: 18px; margin-left: auto; color: var(--muted); }
.appcal .abody { padding: 8px; }
.appcal .cal.mini { border: 0; padding: 0; }

/* accent picker in Settings */
.accents { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.acc input { position: absolute; opacity: 0; pointer-events: none; }
.acc span { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; background: var(--bg); }
.acc i { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.acc em { font-style: normal; font-size: .88rem; }
.acc input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); font-weight: 600; }
.acc-tbn .a1 { background: #f53560; } .acc-tbn .a2 { background: #3493f2; }
.acc-lime .a1 { background: #c6e738; } .acc-lime .a2 { background: #d8496a; }
.acc-gold .a1 { background: #f1b142; } .acc-gold .a2 { background: #f53560; }
.acc-rose .a1 { background: #d24f76; } .acc-rose .a2 { background: #f0a2b8; }
.appcal .acap > .i.go { width: 18px; height: 18px; padding: 0; background: none; color: var(--muted); margin-left: auto; }

/* ---------- v0.4 ---------- */
/* the mark: one shape, one colour */
.logo .l1 { fill: var(--accent); }

/* groups that fold */
.box > .cap .fold .i { transition: transform .15s; }
.box.folded > .cap { border-bottom: 0; }
.box.folded > .cap .fold .i { transform: rotate(-90deg); }
.box.folded > .body { display: none !important; }
.box > .cap h2 + .fold, .box > .cap .capnote + .fold { margin-left: auto; }

/* today: date, weather, and the plain rain answer */
.todayrow { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.todayrow .today-line { flex: 1 1 auto; margin: 0; }
.todayrow .wx { margin-left: 0; }
.rain { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 3px; font-size: .92rem; white-space: nowrap; border: 1px solid; }
.rain .i { width: 20px; height: 20px; }
.rain small { color: inherit; opacity: .8; }
.rain.yes { background: color-mix(in oklab, #3493f2 16%, var(--surface)); border-color: #3493f2; color: #2a7fd8; }
.rain.no { background: var(--sunk); border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .rain.yes { color: #7db8f7; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .rain.yes { color: #7db8f7; } }

/* a quiet text button (write a message, set a countdown) */
.linkbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--line); background: transparent;
  color: var(--muted); padding: 8px 12px; border-radius: 3px; cursor: pointer; font-size: .9rem; }
.linkbtn:hover { color: var(--accent); border-color: var(--accent); }
.linkbtn .i { width: 17px; height: 17px; }

/* the countdown, set by hand */
.countdown { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 14px; border-radius: var(--r);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line)); background: color-mix(in oklab, var(--accent) 9%, var(--surface)); text-decoration: none; }
.countdown .cdicon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); flex: none; }
.countdown .cdicon .i { width: 24px; height: 24px; }
.countdown .cdn { display: flex; flex-direction: column; align-items: center; min-width: 54px; line-height: 1; }
.countdown .cdn b { font-size: 2rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.countdown .cdn b .i { width: 28px; height: 28px; }
.countdown .cdn small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
.countdown .grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.countdown .grow strong { font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.countdown .grow small { color: var(--muted); font-size: .85rem; }
.cdclock { font: 700 1.05rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }
.cdclock:empty { display: none; }

/* the quick note */
.quicknote .acap { gap: 8px; }
.quicknote .acap .ib { width: 32px; height: 32px; }
.quicknote .acap .ib .i { width: 17px; height: 17px; padding: 0; background: none; color: var(--muted); }
.qstate { margin-left: auto; font-size: .75rem; color: var(--muted); font-weight: 500; }
.quicknote .abody { padding: 0; }
.qn { width: 100%; min-height: 180px; border: 0; resize: vertical; background: transparent; padding: 12px 14px; font: inherit; line-height: 1.5; outline: none; }
.qn:focus { background: var(--sunk); }

/* larger lines in the lists and Scout cards */
.aline.big { font-size: 1.02rem; gap: 9px; padding: 2px 0; }
.aline.big .i { width: 18px; height: 18px; }
.acap .tag { margin-left: 2px; }

.homehint { text-align: center; }
.homehint a { color: var(--muted); }

/* switches in Settings */
.switches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.switch { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; background: var(--bg); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .knob { width: 34px; height: 20px; border-radius: 3px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { left: 16px; }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch .i { color: var(--muted); width: 18px; height: 18px; }

/* ---------- the Scout app ---------- */
.scout .hello { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scout .hello .i { width: 28px; height: 28px; color: var(--accent); }
.ib.sm { width: 30px; height: 30px; }
.ib.sm .i { width: 15px; height: 15px; }
.empty.sm { font-size: .88rem; }
.bar { height: 8px; border-radius: 4px; background: var(--sunk); border: 1px solid var(--line); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: var(--tone, var(--accent)); }
.alfas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.alfa { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.alfa.obsidiana { --tone: #6b6f7a; } .alfa.jade { --tone: #14a3a0; }
.alfa.got { border-color: var(--tone); background: color-mix(in oklab, var(--tone) 10%, var(--surface)); }
.alfahead { display: flex; justify-content: space-between; align-items: baseline; }
.alfahead strong { font-size: 1.1rem; }
.alfahead span { color: var(--muted); font-size: .9rem; }
.reqs, .checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.reqs li { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.reqs li span { flex: 1; }
.reqs li small { color: var(--muted); white-space: nowrap; }
.reqs .i, .checks > li > .i { width: 17px; height: 17px; color: var(--muted); }
.reqs li.met .i, .checks li.met > .i { color: var(--ok); }
.cazs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.caz { border: 1px solid color-mix(in oklab, var(--tone) 35%, var(--line)); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.caz.done { border-color: var(--tone); }
.cazcap { display: flex; flex-direction: column; padding: 10px 12px; background: color-mix(in oklab, var(--tone) 16%, var(--surface)); position: relative; }
.cazcap strong { font-size: 1.1rem; }
.cazcap small { color: var(--muted); font-size: .8rem; }
.cazcap .badge { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 3px; background: var(--tone); color: #fff; }
.cazcap .badge .i { width: 16px; height: 16px; }
.cazbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.prog { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.prog span { width: 72px; color: var(--muted); }
.prog b { width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.slog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.slog li { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: .92rem; }
.slog li:first-child { border-top: 0; }
.slog .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slog small { color: var(--muted); font-size: .78rem; }
.slog li.wip > .i { color: var(--warn); } .slog li.fin > .i { color: var(--ok); }
.row.start { justify-content: flex-start; align-items: center; }
.ejes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.eje { border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px 8px; }
.eje.has { border-color: color-mix(in oklab, var(--tone) 50%, var(--line)); }
.ejecap { margin: 0 -10px 6px; padding: 8px 10px; font-weight: 700; font-size: .9rem; background: color-mix(in oklab, var(--tone) 14%, var(--surface)); border-radius: var(--r) var(--r) 0 0; }
.scoutgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 16px; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); }
.checks li:first-child { border-top: 0; }
.checks .grow { flex: 1; display: flex; flex-direction: column; }
.checks small { color: var(--muted); font-size: .8rem; }
.srcnote { margin-top: 4px; }
select.in { appearance: auto; }
.message .mby { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .8rem; color: var(--muted); }
.message .mby .i { width: 14px; height: 14px; }
.linkbtn small { color: var(--muted); font-size: .8rem; }


/* ---------- v0.6 ---------- */
/* more named colours (the first ten are above) */
.c-red { --tone: #e5484d } .c-pink { --tone: #e93d82 } .c-indigo { --tone: #5b5bd6 } .c-blue { --tone: #2f6fed }
.c-green { --tone: #30a46c } .c-yellow { --tone: #d4a90a } .c-orange { --tone: #f76b15 } .c-slate { --tone: #6b7385 }
html[data-theme="dark"] .c-red { --tone: #ff6369 } html[data-theme="dark"] .c-pink { --tone: #f76fa8 }
html[data-theme="dark"] .c-indigo { --tone: #8d8dff } html[data-theme="dark"] .c-blue { --tone: #6e9dff }
html[data-theme="dark"] .c-green { --tone: #4cc38a } html[data-theme="dark"] .c-yellow { --tone: #f5d90a }
html[data-theme="dark"] .c-orange { --tone: #ff8b3e } html[data-theme="dark"] .c-slate { --tone: #9aa2b1 }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .c-red { --tone: #ff6369 } html[data-theme="auto"] .c-pink { --tone: #f76fa8 }
  html[data-theme="auto"] .c-indigo { --tone: #8d8dff } html[data-theme="auto"] .c-blue { --tone: #6e9dff }
  html[data-theme="auto"] .c-green { --tone: #4cc38a } html[data-theme="auto"] .c-yellow { --tone: #f5d90a }
  html[data-theme="auto"] .c-orange { --tone: #ff8b3e } html[data-theme="auto"] .c-slate { --tone: #9aa2b1 }
}
.sw.custom { position: relative; }
.sw.custom span { background: conic-gradient(from 0deg, #e5484d, #f5d90a, #30a46c, #14a3a0, #2f6fed, #8a6cf0, #e93d82, #e5484d); }
.sw.custom input:checked + span { background: var(--tone); }
.sw.custom input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* the one tooltip: on top of everything, kept inside the screen */
.tip { position: fixed; z-index: 2147483647; max-width: min(300px, calc(100vw - 16px)); pointer-events: none;
  background: var(--ink); color: var(--bg); font: 500 .8rem/1.35 var(--sans); padding: 7px 10px; border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.tip.rich { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; }
.tip b { font-size: .85rem; }
.tip .tt-today { color: var(--accent); font-weight: 700; }
.tip .tt-hol { display: flex; align-items: center; gap: 5px; color: #4cc38a; font-weight: 600; }
html[data-theme="light"] .tip .tt-hol { color: #1f8a57; }
.tip .tt-hol .i { width: 13px; height: 13px; }
.tip .tt-ev em { font-style: normal; opacity: .7; margin-right: 6px; font-variant-numeric: tabular-nums; }
.tip .tt-more { opacity: .7; }

/* breadcrumbs */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; max-width: 1100px; width: 100%; margin: -4px auto 12px;
  padding: 0 clamp(14px, 4vw, 32px); font-size: .85rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .i { width: 15px; height: 15px; }
.crumbs .sep { width: 13px; height: 13px; opacity: .6; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* password eyes */
.pw { position: relative; display: block; flex: 1; }
.pw .in { padding-right: 46px; }
.pw .eye { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; }
.pw .eye .i { width: 18px; height: 18px; color: var(--muted); }

/* messages: from them, and yours, full width */
.msgs { display: flex; flex-direction: column; gap: 8px; }
.message { display: block; width: 100%; text-align: left; font: inherit; color: inherit; border: 0; border-left: 3px solid var(--accent);
  border-radius: 3px; background: color-mix(in oklab, var(--accent) 7%, var(--surface)); padding: 10px 12px 12px 14px; }
.message.out { cursor: pointer; border-left-color: var(--accent2); background: var(--sunk); border: 1px dashed var(--line); border-left: 3px solid var(--accent2); }
.message.out:hover { border-color: var(--accent2); }
.message .mhead { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.message .mhead b { color: var(--ink); font-weight: 700; }
.message .mhead .i { width: 15px; height: 15px; }
.message .mhead .medit { position: static; margin-left: auto; }
.message .mhead small::before { content: "·"; margin: 0 6px 0 0; }
.message .mhead small:empty::before { content: none; }
.message .mtext { display: block; }
.message.out .mtext { font-size: .98rem; }
.message.out em { color: var(--muted); font-style: normal; }
.cds { display: flex; flex-direction: column; gap: 8px; }
.countdown.theirs { border-color: color-mix(in oklab, var(--accent2) 40%, var(--line)); background: color-mix(in oklab, var(--accent2) 8%, var(--surface)); }
.countdown.theirs .cdicon { background: var(--accent2); }
.countdown.theirs .cdn b, .countdown.theirs .cdclock { color: var(--accent2); }
.countdown .cdwho { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.countdown .cdwhen { font-size: .8rem; }
.linkbtn.wide { align-self: stretch; }
.timepair { display: flex; gap: 4px; align-items: center; }
.timepair .ib { width: 40px; height: 44px; flex: none; }

/* the icon pool: one boxed group per theme */
.iconpool { display: flex; flex-direction: column; gap: 8px; }
.igroup { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.igcap { padding: 6px 10px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  background: var(--sunk); border-bottom: 1px solid var(--line); }
.igroup .icons { padding: 8px; }

/* the calendar's week-either-side switch */
.switch.slim { padding: 5px 10px; min-height: 36px; font-size: .88rem; background: var(--surface); }
.caltools { align-items: center; }

/* four more looks (2026-09-30): each changes the dark base as well as the accents */
html[data-accent="ocean"] { --accent: #c77d06; --accent2: #0284c7; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="ocean"] { --bg: #0b1220; --surface: #121b2e; --sunk: #0e1626; --line: #1f2a44; --accent: #f5a524; --accent2: #38bdf8; --accent-ink: #1a1204; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="ocean"] { --bg: #0b1220; --surface: #121b2e; --sunk: #0e1626; --line: #1f2a44; --accent: #f5a524; --accent2: #38bdf8; --accent-ink: #1a1204; } }
.acc-ocean .a1 { background: #f5a524; } .acc-ocean .a2 { background: #38bdf8; } .acc-ocean span { background: linear-gradient(90deg, #0b1220 0 30%, var(--bg) 30%); }
html[data-accent="graphite"] { --accent: #e2553a; --accent2: #0f9488; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="graphite"] { --bg: #161514; --surface: #1f1d1b; --sunk: #1a1817; --line: #2e2b28; --accent: #ff6b4a; --accent2: #2ec4b6; --accent-ink: #1a0d08; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="graphite"] { --bg: #161514; --surface: #1f1d1b; --sunk: #1a1817; --line: #2e2b28; --accent: #ff6b4a; --accent2: #2ec4b6; --accent-ink: #1a0d08; } }
.acc-graphite .a1 { background: #ff6b4a; } .acc-graphite .a2 { background: #2ec4b6; } .acc-graphite span { background: linear-gradient(90deg, #161514 0 30%, var(--bg) 30%); }
html[data-accent="forest"] { --accent: #15803d; --accent2: #db2777; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="forest"] { --bg: #0a110d; --surface: #111a15; --sunk: #0d1510; --line: #1e2b23; --accent: #4ade80; --accent2: #f472b6; --accent-ink: #04130a; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="forest"] { --bg: #0a110d; --surface: #111a15; --sunk: #0d1510; --line: #1e2b23; --accent: #4ade80; --accent2: #f472b6; --accent-ink: #04130a; } }
.acc-forest .a1 { background: #4ade80; } .acc-forest .a2 { background: #f472b6; } .acc-forest span { background: linear-gradient(90deg, #0a110d 0 30%, var(--bg) 30%); }
html[data-accent="violet"] { --accent: #7c3aed; --accent2: #d97706; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="violet"] { --bg: #0e0b16; --surface: #16121f; --sunk: #120f1a; --line: #2a2338; --accent: #a78bfa; --accent2: #f59e0b; --accent-ink: #150b2e; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="violet"] { --bg: #0e0b16; --surface: #16121f; --sunk: #120f1a; --line: #2a2338; --accent: #a78bfa; --accent2: #f59e0b; --accent-ink: #150b2e; } }
.acc-violet .a1 { background: #a78bfa; } .acc-violet .a2 { background: #f59e0b; } .acc-violet span { background: linear-gradient(90deg, #0e0b16 0 30%, var(--bg) 30%); }
.dayagenda .agenda li > button { align-items: stretch; }
.dayagenda .agenda .bar { align-self: stretch; height: auto; min-height: 38px; }

/* ---------- v0.7 ---------- */
/* the top bar stays put while the page scrolls under it */
.top { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--line);
  max-width: none; width: 100%; padding-left: max(clamp(14px, 4vw, 32px), calc((100% - 1036px) / 2));
  padding-right: max(clamp(14px, 4vw, 32px), calc((100% - 1036px) / 2)); }
.crumbs { margin-top: 8px; }

/* messages, boxed like the countdowns: a big icon on the left */
.message { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; border-radius: var(--r);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line)); background: color-mix(in oklab, var(--accent) 8%, var(--surface)); }
.message.out { border: 1px solid color-mix(in oklab, var(--accent2) 40%, var(--line)); background: color-mix(in oklab, var(--accent2) 7%, var(--surface)); border-left-width: 1px; }
.message.out:hover { border-color: var(--accent2); }
.message .micon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 3px; flex: none; background: var(--accent); color: var(--accent-ink); }
.message.out .micon { background: var(--accent2); color: #fff; }
.message .micon .i { width: 26px; height: 26px; }
.message .mbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.message .mhead { margin: 0; }
.message .medit { flex: none; }

/* settings: every colour choice, every tab, the same size */
.accents { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.acc span { height: 46px; box-sizing: border-box; }
.acc em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); overflow: visible; }
.tabs a { justify-content: center; }
.usernote { margin: -4px 0 12px; }
.seasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.season input { position: absolute; opacity: 0; pointer-events: none; }
.season span { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 4px 6px; height: 56px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--bg); cursor: pointer; }
.season i { width: 14px; height: 14px; border-radius: 2px; }
.season .i { grid-column: span 2; width: 18px; height: 18px; color: var(--muted); }
.season em { font-style: normal; font-size: .88rem; font-weight: 600; }
.season small { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; }
.season input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.season input:focus-visible + span { outline: 2px solid var(--accent); }

/* the calendar page is narrower on big screens */
.calbox, .dayagenda { max-width: 640px; margin-left: auto; margin-right: auto; }
.widechk { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); margin: 0 0 6px 6px; cursor: pointer; }
.widechk input { width: 16px; height: 16px; accent-color: var(--accent); }

/* calendar tooltips, boxed: the background takes the day's colour, the text stays plain */
.tip.rich { --tt: var(--tone, var(--accent)); display: block; padding: 0; overflow: hidden; color: var(--ink);
  background: color-mix(in oklab, var(--tt) 12%, var(--surface)); border: 1px solid color-mix(in oklab, var(--tt) 55%, var(--line)); }
.tip.rich.t-hol { --tt: #30a46c; } .tip.rich.t-today { --tt: var(--accent); }
.tip .tt-cap { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: color-mix(in oklab, var(--tt) 28%, var(--surface)); font-size: .85rem; }
.tip .tt-cap .tt-today { color: var(--ink); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 2px; background: color-mix(in oklab, var(--accent) 35%, var(--surface)); }
.tip .tt-body { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 9px; }
.tip .tt-body:empty { display: none; }
.tip .tt-hol { color: var(--ink); }
.tip .tt-hol .i { color: #30a46c; }
.tip .tt-ev { display: block; padding-left: 8px; border-left: 3px solid var(--tone, var(--accent)); }
html[data-theme="light"] .tip .tt-hol { color: var(--ink); }

/* reminders in the add sheet */
.reminders .body { gap: 8px; }
.remrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seasons { grid-auto-rows: 1fr; }
.season { display: flex; }
.season span { height: auto; min-height: 64px; width: 100%; align-content: center; }
.message .medit { position: static; }
.message .mhead { flex-wrap: wrap; row-gap: 0; }

/* four more looks (2026-10-01: "keep adding more") */
html[data-accent="sunset"] { --accent: #e8590c; --accent2: #9333ea; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="sunset"] { --bg: #140b10; --surface: #1e1218; --sunk: #180e14; --line: #33202a; --accent: #ff7a45; --accent2: #c084fc; --accent-ink: #1a0a04; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="sunset"] { --bg: #140b10; --surface: #1e1218; --sunk: #180e14; --line: #33202a; --accent: #ff7a45; --accent2: #c084fc; --accent-ink: #1a0a04; } }
.acc-sunset .a1 { background: #ff7a45; } .acc-sunset .a2 { background: #c084fc; } .acc-sunset span { background: linear-gradient(90deg, #140b10 0 30%, var(--bg) 30%); }
html[data-accent="mint"] { --accent: #0f9d76; --accent2: #4f46e5; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="mint"] { --bg: #08110f; --surface: #0f1a17; --sunk: #0b1513; --line: #1d2d29; --accent: #34e3b0; --accent2: #818cf8; --accent-ink: #03140f; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="mint"] { --bg: #08110f; --surface: #0f1a17; --sunk: #0b1513; --line: #1d2d29; --accent: #34e3b0; --accent2: #818cf8; --accent-ink: #03140f; } }
.acc-mint .a1 { background: #34e3b0; } .acc-mint .a2 { background: #818cf8; } .acc-mint span { background: linear-gradient(90deg, #08110f 0 30%, var(--bg) 30%); }
html[data-accent="berry"] { --accent: #c2185b; --accent2: #0891b2; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="berry"] { --bg: #120914; --surface: #1b0f1e; --sunk: #160c19; --line: #2e1a33; --accent: #ff3d8b; --accent2: #22d3ee; --accent-ink: #1a0510; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="berry"] { --bg: #120914; --surface: #1b0f1e; --sunk: #160c19; --line: #2e1a33; --accent: #ff3d8b; --accent2: #22d3ee; --accent-ink: #1a0510; } }
.acc-berry .a1 { background: #ff3d8b; } .acc-berry .a2 { background: #22d3ee; } .acc-berry span { background: linear-gradient(90deg, #120914 0 30%, var(--bg) 30%); }
html[data-accent="mono"] { --accent: #18181b; --accent2: #71717a; --accent-ink: #fff; }
html[data-theme="dark"][data-accent="mono"] { --bg: #0a0a0a; --surface: #141414; --sunk: #0f0f0f; --line: #262626; --accent: #f5f5f5; --accent2: #a1a1aa; --accent-ink: #0a0a0a; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"][data-accent="mono"] { --bg: #0a0a0a; --surface: #141414; --sunk: #0f0f0f; --line: #262626; --accent: #f5f5f5; --accent2: #a1a1aa; --accent-ink: #0a0a0a; } }
.acc-mono .a1 { background: #f5f5f5; } .acc-mono .a2 { background: #a1a1aa; } .acc-mono span { background: linear-gradient(90deg, #0a0a0a 0 30%, var(--bg) 30%); }

/* ---------- v0.8 ---------- */
/* a season dresses the whole site: accents, a band under the top bar */
html[data-season] { --accent: var(--s1); --accent2: var(--s2); --accent-ink: #fff; }
html[data-season] .top { border-bottom: 0; box-shadow: inset 0 -4px 0 0 transparent; }
html[data-season] .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--s1), var(--s2), var(--s3), var(--s1)); background-size: 200% 100%; animation: sband 8s linear infinite; }
html[data-season] .box > .cap { background: linear-gradient(90deg, color-mix(in oklab, var(--s1) 16%, var(--surface)), color-mix(in oklab, var(--s3) 14%, var(--surface))); }
@keyframes sband { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { html[data-season] .top::after { animation: none; } }

/* the important message, right of the logo, scrolling when it does not fit */
.top { display: flex; align-items: center; gap: 14px; }
.banner { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 3px;
  background: color-mix(in oklab, var(--err) 14%, var(--surface)); border: 1px solid color-mix(in oklab, var(--err) 50%, var(--line)); color: var(--ink); font-weight: 600; font-size: .9rem; }
.banner > .i { color: var(--err); width: 18px; height: 18px; }
.bwin { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.btrack { display: inline-block; }
.banner.scroll .btrack { padding-left: 100%; animation: bscroll var(--dur, 15s) linear infinite; }
@keyframes bscroll { to { transform: translateX(-100%); } }
@media (max-width: 560px) { .top { flex-wrap: wrap; } .banner { order: 3; flex-basis: 100%; } }

/* weather: full width on a phone */
@media (max-width: 560px) { .todayrow .wx, .todayrow .rain { flex: 1 1 100%; justify-content: center; } }

/* the whole header row of a group folds it */
[data-group] > .cap { cursor: pointer; user-select: none; }

/* activity as a table, time first */
.logtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.logtable th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; background: var(--sunk); border-bottom: 1px solid var(--line); }
.logtable td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.logtable td.when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.logtable td.who { white-space: nowrap; font-weight: 600; }
.logtable td.what { display: flex; gap: 8px; align-items: flex-start; }
.logtable td.what .i { width: 16px; height: 16px; color: var(--muted); flex: none; margin-top: 2px; }
.logtable tr.bad td.what .i { color: var(--err); }
@media (max-width: 560px) { .logtable td.when { white-space: normal; } }

/* seasons table */
.seasonrows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.srow { display: grid; grid-template-columns: 54px minmax(130px, 1.3fr) 1fr 1fr 120px; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; }
.srow.shead { background: var(--sunk); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.srow.live { background: color-mix(in oklab, var(--accent) 10%, var(--surface)); }
.mdpair { display: flex; gap: 4px; }
.in.sm { min-height: 36px; padding: 4px 6px; font-size: .88rem; }
.scolors { display: flex; gap: 6px; }
.cbtn { width: 30px; height: 30px; border-radius: 3px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--tone); cursor: pointer; padding: 0; }
.switch.mini { padding: 0; border: 0; background: none; }
@media (max-width: 760px) { .srow { grid-template-columns: 44px 1fr; } .srow.shead { display: none; } .srow .mdpair, .srow .scolors { grid-column: 2; } }

/* our date and time fields */
.dpick, .tpick { display: flex; gap: 6px; align-items: center; }
.dbtn { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.dbtn .i { width: 18px; height: 18px; color: var(--muted); flex: none; }
.dpick.empty .dval { color: var(--muted); }
.tpick select { width: auto; flex: 1; }
.tpick b { color: var(--muted); }
.dpicker { width: min(340px, calc(100vw - 24px)); }
.dpicker h2 { font-variant-numeric: tabular-nums; }
.pgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pgrid span { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.pd { height: 38px; border: 1px solid transparent; border-radius: 3px; background: transparent; cursor: pointer; font-variant-numeric: tabular-nums; }
.pd:hover { background: var(--sunk); }
.pd.out { color: var(--muted); opacity: .6; }
.pd.today { box-shadow: inset 0 0 0 2px var(--accent); font-weight: 700; }
.pd.sel { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pd.sug { border-color: var(--accent); border-style: dashed; font-weight: 700; }
.pd:disabled { opacity: .3; cursor: default; }
.pd:disabled:hover { background: transparent; }

/* our colour picker */
.cpicker { width: min(420px, calc(100vw - 24px)); }
.pcs { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; }
.pc { aspect-ratio: 1; border: 0; border-radius: 2px; background: var(--tone); cursor: pointer; padding: 0; }
.pc:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.hexrow { display: flex; gap: 8px; align-items: center; }
.hexrow .pv { width: 44px; height: 44px; border-radius: 3px; background: var(--tone); flex: none; box-shadow: 0 0 0 1px var(--line); }
.hexrow .in { flex: 1; font-family: ui-monospace, Menlo, monospace; }
@media (max-width: 420px) { .pcs { grid-template-columns: repeat(10, 1fr); } }

/* copy buttons say they copied */
.btn.copied { border-color: var(--ok); color: var(--ok); }

/* one save for the whole settings page */
.savebar { position: sticky; bottom: 0; z-index: 5; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); display: flex; justify-content: flex-end; }
.savebar .btn { min-width: 200px; box-shadow: var(--shadow); }

/* calendar: narrower still, and the optional grid */
.calbox, .dayagenda { max-width: 520px; }
.cal.gridded .days { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal.gridded .days > .d { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.cal.gridded .days > .d.blank { visibility: visible; border-color: var(--line); }
.cal.gridded.mini .days > .d { padding: 3px 0; }
.hasnote .i, .tt-ev .i { width: 14px; height: 14px; vertical-align: -2px; color: var(--muted); margin-left: 4px; }

/* messages: the time under the text, and likes */
.message .mfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.message .mfoot small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.message .mfoot small .i { width: 13px; height: 13px; }
.like, .likes { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 3px; padding: 3px 9px; color: var(--ink); font-size: .85rem; }
.like { cursor: pointer; }
.like .i, .likes .i { width: 16px; height: 16px; color: var(--accent); }
.like:hover { border-color: var(--accent); }
.like.pop .i { animation: lpop .35s ease; }
@keyframes lpop { 50% { transform: scale(1.5); } }
.message .mhead small::before { content: none; }

/* drawings */
.drawing { display: block; width: 100%; height: auto; border-radius: 3px; background: var(--sunk); border: 1px solid var(--line); }
html[data-theme="dark"] .drawing, html[data-theme="dark"] #draw { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .drawing, html[data-theme="auto"] #draw { filter: invert(1) hue-rotate(180deg); } }
html[data-theme="dark"] .drawing, html[data-theme="dark"] #draw { background: #e9eaee; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .drawing, html[data-theme="auto"] #draw { background: #e9eaee; } }
#draw { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; touch-action: none; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; cursor: crosshair; }
.drawtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px 0; }
.drawtools .primary { margin-left: auto; }
.appdraw .abody { gap: 8px; }
.drawing.big { max-width: 100%; }

/* ---------- v0.9 ---------- */
/* a season set to "whole site" wins over every personal look, light or dark */
html[data-season][data-accent][data-theme] { --accent: var(--s1); --accent2: var(--s2); --accent-ink: #fff; }

/* messages: the like button (or your likes and the pencil) on the right */
.message { align-items: center; }
.message > .like { flex: none; align-self: center; padding: 8px 12px; font-size: 1rem; }
.message > .like .i { width: 20px; height: 20px; }
.message .mside { display: flex; align-items: center; gap: 8px; flex: none; }

/* colour tiles: plain, with a square for the look's own background */
.acc span { background: var(--bg) !important; min-width: 0; }
.acc i.a0 { box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 520px) { .accents { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acc span { height: auto; min-height: 46px; padding: 8px; } .acc em { font-size: .8rem; } }

/* on touch screens the hover "+" never catches a tap meant for the day */
@media (hover: none) { .cal .addday { display: none; } }

/* the shared board: tall and narrow, the same shape on every screen — about
   300 by 600 on a computer, as big as fits on a phone */
.boardwrap { display: flex; justify-content: center; }
.board { display: block; aspect-ratio: 1 / 2; height: min(600px, 72vh, calc((100vw - 64px) * 2)); width: auto; max-width: 100%;
  touch-action: none; background: #fff; border: 1px solid var(--line); border-radius: 3px; cursor: crosshair; }
.board.mini { height: 210px; cursor: pointer; margin: 0 auto; pointer-events: none; }
html[data-theme="dark"] .board { filter: invert(1) hue-rotate(180deg); background: #e9eaee; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .board { filter: invert(1) hue-rotate(180deg); background: #e9eaee; } }
.drawbox .body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drawbox #draw-state { text-align: center; }
.capnote.live { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--ok); font-weight: 600; }
.capnote.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: livedot 2s infinite; }
.offline .capnote.live { color: var(--muted); } .offline .capnote.live i { background: var(--muted); animation: none; }
@keyframes livedot { 50% { opacity: .3; } }
.appdraw .abody { align-items: center; }
.oldgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.oldgrid figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.oldraw > summary { list-style: none; cursor: pointer; } .oldraw > summary::-webkit-details-marker { display: none; }
.oldraw > summary .chev { margin-left: auto; transition: transform .15s; } .oldraw[open] > summary .chev { transform: rotate(180deg); }

/* the day sheet in the calendar */

/* pictures */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; font-size: .9rem; cursor: pointer; }
.chip .i { width: 16px; height: 16px; color: var(--accent); }
.chip em { font-style: normal; color: var(--muted); font-size: .8rem; }
.chip.on { background: color-mix(in oklab, var(--accent) 14%, var(--surface)); border-color: var(--accent); font-weight: 600; }
.chip.add { border-style: dashed; color: var(--muted); }
.upbtn { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.upstate { margin: 0 0 10px; }
/* (scoped: the date picker's own day grid is also .pgrid — sharing the name
   squeezed its seven days into three columns on phones, fixed 2026-10-07) */
.photos .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(31%, 150px), 1fr)); gap: 6px; }
.pthumb { padding: 0; border: 0; background: var(--sunk); aspect-ratio: 1; border-radius: 3px; overflow: hidden; cursor: zoom-in; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.pthumb:hover img { transform: scale(1.04); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 16px; border: 2px dashed var(--line);
  border-radius: var(--r); color: var(--muted); cursor: pointer; text-align: center; }
.dropzone > .i { width: 40px; height: 40px; color: var(--accent); }
.sheet.viewer { width: min(1000px, calc(100vw - 24px)); }
.pvstage { position: relative; display: flex; align-items: center; justify-content: center; background: #0b0c0f; min-height: 200px; }
.pvstage img { display: block; max-width: 100%; max-height: min(calc(100dvh - 200px), 900px); object-fit: contain; user-select: none; touch-action: pan-y; }
.pvnav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .45); color: #fff; border-color: transparent; }
.pvnav.prev { left: 8px; } .pvnav.next { right: 8px; }
.pvnav:hover { background: rgba(0, 0, 0, .7); }
.sheet .body.pvmeta { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.pvmeta #pv-caption { flex: 1 1 260px; min-width: 0; height: auto; }
.pvmeta .fl.inline { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.pvmeta .fl.inline > span { display: flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .sheet.viewer { width: 100vw; } .pvstage img { max-height: 60vh; } }
.appphoto .abody { gap: 8px; }
.photolink { display: block; border-radius: 3px; overflow: hidden; background: var(--sunk); }
.photolink img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; }
.seg.wrap label { flex: 0 1 auto; }
a.acap { text-decoration: none; color: inherit; }
.acap > .i.go { width: 18px; height: 18px; padding: 0; background: none; color: var(--muted); margin-left: auto; }
@media (max-width: 520px) { .acc em { white-space: normal; line-height: 1.15; overflow: visible; text-overflow: clip; } }

/* ---------- v0.10 ---------- */
/* the version, for the admin, beside the name */
.brand .ver { font-size: .72rem; font-weight: 600; line-height: 1; color: var(--muted); letter-spacing: 0; align-self: flex-end; margin: 0 0 5px -6px; }

/* a like heart grows more intense with the count: 0-9, 10-49, 50-499, 500+ */
.like.t0 .i, .likes.t0 .i { color: #f29bb0; }
.like.t1 .i, .likes.t1 .i { color: #ec4f7a; }
.like.t2 .i, .likes.t2 .i { color: #d10f3f; }
.like.t3 .i, .likes.t3 .i { color: #ff1744; filter: drop-shadow(0 0 4px #ff1744aa); animation: heartbeat 1.1s ease-in-out infinite; }
.like.t3, .likes.t3 { border-color: #ff1744; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .like.t3 .i, .likes.t3 .i { animation: none; } }

/* your own message: the pencil on top, its likes under it */
.message .mside { flex-direction: column; align-items: center; gap: 6px; }

/* the countdown: days, then the time in its own column, both large */
.countdown .cdt { min-width: 0; }
.countdown .cdt b { font-size: 1.7rem; letter-spacing: -.02em; }
.countdown .cdt[hidden] { display: none; }
@media (max-width: 520px) { .countdown { flex-wrap: wrap; } .countdown .grow { flex-basis: 100%; order: 5; } .countdown .cdt b { font-size: 1.5rem; } }

/* the shared board on the home page: full width, foldable, always 300 wide */
.boardapp { grid-column: 1 / -1; }
.boardapp > .cap { cursor: pointer; }
.boardapp > .cap .capnote.live { margin-left: auto; }
.boardapp > .cap .fold { margin-left: 4px; }
.boardapp > .cap .fold .i { transition: transform .15s; }
.boardapp.folded > .cap .fold .i { transform: rotate(-90deg); }
.boardapp.folded > .body { display: none; }
.boardapp > .body { align-items: center; gap: 10px; }
.boardapp .board { height: auto; width: min(300px, 100%); }

/* Halloween: darker, orange and black (2026-10-02). Black can't be an accent
   on a dark page, so the second colour stays orange; the logo keeps the black. */
html[data-season="halloween"] { --accent: #ff6a00; --accent2: #ffa233; --accent-ink: #120700; }
html[data-season="halloween"][data-theme="dark"] { --bg: #050403; --surface: #0f0b08; --sunk: #090705; --line: #2a1d12; }
@media (prefers-color-scheme: dark) { html[data-season="halloween"][data-theme="auto"] { --bg: #050403; --surface: #0f0b08; --sunk: #090705; --line: #2a1d12; } }
html[data-season="halloween"] .top { background: #070503; color: #f4e6d8; }
html[data-season="halloween"] .top .ib { color: #f4e6d8; }
html[data-season="halloween"] .top::after { background: repeating-linear-gradient(90deg, #ff6a00 0 18px, #0b0b0b 18px 30px); background-size: 60px 100%; }
html[data-season="halloween"] .box > .cap { background: linear-gradient(90deg, #1d0f05, #2c1606); color: #f7e9db; border-bottom-color: #3a2210; }
html[data-season="halloween"] .box > .cap > .i { color: #ff8a1f; }
html[data-season="halloween"] .box > .cap .capnote { color: #c9a789; }
html[data-season="halloween"] .box > .cap .ib { color: #f7e9db; }

/* the season's moving things: bats in October, snow at Christmas — behind
   everything, never in the way of a tap */
.fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
html[data-fx] main, html[data-fx] .crumbs, html[data-fx] .foot { position: relative; z-index: 1; }
.fx .bat { color: #1a0d05; opacity: .85; }
html[data-theme="dark"] .fx .bat { color: #ff7a1a; opacity: .28; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .fx .bat { color: #ff7a1a; opacity: .28; } }
.fx .flake { position: absolute; top: -12px; width: var(--s, 6px); height: var(--s, 6px); border-radius: 50%; background: #fff; opacity: .8;
  box-shadow: 0 0 3px rgba(255, 255, 255, .6); animation: snowfall var(--d, 12s) linear var(--delay, 0s) infinite; }
html[data-theme="light"] .fx .flake { background: #b9c9dd; }
@media (prefers-color-scheme: light) { html[data-theme="auto"] .fx .flake { background: #b9c9dd; } }
@keyframes snowfall { to { transform: translate(var(--x, 30px), calc(100vh + 20px)); } }
@media (prefers-reduced-motion: reduce) { .fx { display: none; } }

/* pictures: drop anywhere on the page; zoom in the viewer */
body.dropping main[data-drop]::after { content: attr(data-drop); position: fixed; inset: 12px; z-index: 50; display: grid; place-items: center;
  border: 3px dashed var(--accent); border-radius: var(--r); background: color-mix(in oklab, var(--accent) 12%, transparent);
  font: 700 1.3rem var(--head); color: var(--accent); pointer-events: none; backdrop-filter: blur(2px); }
.pvstage { overflow: hidden; }
.pvstage img { transition: transform .12s ease-out; cursor: zoom-in; }
.pvstage img.zoomed { cursor: grab; transition: none; }
.pvstage:fullscreen { background: #000; }
.pvstage:fullscreen img { max-height: 100vh; max-width: 100vw; }

/* the morning drive */
.appcommute .cmroute { color: var(--muted); font-size: .85rem; }
.appcommute .cmbig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 1rem; color: var(--muted); }
.appcommute .cmbig b { font: 800 2.2rem/1 var(--head); color: var(--tone); }
.appcommute .cmdelay { font-style: normal; color: var(--err); font-weight: 600; font-size: .85rem; }
.appcommute .cmok { font-style: normal; color: var(--ok); font-weight: 600; font-size: .85rem; }
.seg label.chk { flex: 0 1 auto; }
.appcommute .aline { white-space: normal; flex-wrap: wrap; }

/* ---------- v0.11 ---------- */
/* the likes are one size wherever they sit (2026-10-03) */
.message > .like, .message .mside .likes { padding: 6px 11px; font-size: .95rem; min-width: 64px; justify-content: center; }
.message > .like .i, .message .mside .likes .i { width: 18px; height: 18px; }
/* the version gets room of its own */
.brand .ver { padding: 3px 7px; margin: 0 0 2px 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--sunk); }

/* the top bar: no more marching line; instead the whole bar drifts, slowly,
   in its own colours — a dark bar stays dark (2026-10-03) */
html[data-season] .top::after { display: none; }
.top { isolation: isolate; overflow: hidden; }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, color-mix(in oklab, var(--s1, var(--accent)) 16%, transparent) 22%, transparent 42%,
    color-mix(in oklab, var(--s3, var(--accent2)) 13%, transparent) 64%, transparent 82%, color-mix(in oklab, var(--s1, var(--accent)) 10%, transparent) 100%);
  background-size: 260% 100%; animation: topdrift 16s ease-in-out infinite alternate; }
html[data-season] .top { border-bottom: 1px solid color-mix(in oklab, var(--s1) 45%, var(--line)); }
@keyframes topdrift { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .top::before { animation: none; } }

/* the board and the calendar side by side, stacked on a phone */
.duo { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 12px; align-items: start; }
.duo > .boardapp, .duo > .appcal { grid-column: auto; }
.duo > .boardapp.folded { align-self: start; }
.duo > :only-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* the drive: a picture of the route in the card, the big map in its sheet */
.appcommute > .acap { border: 0; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.cmmap { display: block; padding: 0; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; cursor: zoom-in; margin-top: 6px; background: var(--sunk); }
.cmmap > span { display: block; height: 150px; pointer-events: none; }
.sheet.wide.drive { width: min(860px, calc(100vw - 24px)); }
.cmask { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; align-items: end; }
.cmask .swap { margin-bottom: 4px; }
@media (max-width: 640px) { .cmask { grid-template-columns: 1fr; } .cmask .swap { justify-self: center; transform: rotate(90deg); } }
.cmresult { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; min-height: 1.6em; color: var(--muted); }
.cmresult b { font: 800 2rem/1 var(--head); color: #14a3a0; }
.cmresult .fine { flex-basis: 100%; }
.cmbigmap { height: min(52vh, 440px); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.cmgframe { width: 100%; height: min(60vh, 480px); border: 1px solid var(--line); border-radius: 3px; }
html[data-theme="dark"] .leaflet-tile-pane:not(:has(.tt)) { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .leaflet-tile-pane:not(:has(.tt)) { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); } }
.leaflet-container { font: inherit; background: var(--sunk); }

/* Ajustes → Sitio → Animaciones: every option seen moving */
.animpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.animpick.bats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.animpick input { position: absolute; opacity: 0; pointer-events: none; }
.animpick span { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px 8px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; background: var(--sunk); height: 100%; }
.animpick .logo.big { width: 42px; height: 70px; }
.animpick img { width: 100%; max-width: 200px; border-radius: 3px; display: block; }
.animpick em { font-style: normal; font-size: .78rem; color: var(--muted); text-align: center; }
.animpick input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 40%, transparent); }
.animpick input:checked + span em { color: var(--accent); font-weight: 600; }
.btn.busy { opacity: .75; pointer-events: none; }
.btn.busy .i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cmlast b { font-size: 1.1rem; margin-right: 4px; }

/* v0.11b: the drift is a little stronger, and every section's title bar has it
   too (2026-10-03: "is the section title bar animated too? i think it should,
   and make it a bit less subtle") */
:root { --drift: linear-gradient(105deg, transparent 0%, color-mix(in oklab, var(--s1, var(--accent)) 26%, transparent) 22%, transparent 44%,
    color-mix(in oklab, var(--s3, var(--accent2)) 22%, transparent) 66%, transparent 84%, color-mix(in oklab, var(--s1, var(--accent)) 16%, transparent) 100%); }
.top::before { background: var(--drift); background-size: 260% 100%; }
.box > .cap, .sheet .cap { position: relative; isolation: isolate; overflow: hidden; }
.box > .cap::before, .sheet .cap::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--drift); background-size: 300% 100%; animation: topdrift 19s ease-in-out infinite alternate; opacity: .8; }
.box:nth-of-type(2n) > .cap::before { animation-delay: -7s; animation-duration: 23s; }
@media (prefers-reduced-motion: reduce) { .box > .cap::before, .sheet .cap::before { animation: none; } }
.sheet .cap { position: sticky; }
/* the version wears the page's own colours */
.brand .ver { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 55%, var(--line)); background: color-mix(in oklab, var(--accent) 14%, transparent); }
/* the board: shorter (300 × 500), its two tools small and side by side across its width */
.board { aspect-ratio: 3 / 5; height: min(500px, 72vh, calc((100vw - 64px) * 5 / 3)); }
.boardapp .board { height: auto; width: min(300px, 100%); }
.boardapp > .body > .seg, .drawbox .drawtools .seg { width: min(300px, 100%); display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; }
.boardapp > .body > .seg span, .drawbox .drawtools .seg span { padding: 5px 8px; font-size: .82rem; gap: 5px; }
.boardapp > .body > .seg .i, .drawbox .drawtools .seg .i { width: 15px; height: 15px; }

/* ---------- v0.13 ---------- */
/* the top bar's buttons (and those in title bars) light up in their own ink,
   so the hover shows on any bar, dark or light (2026-10-06) */
.top .ib:hover, .top .ib:focus-visible, .box > .cap .ib:hover, .box > .cap .ib:focus-visible {
  background: color-mix(in oklab, currentColor 18%, transparent); border-color: color-mix(in oklab, currentColor 40%, transparent); color: inherit; }
.top .ib.on { background: color-mix(in oklab, var(--accent) 22%, transparent); border-color: color-mix(in oklab, var(--accent) 55%, transparent); color: var(--accent); }

/* pet ideas: cards to tick */
.petideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.petideas input { position: absolute; opacity: 0; pointer-events: none; }
.petideas span { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--sunk); cursor: pointer; height: 100%; }
.petideas span > .i { grid-row: span 3; width: 26px; height: 26px; color: var(--accent); }
.petideas small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.petideas em { font-style: normal; font-size: .78rem; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.petideas input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); }
.petideas input:checked + span em { color: var(--accent); font-weight: 600; }

/* ---------- v0.14 ---------- */
/* the heart fills as likes add up: outline always, the fill's colour and strength from the count */
.hs { display: inline-grid; flex: none; }
.hs > .i { grid-area: 1 / 1; }
.hs > .o { color: #c4243c; }
html[data-theme="dark"] .hs > .o { color: #ff5c75; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .hs > .o { color: #ff5c75; } }
.hs > .f { color: var(--hc, #8b0000); opacity: var(--ho, 0); transition: opacity .2s, color .2s; }
.hs.beat { animation: heartbeat 1.1s ease-in-out infinite; filter: drop-shadow(0 0 4px #ff8c00aa); }
.like .hs .i, .likes .hs .i { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .hs.beat { animation: none; } }

/* a shortcut to the drive card, beside the rain */
.drivechip { cursor: pointer; font: inherit; border: 1px solid color-mix(in oklab, #14a3a0 50%, var(--line)); color: #14a3a0; background: color-mix(in oklab, #14a3a0 10%, transparent); }
.drivechip:hover { background: color-mix(in oklab, #14a3a0 18%, transparent); }
.app.flash { animation: cardflash 1.2s ease-out; }
@keyframes cardflash { 0%, 40% { box-shadow: 0 0 0 3px var(--tone, var(--accent)); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* the board 20% smaller: 240 × 400 */
.board { height: min(400px, 72vh, calc((100vw - 64px) * 5 / 3)); }
.boardapp .board { width: min(240px, 100%); }
.boardapp > .body > .seg, .drawbox .drawtools .seg { width: min(240px, 100%); }
/* (on a phone the two stack — this used to override that, which crushed the calendar into a sliver) */
@media (min-width: 761px) { .duo { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); } }

/* the event sheet: quick days, the Repeat button and its sheet */
.quickdays { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.quickdays .chip { padding: 4px 10px; font-size: .82rem; }
.repbtn { cursor: pointer; font: inherit; background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.repbtn b { font-weight: 600; }
.replist { display: flex; flex-direction: column; gap: 6px; }
.replist input { position: absolute; opacity: 0; pointer-events: none; }
.replist span { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; background: var(--sunk); }
.replist input:checked + span { border-color: var(--accent); color: var(--accent); font-weight: 600; box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 30%, transparent); }

/* the event sheet on a phone: day and time each get the full width */
@media (max-width: 520px) { #event-form .grid2.tight { grid-template-columns: 1fr; } }
.dpicker .pgrid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 560px) { .sheet.dpicker { width: 100vw; max-width: 100vw; } }
.msgs { overflow-x: clip; }

/* ---------- v0.15 ---------- */
/* A toast stays until it is closed: the X sits at its end (2026-10-10). The
   .app.flash blink on a card is another thing; the role keeps the two apart. */
.flash[role=status] { align-items: center; }
.flash[role=status] > span { flex: 1; min-width: 0; }
.flash[role=status] > .ib { width: 32px; height: 32px; margin: -4px -8px -4px 0; color: var(--muted); }
.flash[role=status] > .ib .i { width: 18px; height: 18px; color: inherit; }
.flash[role=status] > .ib:hover { color: var(--ink); }

/* The link editor's Save and Cancel are at the top. The box clips its corners
   but must not be a scroll box, or the row could not stick (a wide screen). */
#linkform.box { overflow: visible; overflow: clip; }

/* Apps: no filled square behind the icon, the icon itself in the card's colour.
   Ink is mixed in so it stays clear on a light cap, a dark one and Halloween's. */
.acap > .i:not(.go) { width: 30px; height: 30px; padding: 0; background: none; border-radius: 0; color: color-mix(in oklab, var(--tone) 82%, var(--ink)); }
html[data-season="halloween"][data-theme="dark"] .acap > .i:not(.go) { color: color-mix(in oklab, var(--tone) 70%, #fff); }
@media (prefers-color-scheme: dark) { html[data-season="halloween"][data-theme="auto"] .acap > .i:not(.go) { color: color-mix(in oklab, var(--tone) 70%, #fff); } }

/* A day with something on it is tinted by v0.16 (below). */

/* The rain chip is a link now, drawn the same. */
a.rain { text-decoration: none; }
a.rain:hover { filter: brightness(.97); }

/* Holiday pets sit in the same kind of card grid as the ideas. */
.petlist { margin-top: 2px; }

/* ---------- v0.16 ---------- */
/* A day with entries: a tinted box of the same size behind the number (the
   number's own box, so every marked day is alike), not the whole cell. */
.cal .d.has .n { background: color-mix(in oklab, var(--accent) 22%, var(--surface)); box-shadow: none; border-radius: 8px; font-weight: 700; }
.cal .d.has:hover .n { background: color-mix(in oklab, var(--accent) 32%, var(--surface)); }
.cal .ym .d.has .n { border-radius: 6px; box-shadow: none; }
.cal .d.off.has .n { box-shadow: inset 0 0 0 1.5px var(--ok); }
.cal .d.today.has .n { background: var(--accent); color: var(--accent-ink); font-weight: 800; box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 35%, transparent); }
/* Days gone by keep the mark, much fainter. */
.cal .d.has.past .n { background: color-mix(in oklab, var(--accent) 9%, var(--surface)); color: var(--muted); font-weight: 500; }
.cal .d.has.past:hover .n { background: color-mix(in oklab, var(--accent) 16%, var(--surface)); }
/* The dot under the number is a countdown day now (his or hers). */
.cal .d.cd::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--surface); pointer-events: none; }
.cal .ym .d.cd::after { bottom: 0; width: 4px; height: 4px; margin-left: -2px; box-shadow: 0 0 0 1px var(--surface); }
.tip .tt-cd { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.tip .tt-cd .i { width: 13px; height: 13px; }

/* The board's last change: who, then when under it. */
.bstate { align-items: flex-start; }
.bstate .i { margin-top: 2px; }
.bstate .bl { display: flex; flex-direction: column; min-width: 0; }
.bstate .bl > * { overflow: hidden; text-overflow: ellipsis; }
#draw-state .who, #draw-state .when { display: block; }
.who { font-weight: 600; }
.when { color: var(--muted); font-size: .8rem; }

/* The link editor: the preview with Cancel and Save right under it. On a wide
   screen the pair is sticky, so both stay in view over the long icon list. */
.linkedit .side { display: flex; flex-direction: column; gap: 12px; }
.linkedit .preview { position: static; }
.linkedit .linkbar { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .linkedit .side { position: sticky; top: 74px; } }
@media (max-width: 760px) {
  .linkedit .side { order: -1; max-width: 260px; }
  .linkedit .preview { order: 0; max-width: none; }
}

/* holiday pets: the Try button on each card and the "not built yet" marks (v0.18) */
.petideas .petsee { margin-top: 6px; justify-self: start; grid-column: 2; }
.petideas .petsee span { display: inline; grid-template-columns: none; padding: 0; border: 0; background: none; height: auto; cursor: pointer; box-shadow: none; }
.petideas i.soon { font-weight: 400; font-style: normal; color: var(--muted); font-size: .78rem; }

/* countdown queue (Leo, 2026-10-21): "Next: …" under mine, and the queue list in its sheet */
.cdq { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: -2px; }
.cdq small { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdq small em { font-style: normal; font-weight: 600; color: var(--accent); }
.cdlist { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cdlist li { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.cdlist .cdl-t { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cdlist .cdl-t .i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.cdlist .cdl-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cdlist .cdl-t small { color: var(--muted); font-size: .8rem; }

/* ---------- v0.2.x: the calendar is a page of its own (Leo, 2026-10-24) ---------- */
/* The month sticks under the top bar, the day's list scrolls below it, and the
   add bar sticks to the bottom. Compact cells and type so the list gets room. */
.calpage { display: flex; flex-direction: column; max-width: 560px; }
.calpage .calbox, .calpage .dayagenda { max-width: none; margin: 0; }
.calstick { position: sticky; top: var(--tophh, 62px); z-index: 20; background: var(--bg); padding: 8px 0; }
.calstick.yearly { position: static; }
.calstick .box { margin: 0; }
.calpage .calbox > .cap { min-height: 40px; padding: 3px 6px 3px 12px; gap: 4px; }
.calpage .calbox .caltitle { font-size: 1.05rem; }
.calpage .calbox > .cap .ib { width: 34px; height: 34px; }
.calpage .calbox > .body { padding: 4px 8px 8px; gap: 0; }
.calpage .cal .wk span { padding: 2px 0 3px; font-size: .66rem; }
.calpage .cal.full .days { gap: 1px; }
.calpage .cal.full .d { min-height: 0; padding: 1px 0; }
.calpage .cal.full .d .n { width: 100%; max-width: 36px; height: 30px; font-size: .85rem; }
.calpage .cal.full.yearly .d .n { height: auto; font-size: .7rem; }
.calpage .cal.full .d.cd::after { bottom: 1px; width: 5px; height: 5px; margin-left: -2.5px; }
/* The picked day is only a border: no fill. */
.calpage .cal .d.sel { outline: 2px solid var(--ink); outline-offset: -1px; border-radius: 6px; }
.calpage .dayagenda { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.daytitle { font: 700 1rem var(--sans); margin: 0 2px; }
.dayrows li > button { align-items: center; gap: 10px; padding: 6px 10px 6px 8px; }
.dayrows .dtime { flex: none; width: 3.4rem; font-size: .8rem; line-height: 1.15; color: var(--muted); font-variant-numeric: tabular-nums; }
.dayrows .bar { align-self: stretch; height: auto; min-height: 30px; }
.dayrows strong { white-space: normal; overflow-wrap: anywhere; }
.dayrows .enotes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dayrows li.tmp { opacity: .55; }
.eicon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 3px;
  background: color-mix(in oklab, var(--tone) 16%, var(--surface)); }
.eicon .i { width: 22px; height: 22px; color: var(--tone); }
.eicon.none { background: none; }
.calopts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.addbar { position: sticky; bottom: 0; z-index: 30; margin: 8px calc(-1 * clamp(14px, 4vw, 32px)) 0;
  padding: 10px clamp(14px, 4vw, 32px) calc(10px + env(safe-area-inset-bottom)); background: var(--bg);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -12px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 8px; }
.addrow { display: flex; gap: 8px; }
.addrow .in { flex: 1; min-width: 0; }
.addrow .plus { flex: none; width: 46px; min-height: 44px; padding: 0; justify-content: center; }
.addrow .plus .i { width: 22px; height: 22px; }
/* On the event sheet the icon is a button that unfolds the pool. */
.evicon-row { display: flex; align-items: center; gap: 6px; }
.evicon .cur { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.evicon .cur .i { width: 20px; height: 20px; color: var(--accent); }
#ev-icons { margin-top: 6px; }
#ev-icons .iconpool { max-height: 260px; overflow: auto; }
#ev-icons .igroup { flex: none; }

/* Coming up: the entry's icon sits to the right of the date, as tall as it (Leo, 2026-10-24). */
.agenda .dbadge + .eicon { width: 44px; height: 44px; border-radius: 3px; }
.agenda .dbadge + .eicon .i { width: 26px; height: 26px; }

/* The save row of a sheet stays at the bottom while the rest scrolls (Leo, 2026-10-24). */
.sheet .body > .row:last-child:not(.start) {
  position: sticky; bottom: 0; z-index: 3; background: var(--surface);
  margin: 0 -16px -16px; padding: 12px 16px; border-top: 1px solid var(--line);
}

/* Wide screens: the message from the other person and mine side by side. */
@media (min-width: 900px) {
  .msgs { flex-direction: row; align-items: stretch; }
  .msgs > .message { flex: 1 1 0; width: auto; min-width: 0; }
}

/* the admin's PHP version in the footer, red when it lacks the October 2026 fixes */
.foot .phpv.bad { color: var(--err); font-weight: 700; }
