/* Booked Together on the web: a cozy library at night. Espresso and forest, warm gold glows, cream type.
   The same palette, type and shapes as the iPhone (ios/BookClub/Views/Theme.swift) and Android apps. */

@font-face { font-family: "Playfair Display"; src: url(/fonts/PlayfairDisplay_400Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(/fonts/PlayfairDisplay_600SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(/fonts/PlayfairDisplay_700Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter_400Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter_500Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter_600SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter_700Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --espresso: #1b120d; --espresso-light: #2a1d15; --forest: #234033; --forest-light: #2f5444;
  --gold: #d5a653; --gold-light: #f0cb7e; --cream: #f7e9d3; --sage: #8fa580; --ember: #e07a4f;
  --ink: var(--cream); --ink-soft: rgba(247, 233, 211, .68); --ink-faint: rgba(247, 233, 211, .45);
  --surface: rgba(43, 30, 22, .86); --raised: rgba(58, 42, 30, .9); --line: rgba(213, 166, 83, .22);
  --gold-grad: linear-gradient(var(--gold-light), var(--gold));
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: Inter, -apple-system, system-ui, "Segoe UI", sans-serif;
  --nav-h: 84px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--espresso); }
body { margin: 0; min-height: 100dvh; font: 15px/1.45 var(--body); color: var(--ink); background: var(--espresso); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .45; }
a { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* The library behind every screen: drawn shelves, a lamp's glow and a vignette. */
#backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--espresso); }
#backdrop canvas { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); filter: blur(2.5px); opacity: .75; }
#backdrop .glow { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 18%) var(--gy, 12%), rgba(213, 166, 83, .38), rgba(213, 166, 83, .08) 360px, transparent 520px); mix-blend-mode: screen; transition: background .6s; }
#backdrop .fade { position: absolute; inset: 0; background: linear-gradient(transparent 25%, rgba(27, 18, 13, .65) 60%, var(--espresso)); }

/* Layout: one column on phones with the bubble bar at the bottom; a rail on the left on wide screens. */
#app { min-height: 100dvh; }
main { max-width: 640px; margin: 0 auto; padding: 0 18px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
main.wide { max-width: 760px; }
.top { display: flex; align-items: center; gap: 8px; min-height: 56px; padding-top: env(safe-area-inset-top); }
.top h1 { flex: 1; margin: 0; font: 600 22px/1.2 var(--display); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .icon-btn { width: 44px; height: 44px; }
.page-title { font: 700 32px/1.15 var(--display); margin: 10px 0 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--gold); }
.icon-btn:hover { background: rgba(213, 166, 83, .1); }
.icon-btn svg.i { width: 21px; height: 21px; }

nav.bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; gap: 4px;
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(27, 18, 13, .92) 22%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(213, 166, 83, .14); }
nav.bar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 68px; text-decoration: none; color: var(--ink-soft); font-size: 11px; font-weight: 500; }
nav.bar a .b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line); transition: all .25s; }
nav.bar a .b svg { width: 20px; height: 20px; }
nav.bar a.on { color: var(--gold-light); }
nav.bar a.on .b { width: 48px; height: 48px; margin-top: -6px; color: var(--espresso); background: var(--gold-grad); border-color: var(--gold-light); box-shadow: 0 0 18px rgba(213, 166, 83, .65); }
nav.bar a .dot { position: absolute; top: -2px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); }
@media (min-width: 980px) {
  :root { --nav-h: 0px; }
  nav.bar { top: 0; right: auto; width: 112px; flex-direction: column; justify-content: center; gap: 22px; padding: 24px 0; border-top: 0; border-right: 1px solid rgba(213, 166, 83, .14); background: rgba(27, 18, 13, .7); }
  nav.bar a { width: 100%; font-size: 12px; }
  nav.bar a .b { width: 52px; height: 52px; }
  nav.bar a.on .b { width: 60px; height: 60px; margin: 0; }
  #app { padding-left: 112px; }
  main { padding-bottom: 48px; }
}

