/* 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;
}

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

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

/* 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;
}

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

/* 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);
}

.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 plain span for yourself, a button for everyone else. */
.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);
}

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 "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 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);
}

.room-menu-empty {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.4rem 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);
}

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

/* 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. */
  .app .room-back {
    display: none;
  }
}
