/*
  Stoa's stylesheet. One system, written down in docs/BRAND.md.

  Colors and fonts are custom properties from /api/brand.css (generated from brand/brand.json and a
  club's look), so a club that changes its colors gets the whole system in its colors. Everything
  else uses the tokens below. test/styles.test.js fails on raw font sizes, spacing, radii or shadows
  outside this :root block, so the system can't drift again.

  The rules that matter more than any value:
  - Calm and current. Sans (Inter) for everything you read and tap; the serif (Literata) only for
    names: the club, books, gatherings and page titles.
  - Hairlines inside, soft surfaces outside. Lists sit on the page, separated by 1px rules. Things
    you act on sit on a white surface with a soft shadow, never a heavy border.
  - No capitals outside the wordmark, no middle dots. Labels differ by weight, not case or color.
  - Egyptian blue is the one color that acts, and marks where you are. Cinnabar is kept for
    destructive actions.
  - Ochre is for stars only and never carries text.
*/

@font-face {
  font-family: 'Tenor Sans';
  src: url('fonts/tenor-sans.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Marcellus';
  src: url('fonts/marcellus.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
/* Literata as Stoa uses it (sprint-6 speed-app, Juno): weights 400 to 600 and optical sizes 10 to 44 only, 68 KB
   in place of 110. A club's own address keeps the full face (fonts/literata-full.css, src/serif-hold.js). */
@font-face {
  font-family: 'Literata';
  src: url('fonts/literata-text.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Literata';
  src: url('fonts/literata-italic.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
/* Inter's stand-in if it is late (sprint-6 speed-app): Inter is still preloaded, since no stand-in holds dates and digits
   within 2 px (#441), so this is a backstop. Arial (Liberation Sans has the same metrics) or, on Android, Roboto, sized
   to Inter's widths and set on its baseline. Used only through brand.css's MATCHED_FONTS, never on a club's own address. */
@font-face {
  font-family: 'Inter Fallback';
  src:
    local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans'), local('Roboto'), local('Roboto-Regular');
  size-adjust: 107.3%;
  ascent-override: 90.2843%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}
/* Semibold and bold: without this face Chromium fakes bold from Arial Regular, which is wider, and 500-600 text jumped
   4-5 px when Inter landed (Vera, #441). Liberation Sans Bold is sized to Inter 600 (100.9%; Inter 500 is 99.9%).
   Roboto is left out until it is measured, so Android's bold text falls through to system-ui as it does today. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('LiberationSans-Bold');
  font-weight: 500 900;
  size-adjust: 100.9%;
  ascent-override: 96.0109%;
  descent-override: 23.9049%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==== Tokens ===================================================================================== */

:root,
.club-space {
  --tab-bar: 4.25rem; /* the phone tab bar, which pages leave room for */
  color-scheme: light dark;

  /* Colors: fallbacks only. /api/brand.css sets the real values. */
  --color-background: #f7f8fa;
  --color-surface: #ffffff;
  --color-ink: #111a2e;
  --color-ink-soft: #4b5468;
  --color-line: #dce0e7;
  --color-primary: #24429b;
  --color-primary-deep: #1a3180;
  --color-on-primary: #fff;
  --color-accent: #b8321f;
  --color-highlight: #b9831b;
  --color-success: #2f6b50;
  --color-danger: #a3201a;
  --color-brand: var(--color-primary);
  --color-on-brand: var(--color-on-primary);
  --button-hover: color-mix(in oklab, var(--color-brand) 82%, black);
  --font-display: 'Literata', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-mark: 'Literata', Georgia, serif;
  --size-base: 17px;
  --radius: 16px;

  /* Derived colors. */
  --rule: color-mix(in oklab, var(--color-line) 70%, var(--color-background));
  --raised: color-mix(in oklab, var(--color-surface) 60%, white);
  --wash: color-mix(in oklab, var(--color-primary) 6%, var(--color-background));
  --hover: color-mix(in srgb, var(--color-ink) 5%, transparent);
  /* A book on your shelf (S6): the same green as stoareads.com's saved state. */
  --saved: #2c6e5f;
  --panel: var(--color-brand);
  --on-panel: var(--color-on-brand);
  --frieze: var(--color-primary);

  /* Type: eight roles. Sizes follow the viewport between a phone and a laptop. */
  --t-display: clamp(2.5rem, 1.9rem + 2.6vw, 3.75rem);
  --t-title: clamp(2rem, 1.7rem + 1.3vw, 2.75rem);
  /* A title inside a ~430 px card (the sign-in door): --t-title's phone size, capped so one line fits at desktop. */
  --t-title-card: clamp(2rem, 1.7rem + 1.3vw, 2.25rem);
  --t-section: clamp(1.375rem, 1.27rem + 0.45vw, 1.625rem);
  --t-item: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --t-read: clamp(1rem, 0.98rem + 0.1vw, 1.0625rem);
  --t-ui: 0.9375rem;
  --t-meta: 0.8125rem;
  --t-label: 0.875rem;
  --lh-display: 1.07;
  --lh-title: 1.14;
  --lh-section: 1.24;
  --lh-item: 1.3;
  --lh-read: 1.55;
  --lh-ui: 1.35;
  --track-tight: -0.025em;
  --track-snug: -0.01em;
  --track-none: 0em;

  /* Space: nine steps and nothing else. */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;
  --tap: 2.75rem; /* 44 px, the smallest tap target */

  /* Widths. */
  --w-read: 40rem;
  --w-form: 35rem;
  --w-page: 70rem;

  /* Shape: controls, cards and sheets, covers. */
  --r-control: calc(var(--radius) * 0.625);
  --r-pill: 999px;
  --r-card: var(--radius);
  --r-cover: 2px;

  /* Elevation: a soft lift for surfaces you act on, a float for things above the page, one for covers. */
  --lift:
    0 1px 2px color-mix(in srgb, var(--color-ink) 5%, transparent),
    0 6px 20px -10px color-mix(in srgb, var(--color-ink) 16%, transparent);
  --lift-hover:
    0 1px 2px color-mix(in srgb, var(--color-ink) 6%, transparent),
    0 12px 28px -12px color-mix(in srgb, var(--color-ink) 24%, transparent);
  --press: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 1px 2px color-mix(in srgb, var(--color-ink) 18%, transparent);
  --menu-shadow: 0 8px 24px rgb(0 0 0 / 0.12); /* the My books "⋯" menu (SPEC-PRE-SPRINT §G.2) */
  --star-inset: 10px; /* a 24 px star's ink inside its 44 px box */
  --glass: color-mix(in srgb, var(--color-background) 80%, transparent);
  --edge: color-mix(in srgb, var(--color-ink) 8%, transparent);
  --float:
    0 1px 2px color-mix(in srgb, var(--color-primary-deep) 10%, transparent),
    0 18px 40px -16px color-mix(in srgb, var(--color-primary-deep) 32%, transparent);
  --cover-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-ink) 10%, transparent),
    0 6px 14px -6px color-mix(in srgb, var(--color-ink) 35%, transparent);
  --ring: 0 0 0 3px color-mix(in srgb, var(--color-primary) 28%, transparent);

  /* Motion: color changes are quick, things that move are a little slower. */
  --quick: 120ms;
  --move: 240ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Ornaments: off by default. A club can turn on dentils or a meander. */
  --ornament-dentils: repeating-linear-gradient(90deg, currentColor 0 9px, transparent 9px 16px);
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.75' fill='none' stroke='black' stroke-width='1.75'/%3E%3Cpath d='m13 13 4.5 4.5' stroke='black' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E");
  --ornament-meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 11h10V3H4v5h3V6' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'/%3E%3Cpath d='M12 1h12M12 11h12M14 11V3h6v5h-3V6' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E");
  --ornament: var(--ornament-dentils);
}

/* R3-61: Stoa's own pages share stoareads.com's two radii, 8 px for controls and 12 px for cards (pills stay round).
   A club's own address keeps the corners its Brand settings give it. .club-space re-declares the tokens, so it is named too. */
:root:not(.own-club),
:root:not(.own-club) .club-space {
  --r-control: 8px;
  --r-card: 12px;
}

@media (prefers-color-scheme: dark) {
  :root,
  .club-space {
    --raised: color-mix(in oklab, var(--color-surface) 92%, white);
    --rule: color-mix(in oklab, var(--color-line) 85%, var(--color-background));
    --wash: color-mix(in oklab, var(--color-brand) 16%, var(--color-background));
    --hover: color-mix(in srgb, white 6%, transparent);
    --saved: #7cc3ae;
    --panel: color-mix(in oklab, var(--color-brand) 88%, black);
    --on-panel: #f3f2ec;
    --float: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 24px 48px -16px rgb(0 0 0 / 0.7);
    --cover-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 8px 18px -8px rgb(0 0 0 / 0.7);
    --lift: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 8px 24px -12px rgb(0 0 0 / 0.6);
    --lift-hover: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 14px 32px -12px rgb(0 0 0 / 0.75);
    --press: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 1px 2px rgb(0 0 0 / 0.4);
    --edge: rgb(255 255 255 / 0.08);
    --menu-shadow: none;
  }
}

/* ==== Base ======================================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-background);
  color: var(--color-ink);
  font: 400 var(--t-read) / var(--lh-read) var(--font-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--color-primary) 22%, transparent);
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition:
    color var(--quick) ease,
    text-decoration-color var(--quick) ease;
}

a:hover {
  color: var(--color-primary-deep);
  text-decoration-color: currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  text-wrap: balance;
  color: var(--color-ink);
}

h1 {
  font-size: var(--t-title);
  line-height: var(--lh-title);
  font-weight: 400;
  letter-spacing: var(--track-tight);
}

h2 {
  font-size: var(--t-section);
  line-height: var(--lh-section);
  font-weight: 500;
  letter-spacing: var(--track-snug);
}

h3 {
  font-size: var(--t-item);
  line-height: var(--lh-item);
  font-weight: 500;
  letter-spacing: var(--track-snug);
}

p {
  margin: 0 0 var(--s4);
}

p:last-child {
  margin-bottom: 0;
}

img {
  max-width: 100%;
}

blockquote {
  margin: 0;
  font-style: italic;
  color: var(--color-ink);
}

cite {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  font-style: normal;
  color: var(--color-ink-soft);
}

cite::before {
  content: '— ';
}

blockquote cite {
  display: block;
  margin-top: var(--s1);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: var(--s4);
  top: var(--s4);
  z-index: 50;
  padding: var(--s2) var(--s4);
  background: var(--raised);
  border-radius: var(--r-control);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a,
button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

/* ==== Type helpers ================================================================================ */

/* A label above a heading, in sentence case. The weight does the work, not capitals or color. */
.eyebrow {
  margin: 0 0 var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  letter-spacing: var(--track-none);
  color: var(--color-ink-soft);
}

.lede {
  max-width: var(--w-read);
  font-size: var(--t-item);
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.muted {
  color: var(--color-ink-soft);
}

.small {
  font-size: var(--t-meta);
}

.count {
  margin-left: var(--s2);
  font: 500 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink-soft);
  font-variant-numeric: tabular-nums;
}

.error {
  color: var(--color-danger);
}

.grow {
  flex: 1;
}

/* ==== Frame: header, page, footer ================================================================ */

.site-header,
main,
.site-footer {
  width: min(var(--w-page), 100% - var(--s6) * 2);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  width: 100%;
  min-height: var(--s8);
  padding-inline: max(var(--s6), (100% - var(--w-page)) / 2);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--edge);
}

.cornice {
  display: none;
}

.ornament {
  display: block;
  height: 6px;
  color: var(--color-primary);
  background: var(--ornament);
  opacity: 0.45;
}

/* The lockup: the mark and the wordmark, the only capitals in Stoa. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--color-ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-ink);
}

/*
 * 44 px to tap, with nothing moved (DEVICE-A11Y-FINDINGS A1, A2): the link's own box is at least 44 px, grown by padding
 * that an equal negative margin gives back, so the header, the footer and every line keep their place.
 */
.brand {
  min-width: 44px;
  min-height: 44px;
  padding: var(--s3);
  margin: calc(-1 * var(--s3));
}

/* The footer's links are flex items: padding grows the box and an equal negative margin gives it back. */
.site-footer a {
  padding-block: var(--s4);
  margin-block: calc(-1 * var(--s4));
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand span {
  font: 600 var(--t-item) / 1 var(--font-mark);
  font-optical-sizing: auto;
  letter-spacing: var(--track-tight);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s1);
  font: 500 var(--t-ui) / 1 var(--font-ui);
}

.site-nav > a,
.site-nav .hd-dm > a,
.nav-club-group > a {
  position: relative;
  padding: var(--s2) var(--s3);
  color: var(--color-ink-soft);
  text-decoration: none;
  border-radius: var(--r-control);
  transition:
    color var(--quick) ease,
    background-color var(--quick) ease;
}

.site-nav > a:hover,
.site-nav .hd-dm > a:hover,
.nav-club-group > a:hover {
  color: var(--color-ink);
  background: var(--hover);
}

/* The place you're in: an accent line under its name, as in the club's rooms (no pills, Juno #187). */
.site-nav > a[aria-current='page'],
.site-nav .hd-dm > a[aria-current='page'],
.nav-club-group > a[aria-current='page'] {
  color: var(--color-ink);
  background: transparent;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.nav-me {
  display: inline-flex;
}

.me-menu {
  position: relative;
}

.me-menu > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 50%;
  transition: box-shadow var(--quick) ease;
}

.me-menu > summary::-webkit-details-marker {
  display: none;
}

.me-menu > summary:hover,
.me-menu[open] > summary {
  box-shadow: 0 0 0 3px var(--rule);
}

.me-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s3));
  z-index: 30;
  min-width: 15rem;
  max-width: min(18rem, 100vw - var(--s6));
  padding: var(--s1);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  box-shadow: var(--float);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  animation: rise var(--move) var(--ease);
}

.me-menu-name {
  display: grid;
  gap: var(--s1);
  margin: 0;
  padding: var(--s3);
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.me-menu-name strong {
  font-weight: 600;
}

.me-menu-name .muted {
  font-size: var(--t-meta);
}

.me-menu-panel ul {
  list-style: none;
  margin: 0;
  padding: var(--s1) 0 0;
}

.me-menu-panel li > a,
.me-menu-panel li > .link-button {
  display: block;
  width: 100%;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-control);
  color: var(--color-ink);
  text-align: left;
  text-decoration: none;
  font: inherit;
}

.me-menu-panel li > a:hover,
.me-menu-panel li > a[aria-current='page'],
.me-menu-panel li > .link-button:hover {
  background: var(--hover);
  color: var(--color-ink);
}

.me-menu-panel li:last-child {
  margin-top: var(--s1);
  padding-top: var(--s1);
  border-top: 1px solid var(--rule);
}

main {
  flex: 1;
  padding-bottom: var(--s7);
}

main:focus {
  outline: none;
}

/* The one site (stoareads.com in the mode): the page fills the screen under the header from the first paint, so the
   footer starts below the fold instead of coming in at its bottom edge as a short page fills (UX-02, Juno: 0.019 at
   1366). The header's height is .com's (site-header.css: 64px and its 1px rule). stoareads.app and a club's own
   address are unchanged (club-look rule). */
:root {
  --one-hd-h: 4.0625rem;
}

html[data-one] main {
  min-height: calc(100dvh - var(--one-hd-h));
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2) var(--s5);
  padding: var(--s5) 0 var(--s6);
  border-top: 1px solid var(--rule);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.site-footer p {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin: 0;
}

.site-footer a {
  color: var(--color-ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-ink);
}

/* ==== The Stoa panel ==============================================================================
   The recurring cartouche: a flat field of Egyptian blue, with the club's
   name set large. It heads the porch, the club's door, and the site. */

.panel,
.porch-head.beam {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: var(--s5) 0 var(--s6);
  padding: var(--s6);
  background:
    radial-gradient(36rem 18rem at 100% 0%, color-mix(in oklab, var(--panel) 70%, white) 0%, transparent 70%),
    linear-gradient(155deg, color-mix(in oklab, var(--panel) 92%, white), color-mix(in oklab, var(--panel) 82%, black));
  color: var(--on-panel);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.panel-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s5);
  margin: var(--s5) 0 0;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* Facts sit in soft glass chips on the panel. */
.panel-facts > * {
  padding: var(--s1) var(--s3);
  background: color-mix(in srgb, var(--on-panel) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-panel) 18%, transparent);
  border-radius: var(--r-pill);
}

.panel-facts em {
  font: italic 400 var(--t-ui) / var(--lh-ui) var(--font-body);
}

/* V-014: the member count is a way to the Members page. On a phone it carries a row of faces. */
.panel-facts > .panel-members {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: inherit;
  text-decoration: none;
}

.panel-members:hover {
  background: color-mix(in srgb, var(--on-panel) 22%, transparent);
}

.avatar-stack {
  display: none;
}

/* The old sun-sheen bands and stylobate line are gone: one calm gradient carries the panel. */

.porch-head.beam h1,
.panel h1 {
  max-width: 18ch;
  color: inherit;
  font-size: var(--t-display);
  line-height: var(--lh-display);
}

.porch-head.beam .lede,
.panel .lede {
  margin: var(--s3) 0 0;
  color: inherit;
  opacity: 0.85;
}

.porch-head.beam .ornament {
  display: none;
}

/* ==== Page heads ================================================================================== */

.porch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4) var(--s5);
  padding: var(--s7) 0 var(--s5);
}

.porch-head .actions {
  margin: 0;
}

/* "Pick the next book" for a vote club's organiser: a link on its own line under the shared actions (Juno, lifecycle #13). */
.porch-head-link {
  flex-basis: 100%;
  margin: 0;
}

.porch-head h1 {
  font-size: var(--t-title);
}

.narrow {
  max-width: var(--w-form);
  padding: var(--s7) 0;
}

.narrow > h1 {
  margin-bottom: var(--s3);
}

.narrow > .lede {
  margin-bottom: var(--s5);
}

/* The unsubscribe page's note sits apart from the Settings line under it (Vera B on #552). */
.narrow > .unsub-hint {
  margin: var(--s4) 0 var(--s3);
}

.narrow > .card,
.narrow > form.card {
  margin-top: var(--s5);
}

/* ==== Surfaces ==================================================================================== */

/* A card is a white surface with a soft lift and a faint edge, never a heavy border. */
.card {
  padding: var(--s5);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.card h2 {
  margin: 0 0 var(--s3);
  font-size: var(--t-item);
}

.card > p:last-child {
  margin-bottom: 0;
}

/* A gathering's Venn poll, on the plaster in the club's own look (src/venn-brand.js). Venn sets
   its height as it grows; until then it has room for a few dates. */
.venn-poll {
  margin: 0 0 var(--s5);
}
.venn-poll h2 {
  margin: 0 0 var(--s1);
  font-size: var(--t-section);
}
.venn-poll > p {
  margin: 0 0 var(--s3);
}
.venn-frame {
  display: block;
  /* Venn pads its page; this lines its cards up with the text above. */
  width: calc(100% + 2 * var(--s4));
  margin-inline: calc(-1 * var(--s4));
  height: 40rem;
  border: 0;
  color-scheme: normal;
}
.poll-progress p {
  margin: 0 0 var(--s2);
}
/* S4: every proposed time, best first; the organizer sets one in place. */
.poll-ranked {
  margin: var(--s5) 0 0;
}
.poll-ranked-h {
  margin: 0;
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}
.ranked {
  margin: 0 0 var(--s3);
}
.ranked-list {
  list-style: none;
  margin: var(--s3) 0 var(--s2);
  padding: 0;
  border-top: 1px solid var(--rule);
}
.ranked-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
.ranked-row[hidden] {
  display: none;
}
.ranked-main {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-width: 0;
}
.ranked-count {
  font-size: var(--t-ui);
}
.ranked-set {
  min-height: 2.75rem;
  flex: none;
}
.ranked-confirm {
  flex-basis: 100%;
}
.ranked-confirm p {
  margin: 0 0 var(--s2);
}
.ranked-confirm .actions {
  margin: 0;
}
.ranked-confirm .actions button,
.ranked button.ranked-more {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
.ranked-row.open {
  background: color-mix(in srgb, var(--color-ink) 3%, transparent);
  margin-inline: calc(-1 * var(--s3));
  padding-inline: var(--s3);
}

/* Sections on the page are bands, not boxes: a heading, then content on the plaster. */
.shelf-section,
.thread,
.reviews,
.band {
  margin: var(--s7) 0 0;
}

.shelf-section > h2,
.thread > h2,
.reviews-head h2,
.band > h2 {
  display: flex;
  align-items: baseline;
  margin: 0 0 var(--s4);
}

.thread > h2 + .muted {
  margin: calc(var(--s3) * -1) 0 var(--s4);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* Empty states: a line of plain text on a soft wash, with what to do next. */
.empty,
.card.empty,
p.empty {
  padding: var(--s5);
  background: color-mix(in srgb, var(--color-ink) 3.5%, transparent);
  border: 1px dashed color-mix(in srgb, var(--color-ink) 14%, transparent);
  border-radius: var(--r-card);
  box-shadow: none;
  color: var(--color-ink-soft);
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
}

.card.empty h2 {
  color: var(--color-ink);
}

/* V-015: an empty porch offers easy ways to begin; the week's question sits above the talk. */
.porch-starters {
  margin-bottom: var(--s4);
}

.porch-starters > p {
  margin: 0 0 var(--s3);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.porch-starters ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

button.starter {
  min-height: 44px;
  padding: var(--s2) var(--s4);
  font: 500 var(--t-ui) / 1.3 var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
}

button.starter:hover {
  background: var(--hover);
}

.week-question {
  margin-bottom: var(--s4);
  padding: var(--s4) var(--s5);
  background: color-mix(in srgb, var(--color-accent) 6%, var(--raised));
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

.week-question .eyebrow {
  margin: 0 0 var(--s2);
}

.week-question-text {
  margin: 0 0 var(--s3);
  font-family: var(--font-display);
  font-size: var(--t-item);
  line-height: 1.4;
  color: var(--color-ink);
}

@media (max-width: 720px) {
  .porch-starters ul {
    flex-direction: column;
  }

  button.starter {
    width: 100%;
    border-radius: var(--r-control);
  }
}

/* ==== Controls ==================================================================================== */

.field {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

label,
legend,
.label {
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}

input:not(:where(.ss *, .hd-dm *, .lib *, .lib-sheet *, .lib-as *, .tst *, .sf *, .s3 *, .hd:not(.site-header) *)),
textarea,
select {
  width: 100%;
  min-height: 2.75rem;
  padding: var(--s3) var(--s3);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid color-mix(in srgb, var(--color-ink) 14%, var(--color-line));
  border-radius: var(--r-control);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-ink) 4%, transparent);
  transition:
    border-color var(--quick) ease,
    box-shadow var(--quick) ease;
}

textarea {
  font: 400 var(--t-read) / 1.5 var(--font-body);
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-ink-soft);
  opacity: 0.8;
}

input:not(:where(.ss *, .hd-dm *, .lib *, .lib-sheet *, .lib-as *, .tst *, .sf *, .s3 *, .hd:not(.site-header) *)):hover,
textarea:hover,
select:hover {
  border-color: color-mix(in srgb, var(--color-ink) 35%, var(--color-line));
}

input:not(:where(.ss *, .hd-dm *, .lib *, .lib-sheet *, .lib-as *, .tst *, .sf *, .s3 *, .hd:not(.site-header) *)):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--ring);
}

input[readonly] {
  background: var(--wash);
  color: var(--color-ink-soft);
}

input[type='checkbox'],
input[type='radio'] {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  padding: 0;
  accent-color: var(--color-primary);
  box-shadow: none;
}

input[type='color'] {
  width: var(--s7);
  height: 2.5rem;
  padding: var(--s1);
}

input[type='range'] {
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--color-primary);
}

input[type='range']:focus {
  box-shadow: none;
}

input[type='datetime-local'],
input[type='date'],
input[type='time'] {
  min-height: 2.75rem;
}

input[type='file'] {
  padding: var(--s2);
  border-style: dashed;
  color: var(--color-ink-soft);
  font-size: var(--t-meta);
}

input[type='file']::file-selector-button {
  margin-right: var(--s3);
  padding: var(--s2) var(--s3);
  font: 600 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink);
  background: var(--raised);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  cursor: pointer;
}

select {
  appearance: none;
  padding-right: var(--s6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%237a8090' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s3) center;
  background-size: 12px;
}

fieldset {
  min-width: 0;
  margin: 0 0 var(--s4);
  padding: var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

legend {
  padding: 0 var(--s1);
}

.hint {
  margin: 0;
  font: 400 var(--t-meta) / 1.45 var(--font-ui);
  color: var(--color-ink-soft);
}

.check {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s2) 0 var(--s4);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.row {
  display: flex;
  gap: var(--s2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
}

.form-status {
  margin: var(--s3) 0 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-success);
}

.form-status:empty {
  margin: 0;
}

.form-status.error {
  color: var(--color-danger);
}

.form-submit .form-status:not(:empty) {
  margin: 0 0 var(--s2);
  padding-top: var(--s2);
  background: var(--raised);
}

/* Buttons: one solid brand, one quiet white, one danger, one link. Soft pressed edges, no glow. Discover's shared
   pieces (public/discover/menu.css) style their own buttons and fields, so these rules leave them alone. */
button:not(:where(.ss *, .hd-dm *, .lib *, .lib-sheet *, .lib-as *, .tst *, .sf *, .s3 *, .hd:not(.site-header) *)),
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: var(--s3) var(--s5);
  font: 600 var(--t-ui) / 1 var(--font-ui);
  letter-spacing: -0.005em;
  color: var(--color-on-brand);
  background: var(--color-brand);
  border: 1px solid color-mix(in srgb, var(--color-brand) 80%, black);
  border-radius: var(--r-control);
  box-shadow: var(--press);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--quick) ease,
    border-color var(--quick) ease,
    box-shadow var(--quick) ease,
    color var(--quick) ease,
    transform var(--quick) ease;
}

/* Darker on hover, in both themes. (--color-primary-deep is a text color, pale in dark mode.)
   Touch screens keep :hover after a tap, so the change only applies where there is a pointer. */
.button:hover {
  text-decoration: none;
}

@media (hover: hover) {
  button:not(:where(.ss *, .hd-dm *, .lib *, .lib-sheet *, .lib-as *, .tst *, .sf *, .s3 *, .hd:not(.site-header) *)):hover,
  .button:hover {
    color: var(--color-on-brand);
    background: var(--button-hover);
    border-color: var(--button-hover);
  }
}

button:not(:where(.ss *, .hd-dm *, .lib *, .lib-sheet *, .lib-as *, .tst *, .sf *, .s3 *, .hd:not(.site-header) *)):active:not(
    :disabled
  ),
.button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* A page move waiting for its stylesheets (app.js route, pageCss). */
main[aria-busy='true'] {
  opacity: 0.6;
  cursor: progress;
  transition: opacity 0.2s;
}

button.secondary,
.button.secondary {
  color: var(--color-ink);
  background: var(--color-surface);
  border-color: color-mix(in srgb, var(--color-ink) 14%, var(--color-line));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-ink) 6%, transparent);
}

button.secondary:hover,
.button.secondary:hover {
  color: var(--color-ink);
  background: color-mix(in srgb, var(--color-ink) 4%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-ink) 24%, var(--color-line));
}

button.danger {
  color: var(--color-danger);
  background: var(--color-surface);
  border-color: color-mix(in srgb, var(--color-danger) 30%, var(--color-line));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-ink) 6%, transparent);
}

button.danger:hover {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 7%, transparent);
  border-color: var(--color-danger);
}

button.small,
.button.small {
  min-height: 2.25rem;
  padding: var(--s2) var(--s4);
  font-size: var(--t-meta);
}

.link-button,
button.link-button {
  display: inline;
  min-height: 0;
  padding: 0;
  font: inherit;
  color: var(--color-primary);
  background: none;
  border: 0;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
}

.link-button:hover,
button.link-button:hover {
  color: var(--color-primary-deep);
  background: none;
}

.actions .link-button,
form .link-button {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.link-button.danger-link {
  color: var(--color-danger);
}

button.icon {
  min-width: 2.75rem;
  padding: var(--s2);
  color: var(--color-ink-soft);
  background: transparent;
  border-color: var(--rule);
  box-shadow: none;
}

/* A move that can't go further stays focusable, so focus can rest on it (S-J01). */
button.icon[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
}

button.icon:hover:not(:disabled):not([aria-disabled='true']) {
  color: var(--color-ink);
  background: var(--hover);
  border-color: var(--color-line);
}

/* A segmented choice: square-cornered, the chosen one filled. Used for RSVPs and post kinds. */
.segmented,
.rsvp {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin: var(--s4) 0;
  padding: 3px;
  background: color-mix(in srgb, var(--color-ink) 5%, transparent);
  border: 0;
  border-radius: var(--r-control);
}

.segmented button,
.rsvp button,
.rsvp button.secondary {
  min-height: 2.5rem;
  padding: var(--s2) var(--s4);
  font-weight: 500;
  color: var(--color-ink-soft);
  background: transparent;
  border: 0;
  border-radius: calc(var(--r-control) - 2px);
  box-shadow: none;
}

.segmented button:hover,
.rsvp button:hover {
  color: var(--color-ink);
  background: var(--hover);
}

.segmented button[aria-pressed='true'],
.rsvp button[aria-pressed='true'],
.rsvp button.chosen {
  color: var(--color-ink);
  background: var(--raised);
  box-shadow:
    0 0 0 1px var(--rule),
    0 1px 2px color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.rsvp button[aria-pressed='true']::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-success);
}

/* The rating field on a form: the shared laurel picker (onboarding.css), whole laurels (R3-99). */
.star-input {
  display: block;
}

/* ==== People ====================================================================================== */

.avatar {
  --size: 56px;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  object-fit: cover;
}

img.avatar {
  width: auto;
}

.avatar-initials {
  display: inline-grid;
  place-items: center;
  font: 600 calc(var(--size) * 0.36) / 1 var(--font-ui);
  color: var(--color-primary-deep);
  background: color-mix(in oklab, var(--color-primary) 14%, var(--color-surface));
}

/* The text and tint for each pigment come from /api/brand.css, measured against the club's own
   colors so the initials always read at 4.5:1 (W3-6); the color-mix values are only a fallback. */
.avatar-initials[data-pigment='0'] {
  --pigment: var(--color-primary);
  --pigment-ink: var(--avatar-ink-0);
  --pigment-tint: var(--avatar-tint-0);
}
.avatar-initials[data-pigment='1'] {
  --pigment: var(--color-accent);
  --pigment-ink: var(--avatar-ink-1);
  --pigment-tint: var(--avatar-tint-1);
}
.avatar-initials[data-pigment='2'] {
  --pigment: var(--color-highlight);
  --pigment-ink: var(--avatar-ink-2);
  --pigment-tint: var(--avatar-tint-2);
}
.avatar-initials[data-pigment='3'] {
  --pigment: var(--color-success);
  --pigment-ink: var(--avatar-ink-3);
  --pigment-tint: var(--avatar-tint-3);
}

.avatar-initials[data-pigment] {
  color: var(--pigment-ink, color-mix(in oklab, var(--pigment) 60%, var(--color-ink)));
  background: var(--pigment-tint, color-mix(in oklab, var(--pigment) 14%, var(--color-surface)));
}

/* Role and status tags: small, tinted, never outlined. */
.badge {
  display: inline-block;
  margin-left: var(--s2);
  padding: 3px var(--s2);
  font: 600 var(--t-meta) / 1.2 var(--font-ui);
  color: var(--color-primary-deep);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-radius: var(--r-control);
  vertical-align: middle;
}

.badge.new {
  color: var(--color-success);
  background: color-mix(in oklab, var(--color-success) 12%, var(--color-surface));
}

.badge.waiting {
  color: var(--color-ink-soft);
  background: var(--wash);
}

.badge.cancelled {
  color: var(--color-danger);
  background: color-mix(in oklab, var(--color-danger) 10%, var(--color-surface));
}

.members {
  margin: 0;
}

.member-list {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.member {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  color: var(--color-ink);
  text-decoration: none;
  border-top: 1px solid var(--rule);
}

.member-list > li:first-child .member {
  border-top: 0;
}

.member:hover {
  color: var(--color-ink);
}

.member:hover strong {
  color: var(--color-primary);
}

.member > span:not(.avatar) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s2);
  min-width: 0;
}

.member .badge {
  margin: 0;
}

.member strong {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  transition: color var(--quick) ease;
}

.member .muted {
  flex-basis: 100%;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: var(--s5);
  padding: var(--s7) 0 var(--s5);
}

.profile-head h1 {
  margin: 0;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s2) var(--s5);
  margin: var(--s5) 0;
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
}

.facts dt {
  font-weight: 600;
  color: var(--color-ink);
}

.facts dd {
  margin: 0;
  color: var(--color-ink-soft);
}

.tags,
.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tags li,
.word-list li {
  padding: var(--s1) var(--s2);
  font: 500 var(--t-meta) / 1.4 var(--font-ui);
  background: var(--wash);
  border-radius: var(--r-control);
}

.word-list.avoid li {
  color: var(--color-ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--color-danger);
}

.photo-field {
  display: flex;
  align-items: center;
  gap: var(--s4);
}

/* The photo button is a label for a hidden file input, so it shows the input's keyboard focus. */
.photo-pick {
  cursor: pointer;
}

.photo-pick:has(input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ==== Books ======================================================================================= */

.cover {
  display: block;
  flex: none;
  object-fit: cover;
  background: var(--color-line);
  border-radius: var(--r-cover);
  box-shadow: var(--cover-shadow);
}

.cover-S {
  width: 40px;
  height: 60px;
}

.cover-M {
  width: 72px;
  height: 108px;
}

.cover-L {
  width: 160px;
  height: 240px;
}

/* A book without a cover gets a bound cloth: one of four pigments, the title in a band across the
   top third, the author under it. The same title always gets the same cloth. */
.cover-blank {
  --cloth: var(--color-brand);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow: hidden;
  container-type: inline-size;
  color: #f4f1e8;
  text-align: left;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.18) 0 5%, rgb(255 255 255 / 0.07) 5% 6%, transparent 6%),
    linear-gradient(to bottom, transparent 0 78%, rgb(0 0 0 / 0.08) 78% 79%, transparent 79%),
    color-mix(in oklab, var(--cloth) 90%, black);
}

.cover-blank[data-tone='1'] {
  --cloth: color-mix(in oklab, var(--color-brand) 60%, #0c1530);
}
.cover-blank[data-tone='2'] {
  --cloth: color-mix(in oklab, var(--cloth-accent, var(--color-accent)) 75%, #2a0a06);
}
.cover-blank[data-tone='3'] {
  --cloth: color-mix(in oklab, var(--cloth-success, var(--color-success)) 85%, #06140e);
}

/* C15 (Juno): on stoareads.com a typeset cover takes shelf v3's pigment (library/shelf3/layout.js PIGMENTS), unshaded,
   so a book is one colour on club Home and on the Shelf. */
.club-plain .cover-blank[data-p='0'] {
  --cloth: #22304f;
}
.club-plain .cover-blank[data-p='1'] {
  --cloth: #5a2630;
}
.club-plain .cover-blank[data-p='2'] {
  --cloth: #1f4a3d;
}
.club-plain .cover-blank[data-p='3'] {
  --cloth: #3b2f57;
}
.club-plain .cover-blank[data-p='4'] {
  --cloth: #2a2c33;
}
.club-plain .cover-blank[data-p='5'] {
  --cloth: #6b4b24;
}
.club-plain .cover-blank[data-p='6'] {
  --cloth: #24485a;
}
.club-plain .cover-blank[data-p='7'] {
  --cloth: #7d1f26;
}
.club-plain .cover-blank[data-p='8'] {
  --cloth: #3d4a2a;
}
.club-plain .cover-blank[data-p='9'] {
  --cloth: #1c2740;
}
.club-plain .cover-blank[data-p='10'] {
  --cloth: #a2977f;
}
.club-plain .cover-blank[data-p='11'] {
  --cloth: #44352c;
}
.club-plain .cover-blank[data-p='12'] {
  --cloth: #0f5a55;
}
.club-plain .cover-blank[data-p] {
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.18) 0 5%, rgb(255 255 255 / 0.07) 5% 6%, transparent 6%),
    linear-gradient(to bottom, transparent 0 78%, rgb(0 0 0 / 0.08) 78% 79%, transparent 79%), var(--cloth);
}
.club-plain .cover-blank[data-p='10'] {
  color: #15171c;
}

.cover-title {
  display: block;
  margin: 14cqi 10cqi 0 12cqi;
  /* --fit: cover-fit.js shrinks a title whose longest word won't fit, to 80% at most (Juno, #424). */
  font: 500 calc(clamp(0.5rem, 12cqi, 1.75rem) * var(--fit, 1)) / 1.12 var(--font-display);
  letter-spacing: var(--track-snug);
  /* A word breaks only with a hyphen showing, at least 3 letters either side: the browser's own hyphenation, a break
     on file, or cover-fit.js's one in the middle. Never mid-word without one (overflow-wrap stays normal). */
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
  -webkit-hyphenate-limit-before: 3;
  -webkit-hyphenate-limit-after: 3;
  overflow-wrap: normal;
  text-wrap: balance;
}

/* A title with a break on file breaks only there: Chrome's dictionary would add its own over the soft hyphens. */
.cover-title.on-file {
  hyphens: manual;
  -webkit-hyphens: manual;
}

.cover-author {
  display: block;
  margin: 5cqi 10cqi 0 12cqi;
  font: 500 clamp(0.375rem, 7.5cqi, 0.75rem) / 1.25 var(--font-ui);
  opacity: 0.78;
}

/* R3-93 (Juno, via E): a small cloth cover is a typeset mini-cover, never a lone letter, with the same tiers as .com's
   shared cover-box.css. 96 to 133 px: the title at 12cqi, up to 5 lines. 64 to 95 px: the title at max(8px, 14cqi),
   up to 4 lines, over a hairline. Words break only with a hyphen; one still too wide is clipped, never split
   (E, Juno's R3-93 follow-up). Under 64 px (the base 40 px size and the 48 px read row): no type, a title-block
   mark (a 2 px rule over a 1 px rule) and the same hairline, since every small cover sits in a row that names the
   book (Juno, E's under-64 rule). The cover is aria-hidden; the row names the book. */
.cover-S.cover-blank > .cover-author {
  display: none;
}

.cover-S.cover-blank > .cover-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 18cqw 10cqw 0;
  font: 500 12cqi / 1.12 var(--font-display);
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

@container (max-width: 95.98px) {
  .cover-S.cover-blank > .cover-title {
    margin: 12cqw 10cqw 0;
    font: 500 max(8px, 14cqi) / 1.15 var(--font-display);
    -webkit-line-clamp: 4;
  }

  .cover-S.cover-blank::after {
    content: '';
    position: absolute;
    right: 10cqw;
    bottom: 16cqw;
    left: 10cqw;
    border-top: 1px solid rgb(244 241 232 / 0.3);
  }
}

@container (max-width: 63.98px) {
  .cover-S.cover-blank > .cover-title {
    visibility: hidden;
  }

  .cover-S.cover-blank::before {
    content: '';
    position: absolute;
    top: 16cqw;
    right: 12cqw;
    left: 12cqw;
    height: 20cqw;
    border-top: max(2px, 3cqw) solid rgb(244 241 232 / 0.75);
    border-bottom: 1px solid rgb(244 241 232 / 0.3);
  }
}

/* Under real art the marks go too (they would paint over it). */
.cover-S.cover-blank.has-art::before,
.cover-S.cover-blank.has-art::after {
  content: none;
}

/* The real cover art sits over the cloth and fades in once it has loaded. */
.cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.cover-blank.has-art .cover-art {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cover-art {
    transition: none;
  }
}

.book-list,
.mini-books,
.gathering-list,
.search-results {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* A book in a list: the cover, then title in the reading face and the author in the interface face. */
.book {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
}

.book-list > .book:first-child {
  border-top: 0;
  padding-top: 0;
}

.book-body {
  display: grid;
  align-content: start;
  gap: var(--s1);
  min-width: 0;
}

.book h3 {
  font-size: var(--t-item);
}

.book h3 a {
  color: var(--color-ink);
  text-decoration: none;
}

.book h3 a:hover {
  color: var(--color-primary);
}

.book .muted,
.mini-books .muted {
  margin: 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.book blockquote {
  margin-top: var(--s2);
  max-width: var(--w-read);
  font-size: var(--t-ui);
  line-height: 1.5;
}

.book .check {
  margin: var(--s2) 0 0;
}

.mini-books a {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  color: var(--color-ink);
  text-decoration: none;
}

.mini-books a:hover strong {
  color: var(--color-primary);
}

.mini-books span {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

/* A long one-word title ("Neoconservatism") breaks inside the card instead of pushing a 320 px page sideways
   (Vera A on #657). */
.mini-books strong {
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
  letter-spacing: var(--track-snug);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.mini-books li + li {
  margin-top: var(--s4);
}

.result {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s3);
  width: 100%;
  padding: var(--s3) var(--s2);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
}

.result:hover {
  color: var(--color-ink);
  background: var(--hover);
}

.result span {
  display: grid;
}

.result strong {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-display);
}

.picked {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s4);
}

.picked h1,
.picked h2 {
  margin: 0;
}

.picked p {
  margin: 0;
}

.manual {
  margin-top: var(--s5);
}

/* The Painted Wall: every book the club has read, hung on a rail. */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--s6) var(--s5);
  list-style: none;
  margin: 0;
  padding: var(--s5) 0 0;
  border-top: 1px solid var(--color-ink);
}

