/* The look from design/: dark green ground, one amber accent, paper cards for
   quoted passages. Montserrat carries the interface and the reader's own
   words; Newsreader carries book titles, quotes and questions. */
:root {
  --ground: #0D1210;
  --ground-top: #19221D;
  --card: #151C18;
  --bar: #1A221E;
  --ink: #F0ECE3;
  --ink-soft: #D5DAD4;
  --muted: #A9B2AB;
  --line: rgba(238, 235, 227, 0.09);
  --line-strong: rgba(238, 235, 227, 0.18);
  --accent: #E3A94F;
  --accent-soft: rgba(227, 169, 79, 0.14);
  --accent-line: rgba(227, 169, 79, 0.45);
  --accent-glow: rgba(227, 169, 79, 0.55);
  --on-accent: #17120A;
  --paper-ink: #1B1F1C;
  --danger: #E58C7A;
  --ui: Montserrat, system-ui, sans-serif;
  --book: Newsreader, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
a, button { transition: transform .15s ease-out; -webkit-tap-highlight-color: transparent; }
a:active, button:active { transform: scale(.97); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  a, button { transition: none; }
  a:active, button:active { transform: none; }
  .spinner { animation: none; }
}

/* One phone-width column, full height, like the mock screens. */
.screen {
  max-width: 480px;
  min-height: 100dvh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: radial-gradient(130% 55% at 50% 0%, var(--ground-top) 0%, var(--ground) 62%);
}
.scroll {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 20px 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.loading { margin: auto; color: var(--muted); font-size: 14px; }

.serif { font-family: var(--book); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.45; }
.section { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }

/* Buttons */
.btn {
  min-height: 48px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: rgba(238, 235, 227, 0.04);
  color: var(--ink); font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; white-space: nowrap;
}
.btn.primary {
  background: var(--accent); color: var(--on-accent); border-color: transparent;
  font-weight: 700; box-shadow: 0 10px 22px -12px var(--accent-glow);
}
.btn.small-btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.quiet { border-color: transparent; background: none; color: var(--muted); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.link-btn {
  min-height: 44px; padding: 0 4px; background: none; border: none;
  font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.link-btn.danger { color: var(--danger); }
.link-btn.plain { color: var(--muted); }

/* Fields. 16px so phones don't zoom in when you tap one. */
.field {
  width: 100%; border-radius: 16px; border: 1px solid var(--line-strong);
  background: var(--card); color: var(--ink);
  padding: 12px 16px; font-size: 16px; line-height: 1.5;
}
input.field { height: 48px; padding: 0 16px; }
textarea.field { resize: none; min-height: 96px; display: block; }
.field::placeholder { color: #7F8A83; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 16px 30px -22px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.card.pad { padding: 16px; }
.card.accent { border-color: var(--accent-line); }
.paper {
  background: linear-gradient(180deg, #F5EFE2 0%, #EAE3D2 100%); color: var(--paper-ink);
  border-radius: 18px; padding: 16px 20px;
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  display: flex; flex-direction: column; gap: 8px;
}
.paper .quote { font-family: var(--book); font-size: 18px; line-height: 1.38; text-wrap: pretty; white-space: pre-line; }
.paper .rule { height: 1px; background: rgba(27, 31, 28, 0.14); }
.paper .take { font-size: 14px; line-height: 1.5; color: #2E3530; white-space: pre-line; }
.paper .meta { font-size: 12px; font-weight: 600; color: #5B635D; }
.paper textarea {
  width: 100%; border: 1px dashed rgba(27, 31, 28, 0.4); border-radius: 10px; background: rgba(255, 255, 255, 0.35);
  color: var(--paper-ink); font-family: var(--book); font-size: 18px; line-height: 1.38; padding: 8px 10px; resize: none; min-height: 120px;
}
a.paper { text-decoration: none; }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.45; color: var(--ink);
}
.notice svg { flex-shrink: 0; margin-top: 1px; color: var(--accent); }
.error { color: var(--danger); font-size: 13px; line-height: 1.45; }

/* Top bars */
.topbar { display: flex; align-items: center; gap: 8px; padding: 14px 12px 8px; flex-shrink: 0; }
.topbar .title { font-family: var(--book); font-size: 22px; font-weight: 500; line-height: 1.15; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; border: none; background: none; color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0;
}

/* Sign in */
.signin { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 32px 24px; }
.signin h1 { font-family: var(--book); font-weight: 500; font-size: 32px; line-height: 1.12; margin: 0; text-wrap: balance; }
.signin p { margin: 0; color: var(--ink-soft); }
.signin form { display: flex; flex-direction: column; gap: 12px; }

/* Notebook */
.who { display: flex; align-items: center; gap: 16px; padding: 24px 20px 16px; flex-shrink: 0; }
.avatar {
  width: 56px; height: 56px; border-radius: 28px; background: #26302B; border: 1px solid rgba(238, 235, 227, 0.16);
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.who .name { font-family: var(--book); font-size: 28px; font-weight: 500; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .sub { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 20px 20px; padding: 12px 0; flex-shrink: 0; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .n { font-family: var(--book); font-size: 28px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; font-weight: 600; color: var(--muted); }

.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.spine {
  height: 116px; border-radius: 3px 7px 7px 3px; border: none; text-align: left;
  box-shadow: inset 4px 0 0 rgba(0, 0, 0, 0.22), inset 5px 0 0 rgba(255, 255, 255, 0.07), 0 12px 18px -10px rgba(0, 0, 0, 0.85);
  color: var(--ink); padding: 8px 6px 8px 12px;
  display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; overflow: hidden;
}
.spine .status { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.spine .status.reading { font-weight: 700; color: var(--accent); }
.spine .t { font-family: var(--book); font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.spine.mini { width: 32px; height: 44px; border-radius: 2px 5px 5px 2px; padding: 0; flex-shrink: 0;
  box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.22), 0 8px 12px -8px rgba(0, 0, 0, 0.85); }
.c0 { background: linear-gradient(140deg, #4A5D52 0%, #2C3932 100%); }
.c1 { background: linear-gradient(140deg, #36495E 0%, #222E3C 100%); }
.c2 { background: linear-gradient(140deg, #5E4A36 0%, #3B2E22 100%); }
.c3 { background: linear-gradient(140deg, #513C59 0%, #322538 100%); }
.c4 { background: linear-gradient(140deg, #5E3D3D 0%, #3A2525 100%); }
.c5 { background: linear-gradient(140deg, #3B5B5E 0%, #24393B 100%); }

.list { padding: 0 16px; display: flex; flex-direction: column; }
.list > * { padding: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.list > * + * { border-top: 1px solid var(--line); }
.list .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.list .v { font-size: 16px; font-weight: 600; line-height: 1.35; }
.empty { padding: 20px 16px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; color: var(--ink-soft); }

/* Bottom bar with the raised camera button */
.nav {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  height: 68px; margin: 0 12px calc(12px + env(safe-area-inset-bottom)); padding: 0 8px; flex-shrink: 0;
  border-radius: 24px; background: var(--bar); border: 1px solid rgba(238, 235, 227, 0.10);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.9);
}
.nav a.tab {
  flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.nav a.tab .mark { width: 16px; height: 3px; border-radius: 2px; background: transparent; }
.nav a.tab[aria-current="page"] { font-weight: 700; color: var(--ink); }
.nav a.tab[aria-current="page"] .mark { background: var(--accent); }
.nav a.cam {
  width: 64px; height: 64px; margin: -28px 4px 0; border-radius: 32px; border: 4px solid var(--ground);
  background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 12px 22px -10px var(--accent-glow);
}

/* Footer with the two main actions on Capture */
.foot {
  display: flex; gap: 12px; padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--ground); flex-shrink: 0;
}
.foot .btn { flex: 1; padding: 0 12px; }
.foot .btn.primary { flex: 1.6; }

/* Capture */
.photo {
  height: 96px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, #2A332E 0%, #171D1A 100%);
  display: flex; align-items: center; justify-content: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.private { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); }
.pick { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.pick .lead { font-family: var(--book); font-size: 24px; line-height: 1.2; text-wrap: balance; }
.bookrow { padding: 8px 8px 8px 12px; display: flex; align-items: center; gap: 12px; border-radius: 16px; }
.bookrow .t { font-family: var(--book); font-size: 18px; font-weight: 500; line-height: 1.2; }
.bookrow .a { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: rgba(238, 235, 227, 0.04); color: var(--ink); font-size: 14px; font-weight: 600; text-align: left;
}
.results { display: flex; flex-direction: column; gap: 8px; }
.result {
  min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(238, 235, 227, 0.04); text-align: left; display: flex; flex-direction: column; gap: 2px;
}
.result .t { font-family: var(--book); font-size: 17px; line-height: 1.2; }
.result .a { font-size: 13px; color: var(--muted); }
.tick { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 12px; padding: 3px 8px 3px 6px; align-self: flex-start; }
.question { font-family: var(--book); font-style: italic; font-size: 18px; line-height: 1.35; text-wrap: pretty; }
.qhead { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 14px; }

/* Capture: the lines the page reader offers */
button.paper { border: 2px solid transparent; text-align: left; width: 100%; font-size: inherit; }
.choice.on { border-color: var(--accent); }
.choice .picked { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #8A5A12; }

/* Screen headers on Home, Books and Dinners */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; flex-shrink: 0; }
.pagehead .h { font-family: var(--book); font-size: 30px; font-weight: 500; line-height: 1.1; }
.brand { font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.pill {
  min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line-strong); background: rgba(238, 235, 227, 0.04);
  color: var(--ink); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.search {
  margin: 0 20px 16px; height: 48px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--card);
  padding: 0 16px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--muted);
}
.search input { flex: 1; min-width: 0; height: 44px; border: none; background: none; color: var(--ink); font-size: 16px; padding: 0; outline: none; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.strong { font-weight: 700; }
.soft { color: var(--ink-soft); font-size: 14px; line-height: 1.45; }
.when { font-size: 12px; font-weight: 600; color: var(--muted); }
.when.hot { color: var(--accent); }
.when.strong { color: var(--ink); }
.wrap { flex-wrap: wrap; }
.wrap > * { flex: 1 1 auto; }

/* Books */
.cover {
  width: 60px; height: 84px; border-radius: 3px 7px 7px 3px; flex-shrink: 0; color: var(--ink);
  box-shadow: inset 4px 0 0 rgba(0, 0, 0, 0.22), inset 5px 0 0 rgba(255, 255, 255, 0.07), 0 12px 18px -10px rgba(0, 0, 0, 0.85);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 8px 6px 8px 11px;
  font-family: var(--book); font-size: 12px; line-height: 1.1; overflow: hidden; overflow-wrap: anywhere;
}
.cover .bar { width: 14px; height: 2px; background: var(--accent); flex-shrink: 0; }
.cover.small { width: 36px; height: 50px; border-radius: 2px 5px 5px 2px; padding: 0;
  box-shadow: inset 3px 0 0 rgba(0, 0, 0, 0.22), 0 8px 12px -8px rgba(0, 0, 0, 0.85); }
.bookline { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.bookline > svg { color: var(--muted); flex-shrink: 0; }
.bookline .t { font-family: var(--book); font-size: 18px; font-weight: 500; line-height: 1.2; }
.bookline .t.big { font-size: 24px; line-height: 1.15; }
.bookline .a { font-size: 13px; color: var(--muted); }
.bookline .grow { display: flex; flex-direction: column; gap: 2px; }
a.card.bookline { gap: 16px; }
.list.rows > * { flex-direction: row; align-items: center; min-height: 52px; }
.new { font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 2px 8px; }
.dashed { display: flex; align-items: center; gap: 12px; border: 1px dashed rgba(238, 235, 227, 0.24); border-radius: 20px; padding: 12px 16px; }
.dashed .grow { display: flex; flex-direction: column; gap: 2px; }
.round {
  width: 48px; height: 48px; border-radius: 24px; border: none; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0;
  box-shadow: 0 10px 22px -12px var(--accent-glow);
}
.round.small { width: 44px; height: 44px; border-radius: 22px; }
.round:disabled { opacity: .55; }

/* Threads */
.tabs { display: flex; gap: 4px; margin: 4px 20px 12px; padding: 4px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); flex-shrink: 0; }
.tabs button { flex: 1; min-height: 44px; border-radius: 22px; border: none; background: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.tabs button[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--ink); }
.tabs button:disabled { opacity: .45; }
.paper .mark { font-family: var(--book); font-size: 48px; line-height: 28px; height: 18px; color: #B9822B; }
.inkbtn { min-height: 44px; padding: 0 16px; border-radius: 14px; background: var(--paper-ink); color: #F5EFE2; display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; flex-shrink: 0; }
.face {
  border-radius: 50%; border: 1px solid rgba(238, 235, 227, 0.16); color: var(--ink); background: #26302B;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; text-decoration: none;
}
.faces { display: flex; }
.faces .face { border: 2px solid var(--card); }
.faces .face + .face { margin-left: -8px; }
.post { display: flex; gap: 12px; }
.post.asked { background: var(--card); border: 1px solid var(--accent-line); border-radius: 20px; padding: 14px 14px 6px; box-shadow: 0 16px 30px -22px rgba(0, 0, 0, 0.9); }
.post .grow { display: flex; flex-direction: column; gap: 4px; }
.post .by { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post .name { font-size: 14px; font-weight: 700; }
.post .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: rgba(238, 235, 227, 0.08); border-radius: 12px; padding: 3px 8px 3px 6px; }
.post .tag.hot { color: var(--accent); background: var(--accent-soft); }
.post .said { font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.post .question { font-size: 19px; line-height: 1.3; }
.post .snip { font-family: var(--book); font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line-strong); padding-left: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .tools { gap: 16px; flex-wrap: wrap; }
.composer { display: flex; flex-direction: column; gap: 8px; padding: 8px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ground); flex-shrink: 0; }
.composer .field { height: 44px; border-radius: 22px; padding: 0 16px; }
.kinds { display: flex; gap: 6px; }
.kinds button { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line-strong); background: none; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kinds button[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }

/* Dinners */
.cal { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; margin-bottom: 4px; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calgrid.heads span { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
.day { min-height: 36px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.day.today { border-color: rgba(238, 235, 227, 0.4); color: var(--ink); }
button.day.has { border: none; background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: 0 10px 22px -12px var(--accent-glow); }
.day small { font-size: 9px; font-weight: 700; }
.facts { gap: 8px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.fact { display: flex; gap: 10px; align-items: flex-start; }
.fact svg { flex-shrink: 0; margin-top: 1px; color: var(--muted); }
.fact .strong { font-weight: 600; color: var(--ink); }
.tear { padding-top: 12px; border-top: 1px dashed rgba(238, 235, 227, 0.24); align-items: center; }

/* Organiser page and the share card */
.pickrow { min-height: 52px; width: 100%; border: none; background: none; color: var(--ink); text-align: left; display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pickrow .grow { display: flex; flex-direction: column; gap: 2px; }
.pickrow .t { font-family: var(--book); font-size: 18px; line-height: 1.2; }
.pickrow .a { font-size: 13px; color: var(--muted); }
.pickrow[aria-pressed="true"] { color: var(--accent); }
.togglerow { min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.togglerow + .togglerow { border-top: 1px solid var(--line); }
.togglerow input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.sharecard {
  width: 216px; height: 384px; border-radius: 16px; flex-shrink: 0; padding: 22px 20px;
  background: radial-gradient(120% 60% at 50% 0%, #25342C 0%, #111714 72%); border: 1px solid rgba(238, 235, 227, 0.14);
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.95); overflow: hidden;
}
.sharecard .b { font-size: 8px; font-weight: 700; letter-spacing: 0.16em; color: var(--accent); }
.sharecard .mid { display: flex; flex-direction: column; gap: 10px; }
.sharecard .m { font-family: var(--book); font-size: 56px; line-height: 34px; height: 20px; color: var(--accent); }
.sharecard .q { font-family: var(--book); line-height: 1.25; overflow-wrap: anywhere; }
.sharecard .r { width: 28px; height: 2px; background: var(--accent); }
.sharecard .tk { font-size: 11px; font-weight: 700; line-height: 1.35; }
.sharecard .f { display: flex; flex-direction: column; gap: 3px; font-size: 8px; font-weight: 600; color: var(--muted); }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented button {
  min-height: 44px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(238, 235, 227, 0.04);
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
}
.segmented button[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  background: #26302B; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 10px 16px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .2s ease-out, transform .2s ease-out; max-width: calc(100vw - 40px); z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