/* Logo: Greg's SB monogram, in gold. */
.logo-wrap { display: flex; justify-content: center; filter: drop-shadow(0 0 10px rgba(213, 166, 83, .5)); }
.logo { background: var(--gold-grad); -webkit-mask: url(/img/logo-full.png) center / contain no-repeat; mask: url(/img/logo-full.png) center / contain no-repeat; }
.logo.full { width: 136px; height: 82px; }
.logo.mark { -webkit-mask-image: url(/img/logo-mark.png); mask-image: url(/img/logo-mark.png); width: 26px; height: 40px; }

/* Cards and rows */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.tight { gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.top-align { align-items: flex-start; }
.grow, .row > .grow { flex: 1; min-width: 0; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .3); text-align: left; width: 100%; }
.card.glow { border: 1.5px solid rgba(213, 166, 83, .8); box-shadow: 0 4px 28px rgba(213, 166, 83, .35); }
button.card:hover, a.card:hover { border-color: rgba(213, 166, 83, .7); }
a.card { color: inherit; text-decoration: none; }
.card h2, .h2 { margin: 0; font: 600 20px/1.25 var(--display); }
.h3 { margin: 0; font: 600 17px/1.3 var(--display); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.soft { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.sage { color: var(--sage); }
.goldtxt { color: var(--gold-light); }
.ember { color: var(--ember); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clip4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.one { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
p { margin: 0; }
.spacer { flex: 1; }
.empty { padding: 28px 8px; text-align: center; color: var(--ink-soft); }
.empty svg.i { width: 40px; height: 40px; color: var(--gold); display: block; margin: 0 auto 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; width: 100%; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; transition: transform .12s, box-shadow .2s; }
.btn.gold { color: var(--espresso); background: var(--gold-grad); box-shadow: 0 2px 14px rgba(213, 166, 83, .45); }
.btn.gold:not(:disabled):hover { box-shadow: 0 2px 22px rgba(213, 166, 83, .7); }
.btn.gold:not(:disabled):active { transform: scale(.98); }
.btn.outline { min-height: 46px; font-weight: 500; font-size: 15px; color: var(--cream); background: rgba(58, 42, 30, .7); border: 1px solid rgba(213, 166, 83, .5); }
.btn.outline:not(:disabled):hover { background: var(--raised); }
.btn.text { width: auto; min-height: 40px; padding: 0 8px; color: var(--ink-soft); font-weight: 500; font-size: 14px; }
.btn.text.gold-t { color: var(--gold-light); }
.btn.text.danger { color: var(--ember); }
.btns { display: flex; gap: 10px; }
.btns > * { flex: 1; }
.linkish { color: var(--gold-light); font-weight: 600; font-size: 14px; }

/* Chips and segments */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--ink-soft); background: rgba(58, 42, 30, .7); border: 1px solid var(--line); transition: all .15s; }
.chip.on { --tint: var(--gold); color: var(--cream); font-weight: 600; background: color-mix(in srgb, var(--tint) 22%, transparent); border: 1.5px solid var(--tint); box-shadow: 0 0 8px color-mix(in srgb, var(--tint) 35%, transparent); }
.chip.on svg { color: var(--tint); }
.chip.sage { --tint: var(--sage); }
.chip.ember { --tint: var(--ember); }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 34px; border-radius: 999px; font-size: 14px; color: var(--ink-soft); }
.seg button.on { background: var(--gold); color: var(--espresso); font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 500; background: var(--forest); border: 1px solid var(--line); }
.tag.flag { background: rgba(224, 122, 79, .35); }
.tag.goldbg { background: rgba(213, 166, 83, .35); }
.tag.solid { height: 24px; padding: 0 10px; color: var(--espresso); background: var(--gold); font-weight: 700; font-size: 12px; border: 0; }
.tag.sagebg { color: var(--espresso); background: var(--sage); font-weight: 700; border: 0; }

/* Fields */
.field { width: 100%; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--cream); font-size: 16px; outline: none; }
.field::placeholder { color: var(--ink-faint); }
.field:focus { border-color: rgba(213, 166, 83, .7); box-shadow: 0 0 0 3px rgba(213, 166, 83, .15); }
textarea.field { resize: vertical; min-height: 110px; line-height: 1.45; }
input[type=date].field, input[type=time].field { color-scheme: dark; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: 15px; cursor: pointer; }
.toggle span { flex: 1; }
.toggle input { appearance: none; position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: rgba(247, 233, 211, .18); transition: background .2s; cursor: pointer; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--cream); transition: transform .2s; }
.toggle input:checked { background: var(--gold); }
.toggle input:checked::after { transform: translateX(20px); }
.stepper { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.stepper span { flex: 1; }
.stepper button { width: 38px; height: 34px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); color: var(--gold-light); font-size: 20px; line-height: 1; }
input[type=range] { width: 100%; accent-color: var(--gold); }

