:root {
    --sea-dark: #23281C;
    --sea-mid: #333B24;
    --sand: #C7B98C;
    --sand-pale: #EDE6D0;
    --steel: #8B8D7C;
    --flare: #8A6D3A;
    --flare-bright: #A5824A;
    --paper: #F3EFE3;
    --ink: #23241C;
    --ink-soft: #45473A;

    --font-display: 'Oswald', sans-serif;
    --font-body: 'Source Serif 4', serif;
    --font-mono: 'Oswald', sans-serif;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
  }

  a { color: inherit; }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  .btn {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.95rem;
    padding: 0.9rem 2rem;
    border-radius: 2px;
    text-decoration: none;
    border: 2px solid transparent;
    transition: transform 0.15s ease, background 0.15s ease;
  }

  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .btn:focus-visible { outline: 3px solid var(--flare-bright); outline-offset: 3px; }

  .btn-primary {
    background: var(--flare);
    color: var(--sand-pale);
  }
  .btn-primary:hover { background: var(--flare-bright); }

  .btn-outline {
    background: transparent;
    border-color: var(--sand-pale);
    color: var(--sand-pale);
  }
  .btn-outline:hover { background: rgba(237,228,204,0.1); }

  .btn-outline-dark {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
  }
  .btn-outline-dark:hover { background: rgba(22,35,42,0.06); }

  /* ---------- Tideline divider (signature element) ---------- */
  .tideline {
    position: relative;
    height: 64px;
    background: var(--paper);
    overflow: hidden;
  }
  .tideline svg { display: block; width: 100%; height: 100%; }
  .tideline-label {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    opacity: 0.6;
    top: 50%;
    transform: translateY(-50%);
  }
  .tideline-label.left { left: 6%; }
  .tideline-label.right { right: 6%; }

  /* ---------- Hero ---------- */
  .hero {
    background: linear-gradient(180deg, var(--sea-dark) 0%, var(--sea-mid) 100%);
    color: var(--sand-pale);
    padding: 5rem 1.5rem 6rem;
  }
  .hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
  }
  .hero .eyebrow { color: var(--sand); margin-bottom: 1.25rem; display: block; }
  .hero h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    line-height: 1.12;
    margin-bottom: 1.5rem;
  }
  .hero h1 .accent { color: var(--flare-bright); }
  .hero p.sub {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--sand-pale);
    opacity: 0.88;
    max-width: 560px;
    margin: 0 auto 2.5rem;
  }
  .hero .price-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--sand);
    opacity: 0.75;
    margin-top: 1rem;
  }

  .blurb-inner.blurb-split {
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3.5rem;
    text-align: left;
  }
  .blurb-text { flex: 1 1 420px; }
  .blurb-cover {
    flex: 0 0 260px;
    text-align: center;
  }
  .blurb-cover img {
    width: 100%;
    max-width: 260px;
    border-radius: 4px;
    box-shadow: 0 20px 45px rgba(35,40,28,0.35), 0 6px 14px rgba(35,40,28,0.25);
  }
  @media (max-width: 760px) {
    .blurb-inner.blurb-split {
      flex-direction: column;
      text-align: center;
    }
    .blurb-cover { flex: 0 0 auto; max-width: 220px; }
  }

  /* ---------- Blurb ---------- */
  .blurb {
    background: var(--paper);
    padding: 5rem 1.5rem;
  }
  .blurb-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
  }
  .blurb .eyebrow { margin-bottom: 1rem; display: block; }
  .blurb h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    margin-bottom: 1.5rem;
    color: var(--sea-dark);
  }
  .blurb p {
    font-size: 1.08rem;
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
  }
  .blurb .cta-row { margin-top: 2rem; }

  /* ---------- Forum teaser ---------- */
  .forum {
    background: var(--sand-pale);
    padding: 5rem 1.5rem;
    border-top: 1px solid rgba(22,35,42,0.08);
    border-bottom: 1px solid rgba(22,35,42,0.08);
  }
  .forum-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
  }
  .forum .eyebrow { color: var(--flare); margin-bottom: 1rem; display: block; }
  .forum h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    color: var(--sea-dark);
    margin-bottom: 1.25rem;
  }
  .forum p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin-bottom: 1rem;
  }
  .forum .fine-print {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
    opacity: 0.7;
    margin: 1.5rem 0 2rem;
  }

  /* ---------- Dossier / stats placeholder ---------- */
  .dossier {
    background: var(--sea-dark);
    color: var(--sand-pale);
    padding: 4rem 1.5rem;
  }
  .dossier-inner {
    max-width: 760px;
    margin: 0 auto;
  }
  .dossier .eyebrow { color: var(--sand); display: block; margin-bottom: 1rem; text-align: center; }
  .dossier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    border-top: 1px dashed rgba(217,203,168,0.35);
    padding-top: 2rem;
  }
  .dossier-stat {
    text-align: center;
    font-family: var(--font-mono);
  }
  .dossier-stat .value {
    font-size: 1.6rem;
    color: var(--flare-bright);
    letter-spacing: 0.02em;
  }
  .dossier-stat .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
    margin-top: 0.4rem;
  }

  /* ---------- Footer ---------- */
  footer {
    background: var(--sea-dark);
    color: var(--sand-pale);
    padding: 4rem 1.5rem 2.25rem;
  }
  .footer-inner {
    max-width: 900px;
    margin: 0 auto;
  }
  .footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(237,230,208,0.15);
    margin-bottom: 1.5rem;
  }
  .footer-brand { flex: 1 1 240px; max-width: 340px; }
  .footer-brand .footer-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--sand-pale);
    margin-bottom: 0.6rem;
  }
  .footer-brand .footer-tagline {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--sand);
    opacity: 0.8;
    line-height: 1.6;
  }
  .footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 0 0 auto;
  }
  .footer-links-col .footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--flare-bright);
    opacity: 0.9;
    margin-bottom: 0.3rem;
  }
  .footer-links-col a {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--sand-pale);
    opacity: 0.82;
    text-decoration: none;
  }
  .footer-links-col a:hover { opacity: 1; text-decoration: underline; }
  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--sand);
    opacity: 0.6;
  }
  @media (max-width: 560px) {
    .footer-top { flex-direction: column; gap: 2rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
  }

  @media (max-width: 600px) {
    .hero, .blurb, .forum, .dossier, footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
  }

/* ---------- Signup / entry page ---------- */
.entry-hero {
  background: linear-gradient(180deg, var(--sea-dark) 0%, var(--sea-mid) 100%);
  color: var(--sand-pale);
  padding: 4.5rem 1.5rem 4rem;
}
.entry-hero-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.entry-hero .eyebrow { color: var(--sand); display: block; margin-bottom: 1.25rem; }
.entry-hero .congrats {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #FFDA47;
  margin-bottom: 1rem;
}
.entry-hero h1 { font-size: clamp(1.5rem, 3.8vw, 2rem); line-height: 1.25; margin-bottom: 1.25rem; }
.entry-hero p { font-family: var(--font-body); font-size: 1.08rem; opacity: 0.9; max-width: 520px; margin: 0 auto 1rem; }
.entry-hero .rule-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(237,230,208,0.25);
  border-radius: 2px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--sand-pale);
  opacity: 0.85;
}

