/* Most People Don't Know This — styles. Palette and type taken from the book cover. */

/* Fonts are hosted on this site (no Google requests). Both are SIL Open Font Licence. */
@font-face {
  font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/anton-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-latin-var.woff2') format('woff2');
}
/* Poppins: quote text on share cards only (downloaded only when a card is made). */
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/poppins-600-latin.woff2') format('woff2');
}

:root {
  --ink: #0b0b0b;
  --ink-2: #161616;
  --ink-3: #242424;
  --paper: #ffffff;
  --paper-2: #f3f3f1;
  --line: #e2e2de;
  --muted: #6b6b66;
  --orange: #f7931e;
  --orange-dk: #d9780a;
  --orange-hover: #fea803;          /* hover colour for every orange button */
  --red: #c8372d;
  --green: #2e7d4f;
  --radius: 10px;
  --display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }   /* jump links land below the sticky top bar */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--orange-dk); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.05;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(34px, 7vw, 64px); }
h2 { font-size: clamp(24px, 4vw, 32px); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }
.page { padding-top: 40px; padding-bottom: 64px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; margin-top: 10px; }
.eyebrow {
  display: block;
  color: var(--orange);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand {
  font-family: var(--display);
  font-size: 20px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  white-space: nowrap;
}
.brand span { color: var(--orange); }
.brand:hover { color: var(--paper); }
.nav { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; justify-content: flex-end; font-size: 15px; }
.nav a { text-decoration: none; color: #cfcfcf; }
.nav a:hover, .nav a.on { color: var(--paper); }
.nav a.btn { color: var(--ink); }
.nav a.nav-login { background: #2e2e2e; border: 0; color: var(--paper); }
.nav a.nav-login:hover, .nav a.nav-login.on { background: #3d3d3d; color: var(--paper); }
.nav-guest { gap: 10px; flex-wrap: nowrap; }
@media (max-width: 560px) {
  .brand span { display: none; }
}
/* Phones: the menu folds into a burger button that drops a full-width panel. */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .topbar-inner { position: relative; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-right: -10px; padding: 10px; background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; border-radius: 1px; background: var(--paper); transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-top: 1px solid #222; box-shadow: 0 12px 24px rgba(0,0,0,.35);
    padding: 6px 16px 16px; font-size: 18px;
  }
  .nav.open { display: flex; }
  /* Logged out: just two buttons, shown in the header itself (no burger). */
  .nav.nav-guest {
    display: flex; position: static; flex-direction: row; align-items: center; gap: 8px;
    background: none; border: 0; box-shadow: none; padding: 0; font-size: 14px;
  }
  .nav.nav-guest a.btn { margin: 0; padding: 8px 16px; border-bottom: 0; }
  .nav.nav-guest a.nav-login { padding: 8px 16px; }
  .nav a { padding: 14px 0; border-bottom: 1px solid #1f1f1f; }
  .nav a.on { color: var(--orange); }
  .nav a.btn { margin-top: 12px; border-bottom: 0; text-align: center; padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font: 700 15px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--orange-hover); color: var(--ink); }
.btn.big { padding: 15px 28px; font-size: 17px; }
.btn.small { padding: 7px 14px; font-size: 14px; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
button.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange);
}
button.link.danger { color: var(--red); }

/* ---------- Messages ---------- */
.flash { padding: 12px 0; font-weight: 500; background: #fff4e5; border-bottom: 1px solid #f5d9b0; }
.flash.error { background: #fdecea; border-color: #f2c4bf; color: #8a1f17; }
.flash.success { background: #e9f5ee; border-color: #c2e2cf; color: #1d5236; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin: 0 0 20px; background: #fff4e5; }
.alert.error { background: #fdecea; color: #8a1f17; }
.alert.success { background: #e9f5ee; color: #1d5236; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0;
}
.hero-inner { display: grid; grid-template-columns: 420px 1fr; gap: 48px; align-items: center; }
.cover { width: 100%; border-radius: 6px; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.hero-text h1 { color: var(--paper); }
.subtitle { font-size: 20px; color: #ddd; margin: 0 0 6px; }
.hero .meta { color: #aaa; font-size: min(15px, calc((100vw - 32px) / 27)); white-space: nowrap; margin: 0 0 24px; }   /* shrinks with the screen so it stays on one line (the line is ~25.8× its font size wide) */
.hero .hint { color: #999; }
@media (max-width: 760px) {
  .hero { padding: 28px 0 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .cover { max-width: 320px; margin: 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--paper-2); }
.section p { font-size: 17px; }
audio.sample { width: 100%; margin-top: 8px; }

.toc { list-style: none; padding: 0; margin: 0 0 32px; border-top: 1px solid var(--line); }
.toc li { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toc-num { font-family: var(--display); color: var(--orange); font-size: 18px; }
.toc-title { font-weight: 600; }
.toc li.extra .toc-title { font-weight: 400; color: var(--muted); }
.toc-len { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
.auth { max-width: 460px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel h2 { font-size: 24px; }
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input:not([type]), select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfcfca;
  border-radius: 8px;
  font: 16px var(--body);
  background: var(--paper);
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; font: 600 13px var(--body); color: var(--muted); cursor: pointer; padding: 8px;
}
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 8px 0 20px; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--orange); }

/* ---------- Buy ---------- */
.buy-card { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }   /* text starts level with the top of the cover */
.buy-card img { width: 120px; border-radius: 4px; flex: none; }
.buy-info { display: flex; flex-direction: column; gap: 2px; }
.buy-info strong { line-height: 1.2; margin-top: -2px; }   /* trim the line's top spacing so the letters meet the cover's top edge */
.price { margin-top: 6px; display: flex; gap: 10px; align-items: baseline; }
.price-now { font-family: var(--display); font-size: 34px; }
.coupon-form { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.coupon-applied {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #e9f5ee; border-radius: 8px; padding: 12px 14px; margin-bottom: 20px;
}

/* ---------- Player ---------- */
.listen-page { background: var(--ink); color: var(--paper); }
.listen-page .footer { background: #050505; }
.player-layout { display: grid; grid-template-columns: 380px 1fr; gap: 40px; padding-top: 32px; padding-bottom: 64px; align-items: start; }
.player { position: sticky; top: 84px; }
.player-cover { width: 100%; border-radius: 6px; margin-bottom: 20px; }
.player-now h1 { font-size: 30px; color: var(--paper); margin-bottom: 16px; }
.scrub input[type=range] {
  --pct: 0%;
  width: 100%; height: 24px; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
/* Strip: #666666, with the played part in orange (--pct is set by player.js) */
.scrub input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--orange) var(--pct), #666666 var(--pct));
}
.scrub input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px;
  border: 0; border-radius: 50%; background: var(--orange);
}
.scrub input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #666666; }
.scrub input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--orange); }
.scrub input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--orange); }
.times { display: flex; justify-content: space-between; font-size: 13px; color: #999; font-variant-numeric: tabular-nums; }
.controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 16px 0; }
.ctl {
  background: var(--ink-3); color: var(--paper); border: 0; border-radius: 50%;
  width: 52px; height: 52px; font: 700 15px var(--body); cursor: pointer;
}
.ctl:hover { background: #333; }
.ctl:disabled { opacity: .35; cursor: default; }
.ctl { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ctl .ico { width: 20px; height: 20px; fill: currentColor; }
.ctl.play .ico { width: 30px; height: 30px; }
.ctl.play { width: 72px; height: 72px; background: var(--orange); color: var(--ink); font-size: 24px; }
.ctl.play:hover { background: var(--orange-hover); }
.controls-sub { display: flex; justify-content: center; gap: 16px; }
.controls-sub label { color: #aaa; font-weight: 500; display: flex; align-items: center; gap: 8px; margin: 0; }
.controls-sub select { width: auto; padding: 6px 10px; background: var(--ink-2); color: var(--paper); border-color: #333; font-size: 14px; }
.wake { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 16px 0 0; color: #aaa; font-weight: 500; cursor: pointer; }
.wake[hidden] { display: none; }
.wake input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wake-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #333; transition: background .15s; flex: none; }
.wake-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #ccc; transition: transform .15s, background .15s; }
.wake input:checked + .wake-track { background: var(--orange); }
.wake input:checked + .wake-track::after { transform: translateX(16px); background: var(--ink); }
.wake input:focus-visible + .wake-track { outline: 2px solid var(--orange); outline-offset: 2px; }
.player audio { display: none; }

.chapters h2 { color: var(--paper); }
.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list button {
  width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  background: var(--ink-2); color: var(--paper); border: 1px solid transparent; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 8px; font: 15px var(--body);
}
.chapter-list button:hover { border-color: #333; }
.chapter-list button.current { border-color: var(--orange); }
.chapter-list button.current .ch-title { color: var(--orange); }
.ch-title { font-weight: 600; }
.ch-len { color: #888; font-variant-numeric: tabular-nums; font-size: 14px; }
.chapter-list button.done .ch-len::before { content: '✓ '; color: var(--orange); }
.ch-bar { grid-column: 1 / -1; height: 3px; background: #2a2a2a; border-radius: 2px; overflow: hidden; }
.ch-bar span { display: block; height: 100%; background: var(--orange); transition: width .3s linear; }
@media (max-width: 860px) {
  .player-layout { grid-template-columns: 1fr; gap: 28px; }
  .player { position: static; }
  .player-cover { max-width: 220px; margin: 0 auto 16px; }
  .player-now { text-align: center; }
}

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.stats div { background: var(--paper-2); border-radius: var(--radius); padding: 16px; }
.stats strong { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; }
.stats span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.coupon-create { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 12px; align-items: end; margin-bottom: 20px; }
.coupon-create .wide { grid-column: span 4; }
.coupon-create .btn { margin-bottom: 16px; }
@media (max-width: 760px) { .coupon-create { grid-template-columns: 1fr 1fr; } .coupon-create .wide { grid-column: span 2; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr.off td { opacity: .5; }
td.actions { white-space: nowrap; }
td.actions button + button { margin-left: 10px; }
.tag { font-size: 11px; background: var(--line); border-radius: 4px; padding: 1px 6px; }

/* ---------- Prose (terms, privacy) ---------- */
.prose h2 { font-size: 22px; margin-top: 32px; }
.prose li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #aaa; padding: 28px 0; font-size: 14px; }
.footer strong { color: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; }
.footer a { color: #ccc; }

/* ---------- About the book ---------- */
.lede { font-family: var(--display); font-size: 24px; text-transform: uppercase; line-height: 1.2; margin: 32px 0 12px; }
.topics { list-style: none; padding: 0; margin: 24px 0 0; }
.topics li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); font-size: 17px; }
.topics li::before { content: ''; position: absolute; left: 0; top: 20px; width: 8px; height: 8px; background: var(--orange); border-radius: 50%; }

/* ---------- Player: tabs + read along ---------- */
.side { min-width: 0; }
.tabs { display: flex; gap: 4px; background: var(--ink-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; width: max-content; max-width: 100%; }
.tabs button {
  background: none; border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer;
  font: 600 14px var(--body); color: #aaa;
}
.tabs button[aria-selected="true"] { background: var(--orange); color: var(--ink); }
.panel-read { position: relative; }
.reader {
  height: calc(100vh - 180px); min-height: 320px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--ink-2); border-radius: var(--radius); padding: 24px 28px 24px;
  --tail: 40vh;                 /* scroll room after the last line, as a spacer (padding would set a minimum height) */
  font-size: 19px; line-height: 1.75; color: #cfcfcf;
}
.reader h2 { font-size: 30px; color: var(--paper); margin-bottom: 20px; }
.reader p { margin: 0 0 1.1em; }
.reader p.callout {
  border-left: 3px solid var(--orange); background: #1d1d1d; padding: 12px 16px;
  border-radius: 0 8px 8px 0; color: var(--paper); font-weight: 500;
}
.reader span { cursor: pointer; border-radius: 3px; transition: background-color .12s, color .12s; }
.reader span.b { font-weight: 700; color: var(--paper); }
.reader span.on { background: var(--orange); color: var(--ink); box-shadow: 0 0 0 2px var(--orange); }
.reader-msg { color: #888; font-size: 16px; }
.follow-btn { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); box-shadow: 0 4px 16px rgba(0,0,0,.5); }
.follow-btn[hidden] { display: none; }
@media (max-width: 860px) {
  .tabs { margin: 0 auto 12px; }
  .reader { height: 60vh; padding: 18px 18px 18px; font-size: 18px; --tail: 30vh; }
  .reader h2 { font-size: 26px; }
}

/* ---------- Account: delete ---------- */
.danger-zone { border-color: #f2c4bf; }
.danger-zone h2 { color: var(--red); }
.btn.danger { background: var(--red); color: var(--paper); }
.btn.danger:hover { background: #a52a21; color: var(--paper); }

/* ---------- Buy: live coupon message ---------- */
.coupon-msg { margin: 8px 0 0; font-size: 14px; min-height: 1.4em; }
.coupon-msg.ok { color: var(--green); font-weight: 600; }
.coupon-msg.err { color: var(--red); }
.price s[hidden], .hint[hidden] { display: none; }

/* ---------- Contact ---------- */
textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #cfcfca; border-radius: 8px;
  font: 16px/1.5 var(--body); background: var(--paper); color: var(--ink); resize: vertical; min-height: 140px;
}
textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }
.social { margin-top: 40px; }
.social h2 { font-size: 24px; }
.social-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-link {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  transition: border-color .15s, transform .15s;
}
.social-link:hover { border-color: var(--orange); color: var(--ink); transform: translateY(-1px); }
.social-link svg { width: 30px; height: 30px; flex: none; color: var(--ink); }
.social-link span { display: flex; flex-direction: column; line-height: 1.3; color: var(--muted); font-size: 14px; }
.social-link strong { color: var(--ink); font-size: 16px; }
@media (max-width: 520px) { .social-links { grid-template-columns: 1fr; } }

/* ---------- Add to Home Screen ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn.ghost-light { background: transparent; border: 2px solid #555; color: var(--paper); }
.btn.ghost-light:hover { border-color: var(--orange); color: var(--paper); background: transparent; }
.install-btn { display: inline-flex; align-items: center; gap: 8px; }
.install-btn svg { width: 18px; height: 18px; }
.install-btn[hidden] { display: none; }
@media (min-width: 861px) { .install-btn { display: none !important; } }   /* phones and tablets only */
@media (max-width: 760px) { .hero-actions { justify-content: center; } }
.install-sheet {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.install-sheet[hidden] { display: none; }
.install-card {
  position: relative; width: 100%; max-width: 420px; background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 24px 22px 20px; margin-bottom: 70px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.install-card img { width: 64px; height: 64px; border-radius: 14px; margin-bottom: 12px; }
.install-card h2 { font-size: 26px; }
.install-card ol { padding-left: 20px; margin: 8px 0; }
.install-card li { margin-bottom: 8px; }
.install-card .note { font-size: 14px; color: var(--muted); margin: 12px 0 0; }
.install-x {
  position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 28px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 4px 8px;
}
.ios-share {
  display: inline-block; width: 14px; height: 17px; vertical-align: -2px; margin: 0 2px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18'%3E%3Cpath d='M7 1v10M3.5 4.5 7 1l3.5 3.5M4 7H2v10h10V7h-2' fill='none' stroke='%23007aff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Free sample sign-up ---------- */
.sample-form { margin-top: 8px; }
.sample-form .inline input { font-size: 16px; }
.sample-form .check { margin: 14px 0 6px; }
.sample-form .hint { margin-top: 4px; }
@media (max-width: 480px) { .sample-form .inline { flex-direction: column; } .sample-form .inline .btn { width: 100%; } }

/* ---------- "You've finished the book" ---------- */
.finish-sheet {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.finish-sheet[hidden] { display: none; }
.finish-card {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--paper); color: var(--ink); border-radius: 16px; padding: 28px 24px 22px; text-align: center;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.finish-card h2 { font-size: 30px; color: var(--ink); }
.finish-card p { color: #333; }
.finish-qr { display: flex; align-items: center; gap: 14px; text-align: left; margin: 18px 0 6px; font-size: 14px; color: var(--muted); }
.finish-qr img { width: 96px; height: 96px; flex: none; border-radius: 6px; border: 1px solid var(--line); }
@media (max-width: 860px) { .finish-qr { display: none; } }          /* on a phone the button is enough */
.finish-more { display: flex; gap: 10px; margin-top: 16px; }
.finish-more .btn { flex: 1; padding: 10px 12px; font-size: 14px; }
.finish-card .hint[hidden] { display: none; }

/* ---------- Quote cards ---------- */
.reader span { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.reader span.quote-sel { background: rgba(247,147,30,.25); box-shadow: 0 0 0 2px rgba(247,147,30,.25); }
.reader-tip { margin: 8px 0 0; font-size: 13px; color: #888; text-align: center; }
.quote-sheet {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.quote-sheet[hidden] { display: none; }
.quote-card {
  position: relative; width: 100%; max-width: 380px; max-height: calc(100dvh - 32px);
  background: var(--paper); border-radius: 16px; padding: 22px 18px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.quote-preview { flex: 1; min-height: 0; display: flex; justify-content: center; }
.quote-preview img {
  max-width: 100%; max-height: calc(100dvh - 210px); aspect-ratio: 9 / 16; height: auto;
  border-radius: 10px; background: #111; object-fit: contain;
}
.quote-actions { display: flex; gap: 10px; }
.quote-actions .btn { flex: 1; }
.quote-card .link { align-self: center; font-size: 14px; }
.quote-card .link:disabled { opacity: .35; cursor: default; }
.quote-hint { margin: -4px 0 0; font-size: 13px; }
.quote-preview img { -webkit-touch-callout: default; -webkit-user-select: auto; }   /* allow press-and-hold → Save to Photos */
@media (hover: hover) and (pointer: fine) { .quote-hint { display: none; } }    /* computers: the button downloads */

/* Choosing words for a quote card */
.quote-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: rgba(11,11,11,.96); border-top: 1px solid #2a2a2a;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}
.quote-bar[hidden] { display: none; }
.quote-bar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quote-bar p { margin: 0; color: #ccc; font-size: 14px; line-height: 1.4; }
.quote-bar p strong { color: var(--paper); }
.quote-bar-actions { display: flex; gap: 8px; flex: none; }
body.quote-selecting .reader span.quote-sel { background: rgba(247,147,30,.35); box-shadow: 0 0 0 2px rgba(247,147,30,.35); color: var(--paper); }
body.quote-selecting .reader { --tail: 50vh; }      /* room to scroll the last lines above the bar */
body.quote-selecting .follow-btn { display: none; }
.quote-hint[hidden] { display: none; }

/* Quote card shape switch */
.quote-format { display: flex; gap: 4px; background: #eee; border-radius: 999px; padding: 4px; align-self: center; }
.quote-format button {
  background: none; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer;
  font: 600 14px var(--body); color: #555;
}
.quote-format button span { font-weight: 400; color: #888; margin-left: 2px; }
.quote-format button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.quote-format button[aria-pressed="true"] span { color: #bbb; }

/* Quote card background controls */
.quote-bg { display: flex; justify-content: center; align-items: center; gap: 14px; font-size: 14px; margin-top: -2px; }
.quote-bg .link { font-size: 14px; }
.quote-bg .link[hidden] { display: none; }
#quoteBgRemove { text-decoration: none; color: var(--muted); font-size: 16px; padding: 0 4px; }

/* ---------- Book Club ---------- */
.club-list { list-style: none; padding: 0; margin: 0 0 32px; }
.club-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--line, #e2e2e2); border-radius: 8px;
  color: inherit; text-decoration: none;
}
.club-list a:hover { border-color: var(--orange); }
.club-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.club-card { border: 1px solid var(--line, #e2e2e2); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.club-card h2 { margin: 0; font-size: 22px; }
.club-card p { margin: 0; }
.club-code-input { font: 700 28px/1 var(--body); letter-spacing: .3em; text-align: center; }
@media (max-width: 640px) { .club-forms { grid-template-columns: 1fr; } }

.club-layout { display: grid; grid-template-columns: 380px 1fr; gap: 40px; padding-top: 24px; padding-bottom: 64px; align-items: start; }
.club-crumb { margin: 0 0 4px; font-size: 14px; }
.club-crumb a { color: #aaa; }
.club-name { color: var(--paper); font-size: 34px; margin: 0 0 20px; overflow-wrap: anywhere; }
.club-player .player-now h2 { color: var(--paper); font-size: 24px; margin: 0 0 12px; }
.club-status { text-align: center; color: #ccc; min-height: 3em; margin: 0 0 16px; }
.club-player #joinBtn[hidden], .club-player #joinHint[hidden] { display: none; }
.club-side { display: flex; flex-direction: column; gap: 20px; }
.club-page .club-card { background: var(--ink-2); border-color: #2a2a2a; color: var(--paper); }
.club-page .club-card h2 { color: var(--paper); }
.club-page .btn.ghost { border-color: #555; color: var(--paper); }
.club-page .btn.ghost:hover { background: #333; }
.club-page .btn.ghost.danger { border-color: #8a2b22; color: #ff8a7a; }
.club-members { list-style: none; padding: 0; margin: 0; }
.club-members li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #2a2a2a; }
.club-members li:last-child { border-bottom: 0; }
.club-members .dot { width: 10px; height: 10px; border-radius: 50%; background: #555; flex: none; }
.club-members li.on .dot { background: #3fcf6b; box-shadow: 0 0 0 3px rgba(63,207,107,.2); }
.club-members .who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.club-members li:not(.on) .who { color: #888; }
.club-members .badge { font-size: 12px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .08em; }
.club-invite-label { margin: 14px 0 4px !important; font-size: 14px; color: #aaa; }
.club-invite { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin: 0 0 4px; }   /* code, Copy and Share always on one row */
.club-invite .btn { flex: none; }
.club-code { font: 700 clamp(19px, 5.6vw, 24px) var(--body); letter-spacing: .14em; color: var(--orange); margin-right: auto; white-space: nowrap; }
.club-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .club-layout { grid-template-columns: 1fr; gap: 24px; }
}
.club-intro { font-size: 18px; color: #444; margin: 0 0 28px; max-width: 60ch; }
.club-debug { font: 12px/1.5 ui-monospace, monospace; color: #9f9; background: #111; padding: 8px 10px; border-radius: 6px; white-space: pre-wrap; margin: 0 0 16px; }
.club-chat { background: var(--ink-2); border: 1px solid #2a2a2a; border-radius: 12px; margin: 0 0 16px; overflow: hidden; }
.club-chat[hidden], #chatClosed[hidden] { display: none; }
.club-chat-log { max-height: 320px; min-height: 120px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.club-chat-day { margin: 4px 0; text-align: center; font-size: 12px; color: #777; text-transform: uppercase; letter-spacing: .08em; }
.club-msg { max-width: 85%; align-self: flex-start; background: #242424; border-radius: 12px 12px 12px 4px; padding: 8px 12px; }
.club-msg.mine { align-self: flex-end; background: var(--orange); color: var(--ink); border-radius: 12px 12px 4px 12px; }
.club-msg-who { display: block; font-size: 12px; font-weight: 600; opacity: .7; margin-bottom: 2px; }
.club-msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.club-chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid #2a2a2a; }
.club-chat-form textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border-radius: 10px;
  background: #0f0f0f; color: var(--paper); border: 1px solid #333; font: 16px/1.4 var(--body);
}
.club-join-hint { margin: 8px 0 20px; }
.club-voice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid #2a2a2a; }
.club-voice .btn[aria-pressed="true"]#voiceBtn, .club-voice .btn[aria-pressed="true"]#camBtn { border-color: var(--orange); color: var(--orange); }   /* on = orange text + keyline */
.club-voice .btn[hidden] { display: none; }
.club-voice-status { font-size: 13px; color: #aaa; flex: 1 1 100%; }   /* always on its own line under the buttons */
.club-voice-btns { display: flex; gap: 8px; flex-wrap: nowrap; min-width: 0; }   /* mic, mute and camera always on one row */
.club-voice-btns .btn { flex: 0 1 auto; white-space: nowrap; font-size: clamp(12px, 3.4vw, 14px); padding: 7px clamp(9px, 2.6vw, 14px); }
.club-members .mic { display: inline-flex; width: 18px; height: 18px; color: #3fcf6b; }
.club-members .mic.muted { color: #888; }
.club-members .mic .ico { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Buy buttons: two glints of light that run round the inside edge every few seconds ---------- */
@property --glint-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.btn-glint { position: relative; isolation: isolate; }
.btn-glint::before {
  /* A thin ring just inside the button's edge, with two glints on opposite sides. */
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: repeating-conic-gradient(from var(--glint-angle),
    transparent 0deg 125deg, rgba(255,255,255,.2) 145deg, rgba(255,255,255,.75) 162deg, #fff 172deg, rgba(255,226,180,.95) 176deg, transparent 180deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: btn-glint 4s linear infinite;
}
/* One lap in the first 1.8s, then a rest, so it catches the eye without nagging. */
@keyframes btn-glint {
  0%   { --glint-angle: 0deg;   opacity: 0; }
  5%   { opacity: 1; }
  40%  { opacity: 1; }
  45%  { --glint-angle: 360deg; opacity: 0; }
  100% { --glint-angle: 360deg; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .btn-glint::before { animation: none; opacity: 0; } }
.club-mic[hidden], .club-end[hidden] { display: none; }
.club-mic.live { color: #3fcf6b; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 7px rgba(63,207,107,.08); } }
.tester-add { margin-bottom: 16px; } .tester-add .check { margin-top: 10px; }
.club-card h2 #clubName { overflow-wrap: anywhere; }
#clubPrefix[hidden] { display: none; }
.club-typing { margin: 0; padding: 0 14px; height: 0; overflow: hidden; font-size: 13px; color: #aaa; font-style: italic; transition: height .15s; }
.club-typing.on { height: 22px; }
.finish-card [hidden] { display: none !important; }
.finish-sent { background: #e9f5ee; color: #1d5236; border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-weight: 600; text-align: left; }
.finish-msg { text-align: left; display: flex; flex-direction: column; gap: 10px; }
.finish-msg h3 { margin: 0; font-size: 20px; color: var(--ink); }
.finish-msg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.finish-msg input, .finish-msg textarea { width: 100%; font: 16px/1.4 var(--body); }
.finish-msg textarea { resize: vertical; min-height: 110px; }
.finish-msg-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: #fdecea; color: #8a1f17; font-size: 14px; }
.finish-msg-actions { display: flex; gap: 10px; }
.finish-msg-actions .btn { flex: 1; }
@media (max-width: 480px) { .finish-msg-row { grid-template-columns: 1fr; } }
.app-back { padding-top: 12px; }
.app-back button { background: none; border: 0; padding: 6px 0; font: 600 16px var(--body); color: var(--orange-dk); cursor: pointer; }
.listen-page .app-back button { color: var(--orange); }
.club-ended { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: #3a1d0b; border: 1px solid var(--orange); color: var(--paper); font-weight: 600; text-align: center; }
.club-ended[hidden] { display: none; }
.club-guest-note { font-weight: 500; }
/* Read along in a club: in the chat's place while the book plays */
.club-read { margin: 0 0 16px; }
.club-read[hidden] { display: none; }
.club-read .reader { height: 50vh; min-height: 260px; padding: 18px 20px 18px; --tail: 25vh; font-size: 18px; border: 1px solid #2a2a2a; border-radius: 12px; }
.club-read .reader h2 { font-size: 24px; }
.club-read .reader span { cursor: default; }
/* Guests: the end of the free part */
.club-intermission { margin: 0 0 16px; padding: 20px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--orange); color: var(--paper); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.club-intermission[hidden] { display: none; }
.club-intermission h2 { color: var(--paper); font-size: 24px; margin: 0; }
.club-intermission p { margin: 0; }
.club-intermission .eyebrow { color: var(--orange); }
.club-offer strong { font-size: 28px; color: var(--orange); }
.club-offer s { color: #888; }
.club-offer-code { font-weight: 700; letter-spacing: .05em; }
.club-members .badge.guest { color: #aaa; }
.club-page .btn.club-end.pulse { border-color: var(--orange); color: var(--orange); animation: end-pulse 1.2s ease-in-out infinite; }
@keyframes end-pulse { 0% { box-shadow: 0 0 0 0 rgba(247,147,30,.6); } 100% { box-shadow: 0 0 0 12px rgba(247,147,30,0); } }   /* a ring that only grows outwards and fades */
@media (prefers-reduced-motion: reduce) { .club-page .btn.club-end.pulse { animation: none; box-shadow: 0 0 0 3px rgba(247,147,30,.6); } }
.club-sound { margin: 0 0 16px; animation: end-pulse 1.2s ease-in-out infinite; } .club-sound[hidden] { display: none; }
/* Video while paused: everyone in one row, an equal share each (you last, mirrored) */
.club-video { display: grid; grid-template-columns: repeat(var(--tiles, 2), minmax(0, 1fr)); gap: 6px; padding: 8px; border-bottom: 1px solid #2a2a2a; background: #0c0c0c; }
.club-video[hidden] { display: none; }
.club-tile { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #1d1d1d; }
.club-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.club-tile.off video { display: none; }
.club-tile.off::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, #2c2c2c, #161616); }
.club-tile-name { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-tile.off .club-tile-name { left: 50%; bottom: 50%; transform: translate(-50%, 50%); font-size: 14px; background: none; }
.club-tile.me video { transform: scaleX(-1); }   /* mirror yourself, like a selfie camera */

/* Nudges: Join listening pulses until tapped; mic/camera buttons glow softly while off */
.club-player .btn.club-join:not([hidden]) { animation: end-pulse 1.6s ease-out infinite; }
/* Before Join listening is tapped, everything else is greyed out (and can't be used) so the
   button is the obvious first step. The instruction line stays readable. */
.club-layout.pre-join .club-player > :not(#joinBtn):not(#joinHint):not(#status),
.club-layout.pre-join .club-side { opacity: .3; filter: grayscale(1); pointer-events: none; }
.club-player > *, .club-side { transition: opacity .35s, filter .35s; }
#voiceBtn[aria-pressed="false"], #camBtn[aria-pressed="false"] { animation: btn-throb 2.4s ease-in-out infinite; }
@keyframes btn-throb {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,147,30,0); border-color: #555; color: #fff; }
  50%      { box-shadow: 0 0 0 4px rgba(247,147,30,.22); border-color: rgba(247,147,30,.75); color: var(--orange); }
}
@media (prefers-reduced-motion: reduce) {
  .club-player .btn.club-join, #voiceBtn[aria-pressed="false"], #camBtn[aria-pressed="false"] { animation: none; }
}
.club-anchor { scroll-margin-top: 76px; }   /* clear the sticky header when jumped to */
/* Book Club title with a round orange "i" that opens the explanation sheet */
.club-title { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.club-title h1 { margin: 0; }
.help-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--orange);
  color: #fff; font: 700 19px/1 Georgia, 'Times New Roman', serif; font-style: italic; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.help-btn:hover { background: var(--orange-hover); color: #fff; }
.info-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.info-sheet[hidden] { display: none; }
.info-card { position: relative; width: 100%; max-width: 420px; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 28px 24px 20px; box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.info-card h2 { margin: 0 0 12px; font-size: 28px; }
.info-card p { color: #333; }
.club-more { margin-top: 8px; }
.club-more > summary { cursor: pointer; font-weight: 600; color: var(--orange-dk); padding: 10px 0; list-style: none; }
.club-more > summary::-webkit-details-marker { display: none; }
.club-more > summary::before { content: '+ '; }
.club-more[open] > summary::before { content: '– '; }
.club-more .club-forms { margin-top: 8px; }

/* ---------- Gifts and buddy codes ---------- */
.buy-mode { display: flex; gap: 4px; padding: 4px; background: #efefec; border-radius: 12px; margin: 0 0 20px; }
.buy-mode a { flex: 1; text-align: center; padding: 10px; border-radius: 9px; text-decoration: none; color: #555; font-weight: 600; }
.buy-mode a.on { background: var(--ink); color: var(--paper); }
.buy-gift-link { margin-top: 18px; }
.gift-form textarea { width: 100%; resize: vertical; }
.gift-when { border: 0; padding: 0; margin: 0 0 12px; }
.gift-when legend { font-weight: 600; margin-bottom: 6px; }
.gift-when .check { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.gift-when input[type=date] { width: auto; padding: 6px 10px; }
.buddy-code { display: flex; align-items: baseline; gap: 12px; margin: 12px 0; }
.buddy-code strong { font: 700 24px var(--body); letter-spacing: .08em; color: var(--orange-dk); }
.buddy-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.buddy-done { background: #e9f5ee; color: #1d5236; border-radius: 10px; padding: 12px 14px; }
.gift-list { list-style: none; padding: 0; margin: 0 0 16px; }
.gift-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gift-list li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gift-list .gift-status { font-size: 14px; color: var(--muted); }
.claim-panel p { margin-top: 0; }
.claim-message { margin: 0 0 18px; padding: 12px 16px; border-left: 4px solid var(--orange); background: #faf6f0; border-radius: 0 8px 8px 0; font-style: italic; }
/* Claim screen: big heading beside the cover, its letters level with the cover's top */
.claim-card { margin-top: 8px; }
.claim-card h1 { margin: -0.035em 0 14px; line-height: .95; overflow-wrap: anywhere; }   /* letters level with the cover top (measured) */
.claim-card .buy-info strong { margin-top: 0; }

.sample-form .hint { font-size: 12px; }   /* 'The tick-box is optional…' */

.reader::after { content: ''; display: block; height: var(--tail, 30vh); }   /* lets the last lines scroll up into view */

/* Session bar: mic status · keep screen on · end session, one tidy row in a panel */
.club-session {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap;
  background: var(--ink-2); border: 1px solid #2a2a2a; border-radius: 12px; padding: 10px 12px; margin: 0 0 16px;
}
.club-session > [hidden] { display: none !important; }
.club-session .wake { margin: 0; }
.club-session .club-end { margin: 0 0 0 auto; }
.club-mic { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; color: #888; white-space: nowrap; }
.club-mic .mic-ico { display: inline-flex; width: 20px; height: 20px; }
.club-mic .mic-ico .ico { width: 20px; height: 20px; fill: currentColor; }
.club-mic.live { color: #3fcf6b; }
.club-mic.live .mic-ico { animation: mic-glow 1.6s ease-in-out infinite; border-radius: 50%; }
@keyframes mic-glow { 50% { filter: drop-shadow(0 0 4px rgba(63,207,107,.7)); } }
@media (prefers-reduced-motion: reduce) { .club-mic.live .mic-ico { animation: none; } }
body.club-guest .app-back { display: none; }   /* guests in a club room get no "Back" link */
/* "Say hello!" prompt shown straight after Join Club, above the mic/camera buttons */
.club-hello { position: relative; margin: 10px 12px 0; padding: 12px 40px 12px 14px; border-radius: 10px; background: rgba(247,147,30,.12); border: 1px solid rgba(247,147,30,.6); animation: hello-fill 1.3s ease-in-out infinite; }   /* same beat as the buttons */
@keyframes hello-fill { 0%, 100% { background: rgba(247,147,30,.10); } 50% { background: rgba(247,147,30,.30); } }
.club-hello[hidden] { display: none; }
.club-hello p { margin: 0; color: var(--paper); font-size: 15px; line-height: 1.4; }
.club-hello strong { color: var(--orange); }
.club-hello-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: #aaa; font-size: 22px; line-height: 1; cursor: pointer; padding: 4px; }
/* While the prompt shows, the off buttons pulse more strongly */
#voiceBtn.hello[aria-pressed="false"], #camBtn.hello[aria-pressed="false"] { animation: btn-hello 1.3s ease-in-out infinite; }
@keyframes btn-hello {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,147,30,.55); border-color: var(--orange); color: #fff; }
  50%      { box-shadow: 0 0 0 7px rgba(247,147,30,0); border-color: var(--orange); color: var(--orange); }
}
@media (prefers-reduced-motion: reduce) { #voiceBtn.hello, #camBtn.hello, .club-hello { animation: none; border-color: var(--orange); } }
/* Session bar always one row: items shrink a little on narrow phones (only "Keep screen on" may wrap, inside its own space) */
.club-session { flex-wrap: nowrap; gap: 8px clamp(8px, 2.2vw, 14px); }
.club-session .club-mic { flex: none; font-size: clamp(13px, 3.6vw, 16px); }
.club-session .wake { flex: 0 1 auto; min-width: 0; gap: 8px; font-size: clamp(12px, 3.4vw, 15px); line-height: 1.2; }
.club-session .wake .wake-track { flex: none; }
.club-session .club-end { flex: none; font-size: clamp(12px, 3.4vw, 14px); padding: 7px clamp(9px, 2.6vw, 14px); white-space: nowrap; }
.club-session .wake { white-space: nowrap; }
.club-session .wake-short { display: none; }
@media (max-width: 420px) { .club-session .wake-long { display: none; } .club-session .wake-short { display: inline; } }   /* narrower phones: shorter label so the row stays tidy */
/* Per-person voice volume, under their name in Who's here */
.club-members li { flex-wrap: wrap; }
.club-vol { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; margin: 2px 0 0 20px; color: #aaa; font-size: 13px; }
.club-vol-ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.club-vol-ico .ico { width: 18px; height: 18px; fill: currentColor; }
.club-vol input[type=range] {
  --pct: 50%; flex: 1; min-width: 0; height: 22px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
.club-vol input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--orange) var(--pct), #555 var(--pct)); }
.club-vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--orange); border: 0; }
.club-vol input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #555; }
.club-vol input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--orange); }
.club-vol input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--orange); }
.club-vol-val { flex: none; width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
#hostEnded { scroll-margin-top: 76px; }   /* clears the sticky header when scrolled to */
/* Phones turned sideways: cover the page with a "turn upright" note. The class is set from the
   phone's actual orientation (footer script), not the visible area, which an open keyboard squashes. */
.rotate-note { display: none; }
html.is-sideways .rotate-note {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  position: fixed; inset: 0; z-index: 1000; background: var(--ink); color: var(--paper); text-align: center; padding: 24px;
}
html.is-sideways .rotate-note p { margin: 0; font: 600 18px var(--body); }
html.is-sideways .rotate-note svg { animation: rotate-hint 2.4s ease-in-out infinite; }
@keyframes rotate-hint { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }
html.is-sideways body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .rotate-note svg { animation: none !important; } }
/* Volume on a video tile: speaker button (top right) opens a slider along the bottom */
.club-tile-volbtn {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
.club-tile-volbtn .ico { width: 17px; height: 17px; fill: currentColor; }
.club-tile-vol {
  position: absolute; left: 6px; right: 6px; bottom: 32px; z-index: 2; display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.7); border-radius: 999px; padding: 4px 10px; color: #fff; font-size: 11px;
}
.club-tile-vol[hidden] { display: none; }
.club-tile-vol input[type=range] { --pct: 50%; flex: 1; min-width: 0; height: 22px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; }
.club-tile-vol input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--orange) var(--pct), #777 var(--pct)); }
.club-tile-vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--orange); border: 0; }
.club-tile-vol input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #777; }
.club-tile-vol input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--orange); }
.club-tile-vol input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--orange); }
.club-tile-vol .club-vol-val { width: 34px; font-size: 11px; color: #fff; }
.club-tile.off .club-tile-volbtn { background: rgba(255,255,255,.08); }

/* Admin: accounts */
.account-search { margin-bottom: 8px; }
.account-search input[type=search] { -webkit-appearance: none; appearance: none; }
.account-edit { max-width: 480px; }
.account-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 20px 0; }
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.admin-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