.wall .cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
}

.wall a {
  display: grid;
  gap: var(--s2);
  color: var(--color-ink);
  text-decoration: none;
  transition: transform var(--move) var(--ease);
}

.wall a:hover {
  transform: translateY(-3px);
}

/* Every book on the wall also links out to its page on Amazon, under the cover. */
.wall li {
  display: grid;
  align-content: start;
  gap: var(--s1);
}

.wall a.wall-amazon {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  justify-self: start;
  min-height: 2.75rem;
  font: 500 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
  text-underline-offset: 0.2em;
}

.wall a.wall-amazon:hover {
  transform: none;
  text-decoration-color: currentColor;
}

.wall-amazon .out {
  font-size: 0.9em;
}

.wall-note {
  margin-top: var(--s4);
}

/* Search the shelf: one quiet field under the page title, filtering as you type. */
.shelf-find {
  margin: 0 0 var(--s6);
}

.shelf-find-field {
  position: relative;
  display: block;
  max-width: var(--w-form);
}

.shelf-find-field::before {
  content: '';
  position: absolute;
  top: 50%;
  left: var(--s3);
  width: 1.15em;
  height: 1.15em;
  translate: 0 -50%;
  background: var(--color-ink-soft);
  -webkit-mask: var(--icon-search) center / contain no-repeat;
  mask: var(--icon-search) center / contain no-repeat;
  pointer-events: none;
}

.shelf-find input {
  padding-left: calc(var(--s3) + 1.15em + var(--s2));
  font-size: max(16px, 1rem);
  min-height: 2.75rem;
}

.shelf-find-status:empty {
  display: none;
}

.shelf-find-status {
  margin: var(--s2) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.wall-rating {
  display: flex;
  align-items: flex-start; /* "Sealed" and "Not rated yet" start level with a card's laurels (Juno on #657) */
  min-height: var(--t-item);
  gap: var(--s1);
  font: 500 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink-soft);
}

/* ==== Votes and rankings ========================================================================== */

.ranking {
  display: grid;
  list-style: none;
  margin: 0 0 var(--s4);
  padding: 0;
  counter-reset: rank;
}

.ranking li {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-top: 1px solid var(--rule);
}

ol.ranking li::before {
  counter-increment: rank;
  content: counter(rank);
  width: var(--s5);
  font: 400 var(--t-item) / 1 var(--font-display);
  color: var(--color-ink-soft);
  font-variant-numeric: tabular-nums;
}

.ranking-preview {
  border-style: dashed;
}

.ranked-book {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.unranked {
  margin-top: var(--s5);
}

.results {
  display: grid;
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.results li {
  display: grid;
  gap: var(--s1);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.bar {
  display: block;
  width: var(--w);
  min-width: 4px;
  height: 6px;
  background: var(--color-primary);
  border-radius: var(--r-cover);
}

.winner {
  padding: var(--s5);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

.club-ranking {
  margin-top: var(--s6);
}

/* A vote in progress: a band of wash with the question and one action. */
.vote-callout,
.start-vote {
  margin: var(--s5) 0;
}

.vote-callout {
  background: var(--color-surface);
  border: 1px solid var(--edge);
  box-shadow: var(--lift);
}

/* ==== Gatherings ================================================================================== */

/* The date stone: a small calendar leaf. Month on blue, the day large, the weekday under it. */
.stone {
  display: inline-grid;
  justify-items: center;
  align-content: start;
  flex: none;
  width: 4.5rem;
  overflow: hidden;
  padding: var(--s2) 0;
  background: color-mix(in oklab, var(--color-primary) 7%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
  border-radius: var(--r-control);
  font-family: var(--font-ui);
  text-align: center;
}

.stone span {
  font: 500 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink-soft);
}

.stone span:first-child {
  font-weight: 600;
  color: var(--color-primary);
}

.stone strong {
  margin: 0 0 var(--s1);
  font: 600 1.75rem / 1.15 var(--font-ui);
  letter-spacing: var(--track-tight);
  color: var(--color-ink);
}

.stone.pending {
  background: color-mix(in srgb, var(--color-ink) 4%, transparent);
  border-color: var(--edge);
}

.stone.pending span:first-child {
  color: var(--color-ink-soft);
}

.stone.pending strong {
  color: var(--color-ink-soft);
}

.stone.cancelled {
  opacity: 0.55;
}

/* The next gathering: the one raised object on the porch. */
.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
  padding: var(--s5);
}

.feature-body {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

.feature .eyebrow {
  margin-bottom: var(--s1);
}

.feature h2 {
  font-size: var(--t-section);
}

.feature h2 a {
  color: var(--color-ink);
  text-decoration: none;
}

.feature h2 a:hover {
  color: var(--color-primary);
}

.feature p {
  margin: 0;
}

.when {
  margin: 0;
  font: 500 var(--t-ui) / 1.45 var(--font-ui);
  color: var(--color-ink);
}

.feature .muted {
  font: 400 var(--t-ui) / 1.45 var(--font-ui);
}

.going {
  font: 400 var(--t-meta) / 1.45 var(--font-ui);
  color: var(--color-ink-soft);
}

.feature .button {
  justify-self: start;
  margin-top: var(--s4);
}

.attendee-stack {
  display: inline-flex;
  align-items: center;
  margin-right: var(--s2);
  vertical-align: middle;
}

.attendee-stack .avatar {
  width: 24px;
  height: 24px;
  --size: 24px;
  margin-left: calc(var(--s2) * -0.75);
  box-shadow: 0 0 0 2px var(--raised);
}

.attendee-stack .avatar:first-child {
  margin-left: 0;
}

.gathering-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
  color: var(--color-ink);
  text-decoration: none;
  border-top: 1px solid var(--rule);
}

.gathering-list > li:first-child .gathering-row {
  border-top: 0;
}

.gathering-row:hover {
  color: var(--color-ink);
}

.gathering-row:hover strong {
  color: var(--color-primary);
}

.gathering-row > span:not(.stone) {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

.gathering-row strong {
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
  letter-spacing: var(--track-snug);
  transition: color var(--quick) ease;
}

.gathering-row .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.gathering-list + .card,
.shelf-section + .card {
  margin-top: var(--s5);
}

.gathering-row .stone {
  width: 3.5rem;
}

.gathering-row .stone strong {
  font-size: var(--t-item);
}

.gathering-row .stone span:last-child {
  display: none;
}

.gathering-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s5);
  padding: var(--s7) 0 var(--s5);
}

.gathering-head h1 {
  margin: 0;
}

.gathering-head .lede {
  margin: var(--s2) 0 0;
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
}

.gathering .picked {
  padding: var(--s4) 0;
  border-block: 1px solid var(--rule);
  color: var(--color-ink);
  text-decoration: none;
}

.gathering .picked h2 {
  font-size: var(--t-item);
}

.gathering .picked:hover h2 {
  color: var(--color-primary);
}

.gathering > .card {
  margin: var(--s5) 0;
}

.when.big {
  font: 400 var(--t-item) / var(--lh-item) var(--font-display);
}

.attendees {
  display: grid;
  gap: var(--s4);
  margin-top: var(--s4);
}

.attendees h3 {
  margin-bottom: var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}

.attendees ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  list-style: none;
  margin: 0;
  padding: 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.attendees li {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.attendance .link-button {
  margin-top: var(--s3);
}

.attendance-form {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule, currentColor);
}

.attendance-form fieldset {
  margin: 0 0 var(--s4);
  padding: 0;
  border: 0;
}

.attendance-form legend {
  margin-bottom: var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}

.tick-list {
  display: grid;
  gap: var(--s2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tick-list label {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.attendance-form input[type='number'] {
  max-width: 8rem;
}

.questions {
  margin: 0;
  padding-left: var(--s5);
}

.questions li {
  margin-bottom: var(--s2);
}

.recap {
  margin-top: var(--s6);
  padding: var(--s5);
  background: var(--wash);
  border-radius: var(--r-card);
}

.recap p {
  white-space: pre-wrap;
}

/* Books pitched at a gathering (pitches.js): the list, then the organizer's "Log a pitch". */
.pitches {
  margin-top: var(--s6);
}

.pitches .book-list {
  margin-bottom: var(--s4);
}

.pitches .book .actions,
.shelf-section .book .actions,
.pitched-list .book .actions {
  margin-top: var(--s2);
}

.pitch-adder:not(:empty) {
  margin-bottom: var(--s4);
}

.pitched-list {
  margin-bottom: var(--s6);
}

.section-note {
  margin: 0 0 var(--s4);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* Club settings: how the club chooses its next book. */
.pick-modes {
  display: grid;
  gap: var(--s2);
}

.pick-mode {
  align-items: flex-start;
  margin: 0;
}

.pick-mode input {
  margin-top: 0.2em;
}

.pick-mode > span {
  display: grid;
  gap: 2px;
}

/* A cancelled gathering keeps its page, quieter, with its title struck through. */
.gathering.is-cancelled .gathering-head h1 {
  color: var(--color-ink-soft);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.gathering.is-cancelled .stone {
  opacity: 0.55;
}

.gathering-actions {
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}

.edit-area:empty {
  display: none;
}

.edit-gathering {
  margin-top: var(--s6);
  scroll-margin-top: var(--s6);
}

.edit-gathering .row {
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Starts and Length sit side by side, and stack on a phone rather than squeeze the date. */
.edit-gathering .row > .field {
  flex: 1 1 12rem;
  min-width: 0;
}

.export-line {
  grid-column: 2;
  margin-top: var(--s4);
}

.remove-member p {
  margin-top: 0;
}

.book-link {
  color: var(--color-ink);
  text-decoration: none;
}

.mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
}

/* S2: "Answers close" under the proposed times, with room between them. */
.when-poll > .field {
  margin-top: var(--s4);
}

.when-poll > .field input {
  width: 100%;
  min-width: 0;
}

.times {
  display: grid;
  gap: var(--s2);
  margin: 0 0 var(--s3);
  padding-left: 0;
  list-style: none;
}

.times li {
  /* minmax(0, 1fr): the date field shrinks to fit, so the remove button stays inside the box. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s2);
  align-items: center;
}

.times input {
  width: 100%;
  min-width: 0;
}

.times .remove-word {
  display: none;
}

/* On a phone the whole date and time must show (Vera fails cut text): the field takes the room the fieldset's
   padding and the picker icon used (a tap opens the phone's picker anyway). Under 360 px even that isn't enough
   beside a 44 px remove button, so a "Remove" text button goes right under its field (Juno). */
@media (max-width: 30rem) {
  fieldset:has(> .when-poll) {
    padding-inline: var(--s1);
  }

  .times li {
    gap: var(--s1);
  }

  .when-poll input[type='datetime-local'] {
    padding-inline: var(--s2);
  }

  .when-poll input[type='datetime-local']::-webkit-calendar-picker-indicator {
    display: none;
  }
}

@media (max-width: 22.4375rem) {
  .times {
    gap: var(--s3);
  }

  .times li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .times li button.icon {
    justify-self: end;
    min-height: 2.75rem;
    padding: 0 var(--s2);
    font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
    color: var(--color-primary);
    border-color: transparent;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-underline-offset: 0.2em;
  }

  .times .remove-x {
    display: none;
  }

  .times .remove-word {
    display: inline;
  }
}

/* On a form with a sticky submit bar, a field that gets focus scrolls clear of the bar. */
html:has(.form-submit) {
  scroll-padding-bottom: calc(var(--tab-bar) + var(--s9));
}

/* A month on one page: the almanac. */
.almanac {
  margin-top: var(--s6);
}

.almanac-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.almanac-head h2 {
  font-size: var(--t-item);
}

.almanac-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  font: 400 var(--t-meta) / 1.3 var(--font-ui);
}

.almanac-grid > * {
  min-height: 5.5rem;
  padding: var(--s2);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.almanac-grid .dow {
  min-height: 0;
  font-weight: 600;
  color: var(--color-ink-soft);
}

.almanac-grid .out {
  color: color-mix(in srgb, var(--color-ink-soft) 50%, transparent);
}

.almanac-grid .today .day {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-on-brand);
  background: var(--color-brand);
  border-radius: 50%;
}

.almanac-grid a {
  display: block;
  margin-top: var(--s1);
  padding: var(--s1) var(--s2);
  font-weight: 500;
  color: var(--color-primary-deep);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-radius: var(--r-control);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==== Talk ======================================================================================== */

.review-list,
.posts,
.replies {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.review,
.post {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
}

.posts > .post:first-child,
.review-list > .review:first-child {
  border-top: 0;
  padding-top: 0;
}

.post-main {
  min-width: 0;
}

.review-head,
.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s2);
  margin: 0 0 var(--s1);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.review-head strong,
.post-head strong {
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}

.post-head .badge {
  margin: 0;
}

.review-body,
.post-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.spoiler {
  font-style: italic;
}

.quote-text {
  margin: var(--s2) 0 0;
  padding-left: var(--s4);
  border-left: 2px solid var(--color-line);
  font-size: var(--t-item);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Pinned posts and announcements: a wash and a blue rule, not another box. */
.post.pinned,
.post-announcement {
  margin: 0;
  padding: var(--s4);
  background: color-mix(in oklab, var(--color-primary) 4%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
  border-radius: var(--r-card);
}

.post.pinned + .post,
.post-announcement + .post {
  border-top-color: transparent;
}

.posts > .post.pinned:first-child,
.posts > .post-announcement:first-child {
  padding-top: var(--s4);
}

.replies {
  margin-top: var(--s3);
  padding-left: var(--s4);
  border-left: 1px solid var(--rule);
}

.replies .post {
  padding: var(--s2) 0;
  border-top: 0;
}

.post-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s4);
  margin-top: var(--s2);
  font: 500 var(--t-meta) / 1 var(--font-ui);
}

.post-tools .link-button,
.post-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--color-ink-soft);
  text-decoration: none;
}

.post-tools .link-button:hover,
.post-tools a:hover {
  color: var(--color-ink);
}

.reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1);
}

.reaction,
.react-pick summary,
.react-pick button {
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 var(--s2);
  font: 500 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  cursor: pointer;
}

.reaction:hover,
.react-pick summary:hover,
.react-pick button:hover {
  color: var(--color-ink);
  background: var(--hover);
  border-color: var(--color-line);
}

.reaction.mine {
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-color: color-mix(in oklab, var(--color-primary) 35%, var(--color-line));
}

.react-pick {
  position: relative;
}

.react-pick summary {
  list-style: none;
  color: var(--color-ink-soft);
}

/* "+" reads as a text control beside Reply, not a box (Juno on #722); the 44 px tap area comes from ::after below. */
.react-pick summary,
.react-pick summary:hover {
  min-width: 0;
  padding: 0 var(--s1);
  font: 600 var(--t-body) / 1 var(--font-ui);
  background: transparent;
  border-color: transparent;
}

.react-pick summary:hover,
.react-pick[open] summary {
  color: var(--color-ink);
}

.react-pick summary::-webkit-details-marker {
  display: none;
}

.react-pick[open] > div {
  position: absolute;
  z-index: 5;
  top: calc(100% + var(--s1));
  left: 0;
  display: flex;
  gap: var(--s1);
  padding: var(--s1);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  box-shadow: var(--float);
  animation: rise var(--move) var(--ease);
}

.react-pick[open] > div button {
  border-color: transparent;
  font-size: var(--t-item);
}

/* The composer: the one place you write, raised while you're in it. */
.composer {
  margin-top: var(--s5);
  padding: var(--s2) var(--s4) var(--s4);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  transition:
    border-color var(--quick) ease,
    box-shadow var(--quick) ease;
}

.composer:focus-within {
  border-color: color-mix(in srgb, var(--color-primary) 50%, var(--rule));
  box-shadow: var(--float);
}

.composer > .field:first-child {
  margin: 0;
}

.composer > .field:first-child label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.composer textarea,
.composer textarea:focus,
.composer textarea:hover {
  min-height: 4.5rem;
  padding: var(--s2) 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.composer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

.composer-row .field {
  margin: 0;
}

.composer-row .segmented {
  margin: 0 auto 0 0;
}

.composer-row .page-field {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.composer-row .page-field input {
  width: 6rem;
  padding: var(--s2);
}

.reply-form,
.edit-form {
  margin-top: var(--s3);
}

.reply-form textarea,
.edit-form textarea {
  min-height: 0;
}

.reply-form button[type='submit'] {
  margin-top: var(--s2);
}

/* ==== The porch =================================================================================== */

.porch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: var(--s6) var(--s7);
  align-items: start;
}

.porch-main {
  min-width: 0;
}

.porch-main > .thread {
  margin-top: var(--s7);
}

/* Stoa's book of the month (SPEC-BOOK-OF-MONTH §4a): one quiet line, a short step under the next gathering, then the
   page's usual gap (Juno on #557). */
.porch-main > .botm-line {
  margin: var(--s2) 0 0;
}
/* Its row in the book step stands off the page's heading by the h1's usual 16 px; its switch in Club settings keeps no
   room for a status that hasn't said anything (Juno on #557). */
.book-list:has(> .botm-suggestion:first-child) {
  margin-top: var(--s4);
}
/* Opening the book step, its section heading stands off the page's h1 as the round pick page's does after its lede. */
.pitched-list:first-child {
  margin-top: var(--s5);
}
/* "Or find any book" stands 8 px off the Search label under it, on the book step and the round pick page only. */
h2.find-any {
  margin-bottom: var(--s2);
}
/* An empty status keeps no room but stays in the accessibility tree, out of sight, so "Saved." is still heard (Vera A;
   the same rule as Settings, #541). In clubs closes the same way, so the two sibling parts match. */
#book-of-month .invite-status:empty,
#in-clubs .invite-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* UX-022: while the organizer is alone, the invite card leads the Porch. */
.porch-main > .invite-first {
  margin-bottom: var(--s5);
}

/* The side column is a run of short, labeled bands separated by hairlines. */
.porch-aside {
  display: grid;
  gap: 0;
}

.porch-aside > section {
  padding: var(--s5) 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.porch-aside > section:first-child {
  padding-top: 0;
  border-top: 0;
}

.porch-aside > section > h2 {
  display: flex;
  align-items: baseline;
  margin: 0 0 var(--s3);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  letter-spacing: var(--track-none);
  color: var(--color-ink);
}

.porch-aside .vote-callout,
.porch-aside > section.vote-callout:first-child {
  padding: var(--s4);
  margin: 0 0 var(--s4);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.porch-aside .vote-callout + section {
  border-top: 0;
  padding-top: 0;
}

.porch-aside .vote-callout p {
  margin: 0 0 var(--s3);
  font: 400 var(--t-item) / var(--lh-item) var(--font-display);
}

.invite p {
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
  color: var(--color-ink-soft);
}

.invite-line {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: var(--s3) 0 var(--s2);
}

.invite-line code {
  flex: 1;
  min-width: 0;
  padding: var(--s2) var(--s3);
  overflow: hidden;
  font: 500 var(--t-meta) / 1.6 var(--font-ui);
  color: var(--color-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--wash);
  border-radius: var(--r-control);
}

.invite .link-button {
  font: 500 var(--t-meta) / 1.6 var(--font-ui);
}

.invite p.invite-or {
  margin: 0 0 var(--s2);
  font: 400 var(--t-meta) / 1.5 var(--font-ui);
}

.invite-or .link-button {
  padding: 0;
}

.add-member p.added {
  font: 400 var(--t-item) / var(--lh-item) var(--font-display);
  color: var(--color-ink);
}

.invite-status {
  display: block;
  margin-top: var(--s1);
  font: 500 var(--t-meta) / 1.4 var(--font-ui);
  color: var(--color-success);
}

.welcome-note {
  margin-bottom: var(--s5);
  padding: var(--s5);
  background: var(--wash);
  border-radius: var(--r-card);
}

.welcome-note h2 {
  margin-bottom: var(--s2);
  font-size: var(--t-item);
}

/* W3-3: one line, once, for a new member before their first gathering. */
.first-gathering {
  position: relative;
  margin: 0 0 var(--s5);
  padding: var(--s3) var(--s7) var(--s3) var(--s4);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  border-left: 3px solid var(--color-primary);
  background: var(--wash);
  border-radius: 0 var(--r-card) var(--r-card) 0;
}

button.link-button.first-gathering-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.75rem;
  height: 2.75rem;
  font-size: var(--t-item);
  line-height: 1;
  color: var(--color-ink-soft);
  text-decoration: none;
}

/* Notes written in Markdown (markdown.js), like the welcome note: a reading measure, quiet lists. */
.note-md > :first-child {
  margin-top: 0;
}

/* A note that opens with its own heading keeps clear of the card's. */
.welcome-note h2 + .note-md > :is(h3, h4):first-child {
  margin-top: var(--s4);
}

.note-md > * + * {
  margin-top: var(--s3);
}

.note-md h3,
.note-md h4,
.note-md h5 {
  margin-bottom: 0;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}

.note-md h3 {
  font-size: var(--t-item);
}

.note-md * + h3,
.note-md * + h4,
.note-md * + h5 {
  margin-top: var(--s4);
}

.note-md ul,
.note-md ol {
  margin-bottom: 0;
  padding-left: 1.25em;
}

.note-md li + li {
  margin-top: var(--s1);
}

.note-md blockquote {
  margin: var(--s3) 0 0;
  padding-left: var(--s3);
  border-left: 3px solid var(--rule);
  color: var(--color-ink-soft);
  font-style: italic;
}

.note-md hr {
  border: 0;
  border-top: 1px solid var(--rule);
}

.note-md code {
  padding: 0.1em 0.3em;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--color-ink) 7%, transparent);
  border-radius: var(--r-cover);
}

.note-md a {
  overflow-wrap: anywhere;
}

/* The note box grows with its text (autoGrow in markdown.js), so it never hides a long note. */
.note-editor textarea {
  min-height: 8.5rem;
  overflow: hidden;
  resize: none;
  field-sizing: content;
}

.note-preview {
  padding: var(--s3);
  background: var(--wash);
  border-radius: var(--r-control);
  font: 400 var(--t-read) / 1.5 var(--font-body);
}

.note-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s2);
}

form .note-editor-bar .link-button {
  flex: none;
  min-height: 2.75rem;
  padding: 0 var(--s2);
  margin-right: calc(-1 * var(--s2));
}

.welcome-note > a {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* An organizer's nudge to write one: a line on the plaster, not a box. */
.welcome-note.empty {
  padding: 0 0 var(--s4);
  background: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

/* ==== A book ====================================================================================== */

.book-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s6);
  align-items: end;
  padding: var(--s7) 0 var(--s6);
  border-bottom: 1px solid var(--rule);
}

.book-hero-text {
  min-width: 0;
  container-type: inline-size;
}

/* A long one-word title ("Neoconservatism") never pushes a 320 px page sideways (Vera A on #657/#658): the title
   shrinks until its longest word (--hero-run letters, cover.js heroTitle) fits, down to the section size, and past
   that breaks at heroTitle's soft hyphens. overflow-wrap is the last resort. */
.book-hero-text h1 {
  --hero-max: var(--t-display);
  margin: 0 0 var(--s2);
  font-size: max(var(--t-section), min(var(--hero-max), 100cqi / (var(--hero-run, 1) * 0.6)));
  line-height: var(--lh-display);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.book-hero .lede {
  margin: 0 0 var(--s4);
  font: 500 var(--t-ui) / 1.4 var(--font-ui);
  color: var(--color-ink-soft);
}

.book-hero blockquote {
  max-width: var(--w-read);
  font-size: var(--t-item);
  line-height: 1.5;
}
/* Seph 12:46Z Dec 1: a club book's cover and title open its stoareads.com page. The title keeps its look; the
   underline shows on hover and focus only. */
.book-hero-cover {
  display: block;
  line-height: 0;
  color: inherit;
  text-decoration: none;
}
.book-hero-link {
  color: inherit;
  text-decoration: none;
}
.book-hero-link:hover,
.book-hero-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.book-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: var(--s7);
  align-items: start;
}

.book-main {
  max-width: var(--w-read);
}

.book-main .description {
  margin: var(--s6) 0 0;
}

.book-aside {
  position: sticky;
  top: var(--s5);
  padding-top: var(--s6);
}

.book-aside .facts {
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 0;
}

.book-aside .facts dd {
  margin-bottom: var(--s3);
}

.book-aside .actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: var(--s4);
}

.reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s4);
}

.reviews-head h2 {
  margin: 0;
}

.club-average {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s2);
  white-space: nowrap;
  margin: 0;
  font: 500 var(--t-ui) / 1 var(--font-ui);
}

/* "Your ranking": room between the heading and the list's first rule (Juno, #632). */
.rankings > h2 {
  margin-bottom: var(--s2);
}

/* Where the club stands: the live combined ranking before the reveal (rankings.js standing). */
.standing {
  margin: var(--s5) 0 var(--s6);
}

.standing-note {
  margin: var(--s1) 0 var(--s4);
}

.standing-list li {
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: var(--s2);
}

.standing-list li > * {
  grid-column: 2;
}

/* The stat line starts under the title, not the cover (Juno, #632): a small cover (40 px: s6 + s2) plus the row's gap. */
.standing-list li > .muted {
  padding-left: calc(var(--s6) + var(--s2) + var(--s3));
}

.standing-list li > .rank-n {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  padding-top: var(--s3);
  font: 500 var(--t-section) / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink-soft);
}

/* On the book page it sits in the same card as the reviews around it, inside their gutter (Juno, #632). */
.reviews .member-ratings {
  padding: var(--s4);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

/* A sealed book's ratings (talk.js sealedCard, revealMoment): the card the review form uses, until the reveal opens it. */
.book-seal {
  margin: var(--s3) 0 var(--s5);
}

.book-seal > p {
  margin: 0 0 var(--s2);
}

.book-seal .book-seal-h {
  margin: 0 0 var(--s3);
}

.book-seal .actions {
  margin: var(--s4) 0 var(--s3);
}

.book-seal .club-average {
  margin-bottom: var(--s2);
}

.book-reveal-place {
  font: 600 var(--t-ui) / 1.3 var(--font-ui);
}

/* Opened: a short fade (Juno, #635), still for anyone who asks for less motion. */
.book-reveal.opened {
  animation: fade-in 200ms var(--ease);
}

.book-reveal .book-seal-h:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .book-reveal.opened {
    animation: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* Opened, the list sits inside the reveal's card rather than in a second card of its own, rows no wider than 480 px
   (s9 × 5) so a name and its stars stay in one glance on desktop (Juno, #635). */
.reviews .book-reveal.opened .member-ratings {
  max-width: calc(var(--s9) * 5);
  margin: var(--s4) 0 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.sealed-out {
  margin: var(--s3) 0 0;
}

/* How we rated it: each member's club rating of a book, highest first (talk.js memberRatings). */
.member-ratings {
  margin: var(--s3) 0 var(--s4);
}

.member-ratings-h {
  margin: 0 0 var(--s2);
  font: 600 var(--t-meta) / 1.3 var(--font-ui);
  color: var(--color-ink-soft);
}

.member-ratings-list {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-ratings-list li {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
  font: 500 var(--t-ui) / 1.3 var(--font-ui);
}

/* "Name, [laurels] Really liked it" on one line; under 600 px every row is the same two lines, the name (cut with an
   ellipsis if it must be) and then its laurels and words, with no comma (Juno, R3-99 and #657). */
.member-ratings-body {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}

.member-ratings-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-ratings-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--s2);
  white-space: nowrap;
  color: var(--color-ink-soft);
}

.member-ratings-mark .ob-glyphs {
  color: var(--color-ink);
}

@media (max-width: 599.98px) {
  .member-ratings-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .member-ratings-name {
    max-width: 100%;
  }

  .member-ratings-comma {
    display: none;
  }

  .member-ratings-mark {
    gap: var(--s1);
    font-size: var(--t-meta);
  }

  /* 13 px laurels keep "It was all right" inside a 320 px card. */
  .member-ratings-mark .ob-glyphs .ob-glyph svg {
    width: 13px;
    height: 13px;
  }
}

.club-average-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  white-space: nowrap;
}

.club-average-n {
  font-variant-numeric: tabular-nums;
}

.cs3-ratings:empty {
  display: none;
}

.cs3-ratings .member-ratings {
  margin: var(--s3) 0 0;
}

.review-form {
  margin-bottom: var(--s5);
}

.review-form h3 {
  margin-bottom: var(--s3);
}

.amazon,
.free-copy {
  font: 400 var(--t-meta) / 1.5 var(--font-ui);
}

/* The Associates disclosure, on its own line under "Find it on Amazon". */
.amazon-note {
  display: block;
  margin-top: var(--s1);
}

/* ==== Forms that stand alone (join, set up, sign in) ============================================== */

/* The signed-out way in on a hosted Stoa or a private club: one calm column, the app's icon, a
   short welcome and the ways in. On a phone it sits on the plaster; wider, it becomes a sheet. */
/* The icon is the brand here, so the header's lockup steps aside. */
body:has(main > .auth:not(.auth-first)) .site-header,
body:has(main > .auth:not(.auth-first)) .cornice {
  display: none;
}

body:has(main > .auth) .site-footer {
  flex-direction: row;
  justify-content: center;
  border-top: 0;
}

/* A club's own door before its sign-in is drawn (share.js ownDoorFallback): an empty sign-in holds the layout and the
   footer waits, so the page never moves. app.js replaces it at once. If app.js never runs (it failed to load), the
   hold ends after a few seconds: the held room goes, and the shell's welcome, header and footer show as before
   (Vera, #312). With JavaScript off, a noscript style ends the hold at once. */
body:has(main > .auth-first) .site-header {
  animation: own-door-header 4s step-end forwards;
}
body:has(main > .auth-first) .site-footer {
  animation: own-door-footer 4s step-end forwards;
}
.auth-first {
  animation: own-door-held 4s step-end forwards;
}
.own-wait {
  animation: own-door-welcome 4s step-end forwards;
}
@keyframes own-door-header {
  from {
    display: none;
  }
  to {
    display: flex;
  }
}
@keyframes own-door-footer {
  from {
    visibility: hidden;
  }
  to {
    visibility: visible;
    justify-content: space-between;
    border-top: 1px solid var(--rule);
  }
}
@keyframes own-door-held {
  to {
    display: none;
  }
}
@keyframes own-door-welcome {
  from {
    display: none;
  }
  to {
    display: contents;
  }
}

.auth {
  display: grid;
  justify-items: center;
  align-content: start;
  padding: var(--s8) 0 var(--s6);
}

.auth-panel {
  width: 100%;
  max-width: 25rem;
}

.auth-head {
  margin-bottom: var(--s6);
  text-align: center;
}

.auth-mark {
  display: block;
  margin: 0 auto var(--s5);
  border-radius: var(--r-control);
  box-shadow: var(--cover-shadow);
}

.auth-head h1 {
  margin: 0;
  font-size: var(--t-title);
  line-height: var(--lh-title);
  letter-spacing: var(--track-tight);
}

.auth-sub {
  margin: var(--s2) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.auth-switch,
.auth-note {
  max-width: 25rem;
  margin: 0;
  text-align: center;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
  text-wrap: balance;
}

.auth-switch {
  margin-top: var(--s5);
}

.auth-switch a {
  font-weight: 600;
}

.auth-note {
  margin-top: var(--s3);
  font-size: var(--t-meta);
}

/* Signed out on stoareads.app (PR 6): what Stoa is, the way in, then a look inside a club. */
.auth-lede {
  margin: var(--s3) 0 0;
  font: 400 var(--t-read) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  text-wrap: balance;
}

.hosted-welcome .auth {
  padding-bottom: 0;
}

/* UX-04: "Sign in to StoaReads" sits on one line in the desktop card, as on .com; balanced if it must wrap. */
.hosted-welcome .auth-head h1 {
  font-size: var(--t-title-card);
  text-wrap: balance;
}

/* For you while its picks load: the footer waits, unseen, so the rows don't push it down (R3-19). Hidden, not
   removed: it keeps its place in the layout, and shows where the page ends once the rows (or the empty card) are in. */
body:has(.for-you-wait) .site-footer {
  visibility: hidden;
}

/* Discover's lists the same way: the note and the foot under them, and the footer, wait unseen while they load, and
   the topic row keeps its height before its buttons come (R3-22). */
body:has(.discover-wait) :is(.site-footer, .how-we-pick, .discover-foot) {
  visibility: hidden;
}

/* The server's first paint (src/share.js) fills the screen, so the footer doesn't show and then
   get pushed down when the page arrives (Vera, #195: CLS 0.096 to ~0). */
.hosted-first {
  min-height: 100svh;
}

/* A short page (a club's gatherings, round 4) then pulls the footer up into view: it waits unseen until the page is
   in, as For you's does (R3-19), and shows where the page ends. Never for good: if app.js never runs, it shows after
   4 s, as the club door's does (Vera, #312). */
body:has(main > .hosted-first) .site-footer {
  animation: member-hold-footer 4s step-end forwards;
}

@keyframes member-hold-footer {
  from {
    visibility: hidden;
  }
  to {
    visibility: visible;
  }
}

.auth-code {
  width: 100%;
  max-width: 25rem;
}

.auth-code .signin-code {
  margin-top: var(--s2);
  border-top: 0;
  padding-top: 0;
}

.auth-code .signin-code > summary {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* "Forgot password?" and "Explore clubs" on /login: each its own 44px row, the row itself the spacing (Juno, Nov 12). */
button.link-button.forgot-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  margin-top: calc(-1 * var(--s2));
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.auth-explore {
  margin: 0;
  text-align: center;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.auth-explore a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

button.link-button.signin-link {
  display: block;
  width: fit-content;
  min-height: 44px;
  margin: var(--s2) auto 0;
}

.tour {
  margin: var(--s6) 0 0;
  padding-top: var(--s6);
  border-top: 1px solid var(--rule);
}

.tour h2 {
  margin: 0;
  font-size: var(--t-section);
  text-align: center;
}

.tour-note {
  margin: var(--s2) 0 var(--s5);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
  text-align: center;
}

.tour figure {
  margin: 0;
}

.tour img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--color-surface);
}

.tour-wide {
  display: none;
}

/* On a phone the six screens sit in one row you swipe, with the next one peeking in. */
.tour-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 68%;
  gap: var(--s4);
  margin: 0 calc(-1 * var(--s5));
  padding: 0 var(--s5) var(--s3);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--s5);
  overscroll-behavior-x: contain;
}

.tour-list li {
  scroll-snap-align: start;
}

.tour figcaption {
  margin-top: var(--s3);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.tour figcaption strong {
  color: var(--color-ink);
}

@media (min-width: 721px) {
  .tour .tour-wide {
    display: block;
    max-width: 52rem;
    margin: 0 auto var(--s7);
  }

  .tour-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s6) var(--s5);
    max-width: 52rem;
    margin: 0 auto;
    padding: 0;
    overflow: visible;
  }
}

/* A private club: the way in for new members, then a few lines about the club. */
.auth-new {
  width: 100%;
  max-width: 25rem;
  margin-top: var(--s5);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.auth-new > summary,
.signin-code > summary {
  min-height: 44px; /* a full finger target on every screen, not only phones */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: var(--color-primary);
  list-style: none; /* reads as a link, not a lone triangle beside centered text */
  cursor: pointer;
}

.auth-new > summary::-webkit-details-marker {
  display: none;
}

.auth-new[open] > summary {
  margin-bottom: var(--s4);
}

.auth-new .hint {
  margin: 0 0 var(--s3);
}

.auth-about {
  width: 100%;
  max-width: 27rem;
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}

.auth-about h2 {
  margin: 0 0 var(--s3);
  font-size: var(--t-ui);
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--color-ink-soft);
}

.auth-about p {
  margin: 0 0 var(--s3);
  color: var(--color-ink);
}

@media (min-width: 640px) {
  .auth {
    padding-top: var(--s9);
  }
  .auth-panel {
    max-width: 27rem;
    padding: var(--s6);
    background: var(--color-surface);
    border: 1px solid var(--edge);
    border-radius: var(--r-card);
    box-shadow: var(--lift);
  }
}

/* "Already a member?" under the landing page of a self-hosted Stoa. */
.signin {
  max-width: 28rem;
  margin: 0 0 var(--s7);
}

.signin h2 {
  margin-bottom: var(--s4);
}