.form-section { background: var(--paper); padding: 4rem 1.5rem 5rem; }
.form-inner { max-width: 480px; margin: 0 auto; }
.form-inner .eyebrow { display: block; text-align: center; margin-bottom: 1rem; }
.form-inner h2 { text-align: center; font-size: 1.6rem; color: var(--sea-dark); margin-bottom: 2rem; }

.field { margin-bottom: 1.5rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.field .hint {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 0.35rem;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(22,35,42,0.25);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--flare-bright);
  outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 160px; }

.checkbox-field { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.5rem; }
.checkbox-field input { margin-top: 0.3rem; }
.checkbox-field label { font-family: var(--font-body); font-size: 0.92rem; color: var(--ink-soft); text-transform: none; letter-spacing: normal; }

.optional-block {
  border-top: 1px dashed rgba(22,35,42,0.2);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}
.optional-block .block-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.submit-row { margin-top: 2rem; text-align: center; }
.submit-row button {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 0.9rem 2.5rem;
  border-radius: 2px;
  border: none;
  background: var(--flare);
  color: var(--sand-pale);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.submit-row button:hover { background: var(--flare-bright); transform: translateY(-2px); }
.submit-row button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.status-msg { text-align: center; font-family: var(--font-mono); font-size: 0.85rem; margin-top: 1rem; min-height: 1.2rem; }
.status-msg.error { color: #A03A2A; }
.status-msg.success { color: #3A6B3E; }

/* ---------- One-time counter correction ---------- */
.correction-box {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed rgba(22,35,42,0.25);
  border-radius: 2px;
  text-align: left;
}
.correction-box p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.correction-box .correction-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.correction-box input[type="number"] {
  width: 80px;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(22,35,42,0.25);
  border-radius: 2px;
}
.correction-box button {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.correction-box button:hover { background: rgba(22,35,42,0.06); }
.correction-box button:disabled { opacity: 0.5; cursor: not-allowed; }
.correction-note { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); opacity: 0.75; margin-top: 0.6rem; }

/* ---------- Story / About page ---------- */
.story-hero {
  background: linear-gradient(180deg, var(--sea-dark) 0%, var(--sea-mid) 100%);
  color: var(--sand-pale);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}
.story-hero .eyebrow { color: var(--sand); display: block; margin-bottom: 1rem; }
.story-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); }

.story-content {
  background: var(--paper);
  padding: 4rem 1.5rem 3rem;
}
.story-content-inner {
  max-width: 640px;
  margin: 0 auto;
}
.story-content-inner p {
  font-family: var(--font-body);
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  text-align: left;
}
.story-back-link {
  display: block;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 1rem;
}

/* ---------- Profile page ---------- */
.profile-hero {
  background: linear-gradient(180deg, var(--sea-dark) 0%, var(--sea-mid) 100%);
  color: var(--sand-pale);
  padding: 6rem 1.5rem 3rem;
  text-align: center;
}
.profile-hero-wrap { position: relative; }
.sky-band {
  height: 96px;
  background: linear-gradient(180deg, #BFD8F5 0%, #C3D6F5 100%);
}
.avatar-hero {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 112px;
  height: 112px;
  border: 4px solid var(--sea-mid);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  z-index: 2;
}
.avatar-hero.avatar-initial { font-size: 2.6rem; }
.profile-hero .eyebrow { color: var(--sand); display: block; margin-bottom: 0.75rem; }
.profile-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); margin-bottom: 0.5rem; }
.profile-hero .founding-tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea-dark);
  background: var(--flare-bright);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}

