/* Studio West brand. Colours and type follow the studio-west-design skill:
   the website's palette (#8DCAEC sky blue, #1f232b dark, #e1e1e1 lines) and the
   shape language of the site's custom code pages (white panels, light border,
   ~10px corners, soft shadow, pill buttons, small uppercase labels).
   Headings are Jost, body is Lato, as on studiowestlessons.com.

   Contrast notes, so nobody undoes them by accident:
   - Sky blue buttons carry dark text. White on #8DCAEC is about 1.9:1.
   - #3f92d8 on white is about 3.3:1, too low for words. It is used for underlines,
     borders and marks, never as a text colour.
   - --muted passes on white only. On the page background or a tinted panel use
     --muted-strong (the site's body gray). */
:root {
  --bg: #f6f9fc;          /* soft panel background from the custom code pages */
  --card: #ffffff;
  --text: #1f2933;
  --muted: #6b7785;
  --muted-strong: #3e3e3e; /* the site's body text gray */
  --line: #e2e8f0;
  --line-strong: #e1e1e1; /* the site's border gray */
  --accent: #3f92d8;      /* darker blue: underlines, borders, marks */
  --accent-head: #6ab1f0; /* heading blue */
  --button: #8DCAEC;      /* the site's button blue */
  --button-text: #1f232b; /* dark on sky blue. White is ~1.9:1 here and unreadable. */
  --accent-soft: #e8f3fb;
  --dark: #1f232b;
  --nav-line: #44505e;
  --nav-quiet: #b9c2cc;
  --danger: #d2483c;
  --ok: #2e8b57;
  --warn: #b7791f;
  --warn-bg: #fdf6e7;
  --error-bg: #fbecea;
  --ok-bg: #e9f4ee;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31, 35, 43, 0.05), 0 8px 22px rgba(31, 35, 43, 0.06);
  --head: Jost, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--dark); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