.signin-email button,
.signin-ways .providers .button,
.signin-password button[type='submit'],
.narrow form.card > button[type='submit'] {
  width: 100%;
}

.signin-password button[type='submit'] {
  margin-top: var(--s2);
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}

.label-row .link-button {
  position: relative;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  text-decoration: none;
}

/* A bigger tap area than the small text shows, without moving the field below (WCAG 2.5.8, S-A05): 44px tall, from
   the email field's bottom edge to the password field's top border (Vera A, R3-56; it was 28px). */
.label-row .link-button::after {
  content: '';
  position: absolute;
  inset: -17px -8px -9.5px;
}

.label-row .link-button:hover {
  text-decoration: underline;
}

.signin-code,
.another-device {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}

.signin-ways .signin-code {
  text-align: center;
}

.signin-ways .signin-code[open] {
  text-align: start;
}

.signin-code summary {
  cursor: pointer;
  list-style: none;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
  /* The same link as Email me a sign-in link beside it: both are the door's secondary ways in (Juno, #532). */
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
}

.signin-code[open] summary {
  text-align: center;
}

.signin-code summary::-webkit-details-marker {
  display: none;
}

.signin-code form {
  margin-top: var(--s4);
}

.signin-code .hint {
  margin: 0 0 var(--s4);
}

.signin-code button[type='submit'] {
  width: 100%;
}

.signin-code input[name='code'] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
}

.login-code .code {
  margin: var(--s2) 0;
  font:
    600 var(--t-section) / 1.2 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.12em;
}

.providers {
  display: grid;
  gap: var(--s2);
}

.button.provider {
  color: var(--color-ink);
  background: var(--raised);
  border-color: color-mix(in srgb, var(--color-ink) 18%, var(--color-line));
  font-weight: 500;
}

.button.provider:hover {
  color: var(--color-ink);
  background: var(--hover);
  border-color: color-mix(in srgb, var(--color-ink) 35%, var(--color-line));
}

.provider-icon {
  display: inline-flex;
  flex: none;
}

/* "or", between two ways in. Lower case; a hairline either side. */
.or {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s5) 0;
  font: 400 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink-soft);
}

.or::before,
.or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--rule);
}

.club-choices {
  display: grid;
  gap: var(--s2);
  list-style: none;
  padding: 0;
}

.club-choices button {
  width: 100%;
  justify-content: flex-start;
}

.recover-links code {
  font-size: var(--t-meta);
  word-break: break-all;
}

/* ==== Settings and your account ==================================================================
   Settings are a document: titled sections separated by rules, not a stack of cards. */

.account {
  display: grid;
  gap: 0;
  margin-top: var(--s6);
}

.account > h2 {
  margin: 0 0 var(--s3);
}

.account > .card,
.settings-section {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: var(--s2) var(--s6);
  padding: var(--s6) 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  /* .card's lift stayed on, a faint panel with no edge under the reading-page card (Juno, round 5): a section of the
     document sits on the page. */
  box-shadow: none;
}

.account > .card > h3,
.settings-section > h3 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.account > .card > *:not(h3),
.settings-section > *:not(h3) {
  grid-column: 2;
}

.account > details.card {
  display: block;
}

.account > .actions {
  margin: 0;
  padding: var(--s6) 0;
  border-top: 1px solid var(--rule);
}

.settings-page {
  max-width: 52rem;
}

.account h3 + .hint,
.account .card > p {
  margin-top: 0;
}

.pending-email {
  margin: 0 0 var(--s4);
  font: 400 var(--t-meta) / 1.4 var(--font-ui);
  color: var(--color-ink-soft);
}

.device-list,
.identity-list {
  display: grid;
  list-style: none;
  margin: 0 0 var(--s2);
  padding: 0;
}

.device-list li,
.identity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.device-list li > span,
.identity-list li > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s2);
}

.device-list li .muted {
  flex-basis: 100%;
  font-size: var(--t-meta);
}

.device-list .device-all {
  justify-content: flex-end;
  border-bottom: 0;
}

.email-kinds {
  display: grid;
  gap: var(--s1);
  margin: 0 0 var(--s3) var(--s5);
  padding: 0;
  border: 0;
}

.email-kinds .check {
  margin: 0;
}

.email-kinds:disabled {
  opacity: 0.5;
}

.delete-account > summary {
  cursor: pointer;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-danger);
}

.delete-account[open] > summary {
  margin-bottom: var(--s3);
}

/* ==== Help ======================================================================================== */

.help {
  max-width: var(--w-read);
}

.help h2 {
  margin: var(--s6) 0 var(--s3);
  scroll-margin-top: var(--s4);
}

.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.faq {
  border-bottom: 1px solid var(--rule);
}

.faq > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) 0;
  cursor: pointer;
  list-style: none;
  font: 600 var(--t-ui) / 1.4 var(--font-ui);
}

.faq > summary::-webkit-details-marker {
  display: none;
}

.faq > summary::after,
.more-fields > summary::after,
details.disclosure > summary::after {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: var(--s1);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--quick) ease;
  opacity: 0.6;
}

.faq[open] > summary::after,
.more-fields[open] > summary::after,
details.disclosure[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq > p {
  margin: 0 0 var(--s4);
}

/* Optional fields fold away behind one line. */
.more-fields {
  margin: var(--s1) 0 var(--s4);
  border-top: 1px solid var(--rule);
}

.more-fields > summary,
.manual > summary,
details.disclosure > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s3);
  min-height: 3rem;
  padding: var(--s3) 0 var(--s2);
  cursor: pointer;
  list-style: none;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
}

.more-fields > summary::after,
details.disclosure > summary::after {
  margin-left: auto;
}

.manual > summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.6;
}

.manual[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.more-fields > summary::-webkit-details-marker,
.manual > summary::-webkit-details-marker,
details.disclosure > summary::-webkit-details-marker {
  display: none;
}

.more-fields > summary .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.more-fields[open] > summary {
  margin-bottom: var(--s3);
}

/* ==== The signed-out welcome ====================================================================== */

.porch {
  padding: var(--s8) 0 var(--s4);
}

.porch h1 {
  max-width: 14ch;
  margin-bottom: var(--s4);
  font-size: var(--t-display);
  line-height: var(--lh-display);
}

.colonnade {
  margin: var(--s7) 0 0;
  border-top: 1px solid var(--color-ink);
}

.colonnade .entablature {
  display: none;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.pillars li {
  padding: var(--s5) var(--s5) var(--s5) 0;
}

.pillars li + li {
  padding-left: var(--s5);
  border-left: 1px solid var(--rule);
}

.pillars h2 {
  margin-bottom: var(--s2);
  font-size: var(--t-item);
}

.pillars p {
  margin: 0;
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
  color: var(--color-ink-soft);
}

.stylobate {
  display: none;
}

.origin {
  max-width: var(--w-read);
  margin: var(--s7) 0;
}

.origin h2 {
  margin-bottom: var(--s2);
  font-size: var(--t-item);
}

.origin p {
  color: var(--color-ink-soft);
}

/* ==== The club's look ============================================================================ */

/* The club's look editor (Settings, organizers only). Groups are set apart by a rule, not a box. */
.club-look {
  border-bottom: 1px solid var(--rule);
}

.brand-form fieldset {
  margin: var(--s5) 0 0;
  padding: var(--s4) 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
}

.brand-form legend {
  float: left;
  width: 100%;
  margin-bottom: var(--s3);
  padding: 0;
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}

.brand-form legend + * {
  clear: both;
}

.brand-form details {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}

.brand-form details > summary {
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}

.brand-form details > fieldset {
  margin-top: var(--s3);
  padding-top: 0;
  border-top: 0;
}

.brand-form details > fieldset > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.brand-form .actions {
  margin-top: var(--s5);
}

.brand-form .grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: var(--s1) var(--s4);
}

/* Swatch, name and hex in three columns, so every hex field in a column of colours lines up (R3-70). */
.color-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 6.5rem;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
}

.color-field > span {
  display: contents;
}

/* Wide screens fit three colour rows across, not four, so every name has room beside its hex (Vera, #550). */
:root #club-look .grid:has(> .color-field) {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.color-field label {
  font-weight: 500;
}

.color-field input[type='text'] {
  width: 6.5rem;
  padding: var(--s1) var(--s2);
  font-size: var(--t-meta);
}

/* ==== Sheets, the tab bar and the install card ==================================================== */

.tab-bar {
  display: none;
}

dialog.sheet {
  width: min(30rem, 100%);
  max-height: min(85svh, 45rem);
  margin: auto;
  padding: 0;
  color: var(--color-ink);
  background: var(--raised);
  border: 0;
  border-radius: var(--r-card);
  box-shadow: var(--float);
  overscroll-behavior: contain;
}

dialog.sheet::backdrop {
  background: rgb(10 14 24 / 0.45);
}

.sheet-body {
  padding: var(--s2) var(--s5) var(--s5);
}

.sheet-grip {
  display: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s2);
}

.sheet-head h2 {
  margin: var(--s2) 0;
}

button.sheet-close {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  font-size: var(--t-section);
  font-weight: 400;
  color: var(--color-ink-soft);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

button.sheet-close:hover {
  color: var(--color-ink);
  background: var(--hover);
}

.sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sheet-list li + li {
  border-top: 1px solid var(--rule);
}

.sheet-choice,
button.sheet-choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s3);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--s2) var(--s1);
  font: 400 var(--t-ui) / 1.3 var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: var(--r-control);
}

.sheet-choice:hover,
button.sheet-choice:hover,
.sheet-choice:active {
  color: var(--color-ink);
  background: var(--hover);
  text-decoration: none;
}

.sheet-choice.plain {
  min-height: 3rem;
}

.choice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 9%, var(--color-surface));
  border-radius: var(--r-control);
}

.choice-icon svg,
.tab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-text {
  display: grid;
  gap: 2px;
}

.choice-text strong {
  font-weight: 600;
}

.choice-text span {
  font-size: var(--t-meta);
  color: var(--color-ink-soft);
}

.sheet-me {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s1) 0 var(--s4);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
}

.sheet-me p {
  display: grid;
  margin: 0;
  line-height: 1.3;
}

.invite-link {
  font-size: var(--t-ui);
  word-break: break-all;
}

.install-steps {
  padding-left: var(--s5);
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
}

.install-steps li {
  margin-bottom: var(--s2);
}

.install-card {
  margin-top: var(--s5);
}

.install-card h2 {
  font-size: var(--t-item);
}

.install-card .actions {
  margin-top: var(--s3);
}

/* ==== Notes on the Painted Wall =================================================================== */

/* A band of plaster with notes pinned to it: ideas and answers, often from members who can't come.
   Tiles are flat (not raised); each wears its author's pigment along the top edge. */
.painted-wall {
  margin: var(--s7) 0;
  padding: var(--s5) var(--s4);
  background: var(--wash);
  border-radius: var(--r-card);
}

.painted-wall > h2 {
  margin-top: 0;
}

.painted-wall > p.muted {
  margin: 0 0 var(--s4);
  max-width: var(--w-read);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.wall-invite {
  margin: 0 0 var(--s5);
  padding: var(--s4);
  color: var(--on-panel);
  background: var(--panel);
  border-radius: var(--r-card);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.wall-invite p {
  margin: 0;
}

.wall-invite .wall-invite-title {
  margin-bottom: var(--s1);
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
}

.wall-host-note {
  margin: 0 0 var(--s4);
  padding-left: var(--s3);
  border-left: 3px solid var(--color-success);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.notes {
  columns: 15rem auto;
  column-gap: var(--s4);
  margin: 0 0 var(--s4);
  padding: 0;
  list-style: none;
}

.note {
  --pigment: var(--color-primary);
  break-inside: avoid;
  display: grid;
  gap: var(--s2);
  margin: 0 0 var(--s4);
  padding: var(--s4);
  background: var(--color-surface);
  border-top: 3px solid var(--pigment);
  border-radius: var(--r-control);
  animation: rise var(--move) var(--ease) backwards;
}

.note.is-away {
  --pigment: var(--color-highlight);
}

.note.is-raised {
  --pigment: var(--color-success);
}

.note p {
  margin: 0;
}

.note-prompt {
  font: italic 400 var(--t-ui) / var(--lh-ui) var(--font-display);
  color: var(--color-ink-soft);
}

.note-body {
  font: 400 var(--t-read) / 1.5 var(--font-body);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.note-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s2);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.note-by .badge {
  margin-left: 0;
}

.note-name {
  font-weight: 600;
}

.badge.away {
  color: var(--color-ink);
  background: color-mix(in oklab, var(--color-highlight) 18%, var(--color-surface));
}

.note-from {
  font-family: var(--font-ui);
}

.note-replies {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: var(--s2) 0 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.note-replies .link-button {
  margin-left: var(--s2);
}

.note-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s3);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.note-tools .reactions {
  margin: 0;
}

button.raise {
  min-height: 2.25rem;
  padding: var(--s1) var(--s3);
  font: 600 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-success);
  background: transparent;
  border-color: color-mix(in srgb, var(--color-success) 40%, var(--color-line));
}

button.raise:hover {
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 8%, transparent);
  border-color: var(--color-success);
}

button.raise.on,
button.raise.on:hover {
  color: var(--color-on-primary);
  background: var(--color-success);
  border-color: var(--color-success);
}

.raised-seal {
  font: 600 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-success);
}

.raised-seal::before,
button.raise.on::before {
  content: '\2713';
  margin-right: var(--s1);
}

.note-composer {
  padding: var(--s4);
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

.note-composer .field {
  margin-bottom: 0;
}

.note-composer textarea {
  min-height: 5.5rem;
}

/* After the gathering (P1 #4): one box, then what people shared, then the notes from before, read-only. */
.stuck-composer {
  margin: var(--s3) 0 var(--s5);
}

.stuck-composer textarea {
  width: 100%;
}

.notes-before {
  margin-top: var(--s4);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}

.notes-before > h3 {
  margin: 0 0 var(--s4);
}

.prompt-pick {
  margin-bottom: var(--s3);
}

.prompt-pick-label {
  margin: 0 0 var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}

.prompt-pick [role='group'] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

button.prompt-chip {
  min-height: 2.75rem;
  max-width: 100%;
  padding: var(--s2) var(--s3);
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  background: transparent;
  border-color: var(--color-line);
}

button.prompt-chip:hover {
  color: var(--color-ink);
  background: var(--hover);
}

button.prompt-chip[aria-pressed='true'] {
  color: var(--color-primary-deep);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-color: var(--color-primary);
}

.note-composer .composer-row {
  justify-content: space-between;
}

.note-count {
  font-variant-numeric: tabular-nums;
}

.away-nudge {
  margin: var(--s3) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.wall-notes {
  font: 500 var(--t-meta) / 1.2 var(--font-ui);
  color: var(--color-primary);
}

.place-it {
  margin: var(--s5) 0 0;
  padding: var(--s3) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* ==== Ranking: placing a book, the seal and the reveal =========================================== */

.rankings .ranking .grow {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

.rank-title {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

button.why {
  justify-self: start;
  text-align: left;
  font: italic 400 var(--t-meta) / var(--lh-ui) var(--font-display);
  color: var(--color-ink-soft);
  text-decoration: none;
}

button.why.small {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
  text-decoration: underline;
}

.rankings .ranking textarea {
  width: 100%;
  font-size: max(16px, 1rem);
}

.ranking li.just-placed {
  animation: placed 1.2s var(--ease);
}

@keyframes placed {
  from {
    background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  }
}

.empty-rank {
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

ol.ranking li.empty-rank::before {
  content: none;
}

/* Which stayed with you more? Two covers side by side, one tap each. */
.place-box:empty {
  display: none;
}

.placer {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  margin: 0 0 var(--s5);
  padding: var(--s5) var(--s4);
  text-align: center;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  box-shadow: var(--float);
  animation: rise var(--move) var(--ease);
}

.placer p {
  margin: 0;
}

.placer-q {
  font: 500 var(--t-section) / var(--lh-section) var(--font-display);
  letter-spacing: var(--track-snug);
}

.placer-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  margin: var(--s3) 0;
}

button.placer-pick {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--s2);
  height: 100%;
  padding: var(--s3);
  color: var(--color-ink);
  background: var(--color-surface);
  border-color: var(--rule);
  white-space: normal;
}

button.placer-pick:hover {
  color: var(--color-ink);
  background: var(--color-surface);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.placer-pick .cover {
  width: 7rem;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  box-shadow: var(--cover-shadow);
}

.placer-title {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.placer-or {
  font: italic 400 var(--t-ui) / 1 var(--font-display);
  color: var(--color-ink-soft);
}

/* The seal: the club's lists, closed until an organizer reveals them. Deep blue, like the wall. */
.sealed,
.reveal {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--s2);
  margin: var(--s5) 0 var(--s7);
  padding: var(--s6) var(--s4);
  text-align: center;
  color: var(--on-panel);
  background: var(--panel);
  border-radius: var(--r-card);
  box-shadow: var(--float);
}

.sealed p,
.reveal p,
.sealed h2,
.reveal h2 {
  margin: 0;
  color: inherit;
}

.sealed h2,
.reveal h2 {
  font: 500 var(--t-section) / var(--lh-section) var(--font-display);
  letter-spacing: var(--track-snug);
}

.sealed-note,
.reveal-kicker {
  max-width: 30rem;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  opacity: 0.85;
}

.seal-mark {
  width: 4rem;
  height: 4rem;
  margin-bottom: var(--s2);
  color: var(--on-panel);
  opacity: 0.9;
}

.tally-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  max-width: 20rem;
  margin: var(--s2) 0;
}

.tally-dots span {
  width: 0.625rem;
  height: 0.625rem;
  border: 1px solid color-mix(in srgb, var(--on-panel) 60%, transparent);
  border-radius: 50%;
}

.tally-dots span.on {
  background: var(--on-panel);
  border-color: var(--on-panel);
}

button.on-panel-button {
  margin-top: var(--s3);
  color: var(--panel);
  background: var(--on-panel);
  border-color: var(--on-panel);
}

button.on-panel-button:hover {
  color: var(--panel);
  background: color-mix(in srgb, var(--on-panel) 88%, var(--panel));
  border-color: transparent;
}

.sealed .link-button.on-panel,
.reveal .link-button.on-panel {
  margin-top: var(--s3);
  color: var(--on-panel);
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.sealed .actions,
.reveal .actions {
  justify-content: center;
  margin-top: var(--s2);
}

.sealed .ranking-preview {
  width: 100%;
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px dashed color-mix(in srgb, var(--on-panel) 40%, transparent);
}

.sealed .results,
.sealed .results .muted,
.sealed .results a {
  color: var(--on-panel);
  text-align: left;
}

.sealed .bar {
  background: var(--on-panel);
}

/* The podium: second, first, third. The first plinth stands tallest. */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: end;
  gap: var(--s3);
  width: 100%;
  max-width: 32rem;
  margin: var(--s5) 0 var(--s3);
  padding: 0;
  list-style: none;
}

.plinth {
  display: grid;
  justify-items: center;
  gap: var(--s1);
  min-width: 0;
}

.plinth-book .cover {
  width: 100%;
  max-width: 6rem;
  height: auto;
  aspect-ratio: 2 / 3;
  box-shadow: var(--cover-shadow);
}

.plinth-1 .plinth-book .cover {
  max-width: 8.5rem;
}

.plinth-book {
  display: grid;
  justify-items: center;
  width: 100%;
}

.plinth-place {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: var(--s7);
  margin-top: var(--s2);
  font: 500 var(--t-title) / 1 var(--font-display);
  color: var(--panel);
  background: var(--on-panel);
  border-radius: var(--r-control) var(--r-control) 0 0;
}

.plinth-1 .plinth-place {
  min-height: var(--s9);
}

.plinth-2 .plinth-place {
  min-height: var(--s8);
}

.plinth-title {
  font: 600 var(--t-meta) / var(--lh-ui) var(--font-ui);
  overflow-wrap: anywhere;
}

.reveal .plinth .muted,
.sealed .plinth .muted {
  color: inherit;
  opacity: 0.8;
}

.reveal-why {
  display: grid;
  gap: var(--s2);
  max-width: 30rem;
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
  font: italic 400 var(--t-read) / 1.5 var(--font-display);
}

.reveal-why .muted {
  color: inherit;
  opacity: 0.8;
  font-style: normal;
  font-family: var(--font-ui);
}

/* Unveiling, third to first, then the title. Only when motion is welcome (see rankings.js). */
.reveal.is-revealing .plinth {
  animation: unveil 700ms var(--ease) both;
  animation-delay: calc(var(--step) * 900ms + 200ms);
}

.reveal.is-revealing h2,
.reveal.is-revealing .reveal-why,
.reveal.is-revealing .actions {
  animation: rise 600ms var(--ease) both;
  animation-delay: 2.9s;
}

@keyframes unveil {
  from {
    opacity: 0;
    transform: translateY(var(--s6)) scale(0.96);
    filter: blur(6px);
  }
}

.reveal-confirm p {
  margin: 0 0 var(--s3);
}

/* Everyone's picks, after the reveal. Hairlines, not boxes. */
.picks {
  margin-top: var(--s7);
}

.pick-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pick {
  display: grid;
  gap: var(--s2);
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
}

.pick p {
  margin: 0;
}

.pick-who {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.pick-first {
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
}

.pick-why {
  margin: 0;
  padding-left: var(--s3);
  border-left: 3px solid var(--color-primary);
  font: italic 400 var(--t-read) / 1.5 var(--font-display);
}

.pick-all summary {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
  cursor: pointer;
}

.pick-all ol {
  margin: var(--s2) 0 0;
  padding-left: var(--s5);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

@media (max-width: 480px) {
  /* On phones the wall is an inset card, its text lined up with the page column. */
  .painted-wall {
    padding-inline: var(--s4);
  }
  .placer-pair {
    gap: var(--s2);
  }
  .podium {
    gap: var(--s2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal.is-revealing .plinth,
  .reveal.is-revealing h2,
  .reveal.is-revealing .reveal-why,
  .reveal.is-revealing .actions {
    animation: none;
  }
}

/* ==== Motion ====================================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(40%);
    opacity: 0.4;
  }
}

@keyframes draw-check {
  from {
    stroke-dashoffset: 24;
  }
}

.done-check {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--color-success);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  vertical-align: -3px;
  animation: draw-check 300ms var(--ease) both;
}

/* Toast: one line at the bottom, with Undo where it helps. */
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: var(--s5);
  display: flex;
  align-items: center;
  gap: var(--s4);
  max-width: calc(100% - var(--s6));
  padding: var(--s3) var(--s4);
  color: var(--color-surface);
  background: var(--color-ink);
  border-radius: var(--r-card);
  box-shadow: var(--float);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  transform: translateX(-50%);
  animation: rise var(--move) var(--ease);
}

.toast button {
  min-height: 0;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  text-decoration: underline;
}

/* S-A13: no page-to-page @view-transition. The app moves between pages in place, and on the few
   full loads (joining, switching clubs) Chrome aborted the transition every time and logged an
   uncaught InvalidStateError, so it only ever added noise. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ==== Dark ======================================================================================== */

@media (prefers-color-scheme: dark) {
  .lockup-tile.on-ink {
    background: #0b0e13;
  }
  .cover-blank {
    color: #efece2;
  }
  .almanac-grid .today .day {
    color: #fff;
  }
}

/* ==== Small screens =============================================================================== */

@media (max-width: 860px) {
  .porch-layout,
  .book-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .book-columns {
    gap: 0;
  }
  .book-aside {
    position: static;
    padding-top: var(--s5);
  }
  .book-aside .actions {
    flex-direction: row;
  }
  .account > .card,
  .settings-section {
    grid-template-columns: minmax(0, 1fr);
  }
  .account > .card > h3,
  .settings-section > h3,
  .account > .card > *:not(h3),
  .settings-section > *:not(h3) {
    grid-column: 1;
    grid-row: auto;
  }
  .account > .card > h3,
  .settings-section > h3 {
    margin-bottom: var(--s2);
  }
}

@media (max-width: 640px) {
  main,
  .site-footer {
    width: min(var(--w-page), 100% - var(--s5) * 2);
  }
  .site-header {
    min-height: 3.5rem;
    padding-inline: var(--s5);
  }
  .brand img {
    width: 24px;
    height: 24px;
  }
  .site-nav {
    gap: 0;
  }
  .panel,
  .porch-head.beam {
    margin: var(--s4) 0 var(--s5);
    padding: var(--s5);
  }
  .porch-head {
    padding: var(--s6) 0 var(--s4);
  }
  .porch-head.beam {
    display: block;
  }
  .porch-head + .shelf-section {
    margin-top: var(--s4);
  }
  .narrow,
  .profile-head,
  .gathering-head {
    padding-top: var(--s6);
  }
  .card {
    padding: var(--s4);
  }
  .feature {
    gap: var(--s4);
    padding: var(--s4);
  }
  .feature .stone {
    width: 3.75rem;
  }
  .feature .stone strong {
    font-size: var(--t-section);
  }
  .book-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--s4);
    align-items: start;
    padding: var(--s6) 0 var(--s5);
  }
  .book-hero .cover-L {
    width: 96px;
    height: 144px;
  }
  .book-hero-text h1 {
    --hero-max: var(--t-title);
    line-height: var(--lh-title);
  }
  .site-footer {
    flex-direction: column;
  }
  .pillars li,
  .pillars li + li {
    padding: var(--s4) 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .type-scale li,
  .voice-pairs li {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s2);
  }
  .almanac-grid > * {
    min-height: 3.5rem;
    padding: var(--s1);
  }
  .almanac-grid a {
    padding: 2px;
    font-size: 0;
    height: 6px;
  }
  /* V-014: on a phone the talk comes right after what's next. Order: the club panel, the next
     gathering, any open vote and the Next book slot (P1 #6), then On the porch. Members are the row of faces in the
     panel, so their card goes. */
  .porch-main,
  .porch-aside {
    display: contents;
  }
  .porch-layout {
    gap: var(--s5);
  }
  .porch-main > *,
  .porch-aside > section {
    margin: 0;
  }
  /* The book-of-month line keeps to its gathering: the grid's gap, less a step (Juno on #557). */
  .porch-main > .botm-line {
    margin-top: calc(var(--s3) - var(--s5));
  }
  .porch-aside > .vote-callout {
    order: 1;
  }
  .porch-main > .thread {
    order: 2;
    margin-top: var(--s2);
  }
  .porch-aside > .up-next {
    order: 3;
    padding-top: var(--s5);
  }
  /* P1 #6: the Next book slot sits under the next gathering, before the talk. The club door keeps the old order while held. */
  :root:not(.door-held-6) .porch-aside > .up-next {
    order: 1;
  }
  .porch-main > .install-card {
    order: 4;
  }
  .porch-aside > .members {
    display: none;
  }
  .panel-facts > .panel-members {
    min-height: 44px;
    padding-block: var(--s1);
  }
  .avatar-stack {
    display: inline-flex;
  }
  .avatar-stack .avatar {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--on-panel) 60%, transparent);
  }
  .avatar-stack .avatar + .avatar {
    margin-left: -2px;
  }
  .post.pinned,
  .post-announcement {
    margin: 0;
  }
}

@media (max-width: 360px) {
  :root:not(.own-club) .brand span {
    display: none;
  }
  /* A club's own address: the brand is the only place the club's name shows on a phone (the club row is the rooms
     alone, R3-58), so it stays, cut with an ellipsis rather than hidden (Vera A, #535). */
  .own-club .brand {
    min-width: 0;
    max-width: 100%;
  }
  .own-club .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Phones: the tab bar, bottom sheets and touch-sized controls. Under 720px the header links move to
   a tab bar within reach of a thumb: Home, Club, Discover, My books and Me. */
@media (max-width: 720px) {
  .has-tabs .site-nav {
    display: none;
  }
  .has-tabs .site-header {
    justify-content: center;
    padding-top: env(safe-area-inset-top);
  }
  .has-tabs {
    padding-bottom: calc(var(--tab-bar) + env(safe-area-inset-bottom));
  }
  .has-tabs .site-footer {
    margin-top: var(--s6);
  }

  /* The tab bar is opaque: nothing ghosts through it. */
  .tab-bar {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
    padding: var(--s1) max(var(--s2), env(safe-area-inset-left)) max(var(--s1), env(safe-area-inset-bottom))
      max(var(--s2), env(safe-area-inset-right));
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--edge);
    font: 500 0.6875rem / 1 var(--font-ui);
  }

  .typing .tab-bar {
    display: none;
  }

  .tab,
  button.tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    min-height: 3.25rem;
    padding: var(--s1) 0;
    font: inherit;
    color: var(--color-ink-soft);
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: var(--r-control);
    box-shadow: none;
  }

  .tab:hover,
  button.tab:hover {
    color: var(--color-ink);
    background: transparent;
  }

  .tab[aria-current='page'] {
    color: var(--color-primary);
    font-weight: 600;
  }

  /* The tab you're on: its icon sits in a soft pill. */
  .tab > svg {
    box-sizing: content-box;
    padding: var(--s1) var(--s4);
    border-radius: var(--r-pill);
    transition: background-color 0.2s ease;
  }

  .tab[aria-current='page'] > svg {
    background: color-mix(in srgb, var(--color-primary) 13%, transparent);
  }

  .tab-me[aria-current='page'] .avatar {
    box-shadow: 0 0 0 2px var(--color-ink);
  }

  /* The 24px photo stands as tall as the other tabs' 22px icon in its pill (30px), so "Me" sits on the same
     line as the other labels, 3px lower than before (Vera, VA12). On stoareads.com: a club's own address waits. */
  :root[data-one] .tab-me > .avatar {
    margin-block: 3px;
  }

  /* Two or more clubs: the Clubs tab opens Your clubs, and its chevron says so (Atlas, Nov 13; #363). */
  .tab-switch > span {
    display: inline-flex;
    align-items: center;
  }

  .tab-caret {
    display: inline-flex;
  }

  .tab .tab-caret svg {
    width: 12px;
    height: 12px;
    stroke-width: 2;
  }

  dialog.sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: var(--r-card) var(--r-card) 0 0;
  }

  .sheet-body {
    padding-bottom: max(var(--s5), env(safe-area-inset-bottom));
  }

  .sheet-grip {
    display: block;
    width: 2.25rem;
    height: 4px;
    margin: var(--s2) auto 0;
    background: var(--color-line);
    border-radius: 2px;
  }

  .reaction,
  .react-pick summary,
  .react-pick button,
  .post-tools .link-button,
  .post-tools a {
    min-width: 2.75rem;
    min-height: 2.5rem;
  }

  input,
  textarea,
  select {
    font-size: max(16px, 1rem); /* under 16px, iPhones zoom into the field */
  }

  input[type='radio'],
  input[type='checkbox'] {
    width: 22px;
    height: 22px;
  }

  label.check {
    min-height: 2.75rem;
  }

  details > summary {
    min-height: 2.75rem;
  }

  .form-submit {
    position: sticky;
    z-index: 2;
    bottom: calc(var(--tab-bar) + env(safe-area-inset-bottom));
    margin: 0 calc(var(--s4) * -1);
    padding: var(--s3) var(--s4);
    background: linear-gradient(to top, var(--raised) 70%, transparent);
  }

  .typing .form-submit {
    bottom: 0;
  }

  .form-submit button,
  form.card > button[type='submit'] {
    width: 100%;
    min-height: 3rem;
  }

  .segmented,
  .rsvp {
    display: grid;
    width: 100%;
  }

  .toast {
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  dialog.sheet[open] {
    animation: sheet-up var(--move) var(--ease);
  }
}

.delete-account > summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  list-style: none;
}

.delete-account > summary::-webkit-details-marker {
  display: none;
}

/* ==== Home with no club yet, and joining while signed in ========================================= */

.porch-head.lobby-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.lobby-head .eyebrow {
  color: inherit;
  opacity: 0.8;
}

/* Start a club is the one raised thing; joining sits beside it on the plaster. */
.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
  margin: var(--s6) 0 var(--s5);
}

.lobby .card > .eyebrow {
  margin: 0 0 var(--s1);
}

.lobby .card > p {
  color: var(--color-ink-soft);
}

.lobby-join {
  scroll-margin-top: var(--s8);
}

.lobby-join.card {
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  padding: var(--s5) 0 0;
}

.lobby form .field:last-of-type {
  margin-bottom: var(--s4);
}

.lobby-join .hint,
.join-as .hint {
  margin: var(--s4) 0 0;
}

.lobby-meanwhile {
  margin: var(--s4) 0 var(--s7);
}

.lobby-meanwhile h2 {
  margin: 0 0 var(--s3);
  font-size: var(--t-section);
}

.lobby-next {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--s5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.lobby-next-link {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  height: 100%;
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
  color: var(--color-ink);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-decoration: none;
  transition: color var(--quick);
}

/* Your clubs (C9): one row a club, its image, what it reads and its next date, the book's cover at the end. */
.your-clubs {
  margin: var(--s5) 0 0;
  padding: 0;
  list-style: none;
}

.your-clubs .your-club {
  display: flex;
  gap: var(--s4);
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--tap);
  padding: var(--s4) 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  background: none;
  color: var(--color-ink);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.your-clubs li:last-child .your-club {
  border-bottom: 1px solid var(--rule);
}

.your-club:hover .your-club-name,
.your-club:focus-visible .your-club-name {
  color: var(--color-primary);
}

.your-club .your-club-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--s7);
  height: var(--s7);
  color: var(--color-primary);
  font: 600 var(--t-ui) / 1 var(--font-display);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-radius: var(--r-control);
  object-fit: cover;
}

.your-club-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.your-club-name {
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  overflow-wrap: anywhere;
}

.your-club-fact {
  color: var(--color-ink-soft);
  font-size: var(--t-label);
}

.your-club-fact cite {
  font-style: italic;
}

.your-club-fact cite::before {
  content: none;
}

.your-club-cover {
  flex: none;
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
}

.about-members {
  margin: var(--s6) 0 0;
}

.about-members h2 {
  margin: 0 0 var(--s2);
}

.your-clubs-more {
  margin: var(--s5) 0 0;
}

.lobby-next-link:hover,
.lobby-next-link:focus-visible {
  color: var(--color-primary);
}

.lobby-next-link strong {
  display: block;
  margin-bottom: var(--s1);
  font-weight: 600;
}

.lobby-next-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--s6);
  height: var(--s6);
  color: var(--color-primary);
}

.lobby-next-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 860px) {
  .lobby {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s4);
    margin-top: var(--s5);
  }

  .lobby-next {
    grid-template-columns: minmax(0, 1fr);
  }
}

.join-as-who {
  display: flex;
  gap: var(--s3);
  align-items: center;
  margin-bottom: var(--s4);
}

.join-as-who p {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font-ui);
  line-height: var(--lh-ui);
}

.join-as-who .muted {
  font-size: var(--t-meta);
}

.plinth-book,
.plinth-book:hover {
  text-decoration: none;
}
/* ==== Your books ===================================================================================
   A person's own shelf (reading.js): find a book, what's on the go, what's next in their order, and
   a log of what they've read. On a laptop the page card sits beside it. */

.your-books {
  display: grid;
  gap: var(--s6);
  align-items: start;
}

@media (min-width: 860px) {
  .your-books {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    column-gap: var(--s7);
  }
  .your-books > :not(.page-card) {
    grid-column: 1;
  }
  .your-books > .page-card {
    grid-column: 2;
    grid-row: 1 / span 4;
    position: sticky;
    top: var(--s5);
  }
}

.reading-page {
  padding-bottom: var(--s6);
}

.add-book .search-results:not(:empty) {
  margin-top: var(--s2);
}

.add-book .manual {
  margin-top: var(--s3);
}

.my-shelf-head {
  display: grid;
  gap: var(--s1);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--rule);
}

.my-shelf-head h2 {
  font-size: var(--t-section);
}

.my-shelf-head p,
.my-shelf .empty {
  margin: 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.my-shelf .empty {
  padding-top: var(--s3);
}

.my-shelf .book-list {
  padding-top: var(--s4);
}

.my-book-cover {
  flex: none;
  line-height: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s2);
}

.order-buttons {
  display: inline-flex;
  gap: var(--s1);
}

.order-buttons button.icon {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
}

.next-tag {
  margin: 0;
  font: 600 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
}

/* Next up (SPEC-MY-BOOKS §3): numbered, reordered in Reorder mode with ↑/↓ and a drag handle. */
.next-list > li {
  min-width: 0;
  align-items: flex-start;
}

.queue-n {
  flex: none;
  min-width: 1.25rem;
  padding-top: var(--s1);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink-soft);
}

.next-list:not(.reordering) .order-buttons {
  display: none;
}

/* Reordering: ↑, ↓ and the handle get a row of their own under the title, so the title keeps its width (Juno, B2). */
.next-list.reordering > .acts-row > .order-buttons {
  grid-row: 2;
  grid-column: 3 / -1;
  justify-self: start;
  margin-top: var(--s2);
}

@media (max-width: 599px) {
  .next-list.reordering > .acts-row > .order-buttons {
    grid-column: 2 / -1;
  }
}

.drag-handle {
  min-width: 2.75rem;
  min-height: 2.75rem;
  cursor: grab;
  touch-action: none;
}

.next-list li.lifted {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
  background: var(--color-surface);
}

.my-shelf-head:has(.reorder-toggle) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.my-shelf-head .reorder-toggle {
  margin-left: auto;
}

.next-list .book-body {
  flex: 1 1 auto;
  min-width: 0;
}

.next-list .order-buttons {
  flex: none;
}

.my-shelf-head .error {
  flex-basis: 100%;
}

/* A 44px target, over .link-button's inline display (Vera, #219). */
button.row-act {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* More: a small menu anchored to the row, never a sheet. */
.more {
  position: relative;
  display: inline-flex;
}

.more-button {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* A My books row: cover, title and author, More at the top right, then the actions on their own line. */
.my-book.acts-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: var(--s3);
  align-items: start;
}

.next-list > .my-book.acts-row {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.acts-row > .my-book-cover {
  grid-row: 1;
  grid-column: 1;
}

.acts-row > .book-body {
  grid-column: 2;
}

/* Next up: the number, then the cover, then the title, each in its own column. */
.next-list > .acts-row > .queue-n {
  grid-row: 1;
  grid-column: 1;
}

.next-list > .acts-row > .my-book-cover {
  grid-column: 2;
}

.next-list > .acts-row > .book-body {
  grid-column: 3;
}

.acts-row > .book-body,
.acts-row > .more,
.acts-row > .order-buttons {
  grid-row: 1;
}

.acts-row > .more,
.acts-row > .order-buttons {
  grid-column: -2;
}

.acts-row > .row-actions {
  grid-row: 2;
  grid-column: 2 / -1;
}

.next-list > .acts-row > .row-actions {
  grid-column: 3 / -1;
}

/* On a phone the actions start under the cover, so both fit on one line. */
@media (max-width: 599px) {
  .acts-row > .row-actions {
    grid-column: 1 / -1;
  }

  .next-list > .acts-row > .row-actions {
    grid-column: 2 / -1;
  }
}

.my-book > .more {
  align-self: flex-start;
  margin-left: auto;
}

.log-head > .more {
  align-self: flex-start;
  margin-left: auto;
}

.more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 5;
  display: grid;
  min-width: 12rem;
  padding: var(--s1);
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--lift-hover);
}