.counter-block {
  background: var(--paper);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}
.counter-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  color: var(--flare);
  line-height: 1;
}
.counter-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}
.quit-attempt-line {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

.profile-section {
  background: var(--paper);
  padding: 1.5rem 1.5rem 3rem;
}
.profile-section-inner {
  max-width: 700px;
  margin: 0 auto;
}
.profile-block {
  border-top: 1px dashed rgba(22,35,42,0.2);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}
.profile-block .block-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-bottom: 0.75rem;
}
.medal-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.medal-empty {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  opacity: 0.75;
  font-style: italic;
}
.bio-text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.profile-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.profile-actions a, .profile-actions button {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  text-decoration: underline;
}

/* ---------- Forum: thread list & thread view ---------- */
.forum-page-hero {
  background: linear-gradient(180deg, var(--sea-dark) 0%, var(--sea-mid) 100%);
  color: var(--sand-pale);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.forum-page-hero .eyebrow { color: var(--sand); display: block; margin-bottom: 0.5rem; }
.forum-page-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); }

.forum-body { background: var(--paper); padding: 2.5rem 1.5rem 4rem; }
.forum-body-inner { max-width: 900px; margin: 0 auto; }

.new-thread-toggle {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
  padding: 0.85rem;
  border: none;
  border-radius: 2px;
  background: var(--flare);
  color: var(--sand-pale);
  cursor: pointer;
  margin-bottom: 2rem;
}
.new-thread-toggle:hover { background: var(--flare-bright); }

.new-thread-form {
  display: none;
  border: 1px solid rgba(22,35,42,0.15);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #fff;
}