/* Progress and stars */
.bar-track { position: relative; flex: 1; height: 6px; border-radius: 999px; background: rgba(247, 233, 211, .12); overflow: hidden; }
.bar-track i { position: absolute; inset: 0 auto 0 0; min-width: 4px; border-radius: 999px; background: var(--sage); }
.bar-track.gold i { background: var(--gold); }
.bar-track.ember i { background: var(--ember); }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 13px; height: 13px; }
.star-pick { display: flex; gap: 6px; }
.star-pick button { color: var(--gold); }
.star-pick svg { width: 28px; height: 28px; }
.star-pick button.on svg { filter: drop-shadow(0 0 6px rgba(213, 166, 83, .5)); }

/* Covers: the Open Library picture over a made-up cloth cover in the book's colour. */
.cover { position: relative; overflow: hidden; display: grid; place-items: center; text-align: center; color: var(--gold-light); background: linear-gradient(135deg, var(--c1), var(--c2)); flex: none; }
.cover::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(213, 166, 83, .45); border-radius: 3px; }
.cover .ct { position: relative; padding: 14px; font: 700 17px/1.2 var(--display); overflow-wrap: anywhere; }
.cover .ca { display: block; margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(213, 166, 83, .6); font: 500 9px/1.3 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.cover img.ok { opacity: 1; }
.cover.compact::before { inset: 4px; }
.cover.compact .ct { padding: 5px; font-size: 9px; line-height: 1.15; }
.cover.compact .ca { display: none; }
.thumb { border-radius: 5px; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.big-cover { width: 160px; height: 240px; border-radius: 8px; border: 1px solid rgba(213, 166, 83, .6); box-shadow: 0 0 34px rgba(213, 166, 83, .45); margin: 8px auto 0; }
.circle-cover { border-radius: 50%; border: 1.5px solid rgba(213, 166, 83, .7); box-shadow: 0 0 10px rgba(213, 166, 83, .2); }
.circle-cover::before { display: none; }
.circle-cover::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, .18), transparent 50%); pointer-events: none; }
.circle-cover.lit { border: 3px solid var(--gold-light); box-shadow: 0 0 26px rgba(213, 166, 83, .6); }

/* Book rows */
.book-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; color: inherit; text-decoration: none; }
button.book-row:hover, a.book-row:hover { border-color: rgba(213, 166, 83, .6); }
.book-row .t { font: 600 17px/1.25 var(--display); }
.book-row .grow { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }

