/* overhaul.css — additions for the web overhaul. Each slice owns one
   section below; keep the section markers intact so future edits stay
   non-overlapping. Tokens come from forum.css (Cream theme).

   Slice files (forum-side .go files) and their CSS sections:
     - home.go             → /* === HOME === */
     - subrooms.go         → /* === ROOMS+SUBROOMS === */
     - dm_widget.go        → /* === DM WIDGET === */
     - messages_search.go  → /* === MESSAGES SEARCH === */
     - profile_edit.go     → /* === PROFILE === */
     - mod_boards.go       → /* === MOD BOARDS === */
     - register.go         → /* === REGISTRATION === */
*/

/* ---------- NAV SECONDARY (foundational) ---------- */
.nav-link--secondary {
  font-size: 13px;
  color: var(--muted);
}
.nav-link--primary {
  color: var(--primary);
  font-weight: 600;
}

/* === HOME === */
.home-wrap { max-width: 980px; margin: 0 auto; padding-bottom: 60px; }

/* Hero — two-column on wide screens, stacked on narrow */
.home-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 0 18px;
}
.home-hero-text h1 {
  font-size: 38px;
  line-height: 1.12;
  margin: 8px 0 12px;
}
.home-hero-text .sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 52ch;
}
.home-hero-shot .screenshot-placeholder { aspect-ratio: 4/3; }
.home-shot-lg { min-height: 240px; }

/* Feature grid */
.home-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 18px 0 36px;
}
.home-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 18px;
  box-shadow: var(--shadow);
}
.home-feature h3 {
  margin: 14px 0 6px;
  font-size: 18px;
}
.home-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Universal screenshot placeholder — image blocks the user replaces later */
.screenshot-placeholder {
  background: var(--surface-sunken);
  border: 1px dashed var(--border);
  border-radius: var(--r-ctrl);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* News feed */
.home-news { margin-top: 12px; }
.home-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.home-news-head h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0;
}
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.news-image {
  background: var(--surface-sunken);
  overflow: hidden;
  max-height: 360px;
}
.news-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 360px;
}
.news-body { padding: 18px 20px 16px; }
.news-title {
  font-family: var(--serif);
  font-size: 22px;
  margin: 0 0 6px;
}
.news-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.news-meta a { color: var(--muted); font-weight: 600; }
.news-meta a:hover { color: var(--primary-hover); text-decoration: underline; }
.news-meta-sep { margin: 0 6px; opacity: .6; }
.news-text p {
  margin: 0 0 .7em;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}
.news-text p:last-child { margin-bottom: 0; }
.news-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.btn-link {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-ctrl);
  color: var(--muted);
  font-family: var(--sans);
}
.btn-link:hover { background: var(--surface-sunken); }
.btn-link.danger { color: var(--danger, #b94a3a); }
.btn-link.danger:hover { background: rgba(185, 74, 58, 0.08); }

/* News compose form */
.news-form .form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.news-form input[type="file"] {
  font-family: var(--sans);
  font-size: 14px;
  padding: 8px 0;
}
.news-image-preview {
  margin-top: 8px;
  max-width: 320px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  overflow: hidden;
  background: var(--surface-sunken);
}
.news-image-preview img { display: block; width: 100%; height: auto; }

@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-hero-text h1 { font-size: 28px; }
  .home-features { grid-template-columns: 1fr; }
}

/* === ROOMS+SUBROOMS === */
/* Subroom grid section on a city page (room.html). The grid is a flex-wrap
   of cards so 1–N themed sub-spaces look right on every viewport. The
   "+ Add subroom" affordance sits right of the section title. */
.subrooms-section {
  margin: 18px 0 24px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.subrooms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.subrooms-head .section-title {
  margin: 0;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.subroom-add { font-size: 13px; padding: 6px 10px; }
.subrooms-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
}
.subroom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.subroom-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl, 10px);
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, transform 120ms ease;
}
.subroom-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  text-decoration: none;
}
.subroom-icon {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary, #fff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.subroom-body { min-width: 0; }
.subroom-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.subroom-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.subroom-vibe {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--sage, var(--border));
  color: var(--text);
  font-weight: 500;
}
.subroom-stats { white-space: nowrap; }

