/* YourHerd — site styles.
   Calm, minimal, mobile-first. Soft warm palette, generous whitespace,
   readable type. The look should feel quiet, never loud. */

/* Light theme — the default. The dark theme below overrides the colours;
   the two layout widths are shared by both themes. */
:root {
  --bg: #faf8f4;          /* warm near-white background */
  --bg-tint: #edeee3;     /* alternating sections — a barely-there green-cream */
  --surface: #ffffff;     /* cards */
  --ink: #3b3a37;         /* main text — soft near-black */
  --ink-soft: #6f6d68;    /* secondary text */
  --accent: #4d7a45;      /* the brand green — a muted, soft grass green */
  --accent-deep: #38592f; /* darker green — for links, small text, hover */
  --accent-soft: #e8efe0; /* pale green tint for panels */
  --accent-text: #ffffff; /* text shown on an accent-coloured button */
  --line: #e6e2da;        /* hairline borders */
  --error-text: #b4452f;  /* error-message text */
  --error-bg: #f3e3df;    /* error-panel background */
  /* The hero photo: the wash layered over it, and the photo's own filter. */
  --scrim-1: rgba(250, 248, 244, 0.72);
  --scrim-2: rgba(250, 248, 244, 0.66);
  --scrim-3: rgba(250, 248, 244, 1);
  --scene-filter: saturate(0.72) brightness(1.04) blur(2px);
  --content: 36rem;       /* calm reading width for text */
  --content-wide: 58rem;  /* wider width for multi-column sections */
}

/* Dark theme — applied when <html data-theme="dark"> is set (the small
   script in base.html chooses it). A calm, warm dark — never harsh black —
   so the soft feeling carries over to night-time. */