.thread-list-item {
  display: block;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(22,35,42,0.12);
  text-decoration: none;
  color: var(--ink);
}
.thread-list-item .thread-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.thread-list-item .thread-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.75;
}
.thread-list-empty {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  padding: 2rem 0;
}

.thread-view-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--sea-dark);
  margin-bottom: 0.5rem;
}
.post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(22,35,42,0.12);
}
.post-author {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--flare);
  margin-bottom: 0.4rem;
}
.post-body {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
}
.back-link-row { margin-bottom: 1.5rem; }
.back-link-row a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: underline;
}

/* ---------- Masthead (author welcome, pinned) ---------- */
.masthead {
  background: #fff;
  border: 1px solid rgba(22,35,42,0.15);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.masthead img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.masthead-body { flex: 1; }
.masthead-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--sea-dark);
  margin-bottom: 0.15rem;
}
.masthead-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--flare);
  margin-bottom: 0.6rem;
}
.masthead-message {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Club theme: bright sky blue, golden yellow, white 3D cards ---------- */
body.club-theme {
  --sea-dark: #1B3A78;
  --sea-mid: #0F2456;
  --sand: #FFFFFF;
  --sand-pale: #FFFFFF;
  --flare: #F4B400;
  --flare-bright: #FFC933;
  --paper: transparent;
  --ink: #1E3A4F;
  --ink-soft: #3D5A70;
}

body.club-theme {
  background:
    radial-gradient(ellipse 900px 500px at 60% -5%, rgba(140,175,235,0.55) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 15% 30%, rgba(90,130,210,0.35) 0%, transparent 55%),
    radial-gradient(ellipse 1000px 700px at 50% 100%, #2A4F9E 0%, #1B3A78 60%, #14295E 100%);
  min-height: 100vh;
}

body.club-theme .hero,
body.club-theme .entry-hero,
body.club-theme .profile-hero,
body.club-theme .forum-page-hero:not(.banner-hero) {
  background: radial-gradient(ellipse 700px 400px at 50% -10%, rgba(220,232,255,0.35) 0%, transparent 60%), transparent;
}

/* Text sitting directly on the dark page background (not inside a card) needs light colour */
body.club-theme .back-link-row a,
body.club-theme .thread-list-empty,
body.club-theme .story-back-link {
  color: #DCE6F5;
}
body.club-theme .back-link-row a:hover { color: #fff; }

/* Sparkling gold — bright highlight, warm midtone, no muddiness */
body.club-theme .profile-hero h1 {
  background: linear-gradient(180deg,
    #FFF6D0 0%,
    #FFD558 12%,
    #E8A400 32%,
    #B87800 48%,
    #FFD558 60%,
    #E8A400 78%,
    #8A5C00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-text-stroke: 0.5px rgba(90,60,0,0.4);
  text-shadow:
    0 -1px 0 rgba(255,240,190,0.7),
    0 1px 1px rgba(0,0,0,0.15),
    0 0 8px rgba(255,190,60,0.5),
    0 0 20px rgba(240,170,40,0.35),
    0 3px 6px rgba(0,0,0,0.3);
  animation: namePlateGlow 3.5s ease-in-out infinite;
}

@keyframes namePlateGlow {
  0%, 100% {
    text-shadow:
      0 -1px 0 rgba(255,240,190,0.7),
      0 1px 1px rgba(0,0,0,0.15),
      0 0 8px rgba(255,190,60,0.5),
      0 0 20px rgba(240,170,40,0.35),
      0 3px 6px rgba(0,0,0,0.3);
  }
  50% {
    text-shadow:
      0 -1px 0 rgba(255,240,190,0.7),
      0 1px 1px rgba(0,0,0,0.15),
      0 0 12px rgba(255,190,60,0.65),
      0 0 28px rgba(240,170,40,0.5),
      0 3px 6px rgba(0,0,0,0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.club-theme .profile-hero h1 { animation: none; }
}

/* Mid-tone blue cards — the segue layer between dark background and white insets */
body.club-theme .masthead,
body.club-theme .new-thread-form,
body.club-theme .correction-box,
body.club-theme .counter-block,
body.club-theme .profile-section-inner,
body.club-theme .form-inner form,
body.club-theme .thread-list-item,
body.club-theme .post-item {
  background: linear-gradient(160deg, #C3D6F5 0%, #AEC5EE 100%);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.25);
}
body.club-theme .thread-list-item:hover {
  box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.3);
}

/* Bright white recessed windows — the counter and every text-entry box */
body.club-theme .recess-frame {
  padding: 4px;
  border-radius: 12px;
  box-shadow: inset 0 3px 8px rgba(10,15,30,0.4), inset 0 -1px 2px rgba(255,255,255,0.15);
}
body.club-theme .recess-frame.inline {
  display: inline-block;
}

.recess-frame textarea {
  min-height: 160px;
  width: 100%;
  resize: vertical;
}

body.club-theme .counter-number {
  display: inline-block;
  background: #FFFFFF;
  padding: 0.4rem 1.8rem;
  border-radius: 8px;
  border: 1px solid rgba(10,15,25,0.55);
}

body.club-theme .field input[type="text"],
body.club-theme .field input[type="email"],
body.club-theme .field input[type="password"],
body.club-theme .field input[type="number"],
body.club-theme .field textarea,
body.club-theme #bio-edit {
  display: block;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid rgba(10,15,25,0.5);
  border-radius: 8px;
  resize: none;
}

body.club-theme .correction-box input {
  display: block;
  width: 70px;
  background: #FFFFFF;
  border: 1px solid rgba(10,15,25,0.5);
  border-radius: 8px;
}

body.club-theme #avatar-initials {
  width: 80px;
}

body.club-theme .hero,
body.club-theme .entry-hero,
body.club-theme .profile-hero,
body.club-theme .forum-page-hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.35), transparent 55%),
    linear-gradient(180deg, var(--sea-dark) 0%, var(--sea-mid) 100%);
}

body.club-theme .entry-hero .rule-box {
  border-color: rgba(255,255,255,0.45);
}

body.club-theme .founding-tag {
  color: #1E3A4F;
}

body.club-theme .profile-hero h1 {
  text-shadow: 0 3px 6px rgba(0,0,0,0.45), 0 8px 20px rgba(0,0,0,0.3);
}

body.club-theme .profile-block {
  border-left: 3px solid transparent;
  padding-left: 1rem;
}
body.club-theme .profile-block:nth-of-type(1) { border-left-color: #2FA6A0; }
body.club-theme .profile-block:nth-of-type(2) { border-left-color: #8B6FD1; }
body.club-theme .profile-block:nth-of-type(3) { border-left-color: #E8735C; }
body.club-theme .profile-block:nth-of-type(1) .block-title,
body.club-theme .profile-block:nth-of-type(2) .block-title,
body.club-theme .profile-block:nth-of-type(3) .block-title {
  display: inline-block;
  color: #fff;
  opacity: 1;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.72rem;
}
body.club-theme .profile-block:nth-of-type(1) .block-title { background: #2FA6A0; }
body.club-theme .profile-block:nth-of-type(2) .block-title { background: #8B6FD1; }
body.club-theme .profile-block:nth-of-type(3) .block-title { background: #E8735C; }

body.club-theme .thread-list-item,
body.club-theme .post-item {
  border-top: 4px solid #F4B400;
}
body.club-theme .thread-list-item:nth-child(8n+2), body.club-theme .post-item:nth-child(8n+2) { border-top-color: #2FA6A0; }
body.club-theme .thread-list-item:nth-child(8n+3), body.club-theme .post-item:nth-child(8n+3) { border-top-color: #8B6FD1; }
body.club-theme .thread-list-item:nth-child(8n+4), body.club-theme .post-item:nth-child(8n+4) { border-top-color: #E8735C; }
body.club-theme .thread-list-item:nth-child(8n+5), body.club-theme .post-item:nth-child(8n+5) { border-top-color: #5AA9E6; }

body.club-theme .forum-page-hero h1 {
  color: var(--flare);
  text-shadow: 0 3px 6px rgba(0,0,0,0.55), 0 10px 28px rgba(0,0,0,0.4);
}

/* Gold buttons need dark text, not the light hero text colour */
body.club-theme .btn-primary,
body.club-theme .new-thread-toggle,
body.club-theme .submit-row button {
  color: #1E3A4F;
  border-radius: 8px;
  box-shadow: 0 4px 0 #B8830A, 0 6px 14px rgba(30,58,79,0.25);
}
body.club-theme .btn-primary:active,
body.club-theme .new-thread-toggle:active,
body.club-theme .submit-row button:active {
  box-shadow: 0 2px 0 #B8830A, 0 3px 8px rgba(30,58,79,0.2);
  transform: translateY(2px);
}

body.club-theme .form-inner form { padding: 2rem; }
body.club-theme .counter-block { max-width: 700px; margin: 2rem auto 0; }
body.club-theme .profile-section-inner { padding: 2rem; }

body.club-theme .thread-list-item,
body.club-theme .post-item {
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  border-bottom: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
body.club-theme .thread-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(30,58,79,0.2);
}

body.club-theme .field input,
body.club-theme .field textarea,
body.club-theme .correction-box input {
  border-radius: 8px;
}


/* ---------- Persistent club nav bar ---------- */
.club-nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(30,58,79,0.08);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.club-nav .nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: #1E3A4F;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.club-nav .nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.club-nav .nav-links a, .club-nav .nav-links button {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3D5A70;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.club-nav .nav-links a:hover, .club-nav .nav-links button:hover { color: #1E3A4F; }

.club-nav .nav-links a.nav-active {
  color: #1E3A4F;
  position: relative;
  padding-bottom: 4px;
}
.club-nav .nav-links a.nav-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: #F4B400;
  border-radius: 1px;
}

.nav-profile-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  color: #1E3A4F;
  background: #F4B400;
  vertical-align: middle;
  object-fit: cover;
}

/* ---------- Initials avatar (default, no photo uploaded) ---------- */
.avatar-initial {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #1E3A4F;
  background: #F4B400;
  flex-shrink: 0;
}

/* ---------- Thread list meta (reply count, activity) ---------- */
.thread-list-item .thread-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.thread-reply-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #3D5A70;
  background: #EAF6FF;
  border-radius: 20px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

/* ---------- Forum banner hero (D-Day image) ---------- */
body.club-theme .forum-page-hero.banner-hero {
  background-image: url('off-the-beach-banner-mobile.jpg');
  background-size: cover;
  background-position: center 40%;
  height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
@media (min-width: 700px) {
  body.club-theme .forum-page-hero.banner-hero {
    background-image: url('off-the-beach-banner.jpg');
    height: 340px;
  }
}
.forum-page-hero.banner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,20,30,0.1) 0%, rgba(10,20,30,0.45) 100%);
}
.forum-page-hero.banner-hero .hero-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.forum-page-hero.banner-hero .hero-banner-content .eyebrow {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  opacity: 0.9;
}
.forum-page-hero.banner-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  color: var(--flare);
  text-shadow: 0 3px 6px rgba(0,0,0,0.55), 0 10px 28px rgba(0,0,0,0.4);
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---------- Avatar colour picker ---------- */
.avatar-preview-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.swatch-picker {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  padding: 0;
  transition: transform 0.12s ease;
}
.swatch:hover { transform: scale(1.12); }
.swatch.selected {
  border-color: #1E3A4F;
}

/* ---------- Medal badges ---------- */
.medal-badge-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.75rem 0.75rem 0;
}
.medal-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
}
.medal-badge.bronze {
  background: radial-gradient(circle at 35% 30%, #E3A467, #8B5A2B 70%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -3px 6px rgba(0,0,0,0.35), 0 3px 6px rgba(0,0,0,0.3);
}
.medal-badge.silver {
  background: radial-gradient(circle at 35% 30%, #F2F2F2, #A0A0A0 70%);
  color: #333;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.7), inset 0 -3px 6px rgba(0,0,0,0.25), 0 3px 6px rgba(0,0,0,0.25);
}
.medal-badge.gold {
  background: radial-gradient(circle at 35% 30%, #FFE9A0, #C98A00 70%);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), inset 0 -3px 6px rgba(0,0,0,0.3), 0 3px 8px rgba(0,0,0,0.35);
}
.medal-badge.tarnished {
  filter: grayscale(0.75) brightness(0.8);
}
.medal-caption {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
}

/* ---------- Moderation ---------- */
.report-link {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0.75;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 0.5rem;
  margin-right: 1.1rem;
}
.report-link:hover { opacity: 1; text-decoration: underline; }

.mod-report-item {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px rgba(30,58,79,0.15);
}
.mod-report-meta {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-bottom: 0.5rem;
}
.mod-report-body {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  background: rgba(30,58,79,0.05);
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
}
.mod-report-reason {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 0.75rem;
}
.mod-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.mod-actions button {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.mod-actions button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.mod-actions button:active { transform: translateY(0); filter: brightness(0.95); }
.mod-warn-btn { background: #E8B020; color: #1E3A4F; }
.mod-close-btn { background: #C0392B; color: #fff; }
.mod-dismiss-btn { background: rgba(30,58,79,0.1); color: var(--ink); }

.account-closed-notice {
  max-width: 480px;
  margin: 4rem auto;
  text-align: center;
  padding: 2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ---------- Online status dot ---------- */
.avatar-initial { position: relative; }
.online-dot {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3DDC84;
  border: 2px solid #fff;
  bottom: -2px;
  right: -2px;
}
.masthead img { position: relative; }
.masthead-photo-wrap { position: relative; display: inline-block; }
.masthead-photo-wrap .online-dot { bottom: 2px; right: 2px; }

/* ---------- Avatar photo upload ---------- */
.avatar-photo {
  border-radius: 50%;
  object-fit: cover;
}
.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}
.avatar-upload-row label.upload-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: #DCE6F5;
  text-decoration: underline;
}
.avatar-upload-row input[type="file"] { display: none; }

/* ---------- Messaging ---------- */
.message-link {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--flare);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 1rem;
}
.message-link:hover { text-decoration: underline; }

.conversation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}
.conversation-item .unread-badge {
  background: #C0392B;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  margin-left: auto;
}
.conversation-preview {
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.8;
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.message-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.98rem;
  white-space: pre-wrap;
}
.message-bubble.mine {
  background: var(--flare);
  color: #1E3A4F;
  margin-left: auto;
}
.message-bubble.theirs {
  background: #fff;
  color: var(--ink);
}
.message-bubble .msg-time {
  display: block;
  font-size: 0.7rem;
  opacity: 0.65;
  margin-top: 0.3rem;
}

.nav-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C0392B;
  margin-left: 4px;
}

/* ---------- Insights index list ---------- */
.insights-list {
  margin: 2rem 0;
}
.insight-list-item {
  display: block;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(22,35,42,0.12);
  text-decoration: none;
  color: var(--ink);
}
.insight-list-item:hover .insight-list-title {
  color: var(--flare);
}
.insight-list-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--sea-dark);
  margin-bottom: 0.4rem;
  transition: color 0.15s ease;
}
.insight-list-teaser {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* ---------- Persistent site nav (public pages) ---------- */
.site-nav {
  background: var(--sea-dark);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(237,230,208,0.12);
}
.site-nav .site-nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sand-pale);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav .site-nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-nav .site-nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sand-pale);
  opacity: 0.82;
  text-decoration: none;
}
.site-nav .site-nav-links a:hover { opacity: 1; }
.site-nav .site-nav-links a.site-nav-cta {
  background: var(--flare);
  color: var(--sand-pale);
  opacity: 1;
  padding: 0.5rem 1rem;
  border-radius: 2px;
  font-weight: 500;
}
.site-nav .site-nav-links a.site-nav-cta:hover { background: var(--flare-bright); }

@media (max-width: 640px) {
  .site-nav { padding: 0.75rem 1.25rem; }
  .site-nav .site-nav-links { gap: 1rem; }
  .site-nav .site-nav-links a.site-nav-cta { padding: 0.4rem 0.8rem; font-size: 0.72rem; }
}

/* ---------- Insights list: explicit read-more cue ---------- */
.insight-list-readmore {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--flare);
  margin-top: 0.6rem;
}