/* Subroom create form (subroom_new.html). Tightens spacing on the shared
   .post-form so the city-context page reads as a focused admin task. */
.subroom-form label { margin-top: 10px; }
.subroom-form .form-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 14px;
}
.alert.alert-error {
  background: #fde2e0;
  color: #8b1a13;
  border: 1px solid #f4b6b0;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* === DM WIDGET === */
/* Floating Facebook-Messenger-style chat panels. The dock is fixed in the
   bottom-right; panels stack right-to-left. pointer-events:none on the dock
   itself + auto on the panels lets clicks pass through the empty gutter so
   the page underneath stays interactive when nothing is open. */
#dm-widget-dock {
  position: fixed; right: 16px; bottom: 0; z-index: 999;
  display: flex; flex-direction: row-reverse; gap: 10px;
  pointer-events: none;
}
.dm-w {
  width: 300px; height: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card) var(--r-card) 0 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  display: flex; flex-direction: column;
  pointer-events: auto;
  overflow: hidden;
  font-family: var(--sans, system-ui, sans-serif);
}
.dm-w.is-min {
  height: 44px;
}
.dm-w.is-min .dm-w-body,
.dm-w.is-min .dm-w-send,
.dm-w.is-min .dm-w-locked { display: none; }
.dm-w-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: var(--primary-tint);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.dm-w-head-link {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
  color: var(--text);
}
.dm-w-head-link:hover { text-decoration: none; }
.dm-w-av {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--primary);
  font-weight: 700; font-size: 12px;
  object-fit: cover;
  flex: 0 0 auto;
}
.dm-w-name {
  font-weight: 600; font-size: 14px;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.dm-w-btn {
  background: transparent; border: 0;
  color: var(--text);
  width: 24px; height: 24px;
  border-radius: var(--r-ctrl);
  cursor: pointer; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.dm-w-btn:hover { background: rgba(0,0,0,.06); }
.dm-w-min { font-weight: 700; }
.dm-w-close { font-size: 20px; }
.dm-w-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface);
}
.dm-w-msg {
  display: flex; flex-direction: column;
  max-width: 80%;
  align-self: flex-start;
  background: var(--surface-sunken);
  border-radius: var(--r-card);
  padding: 6px 10px;
  font-size: 13px;
}
.dm-w-msg.dm-w-mine {
  align-self: flex-end;
  background: var(--primary-tint);
}
.dm-w-msg-body {
  color: var(--text);
  word-wrap: break-word; overflow-wrap: anywhere;
}
.dm-w-msg-ts {
  color: var(--muted);
  font-size: 10px; margin-top: 2px;
}
.dm-w-empty,
.dm-w-locked,
.dm-w-error {
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
  text-align: center;
}
.dm-w-error {
  background: var(--surface);
  border-radius: var(--r-card) var(--r-card) 0 0;
  border: 1px solid var(--border);
}
.dm-w-send {
  display: flex; gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}