/* Home: the bubble carousel */
.bubbles { position: relative; height: 300px; margin: 6px 0 4px; touch-action: pan-y; user-select: none; }
.bubble { position: absolute; display: grid; place-items: center; align-content: center; gap: 6px; border-radius: 50%; text-align: center; transform: translate(-50%, -50%); transition: all .45s cubic-bezier(.3, 1.3, .5, 1); color: var(--cream); }
.bubble::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, .22), transparent 50%); pointer-events: none; }
.bubble b { font: 700 1em/1.05 var(--display); white-space: pre-line; }
.bubble svg { width: 1.4em; height: 1.4em; }
.bubble.hero { background: linear-gradient(#2f5444, #16291f); border: 3px solid rgba(240, 203, 126, .9); box-shadow: 0 0 34px rgba(213, 166, 83, .65); }
.bubble.forest { background: linear-gradient(#3c6b50, var(--forest)); border: 1.5px solid rgba(240, 203, 126, .6); box-shadow: 0 0 18px rgba(213, 166, 83, .35); }
.bubble.goldb { color: var(--espresso); background: linear-gradient(var(--gold-light), #b8873a); border: 1.5px solid rgba(240, 203, 126, .6); box-shadow: 0 0 18px rgba(213, 166, 83, .35); }
.bubble:active { transform: translate(-50%, -50%) scale(.95); }

.picker-card { flex-direction: row; align-items: center; gap: 14px; }
.picker-card .ico { display: grid; place-items: center; width: 52px; color: var(--gold-light); }
.picker-card .ico svg { width: 30px; height: 30px; }
.picker-card h2 { font-size: 21px; }

/* Option rows (the steps of the Reader's Prompt and Help Me Pick) */
.opt { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; transition: all .15s; }
.opt .oi { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--gold); background: rgba(35, 64, 51, .7); }
.opt .oi svg { width: 22px; height: 22px; }
.opt .ot { font-weight: 600; font-size: 16px; }
.opt .od { font-size: 13px; color: var(--ink-soft); }
.opt .ock { color: var(--ink-faint); }
.opt .ock svg { width: 22px; height: 22px; }
.opt.on { background: rgba(213, 166, 83, .12); border: 1.5px solid var(--gold); box-shadow: 0 0 12px rgba(213, 166, 83, .3); }
.opt.on .ock { color: var(--gold); }
.hub-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; width: 100%; text-align: left; }
.hub-row:hover { border-color: rgba(213, 166, 83, .6); }
.hub-row .oi { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; color: var(--gold); background: rgba(35, 64, 51, .7); }
.hub-row .t { font-weight: 600; font-size: 16px; }
.hub-row .d { font-size: 13px; color: var(--ink-soft); }
.hub-row .chev { color: var(--ink-faint); }
.hub-row.lit { background: rgba(213, 166, 83, .12); border-color: var(--gold); box-shadow: 0 0 12px rgba(213, 166, 83, .35); }
.hub-row.lit .chev { color: var(--gold); }
.avatar { display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--espresso); background: var(--gold-grad); font: 700 18px var(--display); }

/* Steps */
.flow { display: flex; flex-direction: column; min-height: 100dvh; max-width: 640px; margin: 0 auto; padding: 0 18px; }
.flow-head { padding: env(safe-area-inset-top) 0 10px; text-align: center; }
.flow-head .top { padding-top: 0; }
.flow-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; }
.flow-foot { position: sticky; bottom: 0; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(27, 18, 13, .95) 30%); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.dots span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--ink-faint); background: var(--surface); border: 1px solid var(--line); }
.dots span.done { color: var(--gold); border-color: rgba(213, 166, 83, .7); }
.dots span.on { color: var(--espresso); background: var(--gold); border-color: var(--gold); }
@media (min-width: 980px) { .flow { margin-left: calc(50% - 320px - 56px); } }

/* The circle carousel */
.carousel { position: relative; }
.carousel .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 16px 0; }
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .slot { flex: none; display: grid; place-items: center; scroll-snap-align: center; transition: transform .3s, opacity .3s; transform: scale(.66); opacity: .7; }
.carousel .slot.on { transform: scale(1); opacity: 1; }
.carousel .pad { flex: none; }
.carousel .ctl { display: flex; justify-content: center; align-items: center; gap: 14px; color: var(--gold); }
.carousel .ctl .pips { display: flex; gap: 6px; }
.carousel .ctl .pips i { width: 7px; height: 7px; border-radius: 50%; background: rgba(247, 233, 211, .25); }
.carousel .ctl .pips i.on { background: var(--gold); }
.shelf-carousel h2 { margin: 0; font: 600 21px var(--display); }
.shelf-carousel .track { display: flex; gap: 18px; overflow-x: auto; padding: 14px 4px; scrollbar-width: none; }
.shelf-carousel .track::-webkit-scrollbar { display: none; }
.shelf-carousel .item { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--cream); }