h1, h2, h3 {
  font-family: var(--head);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--dark);
}
h1 { font-size: 1.4rem; line-height: 1.25; margin: 0.2rem 0 0.8rem; }
h2 { font-size: 1.05rem; line-height: 1.3; margin: 0 0 0.6rem; }
p { margin: 0.4rem 0; overflow-wrap: anywhere; }
b, strong { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.spacer { flex: 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Words that sit straight on the page background, where --muted is too faint. */
.note, .lede { color: var(--muted-strong); }
.note { font-size: 0.875rem; }
.lede { margin: 0 0 12px; }
.empty { margin: 0; padding: 28px 12px; text-align: center; color: var(--muted-strong); }

/* Focus you can see, on light and on dark. */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
.file-btn:focus-within {
  outline: 2px solid var(--dark); outline-offset: 2px;
}
.nav a:focus-visible, .roombar a:focus-visible, .roombar button:focus-visible { outline-color: var(--button); }

/* A thin bar across the top while a page is on its way, so a tap never looks ignored.
   app.js puts "navigating" on <html> for the length of the fetch. */
html.navigating::after {
  content: ""; position: fixed; z-index: 60; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--button); transform-origin: left center;
  animation: navbar 6s cubic-bezier(0.1, 0.7, 0.2, 1) 0.15s both;
}
@keyframes navbar { from { transform: scaleX(0); } to { transform: scaleX(0.92); } }
@media (prefers-reduced-motion: reduce) {
  html.navigating::after { animation: none; }
  .rec-dot.blink { animation: none; }
}

/* ---- top bar ----
   Phone: the name of the app and your account on one line, the three places you
   can go as full-width tabs under it. The first line scrolls away, the tabs stay.
   Wider screens: all of it on one line. */
.nav {
  position: sticky; top: -48px; z-index: 30;
  background: var(--dark); color: #ffffff;
  padding-top: env(safe-area-inset-top);
}
.nav a { color: #ffffff; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.nav-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 12px 0 16px; }
.nav .brand {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  white-space: nowrap; font-size: 0.95rem;
}
.nav-side { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-side a {
  position: relative; display: inline-block; white-space: nowrap;
  font-family: var(--head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  line-height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: 999px;
}
.nav-side a::after { content: ""; position: absolute; inset: -7px -2px; } /* 44px to tap */
.nav-side a.me {
  font-family: var(--body); font-size: 0.875rem; text-transform: none; letter-spacing: 0;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; border-color: var(--nav-line);
}
.nav-side a:hover, .nav-side a[aria-current] { border-color: var(--button); }
.nav .links { display: flex; }
.nav .links a {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--head); font-weight: 400; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap; color: var(--nav-quiet);
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.nav .links a:hover { color: #ffffff; }
.nav .links a[aria-current] { color: #ffffff; border-bottom-color: var(--button); }
@media (min-width: 641px) {
  .nav { top: 0; display: flex; align-items: stretch; padding-left: 20px; padding-right: 16px; }
  .nav-top { display: contents; }
  .nav .brand { order: 1; align-self: center; }
  .nav .links { order: 2; margin-left: 28px; }
  .nav .links a { flex: none; padding: 0 16px; min-height: 56px; font-size: 0.82rem; }
  .nav-side { order: 3; margin-left: auto; }
}

.main { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
}
.card.narrow { max-width: 440px; margin: 24px auto; }
.card > :last-child { margin-bottom: 0; }
.auth .main { padding-top: 30px; }
.back { margin: -6px 0 4px; font-size: 0.95rem; }
.back a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-right: 12px; text-decoration: none; font-weight: 700; }
.back a:hover { text-decoration: underline; }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label {
  display: block; font-family: var(--head); font-weight: 400; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
label.check {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  font-family: var(--body); font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text);
}
label.check input { width: 24px; height: 24px; flex: none; margin: 0; accent-color: var(--dark); }
input[type=email], input[type=text], input:not([type]), select, textarea {
  width: 100%; margin-top: 5px; padding: 11px 12px; font: 16px/1.5 var(--body); color: var(--text);
  background: #ffffff; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
select { min-height: 48px; }
textarea { resize: vertical; min-height: 48px; }
::placeholder { color: var(--muted); opacity: 1; }
input.code { font-size: 1.6rem; letter-spacing: 6px; text-align: center; font-family: var(--head); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #ffffff; color: var(--text);
  font-family: var(--head); font-size: 0.85rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.btn:hover { border-color: var(--dark); }
.btn.primary { background: var(--button); color: var(--button-text); border-color: var(--button); }
.btn.primary:hover { background: var(--accent-head); border-color: var(--accent-head); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; font-weight: 800; }
.btn.danger:hover { background: var(--danger); color: #ffffff; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:disabled:hover { border-color: var(--line-strong); }
.btn.primary:disabled:hover { background: var(--button); border-color: var(--button); }
button.link {
  background: none; border: 0; min-height: 44px; padding: 0 8px; margin: 0 -8px; color: var(--dark); font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
button.link.danger { color: var(--danger); text-decoration-color: var(--danger); font-weight: 700; }
form.inline { display: inline; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-btn { position: relative; overflow: hidden; }

/* Messages to the person. Dark words on a tint, with the colour carried by the bar on the left. */
.flash { padding: 10px 12px; border-radius: var(--radius); margin: 8px 0 12px; font-size: 0.95rem; color: var(--text); border: 1px solid transparent; border-left-width: 4px; }
.flash.error { background: var(--error-bg); border-color: #f0c8c3; border-left-color: var(--danger); }
.flash.ok { background: var(--ok-bg); border-color: #bfdfcd; border-left-color: var(--ok); }
.flash.warn, .flash.info { background: var(--warn-bg); border-color: #ecd9ab; border-left-color: var(--warn); }
.status { min-height: 1.2em; font-size: 0.9rem; margin-top: 6px; color: var(--text); }
.status:not(:empty) { padding-left: 10px; border-left: 3px solid var(--line-strong); }
.status.error:not(:empty) { border-left-color: var(--danger); font-weight: 700; }
.status.ok:not(:empty) { border-left-color: var(--ok); }
.status.warn:not(:empty) { border-left-color: var(--warn); }
.status.busy:not(:empty) { border-left-color: var(--button); }

/* ---- the voice room line at the top of the feed ---- */
.room-banner {
  display: flex; align-items: center; gap: 12px; min-height: 52px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px 14px; margin-bottom: 14px; line-height: 1.35;
}
.room-banner:hover { border-color: var(--button); }
.room-banner-text { flex: 1; min-width: 0; }
.room-banner .go {
  flex: none; color: var(--dark); font-family: var(--head); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.08em;
  line-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
}
.room-banner.live .go { background: var(--button); border-color: var(--button); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.room-banner.live .dot, .dot.live { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }

/* ---- the room bar: stays put while you move around the app ----
   Two lines on a phone: who you are with, then three buttons you can hit without aiming. */
.roombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--dark); color: #ffffff;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(31, 35, 43, 0.18);
}
.roombar .inner { max-width: 640px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.roombar .label { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; white-space: nowrap; }
.roombar .who-in { flex: 1 1 0; color: var(--nav-quiet); font-size: 0.85rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roombar .spacer { flex: 0 0 100%; height: 0; margin-top: -8px; } /* ends the first line */
.roombar .btn { flex: 1 1 0; min-height: 44px; padding: 0 10px; font-size: 0.78rem; background: transparent; color: #ffffff; border-color: var(--nav-line); }
.roombar .btn:hover { background: #ffffff; color: var(--dark); border-color: #ffffff; }
.roombar .btn.primary { background: var(--button); color: var(--button-text); border-color: var(--button); }
.roombar .btn.danger { color: #ffb3aa; border-color: #7a4b46; }
.roombar .btn.danger:hover { background: var(--danger); color: #ffffff; border-color: var(--danger); }
.roombar .dot.live { box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.3); }
/* The bar's real height (room.js measures it); the 112px is only for the instant before it has. */
body.has-roombar { padding-bottom: calc(var(--ca-bar, 112px) + 4px); }
@media (min-width: 641px) {
  .roombar .inner { flex-wrap: nowrap; }
  .roombar .who-in { flex: 0 1 auto; }
  .roombar .spacer { flex: 1 1 0; margin: 0; }
  .roombar .btn { flex: none; padding: 0 18px; }
  body.has-roombar { padding-bottom: calc(var(--ca-bar, 72px) + 4px); }
}

/* ---- writing and recording ----
   At rest the compose box is a + and a text field, like a messaging app. The + opens the
   menu. The send button appears when there is something to send. While a recording runs,
   its row takes the field's place. client-src/compose.js sets data-state, data-has and
   data-camera on the form, and the markup is in server/composeform.js. */
.compose-card { padding: 8px; }
.compose { display: flex; flex-direction: column; gap: 8px; }
.c-bar { position: relative; display: flex; align-items: flex-end; gap: 6px; }
.c-bar textarea {
  flex: 1 1 0; min-width: 0; width: auto; margin: 0; resize: none; min-height: 44px; max-height: 168px;
  padding: 9px 16px; border-radius: 22px; line-height: 1.5; background: var(--bg);
}
.c-plus, .c-mic, .c-round {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--dark); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.c-plus { background: var(--accent-soft); transition: transform 0.15s ease, background 0.15s ease; }
.c-plus:hover, .c-mic:hover, .c-round.quiet:hover { background: var(--line); }
.c-plus[aria-expanded="true"] { transform: rotate(45deg); background: var(--line); }
.c-round.quiet { color: var(--muted-strong); }
.c-send { display: none; flex: none; }
.c-send.round, .c-round.send {
  align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--button); color: var(--button-text); cursor: pointer;
}
.c-send.round:hover, .c-round.send:hover { background: var(--accent-head); }
.c-send.btn { min-height: 44px; padding: 0 20px; }
.c-send:disabled { opacity: 0.5; }
.compose[data-has] .c-send { display: inline-flex; }
.compose[data-has] .c-mic { display: none; }
.c-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compose > .status { margin: 0; }
.compose > .status:empty { display: none; }
.compose [data-pending] { display: none !important; } /* a marker for the scripts, never something to see */
/* No JavaScript: the + cannot open anything, so show a plain file field and the send button. */
html:not(.js) .compose .c-js { display: none; }
html:not(.js) .compose .c-file { position: static; width: auto; height: auto; opacity: 1; pointer-events: auto; }
html:not(.js) .compose .c-send { display: inline-flex; }

/* What the box looks like while something else has the floor. */
.compose[data-state="recording"] .c-bar { display: none; }
.compose[data-state="take"] .c-plus, .compose[data-camera] .c-plus,
.compose[data-state="take"] .c-mic, .compose[data-camera] .c-mic { display: none; }
.compose[data-camera="open"] .c-bar { display: none; }
.compose .rec { display: contents; }
.compose .vrec { margin: 0; }

/* The + menu. */
.c-menu {
  position: absolute; z-index: 20; left: 0; top: calc(100% + 8px); width: min(280px, calc(100vw - 40px)); padding: 6px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 10px 30px rgba(31, 35, 43, 0.16);
}
.c-menu.up { top: auto; bottom: calc(100% + 8px); }
.c-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.c-item:hover, .c-item:focus-visible { background: var(--accent-soft); }
.c-item:disabled { opacity: 0.45; cursor: default; }
.c-item svg { flex: none; color: var(--dark); }
.c-quality {
  display: block; margin: 6px 0 0; padding: 10px 12px 6px; border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--muted-strong);
}
.c-quality select { display: block; width: 100%; margin: 4px 0 0; padding: 6px 8px; font-size: 0.9rem; min-height: 40px; }

/* A photo, file or GIF waiting to go. */
.c-attach { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); }
.c-attach img { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 7px; background: var(--line); }
.c-attach-name { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }

/* The recorder row. */
.compose div.rec-live { margin: 0; gap: 10px; min-height: 44px; }
.compose div.rec-live b { font-family: var(--head); font-size: 1.1rem; font-variant-numeric: tabular-nums; min-width: 2.4em; }
.compose .rec-info { margin: -2px 4px 0; font-size: 0.78rem; }
.compose .rec-done { margin: 0; }

/* The GIF picker. */
.c-gifs { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px; background: var(--card); }
.c-gifs-head { display: flex; align-items: center; gap: 6px; }
.c-gifs-head input { flex: 1 1 0; min-width: 0; width: auto; margin: 0; border: 1px solid var(--line-strong); border-radius: 22px; padding: 9px 16px; min-height: 44px; font: 16px/1.5 var(--body); color: var(--text); background: var(--bg); -webkit-appearance: none; appearance: none; }
.c-gifs-head b { padding-left: 6px; }
.c-gifs-grid { columns: 2; column-gap: 6px; max-height: 46vh; max-height: 46dvh; overflow-y: auto; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.c-gifs-grid:empty { display: none; }
.c-gif { display: block; width: 100%; margin: 0 0 6px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: var(--line); cursor: pointer; break-inside: avoid; }
.c-gif img { display: block; width: 100%; height: auto; }
.c-gif:focus-visible { outline-offset: -2px; }
.c-gifs-note { margin: 10px 6px 4px; font-size: 0.9rem; color: var(--muted-strong); }
.c-gifs-foot { margin: 6px 6px 0; font-size: 0.75rem; color: var(--muted); }
@media (min-width: 641px) { .c-gifs-grid { columns: 3; } }

/* A GIF picked from GIPHY, in a post or a message. */
.att.gif { display: block; margin-top: 6px; }
.att.gif img { display: block; max-width: min(100%, 320px); max-height: 320px; height: auto; border-radius: var(--radius); background: var(--line); }
.gif-by { display: block; font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); display: inline-block; flex: none; }
.rec-dot.blink { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.level { flex: 1; height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.level-bar { display: block; height: 100%; width: 0; background: var(--ok); transition: width 0.1s linear; }
.level-bar.hot { background: var(--danger); }
.rec-live .btn.danger { min-height: 44px; padding: 0 26px; }

/* The take, ready to hear back: player, then keep-or-redo. */
.rec-done { padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); }
.rec-done audio { display: block; width: 100%; margin: 0 0 8px; }
.rec-done .row, .vrec-done { gap: 8px; }
.rec-done [data-rec-summary], .vrec-done [data-vrec-summary] { flex: 1 1 100%; color: var(--muted-strong); }
.rec-done .spacer, .vrec-done .spacer { display: none; }
.rec-done button.link, .vrec-done button.link, .vrec-ready button.link {
  flex: 1 1 0; margin: 0; padding: 0 12px; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 999px; background: #ffffff;
  font-family: var(--head); font-size: 0.75rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; white-space: nowrap;
}
.rec-done button.link.danger, .vrec-done button.link.danger { flex: 0 1 auto; font-weight: 800; border-color: var(--line-strong); }
.vrec-ready button.link { flex: none; }

/* ---- posts and comments ---- */
.post { padding: 14px 16px; }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.who { line-height: 1.3; min-width: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--head); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; color: #ffffff;
  background: var(--dark);
}
.badge {
  display: inline-block; font-family: var(--head); font-size: 0.66rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 2px 9px; border-radius: 999px;
  background: #ffffff; border: 1px solid var(--line-strong); color: var(--muted-strong); vertical-align: middle;
}
.body p { margin: 0.3rem 0; overflow-wrap: anywhere; }
.att { margin-top: 10px; }
.att audio, .att video { display: block; width: 100%; }
.att video { border-radius: var(--radius); background: #000; max-height: 60vh; }
/* One quiet line under a player: how long, save it, and the technical bits folded away. */
.att-meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; font-size: 0.85rem; color: var(--muted); }
.att-meta a, .att-meta summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-strong); }
.att-meta a { text-decoration-color: var(--line-strong); }
.rec-details { font-size: 0.85rem; color: var(--muted); }
.rec-details[open] { flex: 1 1 100%; }
.rec-details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; list-style: none; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.att-meta .rec-details summary { display: inline-flex; }
.rec-details summary::-webkit-details-marker { display: none; }
.rec-details summary::after { content: "+"; margin-left: 6px; text-decoration: none; display: inline-block; }
.rec-details[open] summary::after { content: "\2212"; }
.rec-details ul { margin: 0 0 8px; padding-left: 18px; color: var(--muted-strong); }
.post-foot { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 6px 0 -8px; }
.comments-link {
  position: relative; display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none;
  font-family: var(--head); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--dark);
}
.comments-link::after { content: ""; position: absolute; inset: -4px 0; }
.comments-link:hover { border-color: var(--dark); }
/* Delete is there when you want it and out of the way when you don't. */
.post-foot button.link.danger, .dm-msg-foot button.link.danger {
  color: var(--muted); font-weight: 400; font-size: 0.85rem; text-decoration: none; margin: 0 -8px 0 0;
}
.post-foot button.link.danger:hover, .post-foot button.link.danger:focus-visible,
.dm-msg-foot button.link.danger:hover, .dm-msg-foot button.link.danger:focus-visible { color: var(--danger); text-decoration: underline; }
.comments { margin: 4px 0 14px; }
.comments h2 { margin: 18px 2px 8px; font-size: 0.8rem; font-weight: 400; letter-spacing: 0.1em; color: var(--muted-strong); }
.comment { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.comment .avatar { width: 32px; height: 32px; font-size: 0.72rem; }
.comment .post-foot { margin-top: 0; }
.pager { text-align: center; margin: 10px 0; }
/* Landing on #post-…, #c-… or #m-… must not hide it under the top bar. */
.post, .comment, .dm-msg { scroll-margin-top: 64px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 14px 0; font-size: 0.95rem; }
.facts dt { font-family: var(--head); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.resend { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.resend p { margin: 0 0 10px; }
.resend + p a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- the voice room page ---- */
.participants { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.participants li { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: var(--radius); border: 2px solid transparent; background: var(--bg); }
.participants li.speaking { border-color: var(--ok); }
.participants .pname { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.participants .muted { color: var(--muted-strong); font-weight: 400; }
.mic.on { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.prejoin, .inroom { display: flex; flex-direction: column; gap: 12px; }
.prejoin p, .inroom p { margin: 0; }
.prejoin .status, .inroom .status { margin-top: 0; min-height: 0; }
.prejoin .btn.wide { min-height: 52px; }
.room-now { font-weight: 700; }
.inroom .participants { margin: 0; }
/* Mute is the one you reach for, so it is the big one. Leave sits beside it. The mode switch goes underneath. */
.controls { margin-top: 0; }
.controls .btn { min-height: 52px; }
.controls [data-mute] { flex: 2 1 0; font-weight: 800; }
.controls [data-leave] { flex: 1 1 0; }
.controls [data-toggle-mode] { order: 3; flex: 1 1 100%; min-height: 44px; }
.devices { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.devices .btn { align-self: flex-start; }
pre.stats, pre.mail { white-space: pre-wrap; font-size: 0.8rem; background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: 8px; overflow-wrap: anywhere; }

/* ---- Gregory's pages ---- */
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.table th { font-family: var(--head); font-size: 0.68rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.table.small { font-size: 0.8rem; }
.table.small td { vertical-align: top; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px 12px; padding: 0 16px; }
.table-wrap .table { margin: 0; }
.admin .main { max-width: 960px; }
.admin .row input, .admin .row select { width: auto; flex: 1; min-width: 140px; margin: 0; }
.admin .table { margin-bottom: 12px; }
.admin .table select { margin: 0; padding: 4px 8px; width: auto; min-height: 40px; }
.admin-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.admin-jump .btn { min-height: 40px; padding: 0 14px; font-size: 0.72rem; }
.admin section { scroll-margin-top: 64px; }
.event-detail { font-family: ui-monospace, Menlo, monospace; font-size: 0.72rem; color: var(--muted-strong); }
.lookup-result { margin-top: 10px; }

@media (max-width: 640px) {
  .btn { padding: 0 18px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 10px; }
  .admin .table th, .admin .table td { white-space: nowrap; padding-right: 14px; }
  .admin .table td.wrap-ok { white-space: normal; min-width: 220px; }
  .main { padding: 14px 12px 48px; }
  .table-wrap { margin: 0 -16px 12px; }
}

/* "New posts" button, shown instead of pulling the page out from under you. */
.newstuff {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(56px + env(safe-area-inset-top)); z-index: 35;
  border: 1px solid var(--button); border-radius: 999px; cursor: pointer;
  background: var(--button); color: var(--button-text);
  font-family: var(--head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  min-height: 44px; padding: 0 20px; white-space: nowrap; box-shadow: var(--shadow);
}
.newstuff:hover { background: var(--accent-head); border-color: var(--accent-head); }
@media (min-width: 641px) { .newstuff { top: calc(68px + env(safe-area-inset-top)); } }

/* The first screen anyone sees: one field, one big button. */
.auth .btn.wide { min-height: 52px; }