.dm-w-send input {
  flex: 1; min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.dm-w-send input:focus { border-color: var(--primary); }
.dm-w-send-btn {
  background: var(--primary); color: var(--on-primary);
  border: 0; padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.dm-w-send-btn:hover { background: var(--primary-hover); }

/* Make channel-chat sender names look + feel clickable. */
.chat-who-btn {
  background: transparent; border: 0;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600; font-size: inherit;
  padding: 0;
}
.chat-who-btn:hover { text-decoration: underline; }

/* === MESSAGES SEARCH === */
.msg-search-form {
  display: flex; gap: 8px;
  margin: 12px 0 14px;
}
.msg-search-input {
  flex: 1; min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.msg-search-input:focus { border-color: var(--primary); }
.msg-search-submit { white-space: nowrap; }
.msg-search-results { margin-bottom: 16px; }
.msg-search-list {
  display: flex; flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.msg-search-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.msg-search-row:last-child { border-bottom: 0; }
.msg-search-row:hover { background: var(--surface-sunken); text-decoration: none; }
.msg-search-av {
  width: 32px; height: 32px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary);
  font-weight: 700; font-size: 13px;
  object-fit: cover;
  flex: 0 0 auto;
}
.msg-search-body { flex: 1; min-width: 0; }
.msg-search-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.msg-search-name { font-weight: 600; font-size: 14px; color: var(--text); }
.msg-search-ts { color: var(--muted); font-size: 11px; }
.msg-search-snippet {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-search-notice,
.msg-search-hint,
.msg-search-empty {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-card);
}

/* === PROFILE === */
/* Own-profile edit page (/forum/profile). Sections are stacked cards,
   each with a heading, optional flash, and a form. Cream theme. */

.profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.profile-header-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-header-initial,
.profile-photo-initial,
.profile-block-initial {
  font-family: var(--serif, var(--sans));
  font-size: 38px;
  font-weight: 600;
  color: var(--muted);
}
.profile-block-initial { font-size: 18px; }
.profile-photo-initial { font-size: 32px; }
.profile-header-text { flex: 1; min-width: 0; }
.profile-header-text h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
}
.profile-header-age {
  color: var(--muted);
  font-weight: 500;
  font-size: 22px;
}
.profile-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.profile-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--sage, #cfe1d4);
  color: var(--text);
  letter-spacing: .02em;
}
.profile-pill--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
}
.profile-pill--danger {
  background: var(--danger, #c0392b);
  color: #fff;
}
.profile-header-public {
  margin: 4px 0 0;
  font-size: 14px;
}
.profile-header-public a { color: var(--primary); }

/* Section cards */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.profile-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
.profile-card > p.muted { margin: 0 0 14px; }
.profile-card--danger {
  border-color: var(--danger, #c0392b);
  background: var(--surface-sunken, #fbf2ef);
}
.profile-card--danger h2 { color: var(--danger, #c0392b); }

/* Flash bars (per-section) */
.profile-flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 500;
}
.profile-flash--ok {
  background: var(--sage, #cfe1d4);
  color: var(--text);
  border: 1px solid var(--border);
}
.profile-flash--err {
  background: #fbeaea;
  color: #802626;
  border: 1px solid #e8b3b3;
}

/* Form layout */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 620px;
}
.profile-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.profile-label input[type=text],
.profile-label input[type=number],
.profile-label input[type=file],
.profile-label textarea,
.profile-label select {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl, 8px);
  background: var(--surface);
  color: var(--text);
}
.profile-label textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}
.profile-label small.muted { font-weight: 400; }

/* Photo section */
.profile-photo-stack {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.profile-photo-preview {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
}

/* Interests grid */
.profile-interest-section { margin-bottom: 18px; }
.profile-interest-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.profile-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.profile-chip input { display: none; }
.profile-chip:hover { border-color: var(--text); }
.profile-chip--on {
  background: var(--sage, #cfe1d4);
  border-color: var(--text);
}

/* Reveal policy radios */
.profile-radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-radio {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl, 8px);
  background: var(--surface);
  cursor: pointer;
}
.profile-radio input { margin-top: 4px; }
.profile-radio-body { display: flex; flex-direction: column; gap: 2px; }
.profile-radio-body small { font-size: 13px; }

/* Notification toggles */
.profile-toggle {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.profile-toggle:last-of-type { border-bottom: none; }
.profile-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}
.profile-toggle span { display: flex; flex-direction: column; gap: 2px; }
.profile-toggle strong { font-size: 15px; }
.profile-toggle small { font-size: 13px; }

/* Blocks list */
.profile-block-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.profile-block-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.profile-block-row:last-child { border-bottom: none; }
.profile-block-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.profile-block-id img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.profile-block-id span code { font-size: 12px; }

/* Buttons */
.btn-danger {
  background: var(--danger, #c0392b);
  color: #fff;
  border-color: var(--danger, #c0392b);
}
.btn-danger:hover { filter: brightness(.95); }

@media (max-width: 720px) {
  .profile-header { flex-direction: column; align-items: flex-start; }
  .profile-photo-stack { flex-direction: column; }
  .profile-card { padding: 18px 16px; }
}

/* === MOD BOARDS === */
.mod-board-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 24px;
  padding: 18px 22px;
  border: 1px solid var(--border, #d8d5cd);
  background: var(--surface, #f3efe4);
  border-radius: 12px;
}
.mod-board-hero h1 { margin: 4px 0 6px; font-family: Lora, serif; font-size: 26px; }
.mod-board-hero .hero-sub { margin: 0; color: var(--muted, #6c655a); max-width: 680px; }
.mod-board-cta { white-space: nowrap; }

.mod-board-section { margin: 28px 0; }
.mod-board-section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: Lora, serif; font-size: 18px;
  margin: 0 0 14px;
}
.mod-board-section-title .count-badge {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 12px; font-weight: 600;
  background: var(--border, #d8d5cd);
  color: var(--text, #2b261d);
  padding: 2px 8px; border-radius: 999px;
}

.mod-board-queues { margin: 20px 0 30px; }
.mod-board-summary {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin: 6px 0 10px;
}
@media (max-width: 760px) { .mod-board-summary { grid-template-columns: repeat(2, 1fr); } }

.mod-tier-list, .mod-topic-list, .mod-reply-list, .mod-search-results {
  list-style: none; margin: 0; padding: 0;
}
.mod-tier-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--border, #d8d5cd);
  border-radius: 10px; margin-bottom: 8px;
  background: var(--bg, #fbfaf6);
}
.mod-tier-row .av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mod-tier-row span.av {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface, #f3efe4); color: var(--text, #2b261d);
  font-weight: 700; text-transform: uppercase;
  width: 36px; height: 36px; border-radius: 50%;
}
.mod-tier-meta { display: flex; flex-direction: column; gap: 2px; }
.mod-tier-meta a { color: var(--text, #2b261d); text-decoration: none; }
.mod-tier-meta a:hover { text-decoration: underline; }
.mod-tier-meta small { color: var(--muted, #6c655a); }
.mod-tier-list-rooms .mod-tier-row { padding: 8px 14px; }

.mod-topic-row {
  display: flex; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border, #d8d5cd);
  border-radius: 10px; margin-bottom: 8px;
  background: var(--bg, #fbfaf6);
}
.mod-topic-row.is-pinned {
  background: var(--surface, #f3efe4);
  border-color: var(--accent-sage, #98a98c);
}
.mod-topic-row .av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mod-topic-row span.av {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface, #f3efe4); color: var(--text, #2b261d);
  font-weight: 700; text-transform: uppercase;
  width: 32px; height: 32px; border-radius: 50%;
}
.mod-topic-body { flex: 1; min-width: 0; }
.mod-topic-title {
  display: block; font-family: Lora, serif; font-weight: 600;
  color: var(--text, #2b261d); text-decoration: none;
  font-size: 16px; margin-bottom: 4px;
}
.mod-topic-title:hover { text-decoration: underline; }
.mod-topic-pin {
  display: inline-block; font-family: 'Source Sans 3', sans-serif;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  background: var(--accent-clay, #c97f5a); color: #fff;
  padding: 1px 6px; border-radius: 4px; vertical-align: middle;
  margin-right: 6px;
}
.mod-topic-meta { color: var(--muted, #6c655a); font-size: 13px; }
.mod-topic-meta a { color: var(--muted, #6c655a); }

.mod-topic-detail {
  border: 1px solid var(--border, #d8d5cd); border-radius: 12px;
  padding: 20px 24px; background: var(--bg, #fbfaf6); margin: 12px 0 24px;
}
.mod-topic-detail-head h1 { margin: 0 0 8px; font-family: Lora, serif; font-size: 24px; }
.mod-topic-detail-meta { display: flex; align-items: center; gap: 8px; color: var(--muted, #6c655a); }
.mod-topic-detail-meta .av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.mod-topic-detail-meta span.av {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface, #f3efe4); color: var(--text, #2b261d);
  font-weight: 700; text-transform: uppercase;
  width: 28px; height: 28px; border-radius: 50%;
}
.mod-topic-detail-body { margin: 16px 0; line-height: 1.55; }
.mod-topic-detail-body p { margin: 0 0 10px; }
.mod-topic-actions { display: flex; gap: 8px; margin-top: 16px; }

.mod-reply-list { margin-top: 8px; }
.mod-reply-row {
  display: flex; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border, #d8d5cd); border-radius: 10px;
  margin-bottom: 8px; background: var(--bg, #fbfaf6);
}
.mod-reply-row .av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mod-reply-row span.av {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface, #f3efe4); color: var(--text, #2b261d);
  font-weight: 700; text-transform: uppercase;
  width: 28px; height: 28px; border-radius: 50%;
}
.mod-reply-meta { display: flex; gap: 8px; align-items: baseline; }
.mod-reply-meta a { color: var(--text, #2b261d); text-decoration: none; }
.mod-reply-text { margin-top: 4px; line-height: 1.5; }
.mod-reply-text p { margin: 0 0 6px; }

.mod-reply-compose, .mod-topic-compose { margin-top: 24px; }
.mod-reply-form textarea, .mod-topic-form textarea, .mod-topic-form input[type=text] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border, #d8d5cd);
  background: var(--bg, #fbfaf6); border-radius: 8px;
  font-family: inherit; font-size: 14px; box-sizing: border-box;
}
.mod-reply-form label, .mod-topic-form label {
  display: block; font-weight: 600; margin: 12px 0 6px;
}
.mod-reply-form-actions, .mod-topic-form-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px;
}

.mod-submod-form {
  display: grid; grid-template-columns: 1fr 280px auto; gap: 16px;
  align-items: end; padding: 16px;
  border: 1px solid var(--border, #d8d5cd);
  background: var(--surface, #f3efe4); border-radius: 10px;
}
@media (max-width: 760px) { .mod-submod-form { grid-template-columns: 1fr; } }
.mod-submod-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.mod-submod-form input[type=search], .mod-submod-form select {
  width: 100%; padding: 9px 12px; box-sizing: border-box;
  border: 1px solid var(--border, #d8d5cd);
  background: var(--bg, #fbfaf6); border-radius: 8px;
  font-family: inherit; font-size: 14px;
}
.mod-submod-results {
  margin-top: 8px; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--border, #d8d5cd); border-radius: 8px;
  background: var(--bg, #fbfaf6);
}
.mod-search-empty { padding: 10px 12px; }
.mod-search-results { padding: 0; }
.mod-search-result { border-bottom: 1px solid var(--border, #d8d5cd); }
.mod-search-result:last-child { border-bottom: none; }
.mod-search-result label {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; cursor: pointer; margin: 0;
}
.mod-search-result label:hover { background: var(--surface, #f3efe4); }
.mod-search-result .av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.mod-search-result span.av {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface, #f3efe4); color: var(--text, #2b261d);
  font-weight: 700; text-transform: uppercase;
  width: 28px; height: 28px; border-radius: 50%;
}
.mod-search-name { display: flex; flex-direction: column; }
.mod-search-name small { color: var(--muted, #6c655a); font-size: 12px; }

.flash-ok {
  padding: 10px 14px; border-radius: 8px;
  background: #e6efe1; color: #324a28;
  border: 1px solid #b9d2ad; margin: 10px 0;
}
.flash-error {
  padding: 10px 14px; border-radius: 8px;
  background: #f7e1de; color: #6b2a23;
  border: 1px solid #e3b5af; margin: 10px 0;
}

/* === REGISTRATION === */
/* Multi-step onboarding shell. One card centred on a calm surface,
   progress bar, and a chip-based form vocabulary that matches the iOS
   onboarding screens. Tokens come from forum.css (Cream theme). */

.reg-shell {
  max-width: 720px;
  margin: 32px auto 80px;
  padding: 0 4px;
}
.reg-card {
  padding: 28px 32px 32px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.reg-card--wide { max-width: none; }
.reg-card--celebrate { text-align: center; }
.reg-card--celebrate .reg-checklist { text-align: left; max-width: 360px; margin: 16px auto 24px; }

.reg-title {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
}
.reg-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 56ch;
}
.reg-foot {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.reg-error {
  background: rgba(220, 50, 50, 0.08);
  border: 1px solid rgba(220, 50, 50, 0.28);
  color: #8b1d1d;
  padding: 10px 14px;
  border-radius: var(--r-ctrl);
  font-size: 14px;
  margin: 0 0 18px;
}

/* Progress: a short headline + a thin bar. */
.reg-progress { margin-bottom: 14px; }
.reg-progress span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.reg-bar {
  height: 4px;
  background: var(--surface-sunken);
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.reg-bar-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* Form vocabulary */
.reg-form { display: flex; flex-direction: column; gap: 16px; }
.reg-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.reg-form input[type="email"],
.reg-form input[type="password"],
.reg-form input[type="text"],
.reg-form input[type="date"],
.reg-form input[type="number"] {
  font-family: var(--sans);
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctrl);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}
.reg-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(80, 110, 160, 0.16);
}
.reg-field {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reg-field legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  padding: 0;
  margin-bottom: 4px;
}
.reg-help {
  color: var(--muted);
  font-size: 13px;
  margin: -2px 0 6px;
}

/* Chips (radio + checkbox) */
.reg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.reg-chips--column { flex-direction: column; align-items: stretch; }
.reg-chips--wrap { flex-wrap: wrap; }
.reg-chip {
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.reg-chip input { position: absolute; opacity: 0; pointer-events: none; }
.reg-chip:hover { border-color: var(--primary); }
.reg-chip:has(input:checked) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.reg-chip--wide {
  border-radius: var(--r-ctrl);
  padding: 12px 16px;
  font-size: 15px;
  display: flex;
  align-items: flex-start;
  width: 100%;
  text-align: left;
}
.reg-chip--multiline { flex-direction: column; align-items: flex-start; gap: 4px; }
.reg-chip-title { font-weight: 600; font-size: 15px; }
.reg-chip-subtitle { font-size: 13px; opacity: 0.85; }

/* Identity age range row */
.reg-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.reg-range label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

/* Quiz */
.reg-quiz-q {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 16px;
  background: var(--bg);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reg-quiz-q legend {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  padding: 0 4px;
  color: var(--text);
}

/* Interests */
.reg-counter {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}
.reg-counter--ok { color: var(--primary); }
.reg-int-cat {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reg-int-cat legend {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

/* Avatar picker */
.reg-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  padding: 4px 0 8px;
}
.reg-avatar-tile {
  position: relative;
  display: block;
  border: 2px solid var(--border);
  border-radius: var(--r-ctrl);
  overflow: hidden;
  background: var(--surface-sunken);
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}
.reg-avatar-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}
.reg-avatar-tile input { position: absolute; opacity: 0; pointer-events: none; }
.reg-avatar-tile:hover { border-color: var(--primary); }
.reg-avatar-tile:has(input:checked) {
  border-color: var(--primary);
  transform: scale(0.97);
  box-shadow: 0 0 0 3px rgba(80, 110, 160, 0.22);
}

/* Reveal days row hidden when policy != after_days */
.reg-days { margin-top: 6px; }

/* Actions */
.reg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.reg-actions--split { justify-content: space-between; }
.reg-primary,
.reg-secondary {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--r-ctrl);
  border: 1px solid var(--primary);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 120ms ease, color 120ms ease;
}
.reg-primary {
  background: var(--primary);
  color: #fff;
}
.reg-primary:hover { filter: brightness(1.05); }
.reg-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.reg-secondary {
  background: transparent;
  color: var(--primary);
}
.reg-secondary:hover {
  background: rgba(80, 110, 160, 0.06);
}

.reg-checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
}
.reg-checklist li {
  padding-left: 24px;
  position: relative;
}
.reg-checklist li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
  position: absolute;
  left: 0;
}

@media (max-width: 560px) {
  .reg-shell { margin: 16px auto 60px; }
  .reg-card { padding: 22px 18px 26px; }
  .reg-title { font-size: 24px; }
  .reg-range { grid-template-columns: 1fr; }
}