/* Sheets, dialogs and the toast */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(10, 6, 4, .6); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 620px; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: var(--espresso); border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: up .25s cubic-bezier(.2, .9, .3, 1); overflow: hidden; }
.sheet::before { content: ""; position: absolute; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(213, 166, 83, .12); background: radial-gradient(circle at 50% 0, rgba(213, 166, 83, .2), transparent 70%); }
.sheet-head h2 { flex: 1; margin: 0; text-align: center; font: 600 18px var(--display); }
.sheet-head .btn.text { min-width: 70px; }
.sheet-body { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); max-height: 86dvh; } }
.dialog { width: min(420px, calc(100% - 32px)); margin: auto; padding: 22px; border-radius: 20px; background: var(--espresso-light); border: 1px solid rgba(213, 166, 83, .5); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 12px; text-align: center; animation: pop .2s; }
.scrim.center { align-items: center; }
#toast { position: fixed; z-index: 80; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 14px; background: var(--raised); border: 1px solid rgba(213, 166, 83, .5); box-shadow: 0 4px 20px rgba(0, 0, 0, .5); font-weight: 500; animation: drop .25s; cursor: pointer; }
.spinner { width: 34px; height: 34px; margin: 30px auto; border-radius: 50%; border: 3px solid rgba(213, 166, 83, .2); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
@keyframes drop { from { transform: translate(-50%, -12px); opacity: 0; } }
.view-in { animation: viewin .25s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Posts and spoilers */
.post { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; text-align: left; width: 100%; }
.post.pinned { border-color: rgba(213, 166, 83, .6); }
.blurred { filter: blur(7px); user-select: none; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; color: var(--ink-soft); }
.meta svg { width: 14px; height: 14px; }
.topic { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.topic.planned { border-color: rgba(213, 166, 83, .6); }
.vote-up { display: flex; flex-direction: column; align-items: center; width: 36px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.vote-up.on { color: var(--gold); }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--espresso-light); border: 1px solid rgba(213, 166, 83, .4); box-shadow: 0 8px 26px rgba(0, 0, 0, .55); display: flex; flex-direction: column; }
.menu-list button { text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.menu-list button:hover { background: rgba(213, 166, 83, .12); }
.menu-list button.danger { color: var(--ember); }

.stat { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stat b { font: 700 24px var(--display); color: var(--gold-light); }
.stat span { font-size: 12px; color: var(--ink-soft); }
.hero-avatar { width: 110px; height: 110px; margin: 12px auto 0; font-size: 38px; box-shadow: 0 0 0 6px var(--espresso), 0 0 0 8px var(--gold-light), 0 0 30px rgba(213, 166, 83, .6); }
.notice { padding: 14px; border-radius: 14px; background: rgba(224, 122, 79, .12); border: 1px solid rgba(224, 122, 79, .5); font-size: 14px; }
.join-hero { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 460px; margin: 0 auto; padding: 32px 22px; text-align: center; }

/* -- /about: the showcase (views/landing.js) -- */
.landing { --accent: var(--gold); max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 40px; }
.l-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 14px 0; background: linear-gradient(rgba(27, 18, 13, .95), rgba(27, 18, 13, .75)); backdrop-filter: blur(10px); }
.l-brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font: 700 20px var(--display); }
.l-brand .logo.mark { width: 22px; height: 34px; }
.l-links { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.l-links > button:not(.btn) { color: var(--ink-soft); font-weight: 500; }
.l-links > button:not(.btn):hover { color: var(--gold-light); }
.btn.small { width: auto; min-height: 40px; padding: 0 18px; font-size: 14px; }
.kicker { margin: 0 0 10px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.kicker.center, .lede.center, .l-cta.center { text-align: center; justify-content: center; }
.l-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding: 48px 0 30px; }
.l-hero h1 { margin: 0 0 18px; font: 700 clamp(40px, 6vw, 68px)/1.05 var(--display); }
.l-hero h1 em { font-style: italic; color: var(--gold-light); text-shadow: 0 0 24px rgba(213, 166, 83, .5); }
.lede { margin: 0 0 26px; max-width: 34em; color: var(--ink-soft); font-size: 18px; line-height: 1.55; }
.lede.center { margin-left: auto; margin-right: auto; }
.l-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.l-cta .btn { width: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 13px; }
.pill .i { width: 16px; height: 16px; color: var(--gold); }
.l-hero-visual { display: flex; justify-content: center; }
.l-hero-visual .phone { transform: rotate(3deg); }
.phone { width: min(290px, 70vw); flex: none; border: 9px solid #0d0806; border-radius: 48px; overflow: hidden; background: #0d0806;
  box-shadow: 0 0 0 1px rgba(213, 166, 83, .35), 0 40px 80px -24px rgba(0, 0, 0, .8), 0 0 60px -10px rgba(213, 166, 83, .35); }
.phone img { display: block; width: 100%; height: auto; border-radius: 39px; }
.pair { display: flex; justify-content: center; }
.pair .phone { width: min(250px, 42vw); }
.pair .phone + .phone { margin: 60px 0 0 -50px; }
.l-section { padding: 70px 0 10px; }
.l-h2 { margin: 0 auto 36px; max-width: 18em; text-align: center; font: 700 clamp(28px, 4vw, 44px)/1.15 var(--display); }
.l-h2.left { text-align: left; margin-left: 0; }
.features { display: grid; gap: 28px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 56px; border-radius: 32px; overflow: hidden;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.feature:nth-child(even) .feature-visual { order: -1; }
.feature.acc-gold { --accent: var(--gold); } .feature.acc-forest { --accent: #4f8a68; } .feature.acc-sage { --accent: var(--sage); } .feature.acc-ember { --accent: var(--ember); }
.feature h3 { margin: 0 0 12px; font: 700 clamp(24px, 3vw, 34px)/1.15 var(--display); }
.feature p { margin: 0 0 18px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.6; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent) !important; font-weight: 700; font-size: 14px !important; letter-spacing: .06em; text-transform: uppercase; }
.chip-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 12px; color: var(--accent, var(--gold)); background: color-mix(in srgb, var(--accent, var(--gold)) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent, var(--gold)) 45%, transparent); }
.chip-ic .i { width: 20px; height: 20px; }
.feature-visual { display: flex; justify-content: center; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .i { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent, var(--gold)); }
.little { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.little-card { padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.little-card h4, .steps h4 { margin: 14px 0 6px; font: 600 19px var(--display); }
.little-card p, .steps p { margin: 0; color: var(--ink-soft); }
.l-how { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { display: flex; gap: 16px; }
.steps h4 { margin-top: 4px; }
.steps .num { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--espresso); background: var(--gold-grad); font: 700 20px var(--display); box-shadow: 0 0 18px rgba(213, 166, 83, .5); }
.l-privacy { margin-top: 60px; padding: 50px clamp(20px, 5vw, 60px); border-radius: 32px; background: linear-gradient(135deg, rgba(35, 64, 51, .9), rgba(27, 18, 13, .9)); border: 1px solid rgba(143, 165, 128, .4); --accent: var(--sage); }
.l-privacy .l-h2 { margin-bottom: 26px; }
.l-privacy .ticks { grid-template-columns: 1fr 1fr; gap: 16px 30px; font-size: 16px; }
.l-get { text-align: center; padding-bottom: 40px; }
.l-get .l-h2 { margin-bottom: 14px; }
.l-foot { padding: 30px 0 10px; border-top: 1px solid var(--line); text-align: center; color: var(--ink-faint); font-size: 13px; }
.l-foot a { color: var(--ink-soft); }
.l-policy { max-width: 720px; margin: 0 auto; padding: 48px 0 40px; }
.l-policy h1 { margin: 0 0 18px; font: 700 clamp(32px, 5vw, 48px)/1.1 var(--display); }
.l-policy section { padding: 18px 0; border-top: 1px solid var(--line); }
.l-policy h2 { margin: 0 0 8px; font: 600 21px var(--display); color: var(--gold-light); }
.l-policy section p { margin: 0; color: var(--ink-soft); font-size: 16.5px; line-height: 1.65; }
.l-policy a { color: var(--gold-light); }
.l-updated { margin: 24px 0 0; color: var(--ink-faint); font-size: 14px; }
@media (max-width: 900px) {
  .l-hero, .feature, .l-how { grid-template-columns: 1fr; }
  .l-hero { padding-top: 24px; text-align: left; }
  .feature { padding: 30px 22px; gap: 30px; }
  .feature:nth-child(even) .feature-visual { order: 0; }
  .little { grid-template-columns: 1fr 1fr; }
  .l-privacy .ticks { grid-template-columns: 1fr; }
  .l-links > button:not(.btn) { display: none; }
}
@media (max-width: 560px) { .little { grid-template-columns: 1fr; } .pair .phone { width: 46vw; } .pair .phone + .phone { margin-left: -12vw; } }
@media (min-width: 980px) { #app:has(> .landing) { padding-left: 0; } }

/* -- Linking devices (views/sync.js) -- */
.qr { align-self: center; width: min(240px, 70vw); padding: 10px; border-radius: 18px; background: #fff; box-shadow: 0 0 24px rgba(213, 166, 83, .45); }
.qr svg { display: block; width: 100%; height: auto; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