.more-menu.flip {
  right: auto;
  left: 0;
}

.more-menu[hidden] {
  display: none;
}

.more-menu button {
  min-height: 2.75rem;
  padding: 0 var(--s3);
  text-align: left;
}

.more-menu button:hover,
.more-menu button:focus-visible {
  background: var(--hover);
}

/* Undo, in place where the book was, for 5 seconds. */
.undo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) 0;
  color: var(--color-ink-soft);
}

.my-empty p {
  margin: 0 0 var(--s2);
}

.dnf-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 2.75rem;
  font: inherit;
}

.page-line {
  margin-top: var(--s5);
}

/* The log: a column of entries under a quiet year, each with what the reader wrote. */
.log-year + .log-year {
  margin-top: var(--s5);
}

.log-year-head {
  margin: var(--s4) 0 0;
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-entry {
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--rule);
}

.log-entry:last-child {
  border-bottom: 0;
}

.log-head {
  display: flex;
  gap: var(--s4);
}

.log-head h3 {
  font-size: var(--t-item);
}

.log-head h3 a {
  color: var(--color-ink);
  text-decoration: none;
}

.log-head h3 a:hover {
  color: var(--color-primary);
}

.log-head .muted,
.log-date {
  margin: 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.log-date {
  color: var(--color-ink-soft);
}

.log-note {
  max-width: var(--w-read);
  margin-top: var(--s3);
}

.log-note .note {
  margin: 0 0 var(--s3);
  font-size: var(--t-read);
  line-height: var(--lh-read);
  white-space: pre-line;
}

.log-note .note:last-child {
  margin-bottom: 0;
}

.log-note-short {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.log-note-short .note {
  display: inline;
  font-size: var(--t-ui);
}

.log-note-short .note + .note::before {
  content: ' ';
}

/* Who can see your books. */
.page-card h2 {
  font-size: var(--t-item);
}

.page-card .segmented {
  display: grid;
  margin: var(--s3) 0 var(--s4);
}

.page-card .actions {
  margin-top: var(--s3);
}

/* "Show what I wrote": its hint sits right under it, and the address waits a step below. */
.page-card .page-notes {
  margin: 0 0 var(--s1);
}

.page-card .page-notes + .hint {
  margin: 0 0 var(--s4);
}

/* Settings › Developer keys (dev-keys.js): your keys, one row each, and a new key shown once. */
.settings-cards {
  display: contents;
}

.keys-card h2 {
  font-size: var(--t-item);
}

.keys-list {
  list-style: none;
  margin: var(--s3) 0 var(--s4);
  padding: 0;
}

.key-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--s3);
  align-items: center;
  padding: var(--s3) 0;
  border-top: 1px solid var(--color-line);
}

.key-row:last-child {
  border-bottom: 1px solid var(--color-line);
}

.key-what {
  display: grid;
  min-width: 0;
}

.key-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.key-prefix,
.key-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.key-prefix {
  color: var(--color-ink-soft);
  font-size: 0.875em;
}

.key-when {
  grid-column: 1;
  margin: 0;
}

/* When it was made, and when last used, each on its own line, so the row's height never depends on the width. */
.key-when span {
  display: block;
}

/* Revoke, or the armed "Revoke now" with Cancel under it: the same reserved box, so the row never reflows (Juno). */
.key-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  align-content: center;
  justify-items: end;
  min-width: 6.5em;
  min-height: 88px;
}

.link-button.key-revoke-now,
.link-button.key-revoke-now:hover {
  color: var(--color-danger);
  text-decoration-color: currentColor;
}

.key-fresh,
.key-confirm {
  margin: var(--s3) 0 var(--s4);
  padding: var(--s4);
  border: 1px solid var(--color-line);
  border-radius: var(--r-card);
}

.key-fresh-lead {
  margin: 0 0 var(--s2);
  font-weight: 600;
}

.key-secret {
  display: block;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-control);
  background: color-mix(in oklab, var(--color-ink) 7%, transparent);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.key-confirm-lead {
  margin: 0 0 var(--s2);
  font-weight: 600;
}

.key-confirm input {
  width: 100%;
}

.key-fresh .actions,
.key-confirm .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
  margin-top: var(--s3);
}

.keys-new {
  display: grid;
  gap: var(--s2);
  justify-items: start;
}

.keys-new input {
  width: 100%;
}

.prefixed {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  background: var(--color-surface);
}

.prefixed:focus-within {
  box-shadow: var(--ring);
  border-color: var(--color-primary);
}

.prefixed .prefix {
  display: flex;
  align-items: center;
  padding: 0 0 0 var(--s3);
  font: 400 var(--t-ui) / 1 var(--font-ui);
  color: var(--color-ink-soft);
  white-space: nowrap;
}

.prefixed input {
  min-width: 0;
  flex: 1;
  padding-left: 1px;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.prefixed input:focus {
  outline: none;
  box-shadow: none;
}

.handle-form .hint {
  margin-top: 0;
}

/* One of your books. */
.my-book-page .picked h1 {
  font-size: var(--t-title);
  line-height: var(--lh-title);
}

/* "See this book on Stoa" under the byline (personal sweep F2): the page's own link look, like My Shelf and Find it on
   Amazon (Juno: red is for Remove), on a 44 px line on touch. */
.my-book-page .on-stoa {
  margin: var(--s2) 0 0;
  font-size: var(--t-ui);
}

@media (pointer: coarse) {
  .my-book-page .on-stoa a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

.my-book-page .segmented {
  display: grid;
  margin-top: 0;
}

.read-fields[hidden] {
  display: none;
}

.quiet-actions {
  justify-content: space-between;
  margin-top: var(--s4);
}

/* Adding a club book to your own. */
.keep-book {
  margin-top: var(--s4);
}

.keep-done {
  margin: var(--s4) 0 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* S6: the club book's status control, its state on your shelf, and the one sheet it opens. */
button.st-ctl.st-on {
  color: var(--saved);
  border-color: var(--saved);
}

button.st-ctl.st-on .st-i {
  fill: currentColor;
}

button.st-ctl.st-on.st-read .st-i {
  fill: none;
}

button.st-ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}

.st-ctl .st-i {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.st-ctl .st-v {
  flex: none;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st-sheet .st-since {
  margin: 0 0 var(--s2);
  font-size: var(--t-meta);
}

.st-opts {
  display: grid;
  border-top: 1px solid var(--rule);
}

.st-o {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 3.25rem;
  padding: 0;
  font: 400 var(--t-ui) / 1.3 var(--font-ui);
  color: var(--color-ink);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
}

.st-o:hover {
  background: var(--hover);
}

.st-o:has(input:checked) {
  font-weight: 600;
}

.st-o input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--saved);
}

.st-rate {
  margin: 0;
  padding: var(--s2) 0 var(--s3) var(--s6);
  font-size: var(--t-meta);
  border-bottom: 1px solid var(--rule);
}

.st-more {
  margin: var(--s3) 0 0;
}

.st-more .st-rm {
  min-height: var(--tap);
  text-decoration: none;
  font: 400 var(--t-ui) / 1.3 var(--font-ui);
}

.st-msg {
  margin: var(--s2) 0 0;
  font-size: var(--t-meta);
}

.st-msg:empty {
  display: none;
}

/* The no-club home: your books first, then the way into a club. */
.lobby-together-head {
  max-width: var(--w-read);
  padding-top: var(--s6);
  border-top: 1px solid var(--rule);
}

.lobby-together-head h2 {
  font-size: var(--t-section);
}

.lobby-together-head p {
  margin: var(--s2) 0 0;
}

/* A reader's page: a column to read, like a small journal. */
.reader-page {
  max-width: var(--w-read);
  margin: 0 auto;
  padding: var(--s7) 0;
}

.private-note {
  margin: 0 0 var(--s5);
  padding: var(--s3) var(--s4);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  background: var(--wash);
  border-radius: var(--r-control);
}

.reader-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s5);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--rule);
}

.reader-head h1 {
  font-size: var(--t-title);
  line-height: var(--lh-title);
}

.reader-head .muted {
  margin: var(--s1) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.reader-head .lede {
  margin: var(--s3) 0;
}

.reader-page > section {
  margin-top: var(--s6);
}

.reader-page h2 {
  font-size: var(--t-section);
}

.cover-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s5);
  list-style: none;
  margin: var(--s4) 0 0;
  padding: 0;
}

.cover-row li {
  display: grid;
  gap: var(--s1);
  max-width: 9rem;
}

.cover-row strong {
  margin-top: var(--s2);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-display);
}

.cover-row .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.reader-next .mini-books {
  margin-top: var(--s4);
}

.reader-next .mini-books li {
  display: flex;
  gap: var(--s4);
}

.reader-foot {
  margin-top: var(--s7);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

@media (max-width: 640px) {
  .reader-head {
    flex-direction: column;
    gap: var(--s4);
  }
  .reader-page {
    padding-top: var(--s5);
  }
}

/* ==== Finding a book ===============================================================================
   Hand-picked shelves (discover.js): rows of covers you scroll sideways on the no-club home, lists
   with a reason per book on /discover, and a sheet for each book. Buttons here are bare: the cover
   is the thing you tap. */

button.plain {
  display: block;
  min-height: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
}

button.plain:hover {
  color: inherit;
  background: none;
}

.tick {
  color: var(--color-success);
  font-weight: 700;
}

.see-all {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  white-space: nowrap;
}

.pick-shelf {
  margin-top: var(--s6);
}

.pick-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
}

.pick-shelf-head h3 {
  margin: 0;
  font-size: var(--t-item);
}

.pick-shelf > .muted {
  margin: var(--s1) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* A row of covers that scrolls sideways and runs to the edge of a phone screen. */
.cover-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 7.5rem;
  gap: var(--s4);
  list-style: none;
  margin: var(--s3) calc(var(--s4) * -1) 0;
  padding: var(--s2) var(--s4) var(--s3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--s4);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.cover-scroll::-webkit-scrollbar {
  display: none;
}

.cover-scroll li {
  scroll-snap-align: start;
}

.cover-card {
  display: grid;
  gap: var(--s1);
  width: 100%;
}

button.cover-card:focus-visible {
  outline: none;
}

button.cover-card:focus-visible .cover {
  box-shadow: var(--ring), var(--cover-shadow);
}

.cover-card-art {
  position: relative;
  display: block;
  margin-bottom: var(--s1);
}

.cover-card .cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  transition: transform var(--move) var(--ease);
}

.cover-card:hover .cover {
  transform: translateY(-3px);
}

/* UX-30 (Juno): on every picks rail, titles and authors wrap in full; names are never cut short.
   Cards in a rail share one height, so their bottom edges line up. */
.cover-card strong {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-display);
  overflow-wrap: break-word;
}

.cover-card .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  overflow-wrap: break-word;
}

html:not(.door-held) .cover-scroll > li {
  display: grid;
  grid-template-rows: 1fr;
  grid-auto-rows: auto;
}

html:not(.door-held) .cover-scroll .cover-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

html:not(.door-held) .cover-card strong,
html:not(.door-held) .cover-card .muted {
  display: block;
}

/* Club own-domains keep the old rails (2-line titles, one-line authors; the round's picks at 3 lines) until Seph says yes. */
.door-held .cover-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.door-held .cover-card .muted {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.door-held .round-pick .cover-card strong {
  -webkit-line-clamp: 3;
}

.door-held .round-pick .cover-card .muted {
  white-space: normal;
  overflow-wrap: anywhere;
}

.on-list {
  position: absolute;
  top: var(--s2);
  right: var(--s2);
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  font: 700 0.75rem / 1 var(--font-ui);
  color: #fff;
  background: var(--color-success);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
}

@media (min-width: 721px) {
  .cover-scroll {
    grid-auto-columns: 8.5rem;
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* The sheet for one book. */
.pick-sheet {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
  margin-bottom: var(--s4);
}

.pick-sheet .cover {
  width: 88px;
  height: 132px;
}

.pick-prize {
  display: inline-block;
  margin: 0 0 var(--s2);
  padding: 2px var(--s2);
  font: 600 var(--t-meta) / 1.4 var(--font-ui);
  color: var(--color-highlight);
  background: color-mix(in srgb, var(--color-highlight) 12%, transparent);
  border-radius: var(--r-control);
}

.pick-facts {
  margin: 0 0 var(--s2);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

/* Why to trust a Start here pick, and where that was read (S-S02). Plain, not a badge. */
.pick-because {
  margin: var(--s3) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.pick-because a {
  white-space: nowrap;
}

.book-reason {
  margin: 0;
  padding-left: var(--s3);
  border-left: 3px solid var(--color-primary);
  font: italic 400 var(--t-read) / 1.45 var(--font-display);
}

.pick-have {
  margin: var(--s2) 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.pick-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin: var(--s3) 0 0;
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* /discover */
.discover-head {
  padding: var(--s7) 0 var(--s4);
}

.discover-head h1 {
  margin: 0 0 var(--s3);
}

.discover-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s5);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

button.chip {
  min-height: 2.25rem;
  padding: var(--s2) var(--s3);
  font: 500 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink-soft);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  box-shadow: none;
}

button.chip:hover {
  color: var(--color-ink);
  background: var(--hover);
  border-color: var(--rule);
}

button.chip[aria-pressed='true'] {
  color: var(--color-on-brand);
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.discover-body {
  display: grid;
  gap: var(--s7);
  margin: var(--s5) 0 var(--s6);
}

@media (min-width: 900px) {
  .discover-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s7);
  }
}

.discover-shelf {
  scroll-margin-top: var(--s7);
}

.discover-shelf h2 {
  margin: 0 0 var(--s1);
  font-size: var(--t-section);
}

.discover-shelf > .muted {
  margin: 0 0 var(--s3);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.pick-list-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.pick-list-rows li {
  border-bottom: 1px solid var(--rule);
}

button.pick-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s1) var(--s4);
  align-items: start;
  width: 100%;
  padding: var(--s4) 0;
  box-shadow: none;
}

button.pick-row:hover strong {
  color: var(--color-primary);
}

.pick-row-body {
  display: grid;
  gap: 2px;
}

.pick-row-body strong {
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
}

.pick-row-body .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.pick-row-why {
  margin-top: var(--s1);
  font: 400 var(--t-ui) / 1.45 var(--font-body);
  color: var(--color-ink-soft);
}

.pick-row-have {
  grid-column: 2;
  font: 600 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-success);
}

.show-more {
  margin-top: var(--s3);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* V-005: the book to begin a topic with, in plain words, and how the lists are made. */
.pick-row-label {
  font: 600 var(--t-meta) / 1.3 var(--font-ui);
  color: var(--color-success);
}

.how-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block: calc(-1 * var(--s3));
}

.how-we-pick {
  margin: var(--s6) 0 var(--s3);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.how-we-pick strong {
  font-weight: 600;
  color: var(--color-ink);
}

.discover-foot {
  margin: 0 0 var(--s7);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* The no-club home. Until your books load, it holds about the height of "What are you reading?", so the rating
   strip and shelves under it don't jump down (CLS, app PR 238). */
.home-books {
  margin-top: var(--s5);
}

.home-books:empty {
  min-height: var(--home-books-hold);
}

.home-start h2,
.home-discover > h2,
.club-invite h2 {
  margin: 0 0 var(--s1);
  font-size: var(--t-section);
}

.home-start > .muted,
.home-discover > .muted {
  margin: 0 0 var(--s4);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.link-button.home-add {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.link-button.home-add,
.link-button.home-add:hover,
.home-desk .see-all {
  color: var(--color-ink);
}

/* "I've read it" sits right under "Reading now": its 44 px button keeps its hit area but not the extra air (Juno). */
.home-desk .row-actions:has(> .read-it) {
  margin-top: calc(-1 * var(--s2));
}

.home-adds {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--s5);
}

.link-button.home-hand,
.link-button.home-hand:hover {
  font-weight: 400;
  color: var(--color-ink-soft);
}

a.home-import {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: var(--tap);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.home-start h2 + .home-adds {
  margin-top: var(--s1);
}

.home-desk .my-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
}

.home-next {
  padding-top: var(--s4);
}

.home-next > .eyebrow {
  margin: 0;
}

.home-next .book-list {
  border: 0;
}

.home-next > .muted {
  margin: 0 0 var(--s2);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.home-desk > .home-adds {
  margin-top: var(--s2);
}

.club-invite {
  margin: var(--s5) 0;
}

.club-invite > p {
  margin: 0 0 var(--s4);
  color: var(--color-ink-soft);
}

.club-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

@media (max-width: 480px) {
  .club-invite-actions > * {
    flex: 1 1 0;
  }

  .club-invite-actions > .club-invite-explore {
    flex-basis: 100%;
    text-align: center;
  }
}

.club-invite-actions > .club-invite-explore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
}

.club-invite h2 {
  margin-bottom: var(--s3);
}

.home-discover {
  margin: var(--s7) 0 var(--s6);
}

.home-shelves-foot .home-all,
.home-shelves-foot .link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font: 500 var(--t-ui) / 1.25rem var(--font-ui);
  color: var(--color-ink);
}

.home-shelves-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  margin-top: var(--s5);
}

.books-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin: 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* /me/import */
.import-steps {
  margin: var(--s5) 0;
  padding-left: var(--s5);
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
}

.import-steps li + li {
  margin-top: var(--s3);
}

.file-button {
  cursor: pointer;
}

.file-button:has(+ input:focus-visible) {
  box-shadow: var(--ring);
}

.import-status {
  margin: var(--s5) 0;
}

.import-preview p {
  margin: 0 0 var(--s3);
  font: 400 var(--t-ui) / 1.5 var(--font-ui);
}

.import-preview p strong {
  font: 600 var(--t-item) / var(--lh-item) var(--font-display);
}

.import-done {
  font: 600 var(--t-item) / var(--lh-item) var(--font-ui);
}

/* "Not now" under the start-a-club form, for someone who isn't ready to start one. */
.not-now {
  margin: var(--s5) 0 0;
  text-align: center;
}

/* "Already in this club? Sign in" under the invite's join form. */
.join-signin {
  margin-top: var(--s5);
}

.join-signin > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  cursor: pointer;
  list-style: none;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
}

.join-signin > summary::-webkit-details-marker {
  display: none;
}

.join-signin[open] > .signin-ways {
  margin-top: var(--s3);
  padding: var(--s5);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--raised);
}

/* UX-044: from your Settings to the club's. */
.club-settings-link {
  display: grid;
  gap: var(--s1);
  margin: 0 0 var(--s5);
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* UX-045: link-style buttons and folds on Settings are full-size tap targets, and a device's
   Sign out stays on one line. */
.settings-page button.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.settings-page details > summary {
  min-height: 2.75rem;
  padding-block: var(--s2);
}

.device-list li > button {
  flex: none;
  min-width: max-content;
  min-height: 2.75rem;
  white-space: nowrap;
}

/* UX-040: a one-line purpose under a section's heading. */
.section-purpose {
  margin: 0 0 var(--s3);
}

/* UX-038: the line under "Show my name" says what each choice really shows. */
.name-toggle .check {
  margin-bottom: var(--s1);
}

.name-hint {
  margin: 0 0 var(--s4);
}

/* UX-034: under a vote's winner, where it went and what to do next. */
.vote-next {
  margin: var(--s4) 0 var(--s6);
}

.vote-next p {
  margin: 0 0 var(--s3);
}

/* UX-032: who hasn't voted yet, for organizers on an open vote. */
.still-to-vote {
  display: grid;
  gap: var(--s2);
  justify-items: start;
  margin: var(--s4) 0;
  padding: var(--s4);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

.still-to-vote p {
  margin: 0;
}

/* UX-046: the club logo picker is a button, like the profile photo's. */
.logo-field {
  justify-items: start;
}

/* UX-043: the club's only organizer reads how to hand over, before Leave or Delete. On the page as a callout, the
   left rule of "Your first gathering" (W3-3), not a boxed panel (Juno, R3-68). */
.hand-over {
  margin: var(--s4) 0;
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--color-primary);
  background: var(--wash);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.hand-over p {
  margin: 0;
}

/* Discover's topic buttons: one row that scrolls sideways on a phone, wrapping on wider screens.
   Topic buttons and "Show more" are full-size tap targets. */
.topic-chips {
  flex: 1 1 100%;
  flex-wrap: nowrap;
  margin-inline: calc(-1 * var(--s4));
  padding: 0 var(--s4) var(--s1);
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.topic-chips::-webkit-scrollbar {
  display: none;
}

.topic-chips button.chip {
  flex: none;
  min-height: 44px;
  padding-inline: var(--s4);
  font-size: var(--t-ui);
  white-space: nowrap;
}

button.link-button.show-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.topic-chips:empty {
  min-height: calc(44px + var(--s1));
}

@media (min-width: 720px) {
  .topic-chips {
    flex-wrap: wrap;
    margin-inline: 0;
    padding: 0;
    overflow: visible;
  }

  .topic-chips:empty {
    min-height: 44px;
  }
}

/* Club /discover (Vera, round 5): from 720 px the ten topic chips wrap, and through 1172 px (Chromium) they take two rows
   (1108 px of chips and gaps). The empty row holds both, so the lists and Pick one for me land without moving. If the
   topic list changes, measure again. */
@media (min-width: 720px) and (max-width: 1172px) {
  .topic-chips:empty {
    min-height: calc(2 * 44px + var(--s2));
  }
}

/* Saving a book from stoareads.com: the book, then a way in. */
.save-head .cover {
  margin: 0 auto var(--s4);
}

.save-head h1 em {
  font-style: italic;
}

.save-create .button {
  width: 100%;
}

.saved-note {
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--color-surface, transparent);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.saved-note:empty {
  display: none;
}

/* The Members page: everyone in the club, grouped by role. Organizers get a Manage button per row. */
.members-page > h1 .count {
  font-size: var(--t-ui);
}

.members-page > .invite {
  margin: var(--s5) 0;
}

.roster-filter {
  width: 100%;
  margin: var(--s4) 0 0;
}

.roster-group {
  margin-top: var(--s6);
}

.roster-group > h3 {
  margin: 0 0 var(--s1);
  font: 600 var(--t-ui) / 1.3 var(--font-ui);
  color: var(--color-ink-soft);
}

.roster-group > .hint {
  margin: 0 0 var(--s2);
}

.roster > li {
  display: flex;
  align-items: center;
  gap: var(--s3);
  border-top: 1px solid var(--rule);
}

.roster > li:first-child {
  border-top: 0;
}

.roster > li[hidden] {
  display: none;
}

.roster .member {
  flex: 1;
  min-width: 0;
  border-top: 0;
}

.roster .member .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster .manage {
  flex: none;
}

.roster-empty {
  margin-top: var(--s5);
}

.members-more {
  margin: var(--s3) 0 0;
  font: 500 var(--t-meta) / 1.4 var(--font-ui);
}

.manage-who {
  margin: 0 0 var(--s2);
  overflow-wrap: anywhere;
}

button.sheet-choice.danger,
button.sheet-choice.danger:hover {
  color: var(--color-danger);
}

.sheet-choice.danger .choice-icon {
  color: var(--color-danger);
  background: color-mix(in oklab, var(--color-danger) 9%, var(--color-surface));
}

/* Delete the club sits flat at the end of Club settings, like Delete my account in Settings. */
.settings-page > .delete-club {
  padding: var(--s6) 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.delete-club .delete-club-people {
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--color-danger);
  background: color-mix(in oklab, var(--color-danger) 7%, var(--color-surface));
  border-radius: var(--r-control);
}

/* ---- Your clubs: switch clubs from the account menu and the You sheet (clubs.js) ---- */

.club-switch {
  padding: var(--s2) 0 var(--s1);
  border-bottom: 1px solid var(--rule);
}

.club-switch.in-sheet {
  margin-bottom: var(--s3);
  padding-top: 0;
}

.club-switch-label {
  margin: 0;
  padding: var(--s1) var(--s3);
  font: 600 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.in-sheet .club-switch-label {
  padding-inline: var(--s1);
}

/* The clubs couldn't load: one line and a way to ask again (P0, Nov 13). */
.club-switch-failed {
  margin: 0 0 var(--s2);
  padding-inline: var(--s1);
  color: var(--color-ink-soft);
}

.club-switch-retry {
  margin-inline: var(--s1);
  min-height: 44px;
}

.club-switch-open {
  margin: var(--s2) 0 0;
  padding-inline: var(--s1);
}

.club-switch-open a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* On a club's own address the other clubs are a link back to the main app. */
.club-switch-away {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: var(--s1) var(--s3);
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
}

.in-sheet .club-switch-away {
  padding-inline: var(--s1);
}

.club-switch ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.me-menu-panel .club-switch li:last-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

button.club-switch-choice,
a.club-switch-choice {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 2.75rem;
  padding: var(--s2) var(--s3);
  color: var(--color-ink);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--r-control);
}

.in-sheet button.club-switch-choice,
.in-sheet a.club-switch-choice {
  min-height: 3rem;
  padding-inline: var(--s1);
}

a.club-switch-choice {
  text-decoration: none;
}

button.club-switch-choice:hover,
a.club-switch-choice:hover {
  color: var(--color-ink);
  background: var(--hover);
}

.club-switch-initial {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  color: var(--color-primary);
  font: 600 var(--t-label) / 1 var(--font-display);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
  border-radius: var(--r-control);
}

.club-switch-choice[aria-current] .club-switch-initial {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.club-switch-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.club-switch-choice[aria-current] .club-switch-name {
  font-weight: 600;
}

.club-switch-here {
  flex: none;
  color: var(--color-ink-soft);
  font-size: var(--t-meta);
}

.me-menu-panel:has(.club-switch:not([hidden])) {
  min-width: 18rem;
}

/* ---- Small-detail polish (polish loop V-004 / P-002) ---- */

/* A prize sits on its own line, so it isn't read as the year. */
.pick-row-prize {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

/* Under real art the typeset words are hidden too, so axe doesn't test text no one can see (Vera, #267). */
.cover-blank.has-art > .cover-title,
.cover-blank.has-art > .cover-author {
  visibility: hidden;
}

/* On touch screens every control is at least 44px tall. */
@media (pointer: coarse) {
  /* Inline links and post tools that stood alone were 16 to 40px tall on phones (R-010). */
  .place-it a,
  .amazon a,
  .free-copy a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
  .post-tools .link-button,
  .help-toc a,
  .rsvp button,
  .reactions button,
  .react-pick summary,
  .composer-row .segmented button {
    min-height: 2.75rem;
  }
  /* Only you / Public on a reader's page (Settings), 40px before (VA3). On stoareads.com only: a club's
     own address keeps its settings as they are until its owner says. */
  :root[data-one] .page-card .segmented button {
    min-height: 2.75rem;
  }

  button.small,
  .button.small,
  button.raise,
  button.chip {
    min-height: 2.75rem;
  }

  .link-button.tap,
  button.link-button.tap,
  .help-toc a,
  a.tap {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }

  /* VA3: "End this round" and "Record who came". Held on a club's own address until Seph's yes (DOOR_AUDIT2). */
  :root:not(.door-held-a2) .link-button.tap-a2 {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

/* R3-25: a standalone control is a 44 px target on every pointer, not only on a phone. A quiet text action
   grows its box (the words stay where they were drawn); a 36 to 40 px button keeps its look and grows an
   unseen hit area, centred on it, to 44 px. */
.link-button.tap,
button.link-button.tap,
.link-button.tap-a2,
a.tap,
.club-settings-link > a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.club-settings-link > a {
  justify-self: start;
}

.roster .manage,
.segmented button,
.rsvp button,
button.pick-one,
button.keep-book,
.panel-facts > .panel-members {
  position: relative;
}

.roster .manage::after,
.segmented button::after,
.rsvp button::after,
button.pick-one::after,
button.keep-book::after,
.panel-facts > .panel-members::after {
  position: absolute;
  inset: calc(50% - var(--tap) / 2) 0;
  content: '';
}

/* Past gatherings, a year at a time once a club has met across more than one. */
.year-head {
  margin: var(--s6) 0 var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  letter-spacing: var(--track-none);
  color: var(--color-ink-soft);
}

.shelf-section > h2 + .year-head {
  margin-top: 0;
}

/* P-005: the organizer's tools for a book, in one fold at the end of the book page. */
.manage-book {
  margin-top: var(--s5);
  border-top: 1px solid var(--rule);
}

.manage-book > summary {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 3rem;
  padding: var(--s3) 0;
  cursor: pointer;
  list-style: none;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}

.manage-book > summary::-webkit-details-marker {
  display: none;
}

.manage-book > summary::after {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.6;
}

.manage-book[open] > summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.manage-book-body {
  display: grid;
  gap: var(--s2);
  padding-bottom: var(--s4);
}

.manage-book-body .actions {
  margin-top: 0;
}

.manage-book-body .manual {
  margin-top: 0;
}

.manage-book-remove {
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
}

/* A review's head, with the organizer's quiet "⋯" menu at the end of the line. */
.review-top {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
}

.review-top .review-head {
  flex: 1;
  min-width: 0;
}

.review-menu {
  position: relative;
  flex: none;
}

.review-menu > summary {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: calc(-1 * var(--s3)) calc(-1 * var(--s2)) 0 0;
  border-radius: var(--r-control);
  cursor: pointer;
  list-style: none;
  font: 600 var(--t-ui) / 1 var(--font-ui);
  color: var(--color-ink-soft);
}

.review-menu > summary::-webkit-details-marker {
  display: none;
}

.review-menu > summary:hover,
.review-menu[open] > summary {
  background: color-mix(in oklab, var(--color-ink) 6%, transparent);
  color: var(--color-ink);
}

.review-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s1));
  z-index: 5;
  min-width: 10rem;
  padding: var(--s2);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  box-shadow: var(--float);
}

.review-menu-panel .link-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--s2);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-decoration: none;
}

/* P-004: quick polls on the porch. Options are full-width rows; results fill like a bar. */
.poll {
  display: grid;
  gap: var(--s3);
}

.poll-question {
  margin: 0;
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

.poll-options,
.poll-results {
  display: grid;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.poll-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s3);
  width: 100%;
  min-height: 2.75rem;
  padding: var(--s2) var(--s3);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-align: left;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
}

.poll-option:hover {
  background: var(--wash);
  border-color: color-mix(in oklab, var(--color-primary) 40%, var(--color-line));
}

.poll-dot {
  flex: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid color-mix(in oklab, var(--color-ink) 40%, var(--color-line));
  border-radius: 50%;
}

.poll-option.mine .poll-dot {
  border: 5px solid var(--color-primary);
}

.poll-result {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 2.75rem;
  padding: var(--s2) var(--s3);
  overflow: hidden;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  isolation: isolate;
}

.poll-result::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: var(--share);
  background: color-mix(in oklab, var(--color-ink) 7%, transparent);
  transition: width 0.4s ease;
}

.poll-result.mine {
  border-color: color-mix(in oklab, var(--color-primary) 45%, var(--color-line));
}

.poll-result.mine::before {
  background: color-mix(in oklab, var(--color-primary) 16%, transparent);
}

.poll-result-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.poll-you {
  display: block;
  font: 600 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
}

.poll-result-count {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.poll-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s3);
  margin: 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.poll-foot .link-button {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.poll-fields {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s3);
}

.poll-inputs {
  display: grid;
  gap: var(--s2);
}

.poll-fields .field {
  margin: 0;
}

.poll-fields .link-button {
  justify-self: start;
}

@media (prefers-reduced-motion: reduce) {
  .poll-result::before {
    transition: none;
  }
}

/* V-009: ask for a book in your own words, answered from the same lists. */
.ask {
  margin-top: var(--s5);
}

.ask-form label {
  display: block;
  margin-bottom: var(--s2);
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.ask-row {
  display: flex;
  gap: var(--s2);
}

.ask-row input {
  flex: 1;
  min-width: 0;
}

.ask-row button {
  flex: none;
}

.ask-fine {
  margin: var(--s2) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.ask-results:not(:empty) {
  margin-top: var(--s4);
}

.ask-note,
.ask-more {
  margin: var(--s3) 0 var(--s2);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* V-010: discussion questions drafted for the organizer, edited before anyone sees them. */
.drafter {
  margin: var(--s5) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.drafter-form {
  padding-bottom: var(--s3);
}

.drafter-fine {
  margin: var(--s2) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.drafter-note {
  margin: 0 0 var(--s3);
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 6%, var(--color-surface));
  border-radius: var(--r-control);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.drafter-list {
  display: grid;
  gap: var(--s3);
  margin: 0 0 var(--s4);
  padding-left: var(--s5);
}

.drafter-list li::marker {
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-muted, currentColor);
}

.drafter-list textarea {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  resize: none;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.drafter-tools {
  display: flex;
  justify-content: flex-end;
  gap: var(--s1);
  margin-top: var(--s1);
}

.drafter-tools button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: transparent;
  color: inherit;
  font: 500 var(--t-ui) / 1 var(--font-ui);
  cursor: pointer;
}

.drafter-tools button:disabled {
  opacity: 0.35;
  cursor: default;
}

.drafter-actions {
  align-items: center;
  padding-bottom: var(--s4);
}

.drafter-actions .link-button {
  min-height: 2.75rem;
}

/* V-008: suggest a picked book to your club from its sheet. */
.pick-club {
  margin: var(--s3) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.pick-club .button {
  width: 100%;
}

/* ==== Grouped lists ===============================================================================
   A list of books, people or gatherings sits on one soft surface with hairlines between rows,
   instead of rows floating on the page. */

.shelf-section > .book-list,
.my-shelf .book-list,
.roster,
.gathering-list {
  padding: 0 var(--s4);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.my-shelf .book-list {
  margin-top: var(--s3);
}

.shelf-section > .book-list > .book:first-child,
.my-shelf .book-list > .book:first-child {
  padding-top: var(--s4);
}

.gathering-list .gathering-row {
  padding: var(--s3) 0;
}

/* An empty shelf section is one quiet line, not another box. */
.my-shelf .empty {
  padding: var(--s2) 0 0;
  background: none;
  border: 0;
}

/* V-011: your next read on /me/books. */
.next-for-you:empty {
  display: none;
}

.next-for-you .pick-list-rows {
  border-top: 0;
}

.next-ask {
  margin: var(--s3) 0 0;
}

.next-fine {
  margin: var(--s2) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* ==== Explore: public clubs (explore.js) ========================================================== */

.explore-search {
  margin-top: var(--s5);
}

.explore-search input {
  padding-left: calc(var(--s3) + 1.15em + var(--s2));
  font-size: max(16px, 1rem);
  min-height: 2.75rem;
}

.explore-list {
  display: grid;
  gap: var(--s3);
  margin: var(--s4) 0 var(--s6);
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .explore-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s4);
  }
}

a.explore-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s4);
  align-items: start;
  height: 100%;
  padding: var(--s4);
  color: inherit;
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
  transition:
    box-shadow var(--move) var(--ease),
    translate var(--move) var(--ease);
}

a.explore-card:hover {
  box-shadow: var(--lift-hover);
  translate: 0 -1px;
}

a.explore-card:hover .explore-card-name {
  color: var(--color-primary);
}

a.explore-card:focus-visible {
  outline: none;
  box-shadow: var(--ring), var(--lift);
}

/* Up to three small covers, fanned like books left on a table. */
.explore-fan {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
}

.explore-fan .cover {
  position: absolute;
  top: 6px;
  left: 0;
}

.explore-fan.n1 .cover {
  left: 16px;
}

.explore-fan.n2 .cover:nth-child(1) {
  left: 6px;
  rotate: -5deg;
  z-index: 2;
}

.explore-fan.n2 .cover:nth-child(2) {
  left: 28px;
  rotate: 6deg;
}

.explore-fan.n3 .cover:nth-child(1) {
  left: 16px;
  z-index: 3;
}

.explore-fan.n3 .cover:nth-child(2) {
  left: 0;
  rotate: -8deg;
  z-index: 1;
}

.explore-fan.n3 .cover:nth-child(3) {
  left: 32px;
  rotate: 8deg;
  z-index: 2;
}

.explore-fan-empty {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: var(--s2);
  font: 500 var(--t-section) / 1 var(--font-display);
  color: var(--color-on-brand);
  background: var(--color-brand);
  border-radius: var(--r-control);
}

.explore-card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.explore-card-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s2);
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
  transition: color var(--quick) var(--ease);
}

.explore-yours {
  padding: 1px var(--s2);
  font: 600 var(--t-meta) / 1.5 var(--font-ui);
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  border-radius: var(--r-pill);
}

.explore-card-tagline {
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.explore-card-reading {
  margin-top: var(--s1);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.explore-card-reading em {
  font-family: var(--font-display);
}

.explore-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s3);
  margin-top: var(--s2);
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.explore-status {
  margin: var(--s5) 0;
}

.explore-status p {
  margin: 0;
  max-width: 34rem;
}

/* No public club yet (S-S08): start one, or find a book meanwhile. */
.explore-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  margin-top: var(--s4) !important;
}

/* No open club (first-five F3): the invite a friend sent, under Start a club. */
/* One step more above it than inside the Start a club row, so it reads as the second way in (Juno). */
.explore-invite {
  max-width: 30rem;
  margin-top: calc(var(--s5) + var(--s4));
}

.explore-invite button {
  margin-top: var(--s2);
}

/* From 600 up, Open invite sits beside the field at its height; phones keep it stacked. */
@media (min-width: 600px) {
  .explore-invite {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--s3);
    align-items: end;
  }

  .explore-invite > :not(.field):not(button) {
    grid-column: 1 / -1;
  }

  .explore-invite .field {
    margin-bottom: 0;
  }

  .explore-invite button {
    margin-top: 0;
    align-self: end;
    min-height: 2.875rem; /* the field's own height, so the two line up */
  }
}

.explore-status .hint {
  margin-top: var(--s4);
}

/* One club's page. */
.explore-club-head {
  padding: var(--s6) 0 var(--s2);
}

.explore-club-head .eyebrow a {
  color: inherit;
}

.explore-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

.explore-facts li {
  padding: var(--s1) var(--s3);
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
}

.explore-join {
  display: grid;
  gap: var(--s3);
  justify-items: start;
  margin: var(--s5) 0;
}

.explore-join > p {
  margin: 0;
}

.explore-join .form-status:empty {
  display: none;
}

.explore-join.is-member {
  background: var(--wash);
}

.explore-join .join-signin {
  justify-self: stretch;
}

@media (max-width: 480px) {
  .explore-join > button,
  .explore-join > .button {
    justify-self: stretch;
  }
}

.explore-now {
  display: grid;
  gap: var(--s3);
  margin: var(--s5) 0;
}

@media (min-width: 600px) {
  .explore-now {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
}

.explore-now .card {
  margin: 0;
}

.explore-reading {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}

.explore-now .explore-label {
  margin: 0 0 var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.explore-book,
.explore-when {
  margin: 0;
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
}

.explore-now .muted {
  margin: var(--s1) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.explore-recent h2 {
  margin: var(--s6) 0 var(--s4);
  font-size: var(--t-section);
}

.explore-covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--s5) var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.explore-covers li {
  display: grid;
  gap: 2px;
  align-content: start;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.explore-covers .cover {
  margin-bottom: var(--s2);
}

.explore-cover-title {
  font-weight: 600;
  color: var(--color-ink);
}

.explore-privacy {
  margin: var(--s6) 0;
}

/* Public or private, when starting a club and in Club settings. */
.visibility-choice {
  margin: 0 0 var(--s4);
}

.visibility-legend {
  padding: 0 var(--s1);
}

.club-invite-explore {
  margin: var(--s3) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* S-005: starting a club from a book on stoareads.com — the book that comes along. */
.club-starts-with {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin: var(--s5) 0 var(--s4);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  background: var(--color-surface);
}
.club-starts-with .cover {
  flex: none;
}
.club-starts-with p {
  display: grid;
  gap: 2px;
  margin: 0;
  font: 400 var(--t-meta) / 1.4 var(--font-ui);
  color: var(--color-ink-soft);
}
.club-starts-label {
  font-weight: 600;
  color: var(--color-success);
}
.club-starts-with strong {
  font: 560 var(--t-item) / 1.25 var(--font-display);
  color: var(--color-ink);
}
.club-starts-by {
  font-size: var(--t-ui);
}
.read-head {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s3);
}
.read-head h1 {
  margin: 0;
}
.read-choices {
  margin-top: var(--s5);
}

/* ==== Sign-in and join (R-004) =====================================================================
   One calm card with the mark, no illustration under it. */

.auth-mark {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

/* The quick links at the top of Your books are full finger targets. */
.books-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* Back from "start a club around this book": where the book went. */
.added-note {
  margin: 0 0 var(--s5);
  padding: var(--s3) var(--s4);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  background: color-mix(in oklab, var(--color-primary) 6%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-primary) 14%, transparent);
  border-radius: var(--r-control);
}

/* ==== Book page (R-005) ===========================================================================
   The book sits on a soft tinted card; its facts and the club's reviews are grouped surfaces. */

.book-hero {
  align-items: center;
  margin: var(--s5) 0 var(--s6);
  padding: var(--s6);
  background: linear-gradient(160deg, color-mix(in oklab, var(--color-primary) 7%, var(--color-surface)), var(--color-surface));
  border: 1px solid var(--edge);
  border-bottom-color: var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.book-hero .cover {
  border-radius: var(--r-control);
}

.book-aside .facts {
  padding: var(--s4) var(--s4) var(--s1);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.reviews .review-list {
  padding: 0 var(--s4);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.reviews .review-list > .review:first-child {
  padding-top: var(--s4);
}

@media (max-width: 640px) {
  .book-hero {
    align-items: start;
    margin: var(--s4) 0 var(--s5);
    padding: var(--s4);
  }
}

/* ==== Discover (R-006) ============================================================================
   Topics are soft pills that fade at the edge of a phone; each topic's books are one grouped card. */

button.chip {
  background: var(--color-surface);
  border-color: var(--edge);
}

@media (max-width: 719px) {
  .topic-chips {
    -webkit-mask: linear-gradient(90deg, transparent, #000 var(--s4), #000 calc(100% - var(--s6)), transparent);
    mask: linear-gradient(90deg, transparent, #000 var(--s4), #000 calc(100% - var(--s6)), transparent);
  }
}

.pick-list-rows {
  padding: 0 var(--s4);
  background: var(--color-surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--lift);
}

.pick-list-rows li {
  border-bottom: 0;
  border-top: 1px solid var(--rule);
}

.pick-list-rows li:first-child {
  border-top: 0;
}

button.pick-row:hover {
  background: var(--hover);
}

/* The Painted Wall is a card like the rest, not a grey band (R-011). */
.painted-wall {
  background: color-mix(in oklab, var(--color-primary) 4%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-primary) 10%, transparent);
  box-shadow: var(--lift);
}

/* ==== Density (J-001, J-002, J-006) ===============================================================
   A post's own row is react and Reply, with Edit, Pin and Remove behind one "⋯".
   The composer's kinds are one quiet row beside Post, not a grey block. Topic chips are buttons,
   so they get control corners, not pills. */

.post-tools .post-menu {
  margin-left: auto;
}

.post-menu > summary {
  margin: 0;
}

.composer-row {
  flex-wrap: nowrap;
}

.composer-row .segmented {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  gap: var(--s1);
  /* R3-25: the kinds scroll sideways, which clips anything past this box, so it keeps room above and below
     for each kind's 44 px hit area and gives it back, so the row doesn't move. */
  margin: calc(-1 * var(--s1)) 0;
  padding: var(--s1) 0;
  overflow-x: auto;
  background: none;
  scrollbar-width: none;
}

.composer-row .segmented::-webkit-scrollbar {
  display: none;
}

/* On a phone the kinds (Comment, Announcement, …) get a row of their own, so none hides behind Post (Juno, #483). */
@media (max-width: 26rem) {
  .composer-row {
    flex-wrap: wrap;
  }

  .composer-row .segmented {
    flex-basis: 100%;
    flex-wrap: wrap;
    row-gap: var(--s2);
    overflow-x: visible;
  }
}

.composer-row .segmented button {
  flex: none;
  padding: var(--s1) var(--s3);
  font: 500 var(--t-label) / 1 var(--font-ui);
  border-radius: var(--r-control);
}

.composer-row .segmented button[aria-pressed='true'] {
  color: var(--color-ink);
  background: color-mix(in oklab, var(--color-ink) 7%, transparent);
}

/* On a phone, three or four kinds and Post don't fit in one row. Every kind must stay in view,
   so the kinds take the full row, sharing it, and Post sits under them on the right. */
@media (max-width: 719px) {
  .composer-row:has(.segmented > :nth-child(3)) {
    flex-wrap: wrap;
  }
  .composer-row .segmented:has(> :nth-child(3)) {
    flex: 1 1 100%;
    flex-wrap: wrap;
    /* R3-25: wrapped kinds sit 8 px apart, so each one's 44 px hit area meets the next row's instead of sharing it. */
    row-gap: var(--s2);
    overflow: visible;
  }
  .composer-row .segmented:has(> :nth-child(3)) button {
    flex: 1 1 auto;
    min-width: 2.75rem;
    padding-inline: var(--s1);
  }
}

.composer textarea {
  resize: none;
}

.review-menu-panel .link-button {
  color: var(--color-ink);
  justify-content: flex-start;
  text-align: left;
}

.review-menu-panel .link-button.danger-link {
  color: var(--color-danger);
}

.review-menu-panel .link-button + .danger-link {
  margin-top: var(--s1);
  border-top: 1px solid var(--rule);
  border-radius: 0;
}

.composer-row > button[type='submit'] {
  flex: none;
}

.composer-row:has(.page-field:not([hidden])) {
  flex-wrap: wrap;
}

.composer-row .page-field {
  order: 3;
}

@media (pointer: fine) {
  .composer-row .segmented button {
    min-height: 2.25rem;
  }
}

button.chip {
  border-radius: var(--r-control);
}

/* ==== Gathering page (J-003) =======================================================================
   The date lives in the header only; organizer actions are one "Manage" menu; Notes for the table
   is one card, not a card in a band; empty states are a muted line, not a dashed box. */

.gathering-head > div:not([class]) {
  flex: 1;
  min-width: 0;
}

.gathering-when {
  margin: var(--s1) 0 0;
  font: 500 var(--t-ui) / 1.5 var(--font-ui);
  color: var(--color-ink-soft);
}

.manage-menu > summary {
  width: auto;
  height: auto;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 var(--s4);
  border: 1px solid var(--edge);
  background: var(--color-surface);
  color: var(--color-ink);
}

@media (max-width: 719px) {
  .gathering-head {
    flex-wrap: wrap;
  }
  .gathering-head > .manage-menu {
    flex-basis: 100%;
  }
  .manage-menu > summary {
    display: inline-grid;
  }
  .manage-menu .review-menu-panel {
    right: auto;
    left: 0;
  }
}

.painted-wall {
  background: var(--color-surface);
  border-color: var(--edge);
}

.painted-wall .note-composer {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.empty,
.card.empty,
p.empty {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

/* ==== The Shelf is a list (J-004) ==================================================================
   An open vote is a card with the question as its title and one Vote button; starting a vote is a
   sheet; the Painted Wall's covers are row-sized on a phone, four across. */

.vote-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.vote-open + .vote-open {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
}

.vote-open-label {
  margin: 0 0 var(--s1);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  color: var(--color-primary);
}

.vote-open h2 {
  margin: 0;
  font: 600 var(--t-item) / 1.3 var(--font-display);
}

.vote-open .muted {
  margin: var(--s1) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.vote-open .button {
  flex: none;
}

.section-actions {
  margin: 0 0 var(--s4);
}

.vote-books {
  margin: 0 0 var(--s4);
  padding: 0;
  border: 0;
}

.vote-books legend {
  padding: 0;
  margin-bottom: var(--s2);
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}

.vote-books .check {
  min-height: 2.75rem;
  margin: 0;
}

.vote-sheet > button[type='submit'] {
  width: 100%;
}

button.sheet-close {
  box-shadow: none;
}

@media (max-width: 719px) {
  .wall {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s5) var(--s3);
  }
}

/* S-I05: on a phone a Wall column is narrower than five stars and a number. Each book measures its
   own column: the stars shrink to fit it, and the number drops under them when there's no room,
   so nothing spills into the next book (or widens the column and pushes the covers together). */
.wall li,
.wall a {
  min-width: 0;
}

.wall li {
  container-type: inline-size;
}

.wall-rating {
  flex-wrap: wrap;
  row-gap: 0;
  font-size: min(var(--t-meta), 19cqi); /* as the Amazon link below it: "Not rated yet" holds two lines */
}

/* A wall card's laurels fit its width (four to a row on a phone), as the stars did; the grid gap keeps groups apart
   (Juno on #657). */
.wall-rating .ob-glyphs .ob-glyph svg {
  width: min(14px, calc((100cqi - 12px) / 5));
  height: min(14px, calc((100cqi - 12px) / 5));
}

/* "Ratings sealed until the reveal" where it fits in two lines; "Sealed" in a phone's narrow card. */
.wall-sealed-short {
  display: none;
}

@container (max-width: 100px) {
  .wall-sealed-long {
    display: none;
  }

  .wall-sealed-short {
    display: inline;
  }
}

.wall a.wall-amazon {
  max-width: 100%;
  font-size: min(var(--t-meta), 19cqi);
}

/* ==== Two faces, two jobs (J-005) =================================================================
   The brand's body face is for reading: posts, passages, reviews, notes, pitches, descriptions.
   Everything else (inputs, placeholders, labels, meta lines) is the interface face, so a control
   never mixes two. With the default brand both are Inter, so only branded clubs see a change. */

body,
textarea {
  font-family: var(--font-ui);
}

.post-body,
.quote-text,
.review-body,
.note-body,
.note-preview,
.prose,
.questions li,
.book-list blockquote,
.pick-row-why,
.description,
.lede,
.panel-facts em {
  font-family: var(--font-body);
}

/* A join link that doesn't work (I-05): the way on sits right under the lede, full finger targets. */
.invite-gone-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
}

.invite-gone-actions a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* V-024: a pick from an ask that meets only part of the request says so, under its reason. */
.pick-row-fit {
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

/* "New to Stoa?" over a full-width second button, as easy to find as signing in (S-A04). */
.auth-switch:has(.button) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s2);
  width: 100%;
}

/* A one-time line after something finished elsewhere: a reset, a deleted account (S-A05). */
.page-notice {
  max-width: 40rem;
  margin: 0 auto var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-control);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}

/* The field a form error is about, marked until it's edited (S-J02): the message can sit far below on a phone. */
form [aria-invalid='true'] {
  border-color: var(--color-danger);
}

/* S-M01: the porch's next-gathering card takes an RSVP in place; "Details" opens the gathering. */
.next-gathering .rsvp {
  margin-bottom: var(--s2);
}

/* The card's column is narrow beside the date stone: keep each answer on one line. */
.next-gathering .rsvp button {
  padding-inline: var(--s2);
  white-space: nowrap;
}

.next-gathering .details-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 500;
}

@media (max-width: 359px) {
  /* The narrowest phones: the date stone is decoration (the date is in the text), so the card
     gives its width to the answers instead. */
  .next-gathering.feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .next-gathering .stone {
    display: none;
  }
}

/* S-M03: an earlier gathering that's off, said in one line above the next one that's on. */
.next-gathering .cancel-note {
  margin-bottom: var(--s2);
  font: var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

/* S-S01: who the organizers kept out, each with a way to let them back in. */
.kept-out-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-top: 1px solid var(--rule);
}

.kept-out-list > li:first-child {
  border-top: 0;
}

.kept-out-who {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

.kept-out-list .let-in p {
  margin: 0;
}

.kept-out-who .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

/* SP-05: Before we meet, and What's next after a gathering. Numbered steps; a done step gets a tick. */
.before-steps {
  --dot: 28px;
  list-style: none;
  counter-reset: step;
  margin: var(--s3) 0 var(--s4);
  padding: 0;
}
.before-steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--s4) calc(var(--dot) + var(--s3));
  min-width: 0;
}
.before-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-primary);
  border: 1.5px solid currentColor;
}
/* C7 (Juno's audit): a single step is no list, so it carries no number on stoareads.com. */
.club-plain .before-steps > li:only-child {
  padding-left: 0;
}
.club-plain .before-steps > li:only-child::before {
  content: none;
}
/* C7: "Pin it for the group" under a gathering's one writing box. */
.composer .pin-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  min-height: var(--tap);
  padding-top: var(--s2);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}
.composer .pin-note .muted {
  display: block;
  font-weight: 400;
}
.composer .pin-note input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
}
.before-steps > li.done::before {
  content: '✓';
  /* The light-mode green in both themes, so the white tick keeps its contrast in the dark. */
  color: #fff;
  background: var(--cloth-success, var(--color-success));
  border-color: var(--cloth-success, var(--color-success));
}
.before-steps .step-title {
  margin: 0 0 var(--s2);
  min-height: var(--dot);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 var(--s2);
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}
.before-steps > li > p:not(.step-title) {
  margin: var(--s2) 0 0;
}
.before-steps .away-nudge {
  margin: 0;
}
/* The answer buttons take the card's full width, so "Can't go" stays on one line on a phone. */
.before-steps .rsvp {
  display: grid;
  width: calc(100% + var(--dot) + var(--s3));
  max-width: 26rem;
  margin: var(--s3) 0 var(--s3) calc(-1 * (var(--dot) + var(--s3)));
}
.before-steps .rsvp button {
  padding-inline: var(--s2);
  white-space: nowrap;
}
.next-gathering .prep-line,
.next-gathering .after-note {
  margin: var(--s2) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  overflow-wrap: anywhere;
}
.next-gathering .after-note {
  margin: 0;
}
/* PA3 (Juno, polish pass 1): "After {book}: what’s next" gets 12 px under a button above it, at the body size in
   soft ink. Held on a club's own address until Seph's yes (DOOR_AUDIT2). */
:root:not(.door-held-a2) .next-gathering .button + .after-note {
  margin-top: var(--s3);
}
:root:not(.door-held-a2) .next-gathering .after-note {
  font-size: var(--t-ui);
  color: var(--color-ink-soft);
}
/* PA2 (Juno, polish pass 1): "Invite your club" and "Members" are sibling sections on the club's About tab, so they
   share one size: --h-sub, 22 px on a desktop and 20 on a phone. Held on a club's own address (DOOR_AUDIT2). */
:root:not(.door-held-a2) .about-page > .card.invite > h2,
:root:not(.door-held-a2) .about-page > h2#members {
  font-size: var(--h-sub, 1.25rem);
}
/* U15 (Juno): "Questions to think about" sits the same gap below the block above it as "Notes for the gathering"
   does at every width (--club-gap: 24 px on phones, 32 px wide), never flush against the last RSVP row. Held on a
   club's own address until Seph's yes (DOOR_AUDIT2). */