:root[data-theme="dark"] {
  --bg: #1c1e1a;
  --bg-tint: #24261f;
  --surface: #282a23;
  --ink: #e9e7e0;
  --ink-soft: #a8a59d;
  --accent: #7faf6f;
  --accent-deep: #9cc78d;
  --accent-soft: #2b352a;
  --accent-text: #16180f;
  --line: #34362f;
  --error-text: #e3998a;
  --error-bg: #3a2723;
  --scrim-1: rgba(20, 22, 18, 0.72);
  --scrim-2: rgba(20, 22, 18, 0.66);
  --scrim-3: rgba(20, 22, 18, 1);
  --scene-filter: saturate(0.6) brightness(0.5) blur(2px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;  /* gentle glide when a nav link jumps to a section */
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  /* System fonts: no external download keeps every page fast and quiet. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  /* Footer sits at the bottom even on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent-deep);
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.3;
}

/* --- Header (sticky, quiet) --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  /* Push the navigation and account area to the right of the header. */
  margin-right: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* The section links are a desktop convenience. On a phone they are hidden —
   the page is one scroll, so you simply scroll. The Join button always shows. */
.site-nav a:not(.nav-cta) {
  display: none;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:not(.nav-cta):hover {
  color: var(--accent-deep);
}

.nav-cta {
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav-cta:hover {
  background: var(--accent-deep);
}

/* Account area in the header — log in / join, or handle / log out. */
.site-account {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.account-name {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.account-name:hover {
  color: var(--accent-deep);
}

.account-link {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.account-link:hover {
  color: var(--accent-deep);
}

.logout-form {
  margin: 0;
}

.logout-form button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.logout-form button:hover {
  color: var(--accent-deep);
}

/* --- Main / shared section layout --- */

main {
  flex: 1;
}

/* When a nav link jumps to a section, leave room so the sticky header
   does not cover the section heading. */
section {
  scroll-margin-top: 4.5rem;
}

.band {
  padding: 3.5rem 1.5rem;
}

.band-tint {
  background: var(--bg-tint);
}

.band-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.band-inner.wide {
  max-width: var(--content-wide);
}

.band h2,
.closing h2 {
  font-size: 1.55rem;
  margin: 0 0 1.25rem;
}

.band p {
  margin: 1rem 0;
}

/* --- Hero --- */

/* The "scene" wraps the hero and the first content section, so one
   continuous landscape photo sits behind both. */
.scene {
  position: relative;
  overflow: hidden;
}

/* The photo layer — a real landscape, gently desaturated and softened so it
   reads as calm and muted rather than busy. The slight negative inset gives
   the soft blur a little overscan so it has no transparent edge. */
.scene::before {
  content: "";
  position: absolute;
  inset: -14px;
  background: url("../img/appal4.aa852ce36aa7.webp") center / cover no-repeat;
  filter: var(--scene-filter);
}

/* The cream scrim — washes the photo paler and keeps the text readable, then
   fades to solid at the bottom so the photo dissolves cleanly into the next
   section. Raise these opacity values toward 1 for a paler photo / safer
   text; lower them to let more of the landscape show through. This is the
   main dial for tuning the scene. */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--scrim-1) 0%,
    var(--scrim-2) 50%,
    var(--scrim-3) 100%
  );
}

/* Lift the hero and section content above the photo and scrim layers. */
.scene > * {
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 5.5rem 1.5rem;
}

.wordmark {
  font-size: 2.8rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.tagline {
  color: var(--accent);
  font-style: italic;
  font-size: 1.3rem;
  margin: 0.4rem 0 1.8rem;
}

.hero-line {
  max-width: 28rem;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* The primary call to action. */
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-size: 1.05rem;
}

.cta:hover {
  background: var(--accent-deep);
}

/* --- "How it works" feature cards --- */

.features {
  display: grid;
  gap: 1.25rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--accent-deep);
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
}

/* Spacing when a feature card has more than one paragraph. */
.feature p + p {
  margin-top: 0.85rem;
}

/* The two hosted-event formats — laid out as equal, parallel choices. */
.feature-formats {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-formats li {
  margin-top: 0.45rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
}

.feature-formats li:first-child {
  margin-top: 0;
}

/* The reassurance line below the two event formats. */
.feature .feature-note {
  margin-top: 0.85rem;
}

/* --- The founder's note --- */

/* The interior tagline — the warmer, honest promise, shown inside the app. */
.interior-tagline {
  color: var(--accent-deep);
  font-style: italic;
  margin: 0 0 0.3rem;
}

/* "I pass." — gently marked so the sanctioned opt-out script stands out. */
.ipass {
  color: var(--accent-deep);
  font-weight: 600;
}

.welcome-note .signoff {
  font-style: italic;
  color: var(--ink-soft);
}

/* --- Closing call to action --- */

.closing {
  text-align: center;
  padding: 3.5rem 1.5rem 4rem;
}

.closing p {
  color: var(--ink-soft);
  margin: 0 0 1.8rem;
}

/* --- Document pages (join, privacy, terms) --- */

.doc {
  padding: 3.5rem 1.5rem;
}

.doc-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.doc-inner h1 {
  font-size: 1.7rem;
  margin: 0 0 1.25rem;
}

.doc-inner h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
  color: var(--accent-deep);
}

.doc-inner h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.4rem;
  color: var(--ink);
}

.doc-inner ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.doc-inner li {
  margin-bottom: 0.4rem;
}

.doc-inner p {
  margin: 0 0 0.9rem;
}

/* The "Last updated" line at the top of a legal document. */
.doc-updated {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: -0.5rem 0 1.5rem;
}

/* The cross-link to the sibling legal doc. */
.doc-related {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.back-link {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-deep);
}

/* --- Forms (sign-up, and later login, etc.) --- */

.form-intro {
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="date"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-help {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-help ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}

.form-error {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--error-text);
}

.form-errors {
  background: var(--error-bg);
  border-radius: 10px;
  padding: 0.5rem 1rem 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.form-errors p {
  margin: 0.4rem 0;
}

.form button[type="submit"] {
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-top: 0.5rem;
}

.form-foot {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2.25rem;
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.footer-brand span {
  font-weight: 400;
  font-style: italic;
  color: var(--accent-deep);
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  margin: 0 0.6rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent-deep);
}

/* The light / dark theme toggle — a small icon button in the header. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
}

.theme-toggle:hover {
  color: var(--accent-deep);
}

.theme-toggle svg {
  display: block;
}

/* A moon shows in light mode (tap for dark); a sun shows in dark mode. */
.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* "Talk to a professional" — quiet, present on every page. */
.support-dropdown summary {
  cursor: pointer;
  color: var(--ink-soft);
  list-style: none;      /* hide the default disclosure triangle */
  font-size: 0.95rem;
}

.support-dropdown summary::-webkit-details-marker {
  display: none;
}

.support-dropdown summary:hover {
  color: var(--accent-deep);
}

.support-panel {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  text-align: left;
  color: var(--ink);
  font-size: 0.95rem;
}

.support-panel p {
  margin-top: 0;
}

.support-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.support-panel li {
  margin: 0.6rem 0;
}

/* --- Profile editor (the bubble sorter) --- */

.profile-editor {
  max-width: var(--content-wide);
}

.profile-intro {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.profile-intro p {
  margin: 0 0 0.7rem;
}

.profile-intro p:last-child {
  margin-bottom: 0;
}

.sorter {
  margin-top: 1.5rem;
}

/* The three zones — the pool, and the two profile fields. */
.zone {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

/* The two profile fields are gently tinted, to set them apart from the pool. */
.zone[data-zone="public"],
.zone[data-zone="private"] {
  background: var(--accent-soft);
}

.zone > h2 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}

.zone-hint {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

/* The hint shows only while its zone is empty. */
.zone:has(.bubble) .zone-hint {
  display: none;
}

.bubble-group {
  margin-top: 1rem;
}

/* A heading-group is hidden entirely when it holds no bubbles. */
.bubble-group:not(:has(.bubble)) {
  display: none;
}

.bubble-group h3 {
  font-size: 0.95rem;
  color: var(--accent-deep);
  margin: 0 0 0.5rem;
}

.bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

/* The tappable bubble — a soft pill. */
.bubble {
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
}

.bubble:hover {
  border-color: var(--accent);
}

/* The popup shown when a bubble is tapped. */
.bubble-dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  max-width: 22rem;
  width: calc(100% - 2rem);
}

.bubble-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

/* The inner wrapper carries the padding, so a click on the dialog itself
   means the backdrop was clicked. */
.bubble-dialog-inner {
  padding: 1.5rem;
}

.bubble-dialog-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.bubble-dialog-prompt {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.bubble-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dialog-btn {
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
}

.dialog-btn:hover {
  background: var(--accent-deep);
}

/* "Leave it here" — the quiet back-out, not a solid action. */
.dialog-btn-quiet {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.dialog-btn-quiet:hover {
  background: none;
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* "Remove this interest" — a careful action, shown for custom interests only. */
.dialog-btn-remove {
  background: none;
  border: 1px solid var(--line);
  color: var(--error-text);
}

.dialog-btn-remove:hover {
  background: none;
  border-color: var(--error-text);
  color: var(--error-text);
}

/* Adding your own interest, at the foot of the pool. */
.add-interest {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.add-interest label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.add-interest-row {
  display: flex;
  gap: 0.5rem;
}

.add-interest-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.add-interest-row input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.add-interest-row button {
  font: inherit;
  cursor: pointer;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
}

.add-interest-row button:hover {
  background: var(--accent-deep);
}

.add-interest-error {
  margin-top: 0.5rem;
}

/* --- Profile view & the handle/location form --- */

.profile-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.profile-handle {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.profile-location {
  color: var(--ink-soft);
  margin: 0.2rem 0 0;
}

.profile-group {
  margin-top: 1.5rem;
}

.profile-group h2 {
  font-size: 1rem;
  color: var(--accent-deep);
  margin: 0 0 0.6rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* A read-only display pill (the editor's bubbles are tappable; these aren't). */
.profile-tag {
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

.profile-empty {
  color: var(--ink-soft);
  margin: 1.25rem 0 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* The secondary profile actions ("Edit handle & location",
   "Notification settings") — outlined buttons, clearly tappable but
   quieter than the filled "Arrange your bubbles" call to action. */
.profile-link {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--accent-deep);
  text-decoration: none;
  font-size: 0.95rem;
}

.profile-link:hover {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
}

/* The quiet "Delete my account" link at the bottom of the profile —
   present, not loud, separated from the main actions. */
.profile-leave {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.9rem;
}

.profile-leave a {
  color: var(--ink-soft);
  text-decoration: underline;
}

.profile-leave a:hover {
  color: var(--error-text);
}

/* --- The delete-account confirmation page --- */

.delete-warning {
  color: var(--error-text);
  margin: 1.25rem 0;
}

.delete-form {
  margin-top: 1.25rem;
}

/* A "I understand..." checkbox row next to its label. */
.form-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.delete-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

/* A destructive primary action — quiet outlined, not loud filled. */
.cta-destroy {
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--error-text);
  border-radius: 10px;
  background: none;
  color: var(--error-text);
}

.cta-destroy:hover {
  background: var(--error-bg);
}

.form-cancel {
  color: var(--ink-soft);
  text-decoration: none;
}

.form-cancel:hover {
  color: var(--accent-deep);
}

/* The state dropdown and the form's fieldsets. */
.form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.form-fieldset legend {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0;
  margin-bottom: 0.4rem;
}

.form-fieldset .form-help {
  margin-top: 0;
  margin-bottom: 0.85rem;
}

/* --- The room list (the in-app home) --- */

.room-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.room-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
}

.room-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.room-card-head h2 {
  font-size: 1.2rem;
  margin: 0;
}

/* The room's occupancy and cap — kept plainly visible. */
.room-cap {
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.room-desc {
  color: var(--ink-soft);
  margin: 0.5rem 0 1rem;
}

.room-card-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.room-card-action form {
  margin: 0;
}

.room-in {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.room-full {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Used for both the "Join" button and the "Enter" link. */
.room-join {
  display: inline-block;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
}

.room-join:hover {
  background: var(--accent-deep);
}

/* The room the person is currently in is gently marked. */
.room-card-current {
  border-color: var(--accent);
}

.room-leave {
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  /* Used both as a <button> (public room "Leave this room") and an
     <a> ("Back to lobby" on a private room) — keep them identical. */
  display: inline-block;
  text-decoration: none;
}

.room-leave:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* The quieter "Stop being a member" control on a private room — a
   deliberate, less-common action, so it reads softer than the
   "Back to lobby" pill above it. */
.leave-membership-form {
  margin-top: 1rem;
}

.leave-membership-btn {
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-soft);
  text-decoration: underline;
}

.leave-membership-btn:hover {
  color: var(--accent-deep);
}

.leave-membership-note {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

/* The quiet "Delete this conversation" control on a conversation page —
   same shape as the room's leave button, with a small hint clarifying the
   per-side soft-delete behavior. */
.conversation-delete-form {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.conversation-delete {
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
  border-radius: 9px;
}

.conversation-delete:hover {
  border-color: var(--error-text);
  color: var(--error-text);
}

.conversation-delete-hint {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* --- A room's page --- */

.room-back {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

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

.room-back a:hover {
  color: var(--accent-deep);
}

/* On a public room, "Back to lobby" is a POST (it leaves the room),
   so it's a button styled to look identical to the link version above. */
.room-back-form {
  display: inline;
  margin: 0;
}

.room-back-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--ink-soft);
  text-decoration: none;
}

.room-back-link:hover {
  color: var(--accent-deep);
}

.room-here {
  margin: 1.75rem 0;
}

.room-here h2 {
  font-size: 1.1rem;
  margin: 0 0 0.6rem;
}

/* --- The room's people list & personal controls --- */

.people-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Each entry may carry both the person-tag and a host-only Remove button,
   so the row itself is a small inline-flex. */
.people-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* A person pill — a button for everyone, including yourself (clicking
   your own pill toggles your mic during a voice session). */
.person-tag {
  font: inherit;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

.person-tag.is-self {
  color: var(--ink-soft);
}

/* The note under the voice controls reminding the session starter that
   leaving voice ends the session for everyone. */
.voice-host-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.4rem 0 0;
}

/* --- PWA install presentation ------------------------------------- */

/* The two equal ways to use YourHerd, shown after signup. */
.pwa-choice {
  margin: 2rem 0 1.5rem;
}

.pwa-choice-heading {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.pwa-choice-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Two equal cards — neither is presented as the "right" choice. */
.pwa-choice-option {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--surface);
}

.pwa-choice-option h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.pwa-choice-option p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* The permanent install item in profile settings. */
.settings-install {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.settings-install h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.settings-install p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* Shown in place of the install controls once YourHerd is installed. */
.settings-install .settings-installed {
  font-size: 0.95rem;
  color: var(--accent-deep);
  margin: 0;
}

/* A settings block set off from the form above it (e.g. push opt-in). */
.settings-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.settings-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

/* The push on/off status line, and the toggle button below it. */
.push-status {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0.6rem 0;
}

.push-toggle {
  margin-top: 0.2rem;
}

/* The install button is a full call-to-action here — it is the whole
   point of this section, so it should read clearly, not as a quiet
   link. Sits a little below the description. */
.settings-install-btn {
  margin-top: 0.6rem;
}

/* Manual install instructions — revealed by pwa-install.js. */
.pwa-steps {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 9px;
  background: var(--accent-soft);
  font-size: 0.9rem;
}

.pwa-steps p {
  margin: 0 0 0.4rem;
}

.pwa-steps ol {
  margin: 0;
  padding-left: 1.2rem;
}

/* The slide-in direct-message panel. Fixed to the right edge, over the
   current page — the room and any voice session keep running beneath
   it. dm-panel.js toggles the `hidden` attribute. */
.dm-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 100%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -6px 0 20px rgba(0, 0, 0, 0.10);
}

/* The fixed display:flex above would otherwise beat the plain `hidden`
   attribute, so re-assert it. */
.dm-panel[hidden] {
  display: none;
}

@media (max-width: 600px) {
  /* No room for a side panel on a phone — take the whole screen. */
  .dm-panel {
    width: 100%;
    border-left: none;
  }
}

.dm-panel-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.dm-panel-name {
  flex: 1;
  font-weight: 600;
}

.dm-panel-fullview {
  font-size: 0.85rem;
  color: var(--accent-deep);
  text-decoration: none;
}

.dm-panel-fullview:hover {
  text-decoration: underline;
}

.dm-panel-close {
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0 0.2rem;
}

.dm-panel-close:hover {
  color: var(--ink);
}

/* The message log fills the space between the header and the input. */
.dm-panel .chat-log {
  flex: 1;
  overflow-y: auto;
  margin: 0;
}

.dm-panel-loading {
  color: var(--ink-soft);
  padding: 1rem 0;
}

/* The compact "next hosted session" pointer at the top of a room page. */
.next-session-line {
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

.next-session-line a {
  color: var(--accent-deep);
  text-decoration: none;
}

.next-session-line a:hover {
  text-decoration: underline;
}

/* The username search form and its result on the "Find someone" page. */
.find-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.find-form input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.find-result {
  margin-top: 1rem;
}

.find-message-form {
  margin-top: 1.25rem;
}

.find-empty {
  margin-top: 1rem;
  color: var(--ink-soft);
}

/* The check-row layout for a labelled checkbox in a form (the
   "find me by username" toggle). */
.form-row-check {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

button.person-tag {
  cursor: pointer;
}

button.person-tag:hover {
  border-color: var(--accent);
}

/* A person you have a control on — quietly marked. */
.person-tag.has-control {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.person-state {
  font-size: 0.78rem;
  color: var(--accent-deep);
}

/* The mute / block / hard-block choices inside the popup. Calm outlined
   buttons, each with a one-line description — not loud primary actions. */
.control-choice {
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  color: var(--ink);
}

.control-choice:hover {
  border-color: var(--accent);
}

/* The choice already in effect for this person. */
.control-choice.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.control-choice-name {
  font-weight: 600;
}

.control-choice-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* --- Hosted session: live indicator, host controls, member Remove --- */

/* A calm banner above the chat when a session is happening. */
.live-session-indicator {
  margin: 0 0 1.5rem;
  padding: 0.7rem 0.9rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent-deep);
  font-size: 0.95rem;
}

/* The voice section — shown when a voice-format session is live. */
.voice-section {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

.voice-section h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--accent-deep);
}

.voice-note {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.voice-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.voice-join,
.voice-leave {
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  border-radius: 9px;
  border: none;
}

.voice-join {
  background: var(--accent);
  color: var(--accent-text);
}

.voice-join:hover:not(:disabled) {
  background: var(--accent-deep);
}

.voice-join:disabled {
  opacity: 0.6;
  cursor: progress;
}

.voice-leave {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.voice-leave:hover {
  border-color: var(--error-text);
  color: var(--error-text);
}

.voice-status {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.voice-status.is-error {
  color: var(--error-text);
}

/* The host-only Start / End buttons, sitting near the leave control. */
.host-controls {
  margin: 1.75rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-tint);
}

.host-controls h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.host-controls-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.host-control-start,
.host-control-end {
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
}

.host-control-start:hover,
.host-control-end:hover {
  background: var(--accent-deep);
}

/* A small, careful Remove button beside a member — visible only to the
   live session's host. */
.member-remove-form {
  display: inline;
  margin: 0;
}

.member-remove-btn {
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  color: var(--error-text);
}

.member-remove-btn:hover {
  border-color: var(--error-text);
}

/* The host's per-person "Mute voice" / "Unmute voice" toggle. Calmer than
   the remove button — voice-mute is the lighter step, not an ejection. */
.host-voice-mute-btn {
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink-soft);
}

.host-voice-mute-btn:hover {
  border-color: var(--accent-deep);
}

.host-voice-mute-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

/* Shown to a person the host has voice-muted for the room. */
.voice-muted-notice {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* The "Message this person" action at the top of the person popup. */
.person-dialog-message {
  margin-bottom: 1rem;
}

.person-dialog-message .dialog-btn {
  width: 100%;
  text-align: center;
}

/* --- A room's live text chat --- */

.chat {
  margin: 0 0 1.75rem;
}

.chat-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

/* The message log: a scrolling box, so a long conversation does not push
   the message field off the screen. */
.chat-log {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  height: 22rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.chat-empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 2rem 1rem;
}

.chat-message {
  margin: 0 0 0.9rem;
}

.chat-message:last-child {
  margin-bottom: 0;
}

/* A muted or blocked person's message: folded into a placeholder. The
   content is hidden until the reader taps to peek at it. */
.chat-message-collapsed .chat-revealed {
  display: none;
}

.chat-message-collapsed.is-peeked .chat-revealed {
  display: block;
}

.chat-message-collapsed.is-peeked .chat-peek {
  display: none;
}

.chat-peek {
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: var(--ink-soft);
  background: var(--bg-tint);
  border: 1px dashed var(--line);
  border-radius: 9px;
  padding: 0.55rem 0.7rem;
}

.chat-peek:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* The author name stays calm inside the placeholder, not bright. */
.chat-peek .chat-author {
  color: inherit;
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.chat-author {
  font-weight: 600;
  color: var(--accent-deep);
  font-size: 0.95rem;
}

.chat-time {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.chat-text {
  margin: 0.15rem 0 0;
  /* Keep deliberate line breaks, and break very long unbroken strings so
     they cannot stretch the layout. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.chat-form textarea {
  flex: 1;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}

.chat-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.chat-form button {
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
}

.chat-form button:hover {
  background: var(--accent-deep);
}

.chat-status {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--error-text);
}

/* --- Reporting --- */

/* The quiet Report control on each message — present, but never loud. */
.chat-report {
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink-soft);
  text-decoration: underline;
}

.chat-report:hover {
  color: var(--accent-deep);
}

/* The "Message" control on a noticeboard post — branches into a DM with
   the poster. A quiet inline button like Report, but in the accent colour
   so it reads as the actionable affordance. */
.chat-dm {
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-deep);
}

.chat-dm:hover {
  text-decoration: underline;
}

/* The room-level "something feels off" line, below the chat. */
.room-report-line {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
}

.room-report-open {
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-deep);
  text-decoration: underline;
}

/* The line naming which message a report is about. */
.report-about {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.report-row {
  margin: 0 0 1rem;
}

.report-row label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.report-row select,
.report-row textarea {
  font: inherit;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}

.report-row textarea {
  resize: vertical;
}

.report-row select:focus,
.report-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.report-error {
  font-size: 0.9rem;
  color: var(--error-text);
  margin: 0 0 0.75rem;
}

/* --- In-app two-pane layout (sidebar + room) --- */

/* Mobile-first: a single column. The sidebar is hidden on phones — the
   room page's own "All rooms" link handles getting back to the room list.
   The two-pane view appears on wider screens further down this file. */
.app-sidebar {
  display: none;
}

.app-main {
  padding: 2.5rem 1.5rem;
}

.room-pane {
  max-width: 44rem;
  margin: 0 auto;
}

.room-menu-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 1.5rem 0 0.5rem;
}

.room-menu-heading:first-child {
  margin-top: 0;
}

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

.room-menu-list li {
  margin: 0 0 0.3rem;
}

/* One shared look for every sidebar entry — whether it is a join-form
   button or the link to the room you are already in. */
.room-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  padding: 0.5rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: var(--ink);
}

button.room-menu-item:hover,
a.room-menu-item:hover {
  background: var(--accent-soft);
}

/* The room the user is currently in — quietly marked, not a button. */
.room-menu-item.is-current {
  background: var(--accent-soft);
  border-color: var(--line);
  font-weight: 600;
  color: var(--accent-deep);
}

span.room-menu-item.is-current {
  cursor: default;
}

.room-menu-count {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* The "· by owner" subtext shown after a private room's name in the
   sidebar — disambiguates rooms with the same name across different
   owners (one person's Cosmere from another's). */
.room-menu-sub {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--ink-soft);
}

/* A quiet "· live" tag next to a public room when a hosted session is
   happening there right now — discoverable, but calm (no red, no badge). */
.room-menu-live {
  font-size: 0.78rem;
  font-weight: normal;
  color: var(--accent-deep);
}

/* The unread marker — a small soft dot, never a count or a red badge
   (CLAUDE.md §11). Sits just after a conversation or room name when there
   is something new. */
.unseen-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* Small contextual tags shown next to a person's name in a private
   room — "owner", or "not here" if they are a member but not currently
   in the room. Quiet, not loud — they orient without distracting. */
.person-role,
.person-presence {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--ink-soft);
  margin-left: 0.25rem;
}

/* The owner-only invite panel (private rooms). Lives just under the
   members list — natural place to add someone after seeing who is in. */
.invite-panel {
  margin: 1rem 0 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.invite-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.invite-form {
  display: flex;
  gap: 0.5rem;
}

.invite-form input[type="text"] {
  flex: 1;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
}

.invite-note {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.invite-note-ok {
  color: var(--accent-deep);
}

.invite-note-error {
  color: var(--ink-soft);
}

.room-owner-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Small persistent indicator next to a permanent room's name so members
   are reminded — even after they have acknowledged on entry — that this
   is a kept-messages room. Quiet, not alarming. */
.room-kept-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
}

/* The one-time acknowledgment screen members see on first entry into a
   permanent private room. Calm and direct — not scary, but clear. */
.permanent-warning-headline {
  margin-top: 1.25rem;
  font-size: 1.1rem;
}

.permanent-warning-actions {
  margin-top: 1.5rem;
}

.permanent-warning-back {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* The owner's "Delete this room" inline link inside a private room.
   Quiet, not red — the destructive action lives behind a confirmation
   page; the link itself should not feel like a panic button. */
.room-delete-link {
  margin-left: 0.5rem;
}

.delete-summary {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.delete-summary li {
  margin-bottom: 0.35rem;
}

/* The actual destructive button on the confirmation page. This is the
   one place a button reads as a destructive action, so it stands out
   from the calm CTA style elsewhere. */
.delete-confirm-form {
  margin-top: 1.5rem;
}

.delete-confirm-btn {
  font: inherit;
  padding: 0.6rem 1rem;
  border: 1px solid var(--danger, #b94a48);
  border-radius: 7px;
  background: var(--danger, #b94a48);
  color: #fff;
  cursor: pointer;
}

.delete-confirm-btn:hover {
  filter: brightness(1.05);
}

.delete-cancel {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.room-menu-empty {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.4rem 0.65rem;
}

/* The noticeboard's sub-text in the sidebar — shown beneath the room name
   so a scanning user sees what the board is for without entering it. */
.room-menu-subtext {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0.15rem 0 0.4rem;
  padding: 0 0.65rem;
}

/* The rooms lobby (no room open). Unlike a room page, its sidebar stays
   visible on phones — there is no room content to make space for. */
.app-lobby .app-sidebar {
  display: block;
  padding: 1.75rem 1.5rem 0.5rem;
}

.lobby-home {
  max-width: 32rem;
  margin: 0 auto;
}

/* The hosted-session schedule panel at the top of the lobby. */
.schedule-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  background: var(--surface);
  margin: 0 0 1.5rem;
}

.schedule-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--accent-deep);
}

.schedule-intro {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.schedule-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.schedule-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.schedule-item:first-child {
  border-top: none;
}

.schedule-when {
  font-weight: 600;
  color: var(--ink);
}

.schedule-format,
.schedule-where,
.schedule-host {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* "Happening now" — the calm tag on a session that is live right now.
   A quiet filled pill in the accent green, no red, no blink. */
.schedule-live {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.schedule-empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 0.6rem 0;
}

/* A calm, present note at the top of the schedule panel — neutral warm
   border, not alarming, not buried. Used for personal pauses or other
   real-world reasons the schedule isn't running as usual. */
.schedule-pause {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: rgba(120, 100, 80, 0.07);
  border-left: 3px solid rgba(120, 100, 80, 0.5);
  border-radius: 4px;
}

.schedule-pause p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
}

/* The §7 reassurance, sitting right with the schedule. */
.schedule-reassurance {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.95rem;
}

.lobby-welcome-line {
  text-align: center;
  color: var(--ink-soft);
  margin: 0;
}

/* --- Wider screens --- */

@media (min-width: 46rem) {
  body {
    font-size: 19px;
  }

  .band {
    padding: 4.5rem 1.5rem;
  }

  /* Reveal the section links in the header. */
  .site-nav a:not(.nav-cta) {
    display: inline;
  }

  /* The feature cards sit two-by-two instead of stacked. */
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* The two-pane room view: the sidebar appears beside the room once there is
   room for both. Below this width it stays a single column. */
@media (min-width: 52rem) {
  .app {
    display: grid;
    grid-template-columns: 15rem 1fr;
    align-items: start;
  }

  .app-sidebar {
    display: block;
    padding: 2rem 1.25rem;
    border-right: 1px solid var(--line);
  }

  /* With the sidebar listing every room, the in-page "All rooms" link is
     redundant. The Gathering opts back in (room-back-always) because the
     lobby is its actual home — the sidebar lists the room but not the
     lobby page where its description and the schedule sit. */
  .app .room-back {
    display: none;
  }
  .app .room-back.room-back-always {
    display: block;
  }
}

/* --- Room visibility, keywords, search, join requests (CLAUDE.md §4) --- */

/* An in-room system message — a calm, centred line, not a chat bubble. */
.chat-system {
  list-style: none;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
  padding: 0.5rem;
}

/* Keyword tags — small pills shown on a room and in search results. */
.keyword-tags {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

.keyword-remove {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--accent-deep);
  padding: 0;
}

.keyword-tags-room {
  margin-top: 0.75rem;
}

/* The owner's "Room settings" link under a room name. */
.room-settings-link {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

/* The keyword editor on the room settings page. */
.keyword-add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.keyword-add-row input {
  flex: 1;
}

.keyword-message {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Room search — the search form and result cards. */
.find-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
}

.find-form input {
  flex: 1;
}

.room-result {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.room-result h2 {
  margin: 0;
  font-size: 1.1rem;
}

.room-result-note {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
}

.room-result-action {
  margin-top: 0.85rem;
}

.request-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.request-form textarea {
  width: 100%;
  margin-bottom: 0.6rem;
}

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

/* Pending join requests on the room settings page. */
.join-request {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}

.join-request-who {
  margin: 0;
}

.join-request-message {
  margin: 0.35rem 0 0;
  font-style: italic;
  color: var(--ink-soft);
}

.join-request-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.7rem;
}
