:root {
  --bg: #faf4f6;
  --surface: #ffffff;
  --surface-2: #f2e9ef;
  --ink: #241b26;
  --ink-2: #4d4150;
  --muted: #726675;
  --rule: #efe4eb;
  --accent: #7a4a8e;
  --accent-ink: #ffffff;
  --accent-soft: #f1e4f0;
  --warn: #9a5b12;
  --warn-soft: #f7ead6;
  --bad: #a3392b;
  --bad-soft: #f6dcd7;
  --good: #2f7a45;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 30, 60, .06);
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
  /* area colours */
  --a-eyes: #3d74b8; --a-neuro_balance: #7b57b0; --a-headache_migraine: #9b4f96; --a-heart: #c0453a;
  --a-brain_pituitary: #5d5fc4; --a-hormones: #c07a1f; --a-ears_hearing: #1f8a8a; --a-facial_nerve: #b0577d;
  --a-gut_bowel: #8a6a2f; --a-gynae: #c2577a; --a-rheum_joints: #4f7f3a; --a-skin: #b9784e;
  --a-mental_health: #6a7f95; --a-general: #66706c; --a-work_income: #2f6b5b; --a-admin: #9aa19d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171219; --surface: #211a24; --surface-2: #2b222e; --ink: #f1ebf2; --ink-2: #cdc2cf; --muted: #9c8f9f;
    --rule: #352b38; --accent: #c9a2dc; --accent-ink: #1e1424; --accent-soft: #3a2a42; --warn: #e2a85a; --warn-soft: #3a2c17;
    --bad: #f08a7c; --bad-soft: #3d2420; --good: #79c88f; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171219; --surface: #211a24; --surface-2: #2b222e; --ink: #f1ebf2; --ink-2: #cdc2cf; --muted: #9c8f9f;
  --rule: #352b38; --accent: #c9a2dc; --accent-ink: #1e1424; --accent-soft: #3a2a42; --warn: #e2a85a; --warn-soft: #3a2c17;
  --bad: #f08a7c; --bad-soft: #3d2420; --good: #79c88f; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 16px; }
.login-card h1 { font-size: 30px; }
.brand-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 14px 25px; background: var(--accent-ink); border-radius: 3px; box-shadow: -11px 11px 0 -0px transparent; }
.brand-mark::before { content: ""; position: absolute; inset: 25px 14px; background: var(--accent-ink); border-radius: 3px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
input, textarea, select {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.error { color: var(--bad); min-height: 1.5em; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 600; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  border-radius: 12px; min-height: 48px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.big { min-height: 56px; font-size: 17px; width: 100%; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; }
.btn-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.icon-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); border-radius: 12px; cursor: pointer; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  padding: calc(var(--safe-t) + 6px) 8px 6px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.topbar h1 { font-size: 22px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { margin-left: -12px; }
.topbar-status { font-size: 13px; font-weight: 600; color: var(--warn); background: var(--warn-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
main { padding: 8px 16px calc(var(--tabbar-h) + var(--safe-b) + 32px); max-width: 760px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--rule);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tabbar a { display: grid; justify-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; min-height: 56px; align-content: center; }
.tabbar a.on { color: var(--accent); }
.add-fab {
  justify-self: center; width: 60px; height: 60px; border-radius: 20px; border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(122, 74, 142, .35); margin-top: -18px; cursor: pointer;
}
.add-fab svg { width: 30px; height: 30px; stroke-width: 2.4; }

/* ---------- cards + lists ---------- */
.stack { display: grid; gap: 12px; }
.section { display: grid; gap: 10px; margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 0; }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.card.tap { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.card.tap:active { transform: scale(.99); }
.card.soft { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.card.warn { background: var(--warn-soft); border-color: transparent; box-shadow: none; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 12px; }
.kpi b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.list { display: grid; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; color: inherit; text-decoration: none; min-height: 56px; border-top: 1px solid var(--rule); }
.row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-title { font-weight: 600; }
.row-sub { font-size: 14px; color: var(--muted); }
.row-meta { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chev { color: var(--muted); align-self: center; width: 18px; height: 18px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.good { background: var(--accent-soft); color: var(--accent); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--a-general); display: inline-block; }
.prose p + p { margin-top: 12px; }
.prose { color: var(--ink); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); display: grid; gap: 12px; justify-items: center; }

/* ---------- timeline ---------- */
.tl-tools { display: grid; gap: 10px; position: sticky; top: calc(var(--safe-t) + 60px); z-index: 10; background: var(--bg); padding: 4px 0 10px; }
.tl-tools-row { display: flex; gap: 8px; }
.tl-tools-row input { flex: 1; min-width: 0; }
.filter-btn { flex: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; min-height: 40px; padding: 6px 14px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.on .dot { box-shadow: 0 0 0 2px var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-year { font-size: 28px; font-weight: 800; margin: 28px 0 4px; letter-spacing: -.02em; }
.tl-month { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 8px; }
.tl-list { display: grid; gap: 8px; position: relative; padding-left: 18px; }
.tl-list::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); border-radius: 2px; }
.ev { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.ev::before { content: ""; position: absolute; left: -19px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--area, var(--a-general)); border: 2px solid var(--bg); }
.ev.imp3 { border-left: 4px solid var(--area, var(--a-general)); }
.ev.imp1 { opacity: .78; }
.ev-top { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.ev-date { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-kind { font-size: 12px; font-weight: 700; color: var(--area, var(--muted)); text-transform: uppercase; letter-spacing: .04em; }
.ev-title { font-weight: 650; }
.ev-sub { font-size: 14px; color: var(--muted); }
.ev-more { font-size: 13px; color: var(--muted); }
.undated { margin-top: 28px; }

/* ---------- story ---------- */
.area-head { display: flex; gap: 10px; align-items: center; }
.area-head .dot { width: 12px; height: 12px; }
.qa { display: grid; gap: 8px; padding-left: 0; margin: 0; list-style: none; }
.qa li { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }

/* ---------- doc ---------- */
.doc-preview { background: var(--surface-2); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; min-height: 120px; }
.doc-preview img, .doc-preview video { width: 100%; height: auto; display: block; max-height: 70vh; object-fit: contain; }
.kv { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 8px 12px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.bullets { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.tag-flag { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-left: 6px; }
.tag-flag.abnormal { background: var(--bad-soft); color: var(--bad); }
.tag-flag.borderline { background: var(--warn-soft); color: var(--warn); }

/* ---------- work coverage ---------- */
.cover { display: grid; gap: 6px; }
.cover-bar { height: 14px; border-radius: 7px; background: var(--surface-2); position: relative; overflow: hidden; }
.cover-bar i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 7px; }
.cover-bar i.modified { background: var(--warn); }
.cover-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* ---------- sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(10, 14, 12, .4); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(var(--safe-b) + 20px); max-width: 760px; margin: 0 auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
}
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--rule); margin: 4px auto 12px; }
.sheet-body { display: grid; gap: 16px; }
.add-options { display: grid; gap: 10px; }
.add-option { display: flex; gap: 14px; align-items: center; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 14px 16px; min-height: 68px; cursor: pointer; }
.add-option svg { color: var(--accent); flex: none; width: 28px; height: 28px; }
.add-option b { display: block; }
.add-option span { font-size: 14px; color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumb { aspect-ratio: 1; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px; text-align: center; overflow: hidden; }
.switch { display: flex; gap: 12px; align-items: center; justify-content: space-between; font-weight: 600; color: var(--ink); font-size: 16px; min-height: 48px; }
.switch input { width: 28px; height: 28px; min-height: 0; flex: none; accent-color: var(--accent); }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 50; background: var(--ink); color: var(--bg); padding: 14px 16px; border-radius: 14px; font-weight: 600; max-width: 520px; margin: 0 auto; }

/* ---------- wider screens ---------- */
@media (min-width: 900px) {
  main { max-width: 920px; padding-left: 24px; padding-right: 24px; }
  .two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- print (brief for a new doctor) ---------- */
@media print {
  .topbar, .tabbar, .no-print, .sheet, .sheet-backdrop, .toast { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  main { padding: 0; max-width: none; }
  .view { display: none !important; }
  .view.active { display: block !important; }
  .card, .list { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .ev { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* ================= v2: clearer layout ================= */
.topbar.large { padding-top: calc(var(--safe-t) + 14px); padding-bottom: 4px; }
.topbar.large h1 { font-size: 32px; font-weight: 800; letter-spacing: -.025em; }
.section { margin-top: 30px; gap: 12px; }
.section > h2, .section-head h2 { font-size: 21px; font-weight: 750; }
.list { border: 0; box-shadow: var(--shadow); }
.row { min-height: 60px; padding: 14px 16px; align-items: center; }
.row-title { font-size: 16px; }
.row-sub { line-height: 1.4; }
.row .dot { align-self: center; }
.row.as-btn { background: none; border: 0; border-top: 1px solid var(--rule); font: inherit; text-align: left; width: 100%; cursor: pointer; color: inherit; }
.row-date { min-width: 64px; font-weight: 700; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.check-row { cursor: pointer; }
.check-row input { width: 26px; height: 26px; min-height: 0; flex: none; accent-color: var(--accent); }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.link-btn { font: inherit; font-weight: 600; font-size: 15px; color: var(--accent); background: none; border: 0; padding: 8px 0; cursor: pointer; }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 14px; }
.notice { background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
.quiet-note { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--muted); padding: 6px 0; }

/* home */
.today { color: var(--muted); font-size: 15px; margin: -2px 0 14px; }
.lead { display: grid; gap: 10px; background: var(--accent); color: var(--accent-ink); border-radius: 22px; padding: 20px; text-decoration: none; }
.lead .eyebrow { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.lead-text { font-size: 19px; line-height: 1.45; font-weight: 500; }
.lead-link { font-weight: 700; font-size: 15px; }
.lead-link::after { content: " →"; }
.area-lead { font-size: 20px; font-weight: 600; margin-top: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: inherit; display: grid; gap: 3px; align-content: start; min-height: 104px; }
.tile b { font-size: 19px; font-weight: 750; letter-spacing: -.01em; margin-top: 4px; }
.tile span:last-child { font-size: 14px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile.alert b { color: var(--bad); }
.share-prompt { margin-top: 30px; display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.share-prompt div { flex: 1; display: grid; gap: 2px; }
.share-prompt span { font-size: 14px; color: var(--ink-2); }

/* segmented control */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { font: inherit; font-weight: 650; font-size: 15px; border: 0; background: transparent; color: var(--ink-2); border-radius: 9px; min-height: 40px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.view[data-view="timeline"] > .seg { margin: 2px 0 14px; }

/* big picture */
.ms { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 10px; }
.ms::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--rule); }
.ms-year { position: relative; z-index: 1; background: var(--bg); padding: 2px 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 18px 0 2px -22px; }
.ms-year:first-child { margin-top: 0; }
.ms-item { position: relative; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 0; border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 3px; cursor: pointer; }
.ms-item::before { content: ""; position: absolute; left: -22px; top: 19px; width: 14px; height: 14px; border-radius: 50%; background: var(--area); border: 3px solid var(--bg); }
.ms-date { font-size: 13px; font-weight: 700; color: var(--area); }
.ms-title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.ms-why { font-size: 14px; color: var(--muted); line-height: 1.4; }

/* everything */
.tl-tools { position: sticky; top: calc(var(--safe-t) + 60px); z-index: 10; background: var(--bg); padding: 4px 0 10px; display: grid; gap: 10px; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: none; }
details.year { margin-top: 10px; }
details.year > summary { list-style: none; display: flex; align-items: baseline; gap: 10px; cursor: pointer; min-height: 48px; align-items: center; }
details.year > summary::-webkit-details-marker { display: none; }
details.year > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-left: auto; margin-right: 6px; transition: transform .15s; }
details.year[open] > summary::after { transform: rotate(45deg); }
.year-n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.year-c { font-size: 14px; color: var(--muted); font-weight: 600; }
.year-body { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tl-month { font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 0; padding: 14px 16px 6px; background: var(--surface-2); }
.ev { all: unset; box-sizing: border-box; display: flex; gap: 12px; width: 100%; padding: 12px 16px; border-top: 1px solid var(--rule); cursor: pointer; min-height: 56px; align-items: flex-start; }
.ev::before { content: none; }
.year-body .tl-month + .ev, .list > .ev:first-child { border-top: 0; }
.ev-day { width: 26px; flex: none; text-align: right; font-weight: 750; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--ink-2); padding-top: 1px; }
.ev-day.wide { width: 86px; font-size: 13px; text-align: left; padding-top: 3px; }
.ev-main { flex: 1; min-width: 0; display: grid; gap: 2px; border-left: 3px solid var(--area, var(--rule)); padding-left: 12px; }
.ev.key .ev-title { font-weight: 700; }
.ev-title { font-weight: 500; line-height: 1.35; }
.ev-sub { font-size: 13px; color: var(--muted); }

/* summary */
.reading p { font-size: 17px; line-height: 1.6; }
.fold { margin-top: 10px; }
.fold > summary { cursor: pointer; font-weight: 650; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.fold .list { margin-top: 6px; }

/* share */
.share-hero { display: grid; gap: 12px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 20px; }
.share-hero > p:first-child { font-size: 18px; line-height: 1.45; font-weight: 500; }
.share-row { align-items: flex-start; flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; }
.small-btn { min-height: 44px; padding: 6px 14px; font-size: 15px; }
.danger-fill { background: var(--bad); border-color: var(--bad); }
.qr { background: #fff; border-radius: 16px; padding: 12px; width: min(260px, 70vw); margin: 0 auto; }
.qr svg { width: 100%; height: auto; display: block; }
.link-box { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; word-break: break-all; user-select: all; -webkit-user-select: all; }

@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tl-tools { top: calc(var(--safe-t) + 70px); }
}