:root:not(.door-held-a2) .gathering #questions {
  margin-top: var(--club-gap, var(--s5));
}
/* A jump from a step lands below the sticky top bar, with the heading in view. */
.gathering section > h2[tabindex],
.gathering .thread h2[tabindex],
.gathering .painted-wall h2[tabindex],
.gathering .painted-wall > h2 {
  scroll-margin-top: var(--s8);
}
.gathering h2[tabindex]:focus {
  outline-offset: var(--s1);
}
/* The calendar link lines up with the answer buttons above it. */
.before-steps .rsvp + p {
  margin-left: calc(-1 * (var(--dot) + var(--s3)));
}

/* F2-2: on phones, a control that gets keyboard focus scrolls clear of the fixed tab bar on every
   page, not only on forms with a sticky submit bar (that rule leaves more room and still applies). */
@media (max-width: 720px) {
  html:has(.tab-bar):not(:has(.form-submit)) {
    scroll-padding-bottom: calc(var(--tab-bar) + var(--s4));
  }
}

/* "Get your club going": an organizer's first three steps on a new club's Porch (setup.js, SP-04).
   One card, a numbered list with hairlines, and only the next step carries a filled button. */
.card.setup {
  padding-bottom: var(--s3);
}

.setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
}

.card.setup h2 {
  margin: 0;
  font: 500 var(--t-section) / var(--lh-section) var(--font-display);
  letter-spacing: var(--track-snug);
}

.setup-count {
  margin: var(--s1) 0 0;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

button.link-button.setup-hide {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 2.75rem;
  margin-top: calc(-1 * var(--s2));
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.setup-steps {
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}

.setup-step {
  display: flex;
  gap: var(--s3);
  padding: var(--s4) 0;
  border-top: 1px solid var(--rule);
}

.setup-step.done {
  align-items: center;
  padding: var(--s3) 0;
}

.setup-mark {
  display: inline-flex;
  flex: none;
  margin-top: calc(var(--s1) / 2);
  color: var(--color-ink-soft);
}

.setup-step.done .setup-mark {
  margin-top: 0;
  color: var(--color-primary);
}

.setup-body {
  flex: 1;
  min-width: 0;
}

.setup-name {
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
}

.setup-name a {
  color: inherit;
}

.setup-state {
  margin-left: var(--s1);
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.setup-help {
  margin: var(--s1) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.setup-step .button.setup-go {
  margin-top: var(--s3);
}

a.setup-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.setup-step .invite-inline .invite-line {
  margin-top: var(--s3);
}

.setup-step .invite-inline .invite-or {
  margin: var(--s2) 0 0;
}

.setup-set,
.setup-hidden {
  margin: 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

@media (max-width: 40rem) {
  .setup-step .button.setup-go {
    width: 100%;
    min-height: 3rem;
  }
}

.setup-step .invite-status:empty {
  display: none;
}

@media (min-width: 641px) {
  .porch-main > .setup,
  .porch-main > .setup-set,
  .porch-main > .setup-hidden {
    margin-bottom: var(--s5);
  }
}

.setup-again {
  margin: 0 0 var(--s5);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.setup-again .link-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* SP08-02: the session ended mid-use. The toast stays until they sign in again or move on. */
.toast.signed-out {
  width: max-content;
}

.toast.signed-out button {
  min-height: 2.75rem;
  box-shadow: none;
  font-weight: 600;
  white-space: nowrap;
}

/* P1 #2: "Added to your Next up." stays on one line, and Undo is a full-size target. */
.toast.next-up {
  width: max-content;
}

.toast.next-up button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  box-shadow: none;
  font-weight: 600;
  white-space: nowrap;
}

/* Not a success and not their mistake: "Not saved." under a form while the signed-out alert explains. */
.form-status.quiet {
  color: var(--color-ink-soft);
}

/* W2-3: an organizer is offered Stoa's questions for a club book that matches one of Stoa's picks. */
.stoa-pick-offer {
  margin: var(--s5) 0;
}

.stoa-pick-offer h2 {
  margin-bottom: var(--s2);
}

.stoa-pick-offer .form-status:empty {
  display: none;
}

/* W2-3: the pick's questions, shown before the organizer decides, and "Not this book" beside the button. */
.stoa-pick-questions {
  margin: var(--s3) 0;
}

.stoa-pick-questions summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.stoa-pick-questions ol {
  margin: var(--s2) 0 0;
  padding-left: var(--s5);
}

.stoa-pick-questions li + li {
  margin-top: var(--s2);
}

.stoa-pick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.stoa-pick-actions .link-button {
  min-height: 2.75rem;
}

/* W2-3b: what's left where the offer was after "Not this book". */
.stoa-pick-declined {
  margin: var(--s5) 0;
  color: var(--color-ink-soft);
}

/* The porch starters are buttons, so they follow the club's brand radius like every other button,
   not a pill (PRINCIPLES.md). button.chip already does (Gathering page block above). */
button.starter {
  border-radius: var(--r-control);
}

/* W3-2: a club that has met, with nothing planned. When it last met sits above the one next step. */
.next-gathering.after-met .last-time {
  margin: var(--s1) 0 0;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  overflow-wrap: anywhere;
}
/* VA8 (Juno): one size in the block, the body size; "Last time" is the quieter line by colour, not size. Held on a
   club's own address until Seph's yes (DOOR_AUDIT2). */
:root:not(.door-held-a2) .next-gathering.after-met .last-time {
  font: inherit;
  color: var(--color-ink-soft);
}

/* W3-1: a club's first book. Stoa's start-here picks on the pick page, and the one-tap first book
   on the Shelf when an organizer has a single nomination. */
.first-picks {
  margin-bottom: var(--s6);
}

.first-picks h2 + .muted {
  margin-top: var(--s1);
}

.first-book-note {
  margin-bottom: var(--s4);
}

/* Choosing one of the row's picks lands on the chosen book below the sticky top bar. */
.picked-details {
  scroll-margin-top: var(--s8);
}

.picked-details h2[tabindex]:focus {
  outline-offset: var(--s1);
}

.first-book-note .actions {
  margin-top: var(--s2);
  align-items: center;
}

/* Reading preferences (/settings/reading, taste.js) */
.reading-prefs .learned-list {
  list-style: none;
  padding: 0;
  margin: var(--s3) 0;
}

.reading-prefs .learned-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  border-top: 1px solid var(--rule);
}

.reading-prefs .learned-list li:first-child {
  border-top: 0;
}

/* For you's eyebrow, with "Tune" at its right. */
.for-you-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.for-you-eyebrow .eyebrow {
  margin: 0;
}

.for-you-tune {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--t-ui);
  line-height: 1.33;
  color: var(--color-ink);
}

/* Tune your ranking (L6, SPEC-LIBRARY §9): a hairline list of the 13 with Less / Usual / More, three dials, the top 5. */
.tune {
  scroll-margin-top: var(--s8);
}

.tune h3 {
  margin: var(--s5) 0 var(--s2);
  font-size: var(--t-ui);
}

.tune-subjects {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s3);
}

.tune-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  border-top: 1px solid var(--rule);
}

.tune-subject:last-child {
  border-bottom: 1px solid var(--rule);
}

.tune-opts {
  display: flex;
  flex: none;
}

.tune-opt {
  display: grid;
  place-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--s2);
  font-size: var(--t-ui);
  line-height: 1.33;
  color: var(--color-ink-soft);
  cursor: pointer;
}

.tune-opt span {
  border-bottom: 2px solid transparent;
}

.tune-opt:has(input:checked) {
  color: var(--color-ink);
  font-weight: 600;
}

.tune-opt:has(input:checked) span {
  border-bottom-color: currentColor;
}

.tune-opt:has(input:focus-visible) span {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (max-width: 22.5rem) {
  .tune-subject {
    display: block;
    padding-top: var(--s2);
  }

  .tune-opts {
    margin-left: calc(var(--s2) * -1);
  }
}

.tune-dial {
  margin-top: var(--s4);
}

.tune-dial-name {
  display: block;
  font-weight: 600;
}

.tune-range {
  width: 100%;
  height: var(--tap);
  margin: 0;
  background: transparent;
  accent-color: var(--color-ink);
  cursor: pointer;
  appearance: none;
}

.tune-range::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--color-line);
}

.tune-range::-moz-range-track {
  height: 2px;
  background: var(--color-line);
}

.tune-range::-webkit-slider-thumb {
  width: 1.25em;
  height: 1.25em;
  margin-top: calc(1px - 0.625em);
  background: var(--color-ink);
  border: 0;
  border-radius: 50%;
  appearance: none;
}

.tune-range::-moz-range-thumb {
  width: 1.25em;
  height: 1.25em;
  background: var(--color-ink);
  border: 0;
  border-radius: 50%;
}

.tune-ends {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  font-size: var(--t-label);
  color: var(--color-ink-soft);
}

.tune-now {
  margin: var(--s1) 0 0;
  font-size: var(--t-label);
  line-height: 1.43;
  color: var(--color-ink-soft);
  text-align: center;
}

.tune-reset {
  min-height: var(--tap);
  margin-top: var(--s3);
}

/* Your top 5: compact rows at a fixed height, so the preview swaps in place (CLS 0). */
.tune-top {
  display: grid;
  grid-template-rows: repeat(5, 4.5rem);
  row-gap: var(--s2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.tune-top-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
}

.tune-top-cv {
  flex: none;
  width: 3rem;
  height: 4.5rem;
}

.tune-top-cv > .cover {
  width: 100%;
  height: 100%;
}

.tune-top-text {
  display: grid;
  min-width: 0;
}

.tune-top-t,
.tune-top-by {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tune-top-t {
  font-weight: 600;
  line-height: 1.375;
}

.tune-top-by {
  font-size: var(--t-ui);
  line-height: 1.33;
  color: var(--color-ink-soft);
}

.tune-top-empty {
  grid-row: 1 / span 5;
  margin: 0;
}

.reading-prefs .reset-button {
  margin-top: var(--s4);
}

/* UX pass #5: a pick row with its own Want to read button, so saving a book doesn't need the sheet.
   The row stays one tap target for "tell me more"; the button sits beside it (under it on a phone). */
.pick-list-rows li.pick-row-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--s3);
}

.pick-row-action {
  display: flex;
  justify-content: flex-end;
  min-width: 7.5rem;
}

.pick-row-action .pick-save {
  min-height: 2.75rem;
  white-space: nowrap;
}

.pick-row-action .pick-row-have {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  outline-offset: 2px;
}

@media (max-width: 34rem) {
  .pick-list-rows li.pick-row-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .pick-list-rows li.pick-row-item button.pick-row {
    padding-bottom: var(--s2);
  }

  .pick-row-action {
    justify-content: flex-start;
    min-width: 0;
    /* Line the button up with the text: past the 40px cover and its 1rem gap. */
    padding: 0 0 var(--s4) calc(var(--s6) + var(--s5));
  }
}

.pick-row-action .pick-row-have > span[aria-hidden='true'] {
  margin-right: var(--s1);
}

/* #165 review: "✓ On your list" and Undo right after a save, and a failed save said on screen. */
.pick-row-action {
  flex-wrap: wrap;
  gap: var(--s1) var(--s2);
}

.pick-row-done {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  font: 600 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-success);
}

.pick-row-done .pick-row-have {
  min-height: 2.75rem;
}

.pick-row-done {
  gap: var(--s3);
}

.pick-row-done .pick-undo {
  min-height: 2.75rem;
  font: 600 var(--t-meta) / 1 var(--font-ui);
}

.pick-save-error {
  flex-basis: 100%;
  margin: 0;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

@media (min-width: 34.01rem) {
  .pick-save-error {
    max-width: 12rem;
    text-align: right;
  }
}

/* ---- For you (/for-you) ---- */

/* The line on why a book is here for you, above Stoa's own reason for picking it. */
.pick-row-lead {
  margin-top: var(--s1);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.for-you-empty p:last-child {
  margin-bottom: 0;
}

/* ==== Book panel, book first (WS-13, Juno's APP-DISCOVER.md §2) ================================ */
.book-panel .bp-head {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
  margin-bottom: var(--s4);
}

.book-panel .bp-head .cover {
  width: 104px;
  height: 156px;
  flex: none;
}

.bp-facts {
  margin: 0 0 var(--s2);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.bp-subjects {
  margin: 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.bp-subjects a,
.bp-links a,
.bp-proof a {
  color: var(--color-primary);
}

.bp-why {
  margin: 0 0 var(--s3);
  font: 400 var(--t-read) / 1.5 var(--font-body);
  color: var(--color-ink);
}

.bp-proof {
  margin: 0 0 var(--s4);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.bp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s4) 0 var(--s2);
}

.bp-save {
  display: inline-flex;
  flex-wrap: wrap;
}

.bp-actions .button {
  min-height: 48px;
}

.bp-save .bp-save-main {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.bp-save .bp-save-more {
  min-width: 44px;
  padding-inline: var(--s3);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-inline-start: 1px solid color-mix(in srgb, var(--color-on-primary) 35%, transparent);
}

/* In the flow, under the button: a sheet scrolls, so a floating menu would be cut off. */
.bp-menu {
  display: grid;
  flex-basis: 100%;
  margin-top: var(--s1);
  padding: var(--s1);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  box-shadow: var(--float);
}

.bp-menu[hidden] {
  display: none;
}

.bp-menu-item {
  min-height: 44px;
  padding: 0 var(--s3);
  text-align: start;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  background: none;
  border: 0;
  border-radius: var(--r-control);
  white-space: nowrap;
}

.bp-menu-item:hover,
.bp-menu-item:focus-visible {
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.bp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
  margin: var(--s3) 0 0;
  padding-top: var(--s2);
  border-top: 1px solid var(--rule);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.bp-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 37.5em) {
  .book-panel .bp-head .cover {
    width: 88px;
    height: 132px;
  }
}

/* Book panel, Juno's fixes: a book-first head, one menu box, equal actions (WS-13) */
.book-panel .bp-head {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 'cover meta' 'cover why';
  align-items: start;
  column-gap: var(--s4);
}

.book-panel .bp-head .cover {
  grid-area: cover;
}

.book-panel .bp-meta {
  grid-area: meta;
}

.book-panel .bp-head .bp-why {
  grid-area: why;
  margin: var(--s3) 0 0;
}

.bp-actions .button {
  border-radius: calc(var(--radius) / 4);
}

.bp-save .bp-save-main {
  flex: 1;
}

.bp-actions > .bp-save,
.bp-actions > .bp-buy {
  flex: 1;
}

.bp-actions > .bp-buy {
  justify-content: center;
}

.bp-menu {
  padding: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) / 4);
}

.bp-menu .bp-menu-item {
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 var(--s3);
  justify-content: flex-start;
  text-align: start;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bp-menu .bp-menu-item + .bp-menu-item {
  border-top: 1px solid var(--rule);
}

.bp-check {
  flex: none;
  width: 1em;
  color: var(--color-primary);
}

@media (max-width: 37.5em) {
  .book-panel .bp-head {
    grid-template-areas: 'cover meta' 'why why';
  }

  .bp-actions {
    flex-direction: column;
  }

  .bp-actions > .bp-save,
  .bp-actions > .bp-buy {
    width: 100%;
  }
}

/* Two equal halves that keep their own height when the menu opens under Save. */
.bp-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.bp-save .bp-save-main {
  white-space: nowrap;
}

/* Ink in every state; the tint marks only the row under the pointer or the keyboard, one at a time. */
.bp-menu .bp-menu-item:focus {
  color: var(--color-ink);
  background: none;
}

.bp-menu .bp-menu-item:hover,
.bp-menu .bp-menu-item:focus-visible {
  color: var(--color-ink);
  background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

@media (max-width: 37.5em) {
  .bp-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Members' own places after the club's (Juno): a gap, no divider. */
.site-nav > a.nav-mine {
  margin-left: var(--s4);
}

/* Discover's search (WS-13; Juno's SPEC §5): the field, then one toolbar row of Subject, Published and
   Sort, then the count and the results as pick rows. On a phone the toolbar scrolls sideways. */
.find-form {
  margin-top: var(--s5);
}

/* The field is the shared one (menu.css .sf, SPEC-SEARCH-BAR §2), at most 640 px on Discover (ruling 00:35 UTC Nov 12). */
.find-form.sf {
  max-width: 640px;
}

.find-toolbar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s3);
  overflow-x: auto;
  scrollbar-width: none;
}

.find-toolbar:empty {
  display: none;
}

/* While the filters load, their room is held, so the heading and the page under it don't drop (Vera, Nov 11). */
.find-toolbar-wait:empty {
  display: flex;
  min-height: 48px;
}

.find-control {
  position: relative; /* keeps its hidden label inside the control */
  flex: none;
}

.find-control select {
  width: auto;
  min-height: 48px;
}

/* Phones: no sideways scroll. Subject takes the first row, Published and Sort share the second, Clear sits under them. */
@media (max-width: 600px) {
  .find-toolbar {
    flex-wrap: wrap;
    overflow: visible;
  }

  .find-toolbar-wait:empty {
    min-height: calc(96px + var(--s2));
  }

  .find-toolbar-wait.find-toolbar-clear:empty {
    min-height: calc(96px + var(--tap) + 2 * var(--s2));
  }

  .find-control {
    flex: 1 1 0;
    min-width: 0;
  }

  .find-control:first-child {
    flex-basis: 100%;
  }

  .find-control select {
    width: 100%;
  }

  .find-toolbar .link-button {
    flex: 1 0 100%;
    min-height: 44px;
    justify-content: flex-start;
    text-align: start;
  }
}

.find-heading {
  margin: var(--s5) 0 0;
  font: 500 var(--t-section) / 1.25 var(--font-display);
}

.find-heading[hidden] {
  display: none;
}

.find-count {
  margin: var(--s4) 0 0;
}

.find-coverage {
  margin: var(--s1) 0 var(--s3);
  font-size: var(--t-label);
}

.pick-row-standing {
  display: block;
  font-size: var(--t-label);
  color: var(--color-ink-soft);
}

/* ---- Personal and club, apart (app UX sprint, PR 1) ---- */

/* The header's club item: its name links to the club, the caret beside it opens Your clubs. */
.site-nav a.nav-club {
  max-width: 14rem;
  /* clip, not hidden, so its 44px unseen area (R3-59) reaches past the 31px box; the ellipsis still cuts the name. */
  overflow: clip;
  overflow-clip-margin: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The club's name and its caret read as one control: no gap, one hover. */
.nav-club-group {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-control);
}

.nav-club-group:hover {
  background: var(--hover);
}

.nav-club-group:has(> a[aria-current='page']) {
  background: transparent;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.nav-club-group:has(> a[aria-current='page']) > a[aria-current='page'] {
  box-shadow: none;
}

.nav-club-group > a.nav-club {
  padding-right: 0;
}

.nav-club-group > a.nav-club:hover,
.nav-club-group > a.nav-club[aria-current='page'] {
  background: transparent;
}

button.nav-club-switch {
  display: inline-grid;
  place-items: center;
  min-width: 2em;
  min-height: 44px;
  padding: 0;
  color: var(--color-ink-soft);
  font: 500 var(--t-meta) / 1 var(--font-ui);
  background: transparent;
  border: 0;
  border-radius: var(--r-control);
  box-shadow: none;
}

button.nav-club-switch:hover {
  color: var(--color-ink);
  background: transparent;
}

/* The club's rooms, a second row on club pages only, so the top row never changes. */
.club-nav {
  border-bottom: 1px solid var(--edge);
  background: var(--color-surface);
}

.club-nav-inner {
  display: flex;
  align-items: stretch;
  gap: var(--s4);
  padding-inline: max(var(--s6), (100% - var(--w-page)) / 2);
}

.home-foryou {
  margin: var(--s5) 0 0;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.home-foryou a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
}

/* On a wider screen the club's name is in the header; here it would only repeat. */
.club-nav-name,
button.club-nav-name {
  display: none;
}

.club-rooms {
  display: flex;
  gap: var(--s5);
  font: 500 var(--t-ui) / 1 var(--font-ui);
}

.club-room {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--color-ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.club-room:hover {
  color: var(--color-ink);
}

.club-room[aria-current='page'] {
  color: var(--color-ink);
  border-bottom-color: var(--color-primary);
}

.club-sheet-more {
  border-top: 1px solid var(--rule);
}

/* stoareads.app and the one site: under the clubs, one hairline, the list's own (Juno on #357). A club's own site keeps
   its sheet as it is. */
.club-switch.in-sheet:not([hidden]) ~ .club-sheet-ways {
  border-top: 0;
}

/* Home: your clubs first, one tap each, then what you're reading. */
.home-head {
  padding-bottom: var(--s2);
}

.home-clubs h2 {
  margin-top: 0;
}

.home-clubs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-clubs-list li + li {
  border-top: 1px solid var(--rule);
}

.home-club,
button.home-club {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--s2) 0;
  color: var(--color-ink);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-club:hover,
button.home-club:hover {
  color: var(--color-primary);
  background: transparent;
}

.home-club-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.home-club-text .muted {
  font-size: var(--t-meta);
}

/* The next gathering under its club: lined up with the club's name, a full finger target. */
.home-club-next,
button.link-button.home-club-next {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 44px;
  margin: calc(-1 * var(--s3)) 0 var(--s1);
  /* Lined up with the club's name: the initial's width plus the row's gap. */
  padding-left: calc(var(--s6) + var(--s3));
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

.home-club-go {
  color: var(--color-ink-soft);
  font-size: var(--t-section);
}

.home-today {
  margin-top: var(--s5);
}

.home-today-empty {
  padding: var(--s3) 0;
}

.home-club-away {
  display: flex;
  align-items: center;
  min-height: 44px;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}

button.lobby-next-link {
  justify-content: flex-start;
  width: 100%;
  min-height: 0;
  padding: var(--s4) 0;
  color: var(--color-ink);
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.discover-for-you {
  margin: var(--s2) 0 0;
}

@media (max-width: 720px) {
  .club-nav-inner {
    flex-direction: column;
    gap: 0;
    padding-inline: var(--s5);
  }

  /* On a phone the club's name heads its rooms: one tap opens Your clubs (on a club's own address, just its name). */
  .club-nav-name,
  button.club-nav-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
    width: 100%;
    min-height: 48px;
    padding: 0;
    color: var(--color-ink);
    font: 600 var(--t-ui) / 1.2 var(--font-ui);
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    box-shadow: none;
  }

  .club-nav-caret {
    color: var(--color-ink-soft);
  }

  .club-rooms {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .club-room {
    justify-content: center;
    min-height: 44px;
  }

  .lobby-next {
    grid-template-columns: 1fr;
  }
}

/* UX-21: at 320 the four equal cells left about 10 px between "Home" and "Gatherings", so the labels read as one run.
   Wherever the phone tab row shows (up to 720), each tab takes its label's width, on the 24 px gutter, with up to 40 px
   between tabs: the spacer columns share the room evenly until each reaches 40, and anything left goes to the right
   end (Juno). Only on Stoa's own address (.club-plain): a club's own address (cltbb.com) keeps its tabs as they are
   until Seph says yes. */
@media (max-width: 720px) {
  :root.club-plain .club-rooms {
    grid-template-columns: auto minmax(0, 40px) auto minmax(0, 40px) auto minmax(0, 40px) auto 1fr;
  }

  /* Never under the 44 px tap target, however short the label (Vera). */
  :root.club-plain .club-room {
    min-width: 44px;
  }

  :root.club-plain .club-room:nth-child(1) {
    grid-column: 1;
  }

  :root.club-plain .club-room:nth-child(2) {
    grid-column: 3;
  }

  :root.club-plain .club-room:nth-child(3) {
    grid-column: 5;
  }

  :root.club-plain .club-room:nth-child(4) {
    grid-column: 7;
  }
}

/* Sheet rows stay flat: no button card or shadow, the same inset for links and buttons, a ring only
   for keyboard focus, and no hover fill left behind by a tap (Juno, #187). */
dialog.sheet .sheet-choice,
dialog.sheet .club-switch-choice {
  box-shadow: none;
}

dialog.sheet button.sheet-choice.plain {
  display: flex;
  min-height: 3rem;
  padding: var(--s2) var(--s1);
}

dialog.sheet .sheet-choice:focus-visible,
dialog.sheet .club-switch-choice:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

@media (hover: none) {
  dialog.sheet .sheet-choice:hover,
  dialog.sheet .club-switch-choice:hover {
    background: transparent;
  }
}

/* ---- The club's space (app UX sprint, PR 2) ---- */

p.club-nav-name {
  margin: 0;
}

/* Each club in Your clubs says when it next meets. */
.club-switch-name {
  display: flex;
  flex-direction: column;
}

.club-switch-next {
  color: var(--color-ink-soft);
  font-size: var(--t-meta);
  font-weight: 400;
}

/* Gatherings: Upcoming or Past, one at a time. */
.gathering-views {
  display: flex;
  gap: var(--s5);
  margin: 0 0 var(--s4);
  border-bottom: 1px solid var(--rule);
  font: 500 var(--t-ui) / 1 var(--font-ui);
}

.gathering-views a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.gathering-views a[aria-current='page'] {
  color: var(--color-ink);
  border-bottom-color: var(--color-primary);
}

/* About: the club's description, then its people. */
.about-page .lede {
  margin-top: 0;
}

.about-welcome {
  margin: var(--s4) 0 var(--s5);
}

.about-page > h2 {
  margin-top: var(--s7);
}

.about-away {
  margin-top: var(--s6);
}

/* Once, right after joining: where the club lives (Juno, PR 3). Same note style as the first-gathering line. */
.joined-line {
  margin-top: var(--s4);
  font-weight: 600;
}

/* Your page (/me): you, your clubs, your reading. */
.me-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  padding: var(--s6) 0 var(--s4);
}

.me-head h1 {
  margin: 0;
  font-size: var(--t-title);
}

.me-head-text p {
  margin: var(--s1) 0 0;
}

.me-edit {
  font-size: var(--t-label);
}

.me-prompt {
  margin: 0 0 var(--s4);
  color: var(--color-ink-soft);
}

.me-reading,
.me-books {
  margin-top: var(--s6);
}

.me-reading h2,
.me-books h2 {
  margin-bottom: var(--s4);
}

.me-books h2 a {
  color: inherit;
  text-decoration: none;
}

.me-shelf-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.me-shelf-counts a {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  min-height: 2.75rem;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--color-line);
  border-radius: var(--r-card);
  background: var(--color-surface);
  color: var(--color-ink);
  text-decoration: none;
}

.me-shelf-counts a:hover {
  border-color: var(--color-primary);
}

.me-shelf-counts strong {
  font-size: var(--t-section);
}

.me-shelf-counts span {
  color: var(--color-ink-soft);
  font-size: var(--t-label);
}

/* The rooms row already names the club, so its Porch hero is quieter (Juno, #187). */
body:has(.club-nav) .porch-head.beam {
  margin-top: var(--s4);
  padding: var(--s5);
}

body:has(.club-nav) .porch-head.beam h1 {
  font-size: var(--t-title);
}

/* On a phone the club row above already says the name, so the hero keeps only its line and faces:
   about half the height, and the name stays for screen readers (Juno, PR 2 note 4). */
@media (max-width: 720px) {
  body:has(.club-nav) .porch-head.beam {
    padding: var(--s4);
  }
  body:has(.club-nav) .porch-head.beam h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  body:has(.club-nav) .porch-head.beam .lede {
    margin-top: 0;
  }
}

/* Four shelves on a book's page: two by two on a phone, so no label breaks over three lines (PR 4). */
@media (max-width: 720px) {
  .my-book-page .segmented {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
  }
  .my-book-page .segmented button {
    min-height: 2.75rem;
  }
}

/* Discover: a book we don't carry, searched on Amazon. A quiet text line, last under the results (WS-28). */
.find-amazon {
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
  font: 400 max(15px, var(--t-ui)) / 1.45 var(--font-ui);
}

.find-amazon p {
  margin: 0;
}

.find-amazon a {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.find-amazon-note {
  margin-top: var(--s1) !important;
}

/* No results: no empty list box above "Not here?". */
.find-results:empty {
  display: none;
}

/* ---- stoareads.app: the app is Stoa, the club is the club (Juno, SPEC-APP-IDENTITY.md) ---- */

/* The club's row opens with its masthead on every width: "Your club", its logo and its name. */
.club-nav-inner:has(.club-mast) {
  flex-direction: column;
  gap: 0;
}

button.club-nav-name.club-mast {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s3);
  width: 100%;
  min-height: 0;
  padding: var(--s4) 0 var(--s3);
  color: var(--color-ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}

.club-mast-tail {
  white-space: nowrap;
}

/* C14 (Juno's audit): the chevron is its own 44px box beside the name, never left alone on a wrapped line. */
.club-mast-caret {
  display: grid;
  place-items: center;
  flex: none;
  /* Level with the first line of the name, however many lines it wraps to (Juno on #701). */
  align-self: flex-start;
  width: var(--tap);
  height: var(--tap);
  margin-top: var(--s4);
  margin-left: calc(-1 * var(--s2));
  color: var(--color-ink-soft);
}

.club-mast-caret svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* UX-12: the club's mark is its initial in a 48px square, as Your clubs and .com's invite card draw it, or the club's
   own logo where its organizer set one. Never Stoa's icon. It sits on the top of the name, not its middle (UX-21). */
.club-mast-logo,
.club-mast-initial {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--r-control);
}

.club-mast-logo {
  object-fit: contain;
}

.club-mast-initial {
  display: grid;
  place-items: center;
  color: var(--color-primary);
  font: 600 1.5rem / 1 var(--font-display);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
}

button.club-nav-name.club-mast:has(.club-mast-initial, .club-mast-logo) {
  align-items: flex-start;
}

.club-mast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Juno, SPEC-CLUBS A2: "Your club" 14/20, the name 24/30 (28/34 from 900), the facts line 14/20. */
.club-mast-kick {
  color: var(--color-ink-soft);
  font: 500 var(--t-label) / 1.4286 var(--font-ui);
}

.club-mast-name {
  color: var(--color-ink);
  font: 400 1.5rem / 1.25 var(--font-display);
}

@media (min-width: 900px) {
  .club-mast-name {
    font: 400 1.75rem / 1.2143 var(--font-display);
  }
}

/* C1 (Juno's audit): an uploaded photo or logo fills its tile wherever a club's initial would sit. */
img.club-tile-img {
  object-fit: cover;
  background: var(--color-surface);
  outline: 1px solid var(--edge);
  outline-offset: -1px;
}

/* The organizer's camera badge: the whole 48px tile is the target, the badge marks its corner. */
.club-mast-wrap {
  position: relative;
}

.club-tile-badge {
  position: absolute;
  top: var(--s4);
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--r-control);
  cursor: pointer;
}

.club-tile-badge:has(input:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.club-tile-badge.busy {
  opacity: 0.6;
}

.club-tile-cam {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--color-ink);
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px var(--edge),
    0 1px 2px rgb(0 0 0 / 0.12);
}

/* Club settings: "Club photo or logo", a 96px preview beside its buttons. */
.club-image-row {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}

.club-image-preview {
  flex: none;
}

.club-image-tile {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: var(--r-control);
}

span.club-image-tile {
  display: grid;
  place-items: center;
  color: var(--color-primary);
  font: 600 2.5rem / 1 var(--font-display);
  background: color-mix(in oklab, var(--color-primary) 10%, var(--color-surface));
}

.start-club-image .label,
.start-club-image .hint {
  margin: 0;
}

.club-image-preview:empty {
  display: none;
}

.club-image-body .hint {
  margin: 0;
}

.club-image-body .club-image-own {
  margin-top: var(--s2);
}

.club-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  align-items: center;
  margin-top: var(--s3);
}

/* Me: your club's row carries its logo, the only place outside the club it shows. */
.home-club-logo {
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* The Stoa Society (/society, SPEC-SOCIETY.md §2): a masthead, the lead pick, the rest as rows with a hairline
   between them, For you, then past editions. No numerals: an edition isn't a ranking. */
.soc-mast {
  margin: var(--s6) 0 var(--s5);
}
.soc-mast h1 {
  margin: 0;
  font: 400 var(--t-title) / 1.1 var(--font-display);
}
.soc-edition {
  margin: var(--s2) 0 0;
  /* The edition's date arrives with the edition: its line is held, so the intro under it never moves (V16). */
  min-height: 1lh;
}
.soc-wait {
  min-height: 100vh;
}
.soc-intro {
  margin: var(--s3) 0 0;
}
.soc-lead {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s5);
  align-items: start;
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--rule);
}
.soc-lead .soc-lead-read {
  grid-column: 2;
  margin-top: calc(-1 * var(--s4));
}
/* The cover spans both rows, so "I've read it" sits right under the text, not under the cover. */
.soc-lead .soc-lead-cover {
  grid-row: 1 / span 2;
}
.soc-lead {
  grid-template-rows: auto 1fr;
}
.soc-lead .cover-L {
  width: 200px;
  height: 300px;
}
.soc-lead h2 {
  margin: 0;
  font: 500 var(--t-section) / 1.2 var(--font-display);
}
.soc-title {
  font: inherit;
  text-align: start;
  color: inherit;
}
.soc-by {
  margin: var(--s1) 0 0;
}
.soc-why {
  margin: var(--s3) 0 0;
  font-family: var(--font-display);
}
.soc-why-lead {
  font-size: var(--t-section);
  line-height: 1.4;
}
.soc-trust {
  margin: var(--s2) 0 0;
  color: var(--color-ink-soft);
}
.soc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s4);
  align-items: center;
}
.soc-save .error {
  margin: var(--s2) 0 0;
}
.soc-note {
  margin: var(--s2) 0 0;
}
.soc-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.soc-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: var(--s4);
  padding: var(--s5) 0;
  border-bottom: 1px solid var(--rule);
}
.soc-row .cover-M {
  width: 84px;
  height: 126px;
}
.soc-row h3 {
  margin: 0;
  font: 500 var(--t-item) / 1.25 var(--font-display);
}
.soc-row .soc-save {
  margin-top: var(--s3);
}
.soc-lead-cover,
.soc-row-cover {
  padding: 0;
}
.soc-none {
  font: 400 var(--t-section) / 1.4 var(--font-display);
}
.soc-for-you,
.soc-past {
  margin-top: var(--s6);
}
.soc-past ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.soc-past li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.soc-card h2 {
  margin: 0;
}
.soc-card p {
  margin: var(--s2) 0 0;
}
.soc-card a,
.discover-society a {
  font-weight: 500;
}
.discover-society {
  margin: var(--s2) 0 0;
}
@media (max-width: 720px) {
  .soc-lead {
    grid-template-columns: 120px 1fr;
    gap: var(--s4);
  }
  .soc-lead .cover-L {
    width: 120px;
    height: 180px;
  }
  .soc-lead-body .soc-actions,
  .soc-lead-body .soc-note {
    grid-column: 1 / -1;
  }
  .soc-lead .soc-lead-read {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .soc-lead .soc-lead-cover {
    grid-row: auto;
  }
  /* A 120px cover leaves a narrow column: the lead's why line steps down a size on a phone. */
  .soc-why-lead {
    font-size: var(--t-item);
  }
  .soc-row {
    grid-template-columns: 64px 1fr;
  }
  .soc-row .cover-M {
    width: 64px;
    height: 96px;
  }
}

/* "I've read it" and its private rating (WS-36, SPEC-ALREADY-READ.md): a text button, quieter than Save. */
.read-it {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
}

.read-it-button,
.read-it-done {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  background: none;
  border: 0;
  box-shadow: none;
}

button.read-it-button:hover,
button.read-it-reopen:hover {
  color: var(--color-ink);
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.read-it-done {
  color: var(--color-success);
  /* A rated line that wraps starts under "Read,", flush left, never centred beside the check (Seph's P1, site #653). */
  text-align: left;
}

/* A rated cover card: one line, the check and the rating's words, in ink (Seph's iPhone, site #708). */
.read-it-done.read-it-card {
  color: var(--color-ink);
  white-space: nowrap;
}

.read-it-check {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.read-it-check.filled {
  padding: var(--s1);
  color: var(--color-on-primary);
  background: var(--color-success);
  border-radius: 50%;
  box-sizing: content-box;
  width: 0.75rem;
  height: 0.75rem;
}

.read-it-rate,
.link-button.read-it-rate {
  font-size: var(--t-meta);
  color: var(--color-ink-soft);
  /* A 44 px target for small text, without moving the line (Juno). */
  padding-block: var(--s3);
  margin-block: calc(-1 * var(--s3));
}

.finished-confirm .read-it {
  margin-block: var(--s4);
}

.read-it-prompt {
  flex-basis: 100%;
  display: grid;
  gap: var(--s2);
}

.read-it-ask {
  margin: 0;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* A picker that opened on a stored half: how it stands now, above laurels with none checked (Juno, R3-99). */
.laurel-now {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 var(--s1);
  margin: 0 0 var(--s1);
}

.read-it-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin: 0;
}

.read-it-tools .link-button {
  min-height: 2.75rem;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* "Saved: 3 ★" holds the tools row's height, so nothing moves when a star is tapped (Vera R2). */
.read-it-tools {
  align-items: center;
  min-height: 2.75rem;
}

.read-it-saved {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.read-it-private {
  margin: 0;
}

/* Cards: Save and "I've read it" side by side, 16 px apart; a rail card is narrow, so it sits under the cover. */
.soc-save-read,
.pick-row-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
}

.rail-save-slot {
  margin-top: var(--s1);
}

.rail-save,
.rail-have {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.rail-have {
  color: var(--color-muted);
}

.read-it-mine,
button.read-it-mine {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.finished-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
}

/* WS-62 (Vera, Juno): nothing on My books moves when you add a book. The search results open over the page, and
   closing them after a pick pulls nothing up (CLS 0.11 at 390 on add). */
.add-book-wrap .add-book-field {
  position: relative;
}

.add-book-wrap .add-book .search-results:not(:empty) {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 6;
  max-height: min(60vh, 26rem);
  overflow-y: auto;
  margin-top: var(--s1);
  padding: var(--s1) var(--s2);
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  box-shadow: var(--lift-hover);
}

.add-book-wrap .add-book .search-results .result {
  min-height: 2.75rem;
}

/* Every target 44 px (SPEC-MY-BOOKS §12): Reorder, and the book titles (the hit area grows, the line doesn't). */
.my-shelf-head .reorder-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.my-shelf .book h3 a {
  display: inline-block;
  padding-block: var(--s2);
  margin-block: calc(-1 * var(--s2));
}

/* The Undo bar (SPEC-MY-BOOKS §12a, Juno): one at a time, over the page at the bottom, above the phone tab bar,
   with a 16 px gutter; 48 px tall on the ink surface, Undo a 44 px target. It pushes nothing. */
.your-books-wrap {
  display: contents;
}

.undo-bar {
  position: fixed;
  z-index: 25;
  inset: auto var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  max-width: 36rem;
  min-height: 3rem;
  margin-inline: auto;
  padding: 0 var(--s2) 0 var(--s4);
  color: var(--color-surface);
  background: var(--color-ink);
  border-radius: var(--r-card);
  box-shadow: var(--float);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.undo-bar[hidden] {
  display: none;
}

.undo-bar span {
  min-width: 0;
}

.undo-bar-button {
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 var(--s3);
  color: inherit;
  background: none;
  border: 0;
  box-shadow: none;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.undo-bar-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

@media (max-width: 720px) {
  .has-tabs .undo-bar {
    bottom: calc(var(--tab-bar) + var(--s2) + env(safe-area-inset-bottom));
  }
}

html:has(.undo-bar:not([hidden])) {
  scroll-padding-bottom: calc(var(--tab-bar) + var(--s9));
}

/* The rating prompt and Didn't finish open on the tap, in the same frame, and grow into place over 200 ms (Juno, §12a):
   the move is the reader's own, so nothing jumps later. Reduced motion: instant (the global rule). */
@keyframes open-down {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 40rem;
    opacity: 1;
  }
}

.read-it-prompt {
  animation: open-down 200ms ease-out;
}

.book-list.opening {
  overflow: clip;
  animation: open-down 200ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .read-it-prompt,
  .book-list.opening {
    animation: none;
  }
}

/* ==== My books: the read row and the "⋯" menu (SPEC-PRE-SPRINT §G) ================================
   Your stars and the date are edited in the row; the rare actions are in the menu. One component for
   every My books row. */

.read-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: var(--s4);
  align-items: start;
}

.read-row .cover-S {
  width: 48px;
  height: 72px;
}

.read-row > .book-body {
  min-width: 0;
}

.read-row h3 {
  margin: 0;
  font: 600 1rem / 1.375rem var(--font-ui);
  letter-spacing: var(--track-none);
}

.read-row h3 a {
  color: var(--color-ink);
  text-decoration: none;
}

.read-row h3 a:hover {
  color: var(--color-primary);
}

.read-row .read-byline {
  margin: 0;
  font: 400 0.9375rem / 1.25rem var(--font-ui);
  color: var(--color-ink-soft);
}

/* "⋯" centred on the title line. */
.read-row > .more {
  margin-top: calc(var(--s3) * -1);
}

.read-row > .log-note {
  grid-column: 2 / -1;
}

/* Five 24 px stars, each in a 44 px box with no gaps (220 px). Fill in ink, outline muted. */
.row-stars {
  display: flex;
  width: max-content;
  margin: 0 0 0 calc(var(--star-inset) * -1); /* the first star's ink lines up with the title */
  touch-action: none;
  cursor: pointer;
  border-radius: var(--r-control);
  -webkit-user-select: none;
  user-select: none;
}

.row-stars:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 0;
}

.row-star {
  --f: 0%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.row-star svg {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.row-star-line {
  fill: none;
  stroke: var(--color-ink-soft);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.row-star-fill {
  fill: var(--color-ink);
  clip-path: inset(0 calc(100% - var(--f)) 0 0);
}

.row-stars.rated .row-star-line {
  stroke: var(--color-ink);
}

/* The date line is a quiet text button; a tap opens the editor in the row. */
.read-row button.read-date {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-height: 2.75rem;
  margin-top: calc(var(--s2) * -1);
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  transform: none;
  font: 400 0.875rem / 1.25rem var(--font-ui);
  color: var(--color-ink-soft);
  cursor: pointer;
}

.read-row button.read-date:hover {
  color: var(--color-ink);
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.date-edit {
  display: grid;
  justify-items: start;
  gap: var(--s1);
  padding-top: var(--s1);
}

select.date-select {
  width: auto;
  min-height: 2.75rem;
  padding: 0 var(--s6) 0 var(--s3);
  font: 400 var(--t-ui) / 1.2 var(--font-ui);
  color: var(--color-ink);
  background-color: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
}

.date-edit > .date-fields,
.date-edit > .date-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
}

.date-edit > .date-fields {
  gap: var(--s2);
}

.date-edit .date-problem {
  margin: 0;
}

/* "⋯" is not a boxed action (§G.1, Juno on #235): no border, the 44 px hit area, a muted glyph, and the hover wash only on
   hover, keyboard focus and while its menu is open. Every My books shelf. */
button.icon.more-button {
  color: var(--color-ink-soft);
  background: transparent;
  border-color: transparent;
}

button.icon.more-button:hover:not(:disabled),
button.icon.more-button:focus-visible,
button.icon.more-button[aria-expanded='true'] {
  color: var(--color-ink);
  background: var(--hover);
  border-color: transparent;
}

/* The menu: a popover under "⋯", right edges lined up; above it when there's no room below. */
.book-menu {
  position: fixed;
  inset: auto;
  min-width: 220px;
  max-width: calc(100vw - 16px);
  margin: 0;
  padding: var(--s1) 0;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  box-shadow: var(--menu-shadow);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease-out,
    transform 120ms ease-out,
    overlay 120ms allow-discrete,
    display 120ms allow-discrete;
}

.book-menu.up {
  transform: translateY(4px);
}

.book-menu:popover-open {
  opacity: 1;
  transform: none;
}

@starting-style {
  .book-menu:popover-open {
    opacity: 0;
    transform: translateY(-4px);
  }

  .book-menu.up:popover-open {
    transform: translateY(4px);
  }
}

button.book-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: none;
  transition: none;
  transform: none;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--s5) 0 var(--s4);
  font: 400 1rem / 1.375rem var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

button.book-menu-item:hover,
button.book-menu-item:focus-visible {
  color: var(--color-ink);
  background: var(--hover);
  outline: none;
}

.book-menu-rule {
  height: 1px;
  margin: var(--s1) 0;
  background: var(--rule);
}

@media (prefers-color-scheme: dark) {
  .book-menu {
    border-color: var(--rule);
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-menu,
  .book-menu.up {
    transform: none;
    transition: none;
  }
}

/* ==== My books, the shared library module (public/library/, SPEC-LIBRARY) ===========================
   Its stylesheet reads only --lib-* properties; here they take Stoa's own tokens. */

:root,
.club-space {
  --lib-ink: var(--color-ink);
  --lib-mut: var(--color-ink-soft);
  --lib-line: var(--color-line);
  --lib-bg: var(--color-background);
  --lib-surface: var(--color-surface);
  --lib-sunk: var(--hover);
  --lib-accent: var(--color-brand);
  --lib-on-accent: var(--color-on-brand);
  --lib-error: var(--color-danger);
  --lib-font: var(--font-ui);
  --lib-display: var(--font-display);
  --lib-radius: var(--r-control);
  --lib-cover-radius: var(--r-cover);
  --lib-sheet-radius: var(--r-card);
  --lib-lift: 0 8px 24px rgb(0 0 0 / 0.14);
  --lib-lift-border: transparent;
  --lib-scrim: rgb(0 0 0 / 0.45);
  --lib-on-cover: white;
  --lib-backdrop: rgb(0 0 0 / 0.4);
  --lib-bottom: var(--s4);
  /* Read's sticky head sits under the app's sticky header; an unrated star is a hairline grey. */
  --lib-sticky-top: var(--s8);
  --lib-gap: 0.75rem;
  --lib-glyph-off: var(--color-line);
  /* The Spines shelf's ledge, as .com sets it (SPEC-SHELF). */
  --lib-stone: #dcdfe3;
  --lib-stone-edge: #c4c8ce;
}

@media (prefers-color-scheme: dark) {
  :root,
  .club-space {
    --lib-lift: none;
    --lib-lift-border: var(--rule);
    --lib-glyph-off: #3d4046;
    --lib-stone: #2b2e34;
    --lib-stone-edge: #3d4046;
  }
}

/* The Add sheet's "Add" keeps a 44px target now that the app's button padding stays out (Vera, #265). */
.lib-as-add {
  min-width: 2.75rem;
  justify-content: center;
}

/* Read's pinned head also hides what scrolls under it in the page gutters (a cover's shadow showed as a 1px line). */
.lib-read-head {
  box-shadow:
    calc(-1 * var(--s5)) 0 0 var(--lib-bg),
    var(--s5) 0 0 var(--lib-bg);
}

/* Read's sticky head meets the phone's shorter header. */
@media (max-width: 640px) {
  :root,
  .club-space {
    --lib-sticky-top: 3.5rem;
  }
}

/* The Undo bar sits above the phone's tab bar. */
@media (max-width: 720px) {
  .has-tabs {
    --lib-bottom: calc(var(--tab-bar) + var(--s3));
  }
}

/* The app's covers fill the module's 2:3 box. */
.lib-cv > .cover {
  box-shadow: none;
}

/* A Covers tile is a link to the book: the app's link underline would rule every line of a typeset cover (Vera, #268). */
.lib-tile-a {
  text-decoration: none;
}

/* ==== Your taste (public/taste/, shared; SPEC-MYBOOKS-M §M3) ===========================================================
   taste.css reads the --lib-* tokens above and styles its own buttons and fields (they're left out of the app's rules).
   On a phone the top 5's sticky bar sits on the tab bar, not under it. */
@media (max-width: 720px) {
  .has-tabs .tst-top {
    bottom: var(--tab-bar);
  }

  /* With picks, the bar stays pinned on the tab bar to the very end (Juno, #273): fixed to the page column's edges,
     with room under the page and its footer for it (the bar's 4rem and 16 px). With none it's a static line, as shared. */
  .has-tabs .tst-top:not(.tst-top-none) {
    position: fixed;
    right: var(--s6);
    left: var(--s6);
    margin: 0;
  }

  body.has-tabs:has(.tst-top:not(.tst-top-none)) {
    padding-bottom: calc(var(--tab-bar) + var(--s8) + var(--s4));
  }
}

/* main's gutter steps down to --s5 under 640 px; the pinned bar follows it. */
@media (max-width: 640px) {
  .has-tabs .tst-top:not(.tst-top-none) {
    right: var(--s5);
    left: var(--s5);
  }
}

.tst-app .check {
  margin-top: var(--s2);
}

/* The shared stylesheet zeroes a first section's top margin on desktop; the app's sections follow
   Beyond your usual, so the first keeps the page's section gap. */
.tst-app > .tst-sec:first-child {
  margin-top: calc(var(--s6) + var(--s2));
}

.tst-app .tst-check + .hint {
  margin-top: var(--s3);
}

.tst-app .hint + .hint {
  margin-top: var(--s3);
}

/* ==== The shared onboarding module (public/onboarding/, SPEC-PRE-SPRINT §E and §I) ==================
   Its stylesheet reads only --ob-* properties; here they take Stoa's own tokens, so they follow the
   theme, a club's brand and dark mode. */

:root,
.club-space {
  --ob-ink: var(--color-ink);
  --ob-mut: var(--color-ink-soft);
  --ob-line: var(--color-line);
  --ob-rule: var(--rule);
  --ob-bg: var(--color-background);
  --ob-surface: var(--color-surface);
  --ob-hover: var(--hover);
  --ob-accent: var(--color-brand);
  --ob-on-accent: var(--color-on-brand);
  --ob-link: var(--color-primary);
  --ob-error: var(--color-danger);
  --ob-font: var(--font-ui);
  --ob-display: var(--font-display);
  --ob-radius: var(--r-control);
  --ob-bar-h: calc(var(--s7) + var(--s5));
  --ob-col: 40rem; /* the steps' column, which the strip matches on wide screens */
  --home-books-hold: 8rem; /* Home's "What are you reading?" while it loads, so the strip under it doesn't jump */
}

/* The phone tab bar sits under the steps' bar. */
@media (max-width: 720px) {
  .has-tabs .ob-bar {
    bottom: calc(var(--tab-bar) + env(safe-area-inset-bottom));
    padding-bottom: var(--s3);
    /* Fills the hairline gap above the tab bar, so no row shows through. */
    box-shadow: 0 var(--s3) 0 var(--ob-bg);
  }
  /* The loved grid runs to the column's edges, so its bar spans the screen and no cover shows beside it. */
  .has-tabs .ob-loved .ob-bar {
    margin-inline: calc(-1 * var(--s6));
    padding-inline: var(--s6);
  }
  /* An opaque band from the bar down under the tab bar, so no cover shows through either (Juno on PR 282). */
  .has-tabs .ob-loved .ob-bar::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 100%;
    height: calc(var(--tab-bar) + env(safe-area-inset-bottom) + var(--s3));
    background: var(--ob-bg);
    pointer-events: none;
  }
}

@media (max-width: 640px) {
  .has-tabs .ob-loved .ob-bar {
    margin-inline: calc(-1 * var(--s5));
    padding-inline: var(--s5);
  }
}

/* The loved grid's covers fill their track, as on stoareads.com, over the app's fixed .cover-M size. */
.ob-covers .ob-cover-b > .cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
}

.ob-strip-home,
.ob-strip-mybooks {
  max-width: var(--ob-col);
  margin: var(--s5) 0;
}

/* Discover's shared pieces (public/discover/menu.css and cover-box.css, copied from stoareads.com) read these tokens.
   The cover box keeps .com's small corner (--rc) and draws its dark-mode outline in --line. */
:root,
.club-space {
  --ink: var(--color-ink);
  --mut: var(--color-ink-soft);
  --bg: var(--color-background);
  --line: var(--color-line);
  --rc: 3px;
  --display: var(--font-display);
  --sans: var(--font-ui);
}

/* Collection, prize and Best of pages (item 6; public/collections/collections.css, copied from stoareads.com) read
   only --coll-* tokens, named by role. Here they take Stoa's own, so the pages follow the brand and dark mode. The
   opener band is the brand panel, as Stoa's other page heads. */
.coll,
.coll-best {
  --coll-text: var(--color-ink);
  --coll-text-2: var(--color-ink-soft);
  --coll-text-3: color-mix(in oklab, var(--color-ink-soft) 80%, var(--color-background));
  --coll-rule: var(--rule);
  --coll-rule-strong: var(--color-line);
  --coll-surface: var(--color-background);
  --coll-surface-sunk: var(--hover);
  --coll-accent: var(--color-primary);
  --coll-link: var(--color-primary);
  --coll-proof: var(--color-highlight);
  --coll-band: var(--panel);
  --coll-band-ink: var(--on-panel);
  --coll-band-soft: color-mix(in oklab, var(--on-panel) 78%, var(--panel));
  --coll-band-accent: color-mix(in oklab, var(--on-panel) 82%, var(--color-highlight));
  --coll-cover-shadow: var(--cover-shadow);
  --coll-best-shadow: var(--lift);
  --coll-display: var(--font-display);
  --coll-sans: var(--font-ui);
  --coll-best-sans: var(--font-ui);
  --coll-best-serif: var(--font-display);
  --coll-fs-hero: var(--t-title);
  --coll-fs-h2: var(--t-section);
  --coll-fs-lead: var(--t-item);
  --coll-fs-body: var(--t-read);
  --coll-fs-small: var(--t-ui);
  --coll-fs-meta: var(--t-ui);
  --coll-s1: var(--s1);
  --coll-s2: var(--s2);
  --coll-s3: var(--s3);
  --coll-s4: var(--s4);
  --coll-s5: var(--s5);
  --coll-s6: var(--s6);
  --coll-sec: var(--s7);
  --coll-gut: var(--s4);
  --coll-maxw: var(--w-page);
  --coll-tap: var(--tap);
  --coll-r: var(--r-control);
  --coll-rc: var(--rc);
}

/* Best of sits inside the app's page column, which already keeps its gutter: no second one inside it, so a phone's
   byline column is as wide as on .com and never has to clip. */
/* A Best of row's two proof lines and inline rank (rows.json tr, .n-in), as .com's reading-room.css draws them: the
   measured phone line under 600, the wide one from 600; under 372 the rank moves inline before the title. */
.coll-best .rank .n-in,
.coll-best .rank .tr-n {
  display: none;
}

@media (max-width: 599.98px) {
  .coll-best .rank .tr-n {
    display: inline;
  }

  .coll-best .rank .tr-w,
  .coll-best .rank .tr-wide {
    display: none;
  }
}

/* Doubled classes: collections.css loads after this file and sets the phone grid at equal specificity. */
@media (max-width: 371.98px) {
  .coll-best.coll-best .rank li {
    grid-template-columns: var(--coll-px-64) minmax(0, 1fr);
  }

  .coll-best.coll-best .rank li > .n {
    display: none;
  }

  .coll-best.coll-best .rank .n-in {
    display: inline;
  }

  .coll-best.coll-best .rank li > .sv-ri {
    grid-column: 2;
    grid-row: 2;
  }
}

.coll-best.coll-best .w {
  padding-inline: 0;
}

/* A row's actions once the book is on your list (Juno on #257): the shelf word muted, "Rate" as a text link, your
   own stars small and read-only. Same slot, 44 px targets, no pills or boxes. */
.coll.coll .sv-ri .st-mut,
.coll-best.coll-best .sv-ri .st-mut {
  color: var(--coll-text-2);
}
/* The shelf's mark is filled, so it never reads as the outline Save (Juno on #257). */
.coll.coll .sv-ri .st-mut svg:not(.ri-check) path,
.coll-best.coll-best .sv-ri .st-mut svg:not(.ri-check) path {
  fill: currentcolor;
}
.coll.coll .sv-ri .ri-rate,
.coll.coll .sv-ri .ri-stars,
.coll-best.coll-best .sv-ri .ri-rate,
.coll-best.coll-best .sv-ri .ri-stars {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--coll-text-2);
  font: 500 var(--t-meta) var(--font-ui);
}
.coll.coll .sv-ri .ri-rate,
.coll-best.coll-best .sv-ri .ri-rate {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.coll.coll .sv-ri .ri-stars,
.coll-best.coll-best .sv-ri .ri-stars {
  text-decoration: none;
}
/* Rate and Undo after "I've read it": text links, each a full 44 px target (Vera on #257). */
.coll.coll .sv-ri .ri-rate,
.coll-best.coll-best .sv-ri .ri-rate {
  min-width: var(--tap);
  justify-content: center;
  /* The same ink link as Undo; only "✓ Read" is muted (Juno on #257). */
  color: var(--color-ink);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}
.coll.coll .sv-ri .ri-undo,
.coll-best.coll-best .sv-ri .ri-undo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0;
  color: var(--color-ink);
  background: none;
  border: 0;
  box-shadow: none;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Visually hidden, the shared markup's name for .sr-only. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The header's search icon (SPEC-DISCOVER-SYSTEM §10.1): on every page, the sheet on a tap. */
.site-header .hd-s {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin-left: calc(var(--s2) * -1);
  color: var(--color-ink);
  border-radius: var(--r-control);
}

.site-header .hd-s:hover {
  background: var(--hover);
}

.site-header .hd-s:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.site-nav .hd-dm {
  display: inline-flex;
}

.site-nav .hd-dm {
  position: relative;
}

/* Centred under its button, which sits mid-nav here (on stoareads.com Discover is first, so its panel opens from the
   left). Discover's panel is wider than the room to its right, so it opens leftward from its button's right edge, and
   discover-shell.js nudges it back onto the page where even that runs off the left. */
.site-nav .hd-dm .dm {
  left: 50%;
  text-align: left;
  translate: -50% 0;
}

.site-nav .hd-dm #dm {
  left: auto;
  right: 0;
  translate: none;
}

@media (max-width: 720px) {
  .site-header .hd-s {
    position: absolute;
    right: var(--s3);
    top: calc(env(safe-area-inset-top) + (var(--s8) - var(--s2) - var(--tap)) / 2);
  }
}

/* Discover's doors on /discover and home: Ways in, then Subjects, then More collections (§7, §10.1). */
.discover-doors {
  margin: var(--s6) 0;
}

.discover-doors h2 {
  margin: var(--s5) 0 var(--s2);
}

/* stoareads.app's Discover opens as stoareads.com's does: the search, then "Discover", then Ways in (Juno, app #239). */
.discover-head > .find-form:first-child {
  margin-top: 0;
}

.discover-head > .discover-h1 {
  margin: var(--s5) 0 0;
}

.discover-h1 + .discover-doors {
  margin-top: 0;
}

.discover-h1 + .discover-doors > h2:first-child {
  margin-top: var(--s6); /* 32 px under "Discover", as on stoareads.com */
}

/* The Stoa Society's one quiet line, after More collections (WS-57). 15/20. */
.discover-doors .dd-soc {
  margin: var(--s5) 0 0;
  color: var(--color-ink-soft);
  font: 400 var(--t-ui) / 1.3333 var(--font-ui);
}

/* Discover's filtered list (item 7, Juno 21:43 Nov 9): .com's search row (§7.3). Cover, title, one-line byline and
   the hairline actions, Want to read and I've read it as text; no card, no bordered button. */
.find-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

.find-eyebrow[hidden] {
  display: none;
}

.find-eyebrow .eyebrow {
  margin: 0;
}

.find-eyebrow .find-clear {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font: 400 var(--t-ui) / 1.33 var(--font-ui);
  color: var(--color-ink);
}

.find-eyebrow + .find-heading {
  margin-top: 0;
}

.find-results.pick-list-rows {
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.find-results.pick-list-rows li:first-child {
  border-top: 1px solid var(--rule);
}

.find-results button.pick-row:hover {
  background: none;
}

.find-results li.pick-row-item {
  grid-template-columns: minmax(0, 1fr) 10.5rem;
  align-items: start;
  column-gap: var(--s5);
}

.find-results button.pick-row {
  grid-template-columns: 4rem minmax(0, 1fr);
  column-gap: var(--s4);
  padding: var(--s4) 0;
}

.find-results .cover-S {
  width: 4rem;
  height: 6rem;
}

.find-results .pick-row-body strong {
  font: 600 1.0625rem / 1.41 var(--font-ui);
}

/* The byline is fitted to one line by dropping words (fitBylines), never cut with "…"; "Ranked on" wraps. */
.find-results .pick-row-body .muted {
  overflow: hidden;
  white-space: nowrap;
}

.find-results .pick-row-body .muted {
  font: 400 var(--t-ui) / 1.33 var(--font-ui);
}

.find-results .pick-row-why {
  display: none;
}

.find-results .pick-row-action {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
  padding: var(--s3) 0 0;
}

.find-results .pick-row-action .pick-save {
  min-height: var(--tap);
  padding: 0;
  font: 600 var(--t-ui) / 1.33 var(--font-ui);
  color: var(--color-ink);
  background: none;
  border: 0;
  box-shadow: none;
}

.find-results .pick-row-action .pick-save:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.find-results .read-it-button {
  font-weight: 600;
}

/* Under 900 px the actions sit on one line under the text, past the cover. */
@media (max-width: 56.24rem) {
  .find-results li.pick-row-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .find-results li.pick-row-item button.pick-row {
    grid-template-columns: calc(var(--s6) + var(--s5)) minmax(0, 1fr);
    padding-bottom: 0;
  }

  .find-results .cover-S {
    width: calc(var(--s6) + var(--s5));
    height: 5.25rem;
  }

  .find-results .pick-row-action {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 var(--s4);
    padding: 0 0 var(--s2) calc(var(--s6) + var(--s5) + var(--s4));
  }
}

/* Discover on stoareads.app: the subjects live in Ways in, so the tools line keeps only "Pick one for me". */
.discover-tools-quiet {
  justify-content: flex-start;
  margin-top: var(--s3);
}

/* Under 360 px both actions fit on one line only from the row's left edge, and the prize leads its line. */
@media (max-width: 22.43rem) {
  .find-results .pick-row-action {
    padding-left: 0;
  }
}

/* ==== Home, cover-led (SPEC-HOME; public/discover/home.css, shared) ===================================
   home.css reads only --dh-* properties; here they take Stoa's own tokens. The few .com base rules it builds on
   (.w, .sec, .sec-h, h2.sh, .big-q, .vh) are set here inside .dh-home only. The app's main already has its gutter,
   so a .w adds none; the rail still bleeds to the right edge by the gutter. */

:root,
.club-space {
  --dh-bg: var(--color-background);
  --dh-ink: var(--color-ink);
  --dh-mut: var(--color-ink-soft);
  --dh-rule: var(--color-line);
  --dh-sunk: var(--hover);
  --dh-sans: var(--font-ui);
  --dh-display: var(--font-display);
  /* rails.css (shared): the evidence dot and the prize chips' links. */
  --dh-ev: var(--color-highlight);
  --dh-link: var(--color-primary);
}

/* Home's rails (public/discover/rails.css, shared, scoped under .dh-rails): a row's actions are each host's own, so
   Want to read and I've read it take the app's text-link look from its collection pages, 44 px targets, no boxes. */
/* The rails as .com draws them (Juno, #274): each section its own band, a hairline on top and .com's 56 px (40 px
   under 900) above and below; a rail item flat on the page, not the app's .card surface. */
.dh-rails .sec {
  padding-block: calc(var(--s7) + var(--s2));
  border-top: 1px solid var(--color-line);
}

@media (max-width: 899px) {
  .dh-rails .sec {
    padding-block: calc(var(--s6) + var(--s2));
  }
}

.dh-rails .card {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Links in the rails take their text's colour, as on .com (a { color: inherit }); the prize chips keep --dh-link from
   rails.css, which loads after this sheet. */
.dh-rails a {
  color: inherit;
}

.dh-rails .sv-ri {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s4);
}

.dh-rails .sv-s,
.dh-rails .ri {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: 0 var(--s1);
  margin-left: calc(-1 * var(--s1));
  color: var(--color-ink);
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
  text-decoration: none;
}

.dh-rails .sv-s:hover span,
.dh-rails .ri:hover span {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.dh-rails .sv-s span,
.dh-rails .ri span {
  white-space: nowrap;
}

.dh-rails .sv-s svg,
.dh-rails .ri svg {
  flex: none;
  width: 1.125em;
  height: 1.125em;
}

.dh-rails .ri-check {
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dh-rails .sv-ri .st-mut,
.dh-rails .sv-ri .ri-stars {
  color: var(--color-ink-soft);
}

.dh-rails .sv-ri .st-mut svg:not(.ri-check) path {
  fill: currentcolor;
}

.dh-rails .sv-ri .ri-rate,
.dh-rails .sv-ri .ri-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* A Home card stacks its slot (rails.css: one column, stretched), so Rate or your laurels start where "Read" does,
   not centred under it (Vera A on #648). */
.dh-rails .card .sv-ri .ri-rate,
.dh-rails .card .sv-ri .ri-stars {
  justify-content: flex-start;
}

.dh-rails .sv-ri .ri-rate {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* The cover box: 2:3, toned, the real cover on top (cover-box.css); the app's covers round like its other covers. */
.dh-home .cv-box {
  aspect-ratio: 2 / 3;
  border-radius: var(--r-cover);
}

.dh-home .cv-box > .cv {
  border-radius: inherit;
}

.dh-home .w {
  max-width: none;
  margin: 0;
  padding-inline: 0;
}

.dh-home .sec-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s2);
}

.dh-home h2.sh {
  margin: 0;
}

.dh-home .sec-h a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font: 600 15px / 22px var(--font-ui);
  color: var(--color-ink);
  white-space: nowrap;
  text-underline-offset: 3px;
}

.dh-home .vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The home bar is the shared search field (menu.css .sf, SPEC-SEARCH-BAR §2): its box, focus and buttons come from
   there; home.css sets its width. Nothing of the old box (an ink border and a Search button) is drawn here. */

.dh-home .dh-rail {
  margin-right: calc(-1 * var(--s5));
  padding-right: var(--s5);
}

@media (min-width: 1024px) {
  .dh-home.dh-home .w {
    padding-inline: 0;
  }
}

/* From 900 a rail stops at the column's edge, under "See all", and peeks there too: four covers and 0.4 of the next,
   the one tile size every rail uses, as .com's reading-room.css does (Nt3-J1, website #403). The shared home.css
   takes over from 1024. */
@media (min-width: 900px) {
  .dh-home .dh-rail {
    margin-right: 0;
    padding-right: 0;
  }
}

@media (min-width: 900px) and (max-width: 1023.98px) {
  .dh-home .dh-rail {
    --dh-rail-n: 4;
    gap: var(--s5);
  }
  .dh-home .dh-rail li {
    width: calc((100% - var(--dh-rail-n) * var(--s5)) / (var(--dh-rail-n) + 0.4));
  }
}

/* Stoa's best #1 to #5 join the hero once the rows arrive; its room is held from the start so nothing moves (CLS). */
@media (min-width: 1024px) {
  .dh-top .dh-hero {
    min-height: 10.375rem;
  }
}

@media (min-width: 1200px) {
  .dh-top .dh-hero {
    min-height: 15.75rem;
  }
}

.home-wait {
  visibility: hidden;
}

/* One site: the members-only page for a club address that isn't yours. Its one link is a full 44 px target. */
.club-door a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ==== Clubs in the house style (SPEC-CLUBS A2) ====================================================
   On stoareads.app a club page has no cards, banner or pills: sections sit on the page, split by a
   rule and space. Scoped by .club-plain, which the club's own site never gets. */

.club-plain {
  --club-gap: var(--s6);
}

/* With the name and facts in the masthead, this holds only the club's own line, if it has one; the first
   section then starts one section gap under the tabs (Juno, #299). */
.club-plain .club-facts {
  margin: 0;
  padding: 0;
}

.club-plain .club-facts .lede {
  margin: var(--club-gap) 0 0;
  font: 400 var(--t-read) / var(--lh-read) var(--font-body);
  color: var(--color-ink);
}

/* The facts line sits in the masthead, under the club's name and in line with it (Juno, #299). The link is a
   full-height target with its words at the top, so they read as the name's third line. */
button.club-nav-name.club-mast:has(+ .club-mast-facts),
.club-mast-wrap:has(+ .club-mast-facts) button.club-nav-name.club-mast {
  padding-bottom: 0;
}

.club-mast-facts {
  min-height: var(--tap);
  /* The 48px mark (--s7) and its gap. */
  margin: 0 0 0 calc(var(--s7) + var(--s3));
  font: 400 var(--t-label) / 1.4286 var(--font-ui);
  color: var(--color-ink-soft);
}

/* C4: the club's tagline, its own line under the name, above the members link. */
.club-mast-facts .club-mast-tag {
  display: block;
  padding-top: 2px;
  color: var(--color-ink-soft);
  overflow-wrap: anywhere;
}

.club-mast-facts a {
  display: inline-flex;
  align-items: flex-start;
  min-height: var(--tap);
  padding-top: 2px;
  color: inherit;
}

.club-plain main .card,
.club-plain .porch-aside .vote-callout,
.club-plain .porch-aside > section.vote-callout:first-child {
  margin: var(--club-gap) 0 0;
  padding: var(--club-gap) 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.club-plain .porch-layout {
  margin-top: var(--club-gap);
}

.club-plain .porch-main > :first-child,
.club-plain .porch-aside > section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.club-plain .porch-main > .thread {
  margin-top: var(--club-gap);
  padding-top: var(--club-gap);
  border-top: 1px solid var(--rule);
}

/* The welcome note is body text under the facts; the next section's rule closes it. */
.club-plain .porch-main > .welcome-note {
  margin: var(--s4) 0 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

/* The starters are text links, so a section has one filled button at most. */
.club-plain .porch-starters ul {
  flex-direction: column;
  gap: 0;
}

.club-plain button.starter {
  width: auto;
  min-height: var(--tap);
  padding: 0;
  text-align: left;
  box-shadow: none;
  color: var(--color-primary);
  background: none;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
}

/* Item B on Seph's card (yes, 12:17 UTC Nov 14): off .com's plain club pages, Quick poll's hover was white on an almost
   clear fill, so it looked disabled. Ink on the hover fill, as the other starters have it. */
@media (hover: hover) {
  :where(html:not(.club-plain)) .porch-starters li > button.starter:hover {
    color: var(--color-ink);
    background: var(--hover);
    border-color: var(--rule);
  }
}

.club-plain button.starter:hover {
  color: var(--color-primary-deep);
  background: none;
}

.club-plain .composer {
  background: var(--color-surface);
  border-radius: var(--r-control);
}

.club-plain .composer:focus-within {
  box-shadow: var(--ring);
}

.club-plain .badge {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--color-ink-soft);
}

/* The date is text: no tile. With a date it is the serif line; without, a plain sentence. */
.club-plain main .stone {
  display: none;
}

.club-plain main .feature {
  display: block;
}

.club-plain main .feature .when {
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
}

/* Notes for the gathering sits on the page like every other section. */
.club-plain main .painted-wall {
  margin: var(--club-gap) 0 0;
  padding: var(--club-gap) 0 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

/* Lists and option groups are rows on the page, not panels. */
.club-plain main .roster,
.club-plain main .gathering-list,
.club-plain main .shelf-section > .book-list {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.club-plain main fieldset {
  padding: 0;
  border: 0;
  border-radius: 0;
}

.club-plain main legend {
  padding: 0;
}

/* Stoa's questions are a section like the others on a gathering's page. */
.club-plain main .stoa-questions {
  margin-top: var(--club-gap);
  padding-top: var(--club-gap);
  border-top: 1px solid var(--rule);
}

@media (max-width: 720px) {
  .club-plain {
    --club-gap: var(--s5);
  }
}

@media (max-width: 860px) {
  .club-plain .porch-aside > .up-next {
    border-top: 1px solid var(--rule);
  }
}

/* One rule, not two, where the book's own bottom rule meets the next section's top rule (Juno, #299). */
.club-plain main .picked.book-link:has(+ section) {
  border-bottom: 0;
}

/* ==== Clubs, step 3: controls (SPEC-CLUBS A3) ====================================================== */

/* The kind of post: words on one line, the chosen one in ink with a 2px underline. Post sits on its own line
   below, on the right, so no kind is ever cut off by it. */
.club-plain .composer-row {
  flex-wrap: wrap;
  row-gap: var(--s2);
}

.club-plain .composer-row .segmented {
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 0 var(--s2);
  overflow: visible;
}

/* From a tablet up there is room for Post on the same line. */
@media (min-width: 720px) {
  .club-plain .composer-row .segmented {
    flex: 1 1 auto;
    gap: 0 var(--s4);
  }
}

.club-plain .composer-row .segmented button {
  flex: none;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  color: var(--color-ink-soft);
  font: 500 var(--t-label) / 1 var(--font-ui);
  text-align: left;
  justify-content: flex-start;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.club-plain .composer-row .segmented button:hover {
  color: var(--color-ink);
  background: none;
}

.club-plain .composer-row .segmented button[aria-checked='true'] {
  color: var(--color-ink);
  background: none;
  /* Under the word itself, so a short word in a 44px box ("Poll") starts where its box does and the gaps stay equal. */
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}

.club-plain .composer-row > button[type='submit'] {
  margin-left: auto;
}

/* PA7 (Juno, UX-AUDIT-2 "Polish pass 1"): the kinds of post are a segmented control like Going / Maybe / Can't go,
   44 px tall with 15 px labels and the chosen one filled, in place of underlined words. Held on a club's own address
   until Seph's yes (DOOR_AUDIT2). */
:root:not(.door-held-a2).club-plain .composer-row .segmented {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  padding: 3px;
  background: color-mix(in srgb, var(--color-ink) 5%, transparent);
  border-radius: var(--r-control);
}

:root:not(.door-held-a2).club-plain .composer-row .segmented button {
  flex: 1 1 auto;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--s2);
  font-size: var(--t-ui);
  text-align: center;
  justify-content: center;
  border-radius: calc(var(--r-control) - 2px);
}

:root:not(.door-held-a2).club-plain .composer-row .segmented button:hover {
  background: var(--hover);
}

:root:not(.door-held-a2).club-plain .composer-row .segmented button[aria-checked='true'] {
  background: var(--raised);
  text-decoration: none;
  box-shadow:
    0 0 0 1px var(--rule),
    0 1px 2px color-mix(in srgb, var(--color-ink) 10%, transparent);
}

/* In the dark the chosen segment's raised fill is barely off its track (1.06:1), so a ring in the soft ink colour
   (3:1 or more against the track) and a 600 label mark it: the kinds of post and Going / Maybe / Can't go alike
   (Vera A on #508, Juno). Light mode keeps its fill and shadow. Held on a club's own address (DOOR_AUDIT2). */
@media (prefers-color-scheme: dark) {
  :root:not(.door-held-a2) .segmented button[aria-pressed='true'],
  :root:not(.door-held-a2) .segmented button[aria-checked='true'],
  :root:not(.door-held-a2) .rsvp button[aria-pressed='true'],
  :root:not(.door-held-a2) .rsvp button.chosen,
  :root:not(.door-held-a2).club-plain .composer-row .segmented button[aria-checked='true'] {
    font-weight: 600;
    box-shadow:
      0 0 0 1px var(--color-ink-soft),
      0 1px 2px color-mix(in srgb, var(--color-ink) 10%, transparent);
  }
}

/* From a tablet up the control is as wide as its words, with Post on the same line. */
@media (min-width: 720px) {
  :root:not(.door-held-a2).club-plain .composer-row .segmented {
    flex: 0 1 auto;
  }

  :root:not(.door-held-a2).club-plain .composer-row .segmented button {
    padding: 0 var(--s4);
  }
}

/* Four kinds (an organiser's) don't fit one row on a phone at 15 px: two rows of two, still one control. */
@media (max-width: 479px) {
  :root:not(.door-held-a2).club-plain .composer-row .segmented:has(> :nth-child(4)) {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
  }
}

/* C6 (Juno's audit): on stoareads.com the kind of post is one compact menu beside Post, on one row at every width,
   and the starters are chips that fill in the box. */
.club-plain .composer-row {
  flex-wrap: nowrap;
}

.club-plain .composer-row .kind-menu {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  min-height: var(--tap);
  margin: 0 auto 0 0;
  padding-block: 0;
  font: 500 var(--t-ui) / 1 var(--font-ui);
}

.club-plain .composer-row:has(.page-field:not([hidden])) {
  flex-wrap: wrap;
}

.club-plain .porch-starters ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--s2);
}

.club-plain button.starter.starter-chip {
  width: auto;
  min-height: var(--tap);
  padding: 0 var(--s4);
  font: 500 var(--t-ui) / 1.2 var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--edge, var(--rule));
  /* No pill buttons (Juno on #722): the standard control radius, as "Suggest a book" has. */
  border-radius: var(--r-control);
}

.club-plain button.starter.starter-chip:hover {
  color: var(--color-ink);
  background: var(--hover);
}

/* PA7: a post's "+" keeps its 32 px look on a desktop but takes taps and clicks over 44 x 44 (on touch the box is
   44 px already). Held on a club's own address (DOOR_AUDIT2). The extra 4 px before it keeps that 44 px off the last
   chip, which sits 4 px away and would otherwise lose its right edge to "+" (Vera A on #508). */
:root:not(.door-held-a2) .react-pick {
  margin-inline-start: var(--s1);
}

:root:not(.door-held-a2) .react-pick summary {
  position: relative;
}

:root:not(.door-held-a2) .react-pick summary::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: max(100%, var(--tap));
  height: max(100%, var(--tap));
  transform: translate(-50%, -50%);
}

/* stoareads.app's own header keeps its Clubs chevron, so .com's plain-link gap for a Clubs without one
   (discover/menu.css, :root:not([data-one]) .hd-cm + .hd-dm) isn't its: the gap after a chevron, as before. */
:root:not([data-one]) .site-header .hd-cm + .hd-dm {
  margin-left: calc(var(--s5) - 2px);
}

@media (min-width: 900px) and (max-width: 1199px) {
  :root:not([data-one]) .site-header .hd-cm + .hd-dm {
    margin-left: var(--s3);
  }
}

/* The club header's room, held from the first frame for a member opening a club page: by the server's first
   paint (src/share.js .club-first), then by the header's own row (app.js) until it is drawn. The masthead with
   its facts line, then the tabs. */
:root {
  --club-head: 9.8125rem;
}

@media (min-width: 721px) {
  :root {
    --club-head: 10.0625rem;
  }
}

@media (min-width: 900px) {
  :root {
    --club-head: 10.3125rem;
  }
}

.club-nav-hold {
  min-height: var(--club-head);
}

/* A club's own address draws its row whole (share.js clubNavHold, home): the name and the rooms, so it holds its own
   height and needs no room kept for a masthead it never has. */
.club-nav-hold.club-nav-own {
  min-height: 0;
}

main:has(> .club-first) {
  margin-top: var(--club-head);
}

/* A link to copy (the invite link, the calendar link): the whole link in a bordered field, wrapped and never
   cut, with Copy beside it, or below it on a phone (SPEC-CLUBS A3). */
.club-plain .invite-line,
.club-plain .row:has(> .link-field) {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: var(--s3);
}

.club-plain .invite-line code,
.club-plain .link-field {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  min-height: var(--tap);
  padding: var(--s3);
  overflow: visible;
  color: var(--color-ink);
  font: 400 var(--t-label) / 1.4286 var(--font-ui);
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  user-select: all;
}

.club-plain .invite-line button,
.club-plain .row:has(> .link-field) button {
  flex: none;
  min-height: var(--tap);
}

@media (max-width: 719px) {
  .club-plain .invite-line,
  .club-plain .row:has(> .link-field) {
    flex-wrap: wrap;
  }

  .club-plain .invite-line code,
  .club-plain .link-field {
    flex: 1 1 100%;
  }
}

/* The cover credit: one quiet line at the foot of a page that shows a cover, 32 px below the page and 24 px above
   the footer's rule (Juno, #316). Hidden, it takes no room and the page ends as it always did. */
.cover-credit {
  margin: var(--s6) 0 0;
}
main:has(> .cover-credit:not([hidden])) {
  padding-bottom: var(--s5);
}
body:has(main > .cover-credit:not([hidden])) .site-footer {
  margin-top: 0;
}
.cover-credit a {
  color: inherit;
}

/* Discover's Genres (the home's "All 19 genres" lands here): below the sticky top bar, heading in view. */
#genres {
  scroll-margin-top: var(--s8);
}

/* Discover's Genres heading: the same gap to its tiles as Ways in and More collections (WS-54, Juno on #321). */
.dh-home.dd-gn h2.sh {
  margin-bottom: var(--s2);
}

/* The header's search bar (SPEC-SEARCH-BAR §2): wide screens only, after the nav, up to 440 px; the shared field
   (menu.css .sf-hd) draws the box. Home and Discover (.hd-noq) have their own big bar, so the header leaves it out.
   On a wide screen the icon gives way to the bar (or the page's own); below 900 px it opens full-screen search. */
.site-header .hd-q {
  display: none;
}

@media (min-width: 900px) {
  .site-header .hd-q {
    display: flex;
    flex: 1;
    min-width: 0;
    max-width: 440px;
    margin-left: auto;
  }

  .site-header.hd-noq .hd-q {
    display: none;
  }

  /* Wide screens: the header bar, or on home and Discover the page's own bar, is the one way in (Juno on #324). */
  .site-header .hd-s {
    display: none;
  }
}

/* ==== One header on stoareads.com (SPEC-ONE-HEADER Phase 1) =====================================
   In the one-site mode the server draws .com's header in place of the app's (src/one-header.js): the shared
   site-header.css and menu.css style it, with .com's own tokens and fonts (ONE-HEADER-INTERFACE.md), so it matches
   .com's pages to the pixel. The app's element rules (buttons, fields) leave it alone (:where(.hd:not(.site-header) *)
   above). Nothing here applies on stoareads.app or a club's own address: their header is .site-header. */
@font-face {
  font-family: Newsreader;
  src: url('fonts/newsreader-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url('fonts/newsreader-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('fonts/public-sans-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==== One type system on stoareads.com (SPEC-TYPE-SYSTEM, Juno, Nov 14) ===========================
   The app's pages there are set in .com's pair: Newsreader 500 for every heading, title, spine and typeset cover, and
   Public Sans 400 for text and meta, 600 for controls, labels and emphasis. Each family is one file per role, so a
   rule's weight picks a file and nothing else: every display weight is the 500, and a UI weight of 500 or more is the
   600 (today's 500 and 700 on controls). Running text that was 500 is 400 (below). Sizes and line heights are unchanged.
   Only in the one-site mode (<html data-one>, src/one-header.js), so stoareads.app and every club's own address
   (cltbb.com) keep Literata and Inter until Seph says yes. */
@font-face {
  font-family: 'Stoa Display';
  src: url('fonts/newsreader-latin-500-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Only fetched where a page sets italics; never preloaded. */
@font-face {
  font-family: 'Stoa Display';
  src: url('fonts/newsreader-latin-400-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Stoa Sans';
  src: url('fonts/public-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 100 499;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Stoa Sans';
  src: url('fonts/public-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}
/* One fill (U3, Juno's token ruling, Nov 14): Stoa's own primary on stoareads.com is .com's accent, #2F44B5, and
   #A8BBF0 with #0F1A3A text in the dark. /api/brand.css names these first where a look still has Stoa's primary
   (src/brand.js ONE_FILL), so a club's own colours and every other address are untouched. */
:root[data-one] {
  --one-fill: #2f44b5;
}
@media (prefers-color-scheme: dark) {
  :root[data-one] {
    --one-fill-dark: #a8bbf0;
    --one-fill-deep-dark: #c4d1f5;
    --one-on-fill-dark: #0f1a3a;
  }
}
/* The tab bar's labels at 13 px on stoareads.com (VB5): "My Shelf" still fits one line at 320 (55 of 61 px). */
@media (max-width: 720px) {
  :root[data-one] .tab-bar {
    font-size: var(--t-meta);
  }
}
/* Above /api/brand.css's :root and .club-space values, whichever loads last. */
:root[data-one],
:root[data-one] .club-space {
  --font-display: 'Stoa Display', Georgia, serif;
  --font-body: 'Stoa Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-ui: 'Stoa Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mark: 'Stoa Display', Georgia, serif;
}
/* One heading scale with stoareads.com (Juno, PA1): page sections 30/24 px, sections inside a column
   22/20 px, both Newsreader 500. No h2 under 20 px. */
:root {
  --h-section: 1.5rem;
  --h-sub: 1.25rem;
}
/* R3-60: the scale steps up where stoareads.com's does (tokens.css, 900 px), on every address. */
@media (min-width: 900px) {
  :root {
    --h-section: 1.875rem;
    --h-sub: 1.375rem;
  }
}
:root[data-one] .porch-main h2,
:root[data-one] .shelf-section > h2 {
  font: 500 var(--h-section) / 1.2 var(--font-display);
  letter-spacing: var(--track-snug);
}
:root[data-one] .porch-aside > section > h2:not(:has(+ .round-theme)),
:root[data-one] .card.round .round-theme,
:root[data-one] .about-page h2,
:root[data-one] .gathering h2,
:root[data-one] .s3-h,
:root[data-one] .settings-page .page-card h2,
:root[data-one] .settings-page .account > h2 {
  font: 500 var(--h-sub) / var(--lh-section) var(--font-display);
  letter-spacing: var(--track-snug);
}
/* The round card: "This round: your own pick" stays the small label, and the round's name under it takes
   the sub-section size, so the label never outranks what it labels (Juno, #498). */
:root[data-one] .card.round > h2:has(+ .round-theme) {
  color: var(--color-ink-soft);
}
/* Today's 500 on running text, meta and status lines is 400 in the one system; on controls and labels it is 600. */
:root[data-one]
  :is(
    .book-hero .lede,
    .form-status,
    .toast,
    .undo-bar,
    .private-note,
    .wall-host-note,
    .wall-notes,
    .explore-fan-empty,
    .explore-when,
    .explore-card-facts,
    .explore-facts li,
    .invite-status,
    .pick-save-error,
    .round-only-you,
    .home-club-away,
    .club-switch-away,
    .when,
    .gathering-when,
    .panel-facts,
    .club-average,
    .setup-state,
    .setup-count,
    .keep-done,
    .read-it-done,
    .read-it-saved,
    .help-toc,
    .word-list li
  ) {
  font-weight: 400;
}

:root[data-one] > body > header.hd:not(.site-header) {
  --bg: #fbfbf9;
  --ink: #15171c;
  --mut: #5a606b;
  --rule: #e2e2dc;
  --link: #13234f;
  --maxw: 1280px;
  --gut: 20px;
  --font-ui: 'Public Sans', system-ui, sans-serif;
  --font-display: Newsreader, serif;
  color: var(--ink);
  font:
    400 16px/1.55 'Public Sans',
    system-ui,
    sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}

@media (min-width: 900px) {
  :root[data-one] > body > header.hd:not(.site-header) {
    --gut: 40px;
  }
}

@media (prefers-color-scheme: dark) {
  :root[data-one] > body > header.hd:not(.site-header) {
    --bg: #111215;
    --ink: #ecebe6;
    --mut: #a3a6ad;
    --rule: #2a2c31;
    --link: #c9d2f2;
  }
}

:root[data-one] > body > header.hd:not(.site-header) a,
:root[data-one] > body > header.hd:not(.site-header) a:hover {
  color: inherit;
}

/* The rule above outranks menu.css's quiet rows, so the phone menu's foot (Settings, Create free account) keeps .com's
   muted colour here, the same as Sign out beside it (Juno, #415). */
:root[data-one] > body > header.hd:not(.site-header) .pm-ft a {
  color: var(--mut);
}

/* .com's footer on the app's pages in the one-site mode (UX-14, .com #520; src/one-header.js). Its rules are the shared
   site-footer.css; these are .com's tokens and the few shell.css lines its own pages set on .ft, so the two match. */
:root[data-one] > body > footer.ft {
  --bg: #fbfbf9;
  --ink: #15171c;
  --mut: #5a606b;
  --rule: #e2e2dc;
  --link: #13234f;
  --maxw: 1280px;
  --gut: 20px;
  color: var(--ink);
  background: var(--bg);
  font:
    400 16px/1.55 'Public Sans',
    system-ui,
    sans-serif;
}

@media (min-width: 900px) {
  :root[data-one] > body > footer.ft {
    --gut: 40px;
  }
}

@media (prefers-color-scheme: dark) {
  :root[data-one] > body > footer.ft {
    --bg: #111215;
    --ink: #ecebe6;
    --mut: #a3a6ad;
    --rule: #2a2c31;
    --link: #c9d2f2;
  }
}

:root[data-one] > body > footer.ft a {
  color: inherit;
}

:root[data-one] > body > footer.ft nav a {
  color: var(--mut);
}

:root[data-one] > body > footer.ft nav a:hover {
  color: var(--ink);
}

:root[data-one] > body > footer.ft .logo {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

:root[data-one] > body > footer.ft :focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

/* The search sheet's field draws its own focus on its box (menu.css .sf:focus-within), so its input is left out here,
   or it gets a second ring inside the first (Vera, #395). */
:root[data-one] > body > header.hd:not(.site-header) :focus-visible:not(.sf input) {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

/* In the mode the page under .com's header stands on the header's line (Juno, #368): .com's column, 1280 wide with
   its 20 or 40 gutter, for the body, the club's masthead and rooms, and the footer. stoareads.app keeps its own. */
:root[data-one] {
  --one-maxw: 1280px;
  --one-gut: 20px;
}

@media (min-width: 900px) {
  :root[data-one] {
    --one-gut: 40px;
  }
}

/* UX-10: in the mode the page under .com's header stands on .com's paper (its --bg, light and dark), so no seam shows
   where the header ends. Panels keep --color-surface. stoareads.app keeps its own. */
:root[data-one] {
  --one-paper: #fbfbf9;
  --color-background: var(--one-paper);
}

@media (prefers-color-scheme: dark) {
  :root[data-one] {
    --one-paper: #111215;
  }
}

/* The club's mark, name and tabs stand on the same paper, not on a panel of their own: .com puts nothing between its
   header and the page. The rule under the tabs stays (Juno, #405). The band is a .club-space, which carries the
   club's own --color-background, so it takes the mode's paper by name. */
:root[data-one] .club-nav {
  background: var(--one-paper);
}

:root[data-one] main,
:root[data-one] .site-footer {
  width: min(var(--one-maxw) - var(--one-gut) * 2, 100% - var(--one-gut) * 2);
}

:root[data-one] .club-nav-inner {
  padding-inline: max(var(--one-gut), (100% - var(--one-maxw)) / 2 + var(--one-gut));
}

/* "Add the books on this phone to your account?" (SPEC-FIRST-FIVE §6 rule 4): the heading wraps evenly, and the books
   it would add sit under the lede as compact rows, titles wrapping and never cut (Juno, #400). */
.device-shelf-ask h1 {
  font-size: var(--t-title-card);
  text-wrap: balance;
}

.device-shelf-books {
  margin: var(--s5) 0 0;
}

.device-shelf-books li {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}

.device-shelf-books li + li {
  margin-top: var(--s3);
}

.device-shelf-books strong {
  overflow-wrap: anywhere;
}

.device-shelf-books .device-shelf-loved {
  display: block;
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.device-shelf-books .device-shelf-loved .tick {
  display: inline;
}

.device-shelf-more {
  margin: var(--s3) 0 0;
}

.device-shelf-actions {
  margin-top: var(--s5);
}

.device-shelf-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.device-shelf-said {
  flex-basis: 100%;
}

/* ---- "Your own pick" (SPEC-CLUBS Part B, rounds.js): the round on Home, and its switch ---- */
.card.round .round-theme {
  margin: 0 0 var(--s1);
  font: 500 var(--t-item) / var(--lh-item) var(--font-display);
}

.card.round .round-count {
  margin: var(--s2) 0 0;
}

.round-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  margin-top: var(--s4);
}

.round-mine .picked {
  margin: var(--s4) 0 0;
}

/* Audit 2 (Juno): 12 px between "Pick your book" and "Start the next round" when both show. Held on a club's own
   address until Seph's yes (DOOR_AUDIT2). */
:root:not(.door-held-a2) .round-actions + .round-next {
  margin-top: var(--s3);
}

.round-mine .picked p {
  overflow-wrap: anywhere;
}

.round-show {
  min-height: var(--tap);
  margin: var(--s3) 0 0;
  cursor: pointer;
}

.round-show input[role='switch'] {
  appearance: none;
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in oklab, var(--color-ink-soft) 60%, transparent);
  border-radius: var(--r-pill);
  background: var(--rule);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.round-show input[role='switch']::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 0.15s ease;
}

.round-show input[role='switch']:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.round-show input[role='switch']:checked::after {
  transform: translateX(18px);
}

.round-show input[role='switch']:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.round-show .form-status:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .round-show input[role='switch'],
  .round-show input[role='switch']::after {
    transition: none;
  }
}

@media (forced-colors: active) {
  .round-show input[role='switch'] {
    border-color: CanvasText;
  }
  .round-show input[role='switch']::after {
    background: CanvasText;
  }
  .round-show input[role='switch']:checked {
    background: Highlight;
  }
}

.round-format {
  margin: var(--s5) 0;
}

/* Your own pick (SPEC-CLUBS B5, B6): the shown picks, one tile per book with who picked it. The tiles aren't links,
   so they don't lift on hover, and names wrap rather than being cut. */
.round-picks .cover-card:hover .cover {
  transform: none;
}

.round-picks .cover-card .muted {
  white-space: normal;
  overflow-wrap: break-word;
}

.round-sharing {
  margin: var(--s5) 0;
}
/* "What we read" (Part B, B6): each member's own words beside their pick. */
.round-read:empty {
  display: none;
}
.round-read {
  margin: var(--s5) 0;
}
.round-read-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s4);
}
.round-read-list > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
}
.round-read-list .muted {
  margin: 0;
}
.round-words {
  margin: var(--s2) 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Deleting your account (/settings/delete, SPEC-DELETE-ACCOUNT): four steps, one at a time. Stoa's own look; rows are
   plain and 44px tall; "Keep my account" is the primary button until the last step. */
.delete-account-link {
  margin-top: var(--s7);
  font-size: var(--t-meta);
}
.delete-account-link a {
  color: var(--color-ink-soft);
}
/* A 44 px tap target (audit VB4) that still reads as a quiet link: padding, not a button. Held on a club's own address
   until Seph says yes (door-hold.js DOOR_VB4). */
:root:not(.door-held-vb4) .delete-account-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s2);
  margin-inline: calc(-1 * var(--s2));
}
.delete-flow h1:focus {
  outline: none;
}
.delete-flow > .lede {
  margin-bottom: var(--s5);
}
.delete-rows {
  margin: 0 0 var(--s6);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-line);
}
.delete-rows > li {
  border-bottom: 1px solid var(--color-line);
}
.delete-row,
button.delete-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
  width: 100%;
  min-height: 44px;
  padding: var(--s3) 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.delete-row:hover > span:first-child {
  color: var(--color-primary);
}
.delete-row .hint {
  font-weight: 400;
}
.delete-row:disabled {
  color: var(--color-ink-soft);
}
.delete-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
  margin-top: var(--s5);
}
.delete-continue {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s3);
}
.delete-continue button:disabled {
  color: var(--color-ink-soft);
  text-decoration: none;
  cursor: not-allowed;
}
.delete-reason {
  color: var(--color-ink-soft);
}
.delete-club {
  margin-bottom: var(--s4);
}
.delete-club h2 {
  margin: 0 0 var(--s3);
  font-size: var(--t-item);
}
.delete-lines {
  margin: 0 0 var(--s3);
  padding-left: 1.1em;
}
.delete-lines li + li {
  margin-top: var(--s2);
}
.delete-blocker {
  margin: 0 0 var(--s4);
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--color-highlight);
  background: color-mix(in srgb, var(--color-highlight) 8%, transparent);
  border-radius: 0 var(--r-card) var(--r-card) 0;
}
.delete-blocker > p {
  margin: 0 0 var(--s2);
}
.delete-blocker > p:last-child {
  margin-bottom: 0;
}
.delete-handover {
  margin: var(--s3) 0;
  padding: 0;
  list-style: none;
}
.delete-handover li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 44px;
}
.delete-handover li + li {
  border-top: 1px solid var(--color-line);
}
.delete-handover li::before {
  content: none;
}
.delete-handover .member {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.delete-handover .member > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.delete-handover button {
  flex: none;
  min-height: 44px;
  padding-inline: var(--s3);
  white-space: nowrap;
}
.delete-blocker .check {
  margin: 0;
}
.delete-reauth {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.delete-reauth > button {
  justify-self: start;
}
.delete-confirm {
  display: grid;
  gap: var(--s2);
}
/* Step 3 has no lede: the reauth or confirm block keeps the same 16px under the h1 (Juno). */
.delete-flow > h1 + .delete-reauth,
.delete-flow > h1 + .delete-confirm {
  margin-top: var(--s4);
}
.delete-confirm input {
  max-width: 22rem;
}
.delete-final {
  margin: var(--s3) 0 0;
  color: var(--color-ink-soft);
}
.delete-back {
  margin-top: var(--s5);
}
/* The flow's text-styled buttons (Continue to delete, Back, Leave this club instead) still take a 44px tap (Vera, #421). */
.delete-flow button.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.delete-done-actions {
  margin-top: var(--s5);
}
.delete-changed a {
  /* Inline, so the line wraps on a phone; the padding gives a 44px-plus tap without moving the text. */
  padding-block: var(--s4);
}
.round-shareback {
  margin-top: var(--s4);
}
.round-shareback .round-actions {
  margin-top: 0;
  gap: var(--s3) var(--s4);
}
.round-shareback .composer-row {
  justify-content: space-between;
}
/* On Our shelf a pick opens its gathering's "What we read": a card, not underlined text (B7). */
.round-picks a.cover-card,
.round-picks a.cover-card * {
  text-decoration: none;
}
.round-picks a.cover-card strong {
  color: var(--color-ink);
}
@media (hover: hover) {
  .round-picks a.cover-card:hover strong {
    text-decoration: underline;
  }
}
.link-button.danger {
  color: var(--color-danger);
}
.round-delete-ask > p {
  margin: var(--s2) 0 0;
}
.round-delete-ask .round-actions {
  margin-top: var(--s2);
  gap: var(--s3) var(--s5);
}
/* Text buttons in a round (Not now, Cancel, Edit, Keep, Delete) still meet the 44px tap gate (Vera, #425). */
.round-actions .link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}
.round-only-you {
  margin: var(--s1) 0 0;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
}
/* "In clubs" cards (#469, Vera A): the status sits a step below the hint on both, member and organizer. */
#in-clubs > .hint {
  margin-bottom: 0;
}
#in-clubs .invite-status:not(:empty) {
  margin-top: var(--s3);
}
/* Settings cards are grids with an 8 px row gap: the margin tops it up to the same 12 px (Vera A). */
.account #in-clubs .invite-status:not(:empty) {
  margin-top: calc(var(--s3) - var(--s2));
}

/* P2 8: a copy the browser refused says how to copy by hand, in the danger colour, not the success one. */
.invite-status.invite-status-error {
  color: var(--color-danger);
}

/* P2 11 (Juno): wherever the tab bar shows, .com's header keeps search and the menu only. The tab bar's My Shelf is
   the only one on the screen; the phone menu still lists it. site-header.css shows signed-in links with !important. */
@media (max-width: 720px) {
  .has-tabs .hd-in > .hd-a[href='/me/shelf'] {
    display: none !important;
  }
}

/* P2 12 is held on a club's own address until Seph's yes (door-hold.js): its cloth covers keep the old breaking. */
.door-held .cover-title {
  overflow-wrap: anywhere;
  hyphenate-limit-chars: auto;
  -webkit-hyphenate-limit-before: auto;
  -webkit-hyphenate-limit-after: auto;
}

/* ==== Club Shelf on shelf v3 (public/club-shelf3.js, slice 7) ========================================
   The shelf reads --lib-* (mapped to the club's tokens by .club-space above); only the sheet and the switch are here. */

.cs3-sheet {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}

.cs3-sheet .cover {
  flex: none;
}

.cs3-facts p {
  margin: 0 0 var(--s1);
}

.cs3-by {
  font-weight: 600;
}

.cs3-actions {
  margin-top: var(--s4);
  align-items: center;
}

.cs3-actions .keep-book {
  margin-top: 0;
}

.cs3-switch {
  margin: var(--s3) 0 0;
}

.cs3-switch button {
  min-height: 44px;
}

/* An organizer's "Remove from our shelf" in a past read's sheet, and the Undo after it (slice 7). */
.cs3-remove {
  margin: var(--s3) 0 0;
}

.cs3-remove button,
.cs3-undo button {
  min-height: 44px;
}

.cs3-remove .error,
.cs3-undo .error {
  display: block;
}

.cs3-undo {
  margin: 0 0 var(--s3);
  color: var(--color-ink-soft);
}

.cs3-found {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs3-found li {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--color-line);
}

/* S5: the new-gathering form's two weeks of days. Each day is a 44 px target; on a phone the grid runs to the card's
   edges so seven fit, and under 360 px the days touch, one continuous surface (Juno). */
.day-picker {
  margin: var(--s3) 0;
}
.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.day-month {
  margin: 0;
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
}
button.day-nav {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  font-size: var(--t-item);
  color: var(--color-ink);
  background: transparent;
  border: 0;
  box-shadow: none;
}
button.day-nav:disabled {
  opacity: 0.3;
}
.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 2.75rem);
  gap: var(--s1);
  margin: var(--s2) 0;
}
.day-weekday {
  text-align: center;
  font: 500 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}
button.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0;
  font: 500 var(--t-ui) / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
  background: color-mix(in srgb, var(--color-ink) 5%, transparent);
  border: 0;
  border-radius: var(--r-control);
  box-shadow: none;
}
button.day.today {
  box-shadow: inset 0 0 0 1px var(--color-ink);
}
button.day[aria-pressed='true'] {
  color: var(--color-on-primary);
  background: var(--color-primary);
}
button.day:disabled {
  color: var(--color-ink-soft);
  background: transparent;
  opacity: 0.45;
  cursor: default;
}
.day-month-short {
  font-size: var(--t-meta);
}
.day-count {
  margin: 0;
}
.part-segmented {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(4, auto);
  margin-top: var(--s2);
}
@media (max-width: 30rem) {
  /* On a phone the day grid fills the form's width and no more: no negative margin, because the form's padding isn't
     the same in every shell and a bleed sized for one ran past the edge in another (Vera, #489). */
  .when-set {
    padding-inline: 0;
    border-width: 1px 0 0;
    border-radius: 0;
  }
  .day-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }
  .part-segmented {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 22.5rem) {
  /* No gaps on the narrowest phones, so each day keeps about 40 px (Juno, #489). */
  .day-grid {
    gap: 0;
  }
  button.day {
    border-radius: 0;
  }
  .part-segmented button {
    padding-inline: var(--s2);
    white-space: nowrap;
  }
}
.part-segmented button {
  min-height: 2.75rem;
}

/* The organizer-page line under "Not answered yet" (a club's own address, once its poll lines are on). */
.after-list {
  margin-top: var(--s4);
}

/* SPEC-SCHEDULING-VENN S6: the organizer's own answer on the new-gathering form. */
.host-answers {
  margin: var(--s3) 0;
}
.host-answers summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  font: 600 var(--t-label) / var(--lh-ui) var(--font-ui);
  cursor: pointer;
}
.host-answers-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.host-answers-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s1) 0;
  border-bottom: 1px solid var(--color-line);
}
.host-answers-list select {
  width: auto;
  min-height: 2.75rem;
}
/* S7: a date poll's times on the edit form. Juno (#499): 16 px before Place, answered or not. */
.change-times {
  margin: var(--s3) 0 var(--s4);
}
.change-times .label {
  margin-bottom: var(--s1);
}
/* Juno (#499): "Set this date" always sits on the right from 360 px up, and always below under it. Held on a club's own
   address until Seph's yes on DOOR_POLL_EXTRAS. */
:root:not(.door-held-px) .ranked-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}
:root:not(.door-held-px) .ranked-row[hidden] {
  display: none;
}
:root:not(.door-held-px) .ranked-set {
  justify-self: start;
}
@media (min-width: 22.5rem) {
  :root:not(.door-held-px) .ranked-row {
    grid-template-columns: minmax(0, 1fr) 9rem;
  }
  :root:not(.door-held-px) .ranked-set {
    justify-self: stretch;
    white-space: nowrap;
  }
}
:root:not(.door-held-px) .ranked-confirm {
  grid-column: 1 / -1;
}
/* Club Shelf v3 header (Juno PA5, #497): Suggest and Rank side by side in one row; Suggest opens the club's search
   under them. Not on cltbb.com, which keeps today's header. */
.porch-head-v3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
.porch-head-v3 .actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--s3);
}
.porch-head-v3 .actions > .button {
  flex: 1 1 0;
  white-space: nowrap;
  padding-inline: var(--s3);
}
@media (min-width: 600px) {
  .porch-head-v3 .actions > .button {
    flex: 0 0 auto;
    padding-inline: var(--s5);
  }
}
.porch-head-v3 .porch-head-link {
  grid-column: 1 / -1;
}
.cs3-pick {
  margin: var(--s2) 0 0;
}
/* VA9: no Next book after the current read. The library draws its "Next book" part anyway, so the club hides it:
   on phones (and wherever Reading now has its own shelf) the last bay, on one shared shelf its heading and the
   divider. One line under the shelf says so instead (club-shelf3.js .cs3-none). Held on a club's own address. */
.cs3-no-next .s3-bay:not(:only-of-type):last-of-type,
.cs3-no-next .s3-bay:only-of-type .s3-h + .s3-h,
.cs3-no-next .s3-bay:only-of-type .s3-div {
  display: none;
}
.cs3-none a {
  white-space: nowrap;
}
.cs3-none {
  margin: var(--s3) 0 0;
}
/* PA4: with "Coming up" for screen readers only, the list sits 24 px under the Upcoming / Past tabs. */
.shelf-section.after-tabs {
  margin-top: var(--s5);
}
/* Juno (P3): a parts poll's day, then its weekday in soft ink, then remove. Under 359 px the date takes the row and the
   weekday sits under it, left, with "Remove" on the right. */
.times li.has-day {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.times-day {
  min-width: 2.25em;
  font: 400 var(--t-ui) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}
@media (max-width: 22.4375rem) {
  .times li.has-day {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .times li.has-day input {
    grid-column: 1 / -1;
  }
  /* Juno: 16 px from a "Remove" to the next day; the 44 px button already gives 14 of it. */
  .times:has(> .has-day) {
    gap: calc(var(--s1) / 2);
  }
}
/* VA13: a roster row never runs past the screen; the name wraps (never cut) and Manage keeps its 44 px. VA14: a field's
   select (WebKit sizes it to its longest option) stays inside its column. Held on a club's own address (DOOR_AUDIT2). */
:root:not(.door-held-a2) .roster {
  grid-template-columns: minmax(0, 1fr);
}
:root:not(.door-held-a2) .roster .member strong {
  overflow-wrap: anywhere;
}
:root:not(.door-held-a2) .field {
  grid-template-columns: minmax(0, 1fr);
}
:root:not(.door-held-a2) .field > select {
  min-width: 0;
}
/* VA13 (Juno): in a narrow roster row the date and email wrap, never cut; "Nov 2026" stays in one piece. */
.nowrap {
  white-space: nowrap;
}
:root:not(.door-held-a2) .roster .member .muted,
:root:not(.door-held-a2) .delete-handover .member > span:last-child {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

/* F15 (club-e2e): the gathering's book row names the book in text, as its h2 would. */
.gathering .picked .picked-title {
  font-family: var(--font-display);
  font-size: var(--t-item);
  font-weight: 500;
  line-height: var(--lh-section);
  letter-spacing: var(--track-snug);
  color: var(--color-ink);
}
.gathering .picked:hover .picked-title {
  color: var(--color-primary);
}

/* F6: the Shelf's Next slot while a Your own pick round is open. */
.round-next-slot {
  display: grid;
  gap: var(--s1);
}

.round-next-slot p {
  margin: 0;
}

/* F11: the Book field during an open round is text, not a choice. */
.field-static {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--t-ui);
  font-weight: 400;
  color: var(--color-ink);
}

/* Suggest a book from anywhere (Juno's spec, Nov 24): your shelf first, then Stoa's books, then Open Library's. */
.sf-shelf h2 {
  margin-bottom: 0;
}

.sf-card .cover-card-art {
  border-radius: var(--r-cover, 2px);
}

.sf-check {
  position: absolute;
  top: var(--s1);
  right: var(--s1);
  display: none;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-on-primary);
  background: var(--color-primary);
  border-radius: 50%;
}

.sf-check svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-card[aria-pressed='true'] .sf-check {
  display: grid;
}

/* The chosen cover: a 2px accent ring, never a fill. */
.sf-card[aria-pressed='true'] .cover {
  box-shadow:
    0 0 0 2px var(--color-primary),
    var(--cover-shadow);
}

.sf-results .sf-group {
  padding: var(--s4) 0 var(--s1);
}

.sf-results .sf-group:first-child {
  padding-top: var(--s2);
}

.sf-group-h {
  margin: 0;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.sf-group-h.sf-quiet {
  font-weight: 400;
  color: var(--color-ink-soft);
}

.sf-result {
  min-height: 2.75rem;
}

.sf-result .sf-text {
  display: grid;
  min-width: 0;
}

.sf-proof {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.sf-result:disabled {
  cursor: default;
  opacity: 0.6;
}

.sf-result:disabled:hover {
  background: transparent;
}

/* "Add it by hand": a plain text link, last. */
.sf-manual > summary::after {
  display: none;
}

.sf-manual > summary {
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Back on the Shelf after a suggestion: the new book is lit for 2 s (showJustSuggested). */
.sf-new {
  border-radius: var(--s1);
  box-shadow: 0 0 0 2px var(--color-primary);
  transition: box-shadow 600ms var(--ease, ease);
}

@media (prefers-reduced-motion: reduce) {
  .sf-new {
    transition: none;
  }
}

/* The confirm block under the tapped result row (Juno, #721). */
.sf-results > .sf-confirm {
  padding: var(--s3) 0;
  list-style: none;
}

/* Under a group, the confirm block keeps the page's section gap before the next heading. */
.round-one > .picked-details:not(:empty) {
  margin-block-end: var(--s5);
}

/* From your shelf: each card is its cover, a title of at most 2 lines and one author line, with no band under it (Juno, #721). */
.sf-rail {
  align-items: start;
}

.sf-card {
  align-content: start;
}

/* Beats UX-30's html:not(.door-held) .cover-card strong (display: block), so the clamp applies (Vera, #712). */
html:not(.door-held) .sf-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sf-card .muted {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---- UX audit 2 PA8: the site's list row in the app (after DZ-5 S7), worded at every width (R3-78) ----
   A 64 px cover, the title, the author and one line of lead or proof (2 lines at most). Want to read and I've read it
   sit under the text, past the cover, icon and words at every width (Seph 16:00 Nov 15: no bare icons): 32 px drawn,
   a 44 px target from a vertical ::after. A club's own address keeps the earlier row. */
/* Rows stand on the page between hairlines, as on the site's results, not inside a card. */
.pick-list-rows:has(> li.list-row) {
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}

.pick-list-rows > li.list-row:first-child {
  border-top: 1px solid var(--rule);
}

.pick-list-rows li.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  padding: var(--s4) 0;
}

.pick-list-rows li.list-row button.pick-row {
  grid-column: 1;
  grid-row: 1;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: var(--s3);
  padding: 0;
}

.list-row .cover-S {
  width: 64px;
  height: 96px;
}

.list-row .pick-row-body {
  gap: 2px;
}

.list-row .list-row-line {
  margin-top: var(--s1);
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  color: var(--color-ink-soft);
}

.list-row .list-row-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s5);
  /* Under the text: past the 64 px cover and the row's gap. */
  padding-left: calc(var(--s8) + var(--s3));
  /* The 44 px buttons draw their words in the middle 32 px, so the row starts higher than the s3 it had. */
  margin-top: var(--s1);
}

.list-row .read-it {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--s5);
  flex: 1 1 auto;
}

.list-row :is(.list-act, .read-it-button, .read-it-done) {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  width: auto;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--color-ink);
  font: 600 14px / 20px var(--font-ui);
  white-space: nowrap;
  cursor: pointer;
}

/* Your own rating in a row is five laurels at the row's own size, 14 px and 3 px apart (as a tile's, Juno #606), in
   ink, never ★ (R3-99). "Read," keeps its laurels and "(only you)" stays whole, so a rated line breaks only between
   them, and it is one flex item, so it wraps inside its slot: two lines at most at 320. Fixed-size SVGs: the line has
   its full width from the first paint. */
.read-it-line {
  min-width: 0;
}

.read-it-rated {
  white-space: nowrap;
}

.read-it-laurels {
  color: var(--color-ink);
}

.read-it-laurels .ob-glyph svg {
  width: 14px;
  height: 14px;
}

/* A rated line in a list row may wrap at 320 rather than run past the gutter; the check keeps its size. */
.list-row .read-it-done.read-it-reopen {
  height: auto;
  min-width: 0;
  white-space: normal;
}

/* Saved is shorter than Want to read: the slot holds, so I've read it never moves under the finger and lines up
   across rows (Vera A on #563). 8em is Want to read's width at 14 px. */
.list-row .list-save {
  min-width: 8em;
}

.list-row .list-act[hidden] {
  display: none;
}

.list-row .list-save-mark,
.list-row .read-it-check {
  flex: none;
  width: 18px;
  height: 18px;
}

.list-save-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  transition: fill 0.12s;
}

/* The saved fill: the bookmark fills, in the colour a done check uses. */
.list-save.saved {
  color: var(--color-success);
}

.list-save.saved .list-save-mark path {
  fill: currentColor;
}

.list-row :is(.list-act, .read-it-button):hover .act-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.list-row :is(.read-it-prompt, .read-it > .error, .pick-save-error) {
  flex-basis: 100%;
  margin-top: var(--s3);
  max-width: none;
  text-align: left;
}

/* PA8: Read together as a list. The row is a link with no action column, so it takes the row's full width. */
.pick-list-rows li.wall-row {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
}

.pick-list-rows li.wall-row a.pick-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: var(--s3);
  align-items: start;
  grid-row: 1;
  color: inherit;
  text-decoration: none;
}

.pick-list-rows li.wall-row a.pick-row:hover strong {
  color: var(--color-primary);
}

/* R3-18: Suggested on the club Shelf is the same list row. An organizer's Pick it sits under the text, past the cover. */
.pick-list-rows li.suggested-row .suggested-acts {
  margin: var(--s2) 0 0;
  padding-left: calc(var(--s8) + var(--s3));
}

/* A list row's text column reads at a comfortable measure on wide screens (Juno on #526): For you, Read together and
   Suggested alike. */
.list-row .pick-row-body {
  max-width: 65ch;
}

/* 44px to the touch, vertical only, with nothing drawn moved (R3-59, round 4 rows 4 to 12; as R3-56): an unseen
   ::after 44px tall, centred on each small control that stands alone. Stacked menu items are taller instead, below. */
:is(
  .react-pick > div > button,
  .post-tools > .link-button.small,
  .note-tools > .link-button.small,
  .members-more > a,
  .feature-body > h2 > a,
  .step-title a,
  .round-next-slot > p > a,
  .invite-line > button.small,
  .invite-or > .link-button,
  .eyebrow > a,
  .amazon > a,
  .site-nav > a,
  .site-nav > .hd-dm > a,
  summary.nav-me
) {
  position: relative;
}

:is(
  .react-pick > div > button,
  .post-tools > .link-button.small,
  .note-tools > .link-button.small,
  .members-more > a,
  .feature-body > h2 > a,
  .step-title a,
  .round-next-slot > p > a,
  .invite-line > button.small,
  .invite-or > .link-button,
  .eyebrow > a,
  .amazon > a,
  .site-nav > a,
  .site-nav > .hd-dm > a,
  summary.nav-me
)::after {
  content: '';
  position: absolute;
  inset: min(0px, calc((100% - 44px) / 2)) 0;
  /* Over a positioned neighbour drawn later (a cover, a reaction chip), under menus and pickers (z-index 5 up). */
  z-index: 1;
}

/* When a row of tools wraps, the control on the line above or below stays whole: the unseen areas pass under it, so
   Remove's never takes the bottom of "Mark as raised" (Vera A, #534). */
:is(.note-tools, .post-tools) > :not(.link-button.small) {
  position: relative;
  z-index: 2;
}

/* The Me menu's items sit one under another, so an unseen area would only overlap its neighbour: each is 44px
   itself, its words centred (R3-59, row 6; it was 36px). */
.me-menu-panel li > a,
.me-menu-panel li > .link-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
}

/* A note kept its rise animation's transform (fill both), so it was a layer of its own and the next one painted over
   its open reaction picker: the lower half of 👍 ❤️ 😂 🤔 📚 could not be tapped (R3-59 check). The fill is now
   backwards, and the note or post with the picker open comes to the front, during the rise too. */
:is(.note, .post):has(details.react-pick[open]) {
  position: relative;
  z-index: 6;
}

/* R3-60 (Juno, round 4 row 13): every address uses the one heading scale, so a club's own address matches
   stoareads.com size for size: page sections --h-section (24 px on a phone, 30 wide), sections inside a column
   or card --h-sub (20, 22). Only the size moves here, in the club's own fonts; stoareads.com keeps its
   Newsreader rules above. */
:root :is(.porch-main h2, .shelf-section > h2, .me-reading > h2, .me-books > h2) {
  font-size: var(--h-section);
}
:root
  :is(
    .porch-aside > section > h2:not(:has(+ .round-theme)),
    .card.round .round-theme,
    .about-page h2,
    .members-page h2,
    .gathering h2,
    .s3-h,
    .settings-page .card > h2,
    .settings-page .account > h2,
    .calendar-feed > h2,
    .home-clubs > h2
  ) {
  font-size: var(--h-sub);
}
/* The side column's headings ("Members, 10") were small UI labels; at --h-sub they take the club's display
   face at 500, as the round's name beside them does and as stoareads.com draws them. */
:root .porch-aside > section > h2:not(:has(+ .round-theme)) {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-section);
  letter-spacing: var(--track-snug);
}

/* R3-68: Settings is one document. Every part, Your reading page included, sits on the page under a rule, its own h2
   on --h-sub in the display face over what it holds (no side label column), and its buttons fit their words from
   600 px, full width below. The segmented control stays. */
:root .settings-page .page-card,
:root .settings-page .account > .card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s2);
  padding: var(--s6) 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}
:root .settings-page .account > details.card {
  display: block;
}
:root .settings-page .account > .card > * {
  grid-column: 1;
  grid-row: auto;
}
:root .settings-page .page-card > h2,
:root .settings-page .account > .card > h2 {
  margin: 0 0 var(--s2);
  font: 500 var(--h-sub) / var(--lh-section) var(--font-display);
  letter-spacing: var(--track-snug);
}
:root
  .settings-page
  :is(.page-card, .account > .card, .account > .actions)
  :is(button, .button):not(.link-button, .segmented button, .device-list button) {
  width: 100%;
  justify-self: stretch;
}
@media (min-width: 600px) {
  :root
    .settings-page
    :is(.page-card, .account > .card, .account > .actions)
    :is(button, .button):not(.link-button, .segmented button, .device-list button) {
    width: auto;
    justify-self: start;
  }
}
/* An empty status or action row under Your reading page took two grid gaps and its own margin (R3-68 stills): only
   one with something in it takes room, and a live region stays in the accessibility tree, kept out of sight, so the
   error it announces later is heard (Vera, #541). The account starts on the next rule, with no margin over it. */
:root .settings-page .page-card > :empty:not([role='status'], [aria-live]) {
  display: none;
}
:root .settings-page .page-card > :is([role='status'], [aria-live]):empty,
:root .settings-page .account > .card > :is([role='status'], [aria-live]):empty {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}
:root .settings-page .account {
  margin-top: 0;
}
:root .settings-page .handle-form .hint {
  margin-bottom: var(--s3);
}

/* R3-69 (Juno): Club settings is the same document as Settings. Every part sits on the page under a rule, with its h2
   on --h-sub in the display face and no white card, and its buttons fit their words from 600 px, full width below.
   "Delete the club" stays a quiet disclosure at the end, as "Delete my account" is on Settings. */
:root .settings-page > :is(.settings-section, section.card) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s2);
  margin: 0;
  padding: var(--s6) 0;
  background: none;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}
:root .settings-page > :is(.settings-section, section.card) > * {
  grid-column: 1;
  grid-row: auto;
}
:root .settings-page > :is(.settings-section, section.card) > h2 {
  margin: 0 0 var(--s2);
  font: 500 var(--h-sub) / var(--lh-section) var(--font-display);
  letter-spacing: var(--track-snug);
}
:root
  .settings-page
  > :is(.settings-section, section.card, details.card)
  :is(button, .button):not(.link-button, .segmented button, summary *) {
  width: 100%;
  justify-self: stretch;
}
@media (min-width: 600px) {
  :root
    .settings-page
    > :is(.settings-section, section.card, details.card)
    :is(button, .button):not(.link-button, .segmented button, summary *) {
    width: auto;
    justify-self: start;
  }
}

/* R3-69 (a): every part's closing button, or its row of buttons, sits 24 px (--s5) under the last thing above it,
   whatever that is (a field's help, a note, a list). A grid's own gap counts toward the 24. */
:root
  :is(
    .settings-page .page-card,
    .settings-page .account > .card,
    .settings-page > :is(.settings-section, section.card, details.card)
  ) {
  --closer-gap: var(--s2);
}
:root
  :is(
    .settings-page .page-card form,
    .settings-page .account > .card form,
    .settings-page > :is(.settings-section, section.card, details.card) form,
    .settings-page > details.card
  ) {
  --closer-gap: 0px;
}
:root
  :is(
    .settings-page .page-card,
    .settings-page .account > .card,
    .settings-page > :is(.settings-section, section.card, details.card),
    .settings-page .page-card form,
    .settings-page .account > .card form,
    .settings-page > :is(.settings-section, section.card, details.card) form
  )
  > :is(button:not(.link-button), .button:not(.link-button), .actions, .another-device):not(:first-child) {
  margin-top: calc(var(--s5) - var(--closer-gap));
}
:root
  :is(
    .settings-page .page-card,
    .settings-page .account > .card,
    .settings-page > :is(.settings-section, section.card, details.card),
    .settings-page .page-card form,
    .settings-page .account > .card form,
    .settings-page > :is(.settings-section, section.card, details.card) form
  )
  > :has(+ :is(button:not(.link-button), .button:not(.link-button), .actions, .another-device)),
:root
  :is(
    .settings-page .page-card,
    .settings-page .account > .card,
    .settings-page > :is(.settings-section, section.card, details.card),
    .settings-page .page-card form,
    .settings-page .account > .card form,
    .settings-page > :is(.settings-section, section.card, details.card) form
  )
  > :has(+ :is(button:not(.link-button), .button:not(.link-button), .actions, .another-device))
  > :last-child {
  margin-bottom: 0;
}

/* R3-69 (b): the segmented control's buttons are full-size tap targets, 44 px, and look as they did. */
:root .settings-page .segmented button {
  min-height: 44px;
}
/* R3-69 (a): on Settings, "Sign in on another device" is the part's closing button like any other, 24 px under the
   help above it, without the rule and padding it has on the sign-in page. */
:root .settings-page .another-device {
  padding-top: 0;
  border-top: 0;
}
/* R3-69 (Vera, #543): Club look's last row of fields gives up its margin too, so "Save the look" sits 24 px
   under it; and the next-book choices sit on the page on a club's own address as on stoareads.com (the club sheet
   has no fieldset reset of its own). */
:root .settings-page .club-look form > fieldset:last-of-type > .grid > .field {
  margin-bottom: 0;
}
/* The fields' old 16 px margin moves into the row gap (16 + 4), so the rows keep their spacing. */
:root .settings-page .club-look form > fieldset:last-of-type > .grid {
  row-gap: calc(var(--s4) + var(--s1));
}
:root .settings-page fieldset.pick-modes {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

/* C12 (Juno's audit): Subscribe is the button; Copy link sits beside it, quieter. */
.cs3-few-1 {
  max-width: min(100%, 22rem);
}
.cs3-few-2 {
  max-width: min(100%, 32rem);
}
.close-presets {
  display: grid;
  gap: var(--s2);
}
.calendar-subscribe {
  align-items: center;
  gap: var(--s2) var(--s4);
}

/* ---- The club reading room (UX audit Nov 28, rows 7 and 8; Juno's mocks 6 and 7) ----
   Club Home while the club reads a book: the book, where everyone is, questions for the gathering, spoiler-safe talk.
   Colours and fonts are the club's own tokens, so a club's own address keeps its look. */
.room-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s4);
  align-items: center;
  margin: 0 0 var(--s5);
  color: inherit;
  text-decoration: none;
}
.room-head .cover-L {
  width: 96px;
  height: 144px;
}
.room-head-text {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}
.room-title {
  font: 400 clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem) / 1.15 var(--font-display);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.room-head:hover .room-title {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.room-where,
.room-questions {
  margin: 0;
}
.room-sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s3);
}
.room-sec-head > h2 {
  margin: 0;
}
.room-place {
  min-height: var(--tap, 44px);
  font-weight: 600;
}
/* The line: a quiet rail, your own stretch of it filled, a tick for the meeting goal, members at their place. */
.room-line {
  position: relative;
  height: 72px;
  margin: var(--s2) var(--s5) var(--s1);
}
.room-rail,
.room-fill {
  position: absolute;
  top: 22px;
  left: 0;
  height: 4px;
  border-radius: 2px;
}
.room-rail {
  right: 0;
  background: var(--color-line);
}
.room-fill {
  background: color-mix(in oklab, var(--color-primary) 45%, var(--color-surface));
}
.room-goal {
  position: absolute;
  top: 4px;
  width: 2px;
  height: 44px;
  margin-left: -1px;
  background: var(--color-ink-soft);
}
.room-goal > span {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  font: 500 var(--t-meta) / 1.2 var(--font-ui);
  color: var(--color-ink-soft);
  white-space: nowrap;
}
.room-goal.start > span {
  left: 0;
  transform: none;
}
.room-goal.end > span {
  right: 0;
  left: auto;
  transform: none;
}
.room-dot {
  position: absolute;
  top: 8px;
  display: flex;
  transform: translateX(-50%);
}
.room-dot > .avatar {
  --size: 32px;
  box-shadow: 0 0 0 2px var(--color-background);
}
.room-dot > .avatar + .avatar {
  margin-left: calc(-1 * var(--s2));
}
.room-dot > .avatar.me {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.room-more {
  align-self: center;
  margin-left: var(--s1);
  font: 600 var(--t-meta) / 1 var(--font-ui);
  color: var(--color-ink-soft);
}
.room-goal-line,
.room-quiet {
  margin: var(--s2) 0 0;
}
/* The place sheet: a big number, a slider, and quick picks. */
.place-now {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin: var(--s3) 0;
}
.place-out {
  font: 400 2.25rem / 1 var(--font-display);
  color: var(--color-ink);
}
.place-page {
  width: 5.5rem;
  min-height: var(--tap, 44px);
}
.place-range {
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  min-height: var(--tap, 44px);
  accent-color: var(--color-primary);
}
.place-quick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: var(--s3) 0 var(--s4);
}
.place-quick button {
  min-width: 3.5rem;
  min-height: var(--tap, 44px);
  padding: 0 var(--s3);
  font-weight: 500;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  box-shadow: none;
}
.place-quick button[aria-pressed='true'] {
  color: var(--color-surface);
  background: var(--color-ink);
  border-color: var(--color-ink);
}
.place-ask-q {
  margin: 0 0 var(--s1);
  font-weight: 600;
}
.place-ask .actions,
.place-sheet .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s3);
}
.place-share {
  margin: 0;
}
.goal-form label {
  display: grid;
  gap: var(--s1);
  margin-bottom: var(--s3);
}
/* Questions for the gathering: a vote box you can hit with a thumb, the question, who asked. */
.room-q-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.room-q {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: var(--s3);
  align-items: start;
  padding: var(--s3) 0;
  border-top: 1px solid var(--color-line);
}
.room-q:first-child {
  border-top: 0;
}
.room-q-body > p {
  margin: 0;
}
.room-q-body > p:first-child {
  font-size: var(--t-item);
  color: var(--color-ink);
}
.room-q-body .link-button {
  margin-left: var(--s3);
}
.room-vote {
  display: grid;
  place-items: center;
  align-content: center;
  width: 3.25rem;
  min-height: 3.25rem;
  padding: var(--s1);
  font: 500 var(--t-meta) / 1.1 var(--font-ui);
  color: var(--color-ink-soft);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  box-shadow: none;
}
.room-vote > strong {
  font-size: var(--t-ui);
  color: var(--color-ink);
}
.room-vote.on {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 6%, var(--color-surface));
}
.room-vote.on > strong {
  color: var(--color-primary);
}
.room-q.raised .room-q-body > p:first-child {
  color: var(--color-ink-soft);
}
.room-q-add {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s3);
}
.room-q-add .room-q-input {
  flex: 1;
  min-width: 0;
  min-height: var(--tap, 44px);
}
/* Spoiler-safe talk: where each writer was, and posts from further in folded behind one line. */
.at-pct {
  margin-left: auto;
  padding: 2px var(--s2);
  font: 500 var(--t-meta) / 1.3 var(--font-ui);
  color: var(--color-ink-soft);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  white-space: nowrap;
}
.thread .post-head:has(.at-pct) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--s2);
}
.room-fold {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin: var(--s3) 0;
  padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--color-ink) 4%, var(--color-surface));
  border-radius: var(--r-card);
}
.room-fold > p {
  margin: 0;
}
.room-fold .link-button {
  min-height: var(--tap, 44px);
  font-weight: 600;
}
.room-scope {
  display: none;
  margin: 0;
}
.post.ahead > .post-main {
  padding-left: var(--s3);
  border-left: 2px solid var(--color-line);
}
.room-starters ul {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
}
.room-starters .starter-line {
  min-height: var(--tap, 44px);
  text-align: left;
}
@media (min-width: 720px) {
  .room-head .cover-L {
    width: 120px;
    height: 180px;
  }
  .room-scope {
    display: inline-grid;
  }
  .room-scope + .room-upto {
    display: none;
  }
}
/* The room shows the book being read, so the side card keeps only the books after it, and goes when there are none. */
.porch-layout:has(.room-head) .up-next:has(.mini-books > li:only-child),
.porch-layout:has(.room-head) .up-next .mini-books > li:first-child {
  display: none;
}
/* ==== Yearly reading goal (UX audit Nov 28 row 5) ===================================================
   A reader's page shows their goal for this year as a card under the header: the number, one mark per book (a bar
   past 60), one plain line on pace, and the latest covers read this year. Same look as stoareads.com's My Shelf. */
.goal-card {
  margin-top: var(--s6);
  padding: var(--s5);
  background: var(--color-surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
}

.reader-page > .goal-card {
  margin-top: var(--s6);
}

.goal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
}

.reader-page .goal-card h2,
.goal-card h2 {
  margin: 0;
  font: 600 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

.goal-count {
  margin: 0;
  flex: none;
  font: 400 var(--t-ui) / 1 var(--font-ui);
  color: var(--color-ink-soft);
}

.goal-count strong {
  font: 500 1.75rem / 1 var(--font-display);
  color: var(--color-ink);
}

.goal-marks {
  display: grid;
  grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr));
  gap: 3px;
  margin-top: var(--s3);
}

.goal-marks > span {
  height: 10px;
  border-radius: 3px;
  background: var(--rule);
}

.goal-marks > span.on {
  background: var(--color-primary);
}

.goal-bar {
  display: block;
  height: 10px;
  margin-top: var(--s3);
  border-radius: var(--r-pill);
  background: var(--rule);
  overflow: hidden;
}

.goal-fill {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: var(--color-primary);
}

/* Covers on the reader's page: the shared typeset box (cover-box.css), sized by its cell (Juno, #721). */
.pub-cv {
  width: 100%;
  aspect-ratio: 2 / 3;
  --rc: var(--r-cover);
  border-radius: var(--r-cover);
}

/* Reading now on the reader's page: My Shelf's cover rows, 3, 4, 6 and 8 across (library.css .lib-cr-l). */
.pub-cr {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s5) var(--s4);
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

.pub-cr li {
  display: grid;
  align-content: start;
  gap: var(--s1);
  min-width: 0;
}

.pub-cr-t {
  margin-top: var(--s2);
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-display);
  overflow-wrap: anywhere;
}

.pub-cr .muted {
  font: 400 var(--t-meta) / var(--lh-ui) var(--font-ui);
  overflow-wrap: anywhere;
}

/* By the section's own width, not the window's: the reader's page is one narrow column, so 8 across at 1366 would
   draw 66 px covers. The same steps as My Shelf where the room is the same. */
.reader-now {
  container-type: inline-size;
}

@container (min-width: 560px) {
  .pub-cr {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container (min-width: 800px) {
  .pub-cr {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@container (min-width: 1100px) {
  .pub-cr {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* Four on a phone, so each cover is wide enough for the typeset title when there's no art (Juno, #721). */
.goal-covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 4.5rem));
  gap: var(--s2);
  list-style: none;
  margin: var(--s4) 0 0;
  padding: 0;
}

.goal-covers li {
  min-width: 0;
}

.goal-covers li:nth-child(5) {
  display: none;
}

@media (min-width: 480px) {
  .goal-covers {
    grid-template-columns: repeat(5, minmax(0, 4.5rem));
  }

  .goal-covers li:nth-child(5) {
    display: block;
  }
}

.goal-all {
  margin: var(--s3) 0 0;
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}

/* ---- The live reveal and the club ranking on Club Home (Seph 16:15Z Nov 29) ----
   The reveal: a vote while it's open, who has voted, then every vote turned over in the same order on every screen.
   Colours and fonts are the club's own tokens. */
.room-reveal:empty,
.room-ranking:empty {
  display: none;
}
.room-reveal-card {
  display: grid;
  gap: var(--s3);
}
.room-reveal-card > h2,
.room-reveal-card > p {
  margin: 0;
}
.room-voted {
  display: grid;
  gap: var(--s2);
}
.room-voted > p {
  margin: 0;
}
.room-voted-list,
.room-flips,
.room-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.room-voted-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}
.room-flips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: var(--s2);
}
.room-flip {
  display: grid;
  perspective: 40rem;
  transform-style: preserve-3d;
}
.room-flip-face {
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--s1);
  padding: var(--s3) var(--s2);
  border: 1px solid var(--color-line);
  border-radius: var(--r-control);
  background: var(--raised);
  text-align: center;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: rotateY(0deg);
  /* Belt and braces for WebKit, which can paint a face's back through (Vera A P1, #722): a face is only visible on its
     own half of the turn. The front shows, and the back hides, at the halfway point, when the card is edge-on. */
  transition:
    transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s linear 0.3s;
}
.room-flip-face .small {
  overflow-wrap: anywhere;
}
.room-flip-back {
  color: var(--color-ink-soft);
}
.room-flip-front {
  visibility: hidden;
  transform: rotateY(180deg);
  border-color: var(--color-ink);
}
.room-flip.on .room-flip-front {
  visibility: visible;
}
.room-flip.on .room-flip-back {
  visibility: hidden;
  transform: rotateY(-180deg);
}
.room-flip.on .room-flip-front {
  transform: rotateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .room-flip-face {
    transition: none;
  }
}
.room-reveal-result {
  display: grid;
  gap: var(--s1);
}
.room-reveal-result > p {
  margin: 0;
}
.room-reveal-place {
  font: 400 var(--t-item) / 1.3 var(--font-display);
}
.room-ranking .room-sec-head a {
  font: 500 var(--t-ui) / var(--lh-ui) var(--font-ui);
}
.room-rank-list {
  display: grid;
  gap: var(--s2);
}
.room-rank-list > li {
  display: grid;
  grid-template-columns: var(--s5) minmax(0, 1fr);
  align-items: center;
  gap: var(--s3);
}
.room-rank-n {
  font: 400 var(--t-item) / 1 var(--font-display);
  text-align: center;
}
.room-rank-book {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.room-rank-book:hover .room-rank-title {
  text-decoration: underline;
}
.room-rank-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.room-ranking > p {
  margin: var(--s2) 0 0;
}

/* ---- The meeting brief (Seph 16:21Z Nov 29): /gatherings/:id?brief, one page on a phone or on paper ---- */
.brief {
  display: grid;
  gap: var(--s5);
}
.brief-head h1 {
  margin: var(--s1) 0;
}
.brief-head > p {
  margin: 0 0 var(--s1);
}
.brief-when {
  font-weight: 600;
}
.brief-tools {
  margin-top: var(--s3);
}
.brief-sec {
  border-top: 1px solid var(--rule);
  padding-top: var(--s4);
}
.brief-sec > h2 {
  margin: 0 0 var(--s2);
  font-size: var(--t-item);
}
.brief-sec > p {
  margin: 0 0 var(--s2);
}
.brief-list,
.brief-qs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s2);
}
.brief-qs {
  counter-reset: q;
}
.brief-list > li,
.brief-qs > li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
}
.brief-qs > li {
  counter-increment: q;
}
.brief-qs > li::before {
  content: counter(q) '.';
  min-width: var(--s5);
  font-variant-numeric: tabular-nums;
}
.brief-qs > li > span:first-of-type {
  flex: 1;
}
.brief-qs > li.raised {
  color: var(--color-ink-soft);
}
.brief-n {
  font: 500 var(--t-meta) / 1 var(--font-ui);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.brief-notes {
  white-space: pre-line;
}
.brief-link {
  margin: var(--s2) 0;
}
.brief-print-only {
  display: none;
}
@media print {
  .brief-print-only {
    display: block;
  }
  .brief-screen-only {
    display: none;
  }
  .site-header,
  .site-footer,
  .tabbar,
  .club-tabs,
  .brief-tools,
  nav {
    display: none !important;
  }
  body,
  .brief {
    background: #fff;
    color: #000;
  }
  .brief-sec {
    break-inside: avoid;
  }
}
/* Juno on #722: the reveal sits clear of the sticky header when it scrolls into view, and its laurels are the size of
   the moment (the book page's rating size); ranking rows keep the small row. */
.room-reveal,
.room-ranking {
  scroll-margin-top: var(--s8);
}
.room-flip .read-it-laurels .ob-glyph svg {
  width: 22px;
  height: 22px;
}
/* Each part of the room has its own breathing room when the parts stack (Juno on #722). */
.room-reveal:not(:empty) + .room-where,
.room-where + .room-questions,
.room-questions + .room-ranking {
  margin-top: var(--s6);
}
