/* ============================================================
   Chess Zine — editorial redesign layered over style.css.
   Loaded AFTER style.css in base.html so these rules win.
   Scoped mostly via `body.chesshome-zine` for high specificity
   without renaming any existing DOM classes.
   ============================================================ */

/* ------------------------------------------------------------
   1. Palette + tokens
   ------------------------------------------------------------ */
body.chesshome-zine {
  --ink:        #1a1512;
  --ink-soft:   #3a2f27;
  --ink-mute:   #6a5d52;
  --paper:      #f7f2e9;
  --paper-2:    #ede4d1;
  --paper-3:    #e2d6bc;
  --rule:       #b7ac93;
  --rule-soft:  #d8ceb6;
  --wood-a:     #8b5a2b;
  --wood-a-hi:  #a56b34;
  --wood-b:     #d9b98a;
  --forest:     #2a5f3a;
  --forest-hi:  #3a7a4c;
  --sienna:     #b45a2b;
  --sienna-hi:  #c96a37;
  --cream:      #fbf7ef;

  /* Rebind existing tokens so legacy components inherit the mood. */
  --bg:            var(--paper);
  --bg-elev:       var(--cream);
  --bg-elev-2:     var(--paper-2);
  --bg-hover:      var(--paper-2);
  --border:        var(--rule-soft);
  --border-strong: var(--rule);
  --text:          var(--ink);
  --text-soft:     var(--ink-soft);
  --text-muted:    var(--ink-mute);
  --link:          var(--forest);
  --link-hover:    var(--forest-hi);
  --accent:        var(--forest);
  --accent-hover:  var(--forest-hi);
  --accent-soft:   #e6ecd8;
  --accent-warm:   var(--wood-a);
  --accent-warm-soft: #f2e3cd;
  --shadow-1:      0 0 0 1px rgba(90,70,40,.04);
  --shadow-2:      0 6px 20px rgba(70,50,30,.10);
  --radius:        6px;
  --radius-sm:     4px;
}

/* ------------------------------------------------------------
   2. Typography — Fraunces (display) + Inter (body)
   ------------------------------------------------------------ */
body.chesshome-zine {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

body.chesshome-zine h1,
body.chesshome-zine h2,
body.chesshome-zine h3,
body.chesshome-zine .brand,
body.chesshome-zine .post-title,
body.chesshome-zine .card-title,
body.chesshome-zine .group-head-body h1,
body.chesshome-zine .club-card h3,
body.chesshome-zine .zine-headline,
body.chesshome-zine .zine-masthead-title {
  font-family: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 1;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

body.chesshome-zine h1 { font-size: 34px; line-height: 1.08; }
body.chesshome-zine h2 { font-size: 24px; line-height: 1.15; }
body.chesshome-zine h3 { font-size: 18px; line-height: 1.2; }

body.chesshome-zine p { text-wrap: pretty; }

/* Small-caps eyebrow labels */
body.chesshome-zine .zine-eyebrow,
body.chesshome-zine .zine-smallcaps {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mute);
  font-family: "Inter", sans-serif;
}

/* ------------------------------------------------------------
   3. Page background — laid-paper effect
   ------------------------------------------------------------ */
body.chesshome-zine {
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(217,185,138,.18), transparent 60%),
    radial-gradient(900px 700px at 100% 0%, rgba(139,90,43,.06), transparent 65%),
    var(--paper);
  background-attachment: fixed;
}

body.chesshome-zine::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(60,40,20,.020) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg,
      rgba(60,40,20,.020) 0 1px, transparent 1px 32px);
  mix-blend-mode: multiply;
  opacity: .55;
}
body.chesshome-zine > * { position: relative; z-index: 1; }

/* ------------------------------------------------------------
   4. Top navigation — chess-notebook bar
   ------------------------------------------------------------ */
body.chesshome-zine .site-header {
  background: rgba(247, 242, 233, 0.92);
  backdrop-filter: saturate(1.1) blur(6px);
  -webkit-backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--rule);
  box-shadow: none;
  height: 60px;
  padding: 0 32px;
}

body.chesshome-zine .brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.015em;
  gap: 12px;
}
body.chesshome-zine .brand-mark {
  background: transparent;
  color: var(--wood-a);
  width: 36px; height: 36px;
  font-size: 30px;
  border-radius: 0;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.05));
}
body.chesshome-zine .brand-text { font-family: "Fraunces", serif; }

body.chesshome-zine .site-nav { gap: 2px; }
body.chesshome-zine .site-nav a,
body.chesshome-zine .site-nav .nav-item {
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--ink-mute);
  border-bottom: 0;
  padding: 0 12px;
  position: relative;
}
body.chesshome-zine .site-nav a .nav-icon { display: none; }
body.chesshome-zine .site-nav a .nav-label { font-size: inherit; }
body.chesshome-zine .site-nav a:hover,
body.chesshome-zine .site-nav .nav-item:hover {
  color: var(--ink);
  background: transparent;
  border-bottom: 0;
}
body.chesshome-zine .site-nav a:not(.btn):hover::after,
body.chesshome-zine .site-nav a:not(.btn).active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 14px; height: 2px;
  background: var(--wood-a);
  border-radius: 2px;
}
body.chesshome-zine .site-nav a.active {
  color: var(--ink);
  border-bottom: 0;
}
body.chesshome-zine .site-nav a.btn,
body.chesshome-zine .site-nav a.btn-primary {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.06em;
}
body.chesshome-zine .site-nav a.btn:hover,
body.chesshome-zine .site-nav a.btn-primary:hover {
  color: var(--cream);
  text-decoration: none;
}
body.chesshome-zine .site-nav .nav-me { padding-right: 12px; }

/* Opening-move ribbon under the header */
body.chesshome-zine .zine-openingline {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-mute);
  padding: 6px 32px 8px;
  text-align: right;
  border-bottom: 1px solid var(--rule-soft);
  background: rgba(247, 242, 233, 0.7);
  letter-spacing: 0.02em;
}
body.chesshome-zine .zine-openingline::before {
  content: "study line — ";
  text-transform: uppercase;
  font-style: normal;
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-right: 6px;
  opacity: .65;
}

/* ------------------------------------------------------------
   5. Site main container — magazine width
   ------------------------------------------------------------ */
body.chesshome-zine .site-main {
  max-width: 1040px;
  margin: 32px auto 64px;
  padding: 0 24px;
}

/* ------------------------------------------------------------
   6. Layout: 2-column asymmetric magazine, kill LinkedIn 3-col
   ------------------------------------------------------------ */
body.chesshome-zine .li-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  justify-content: stretch;
  max-width: none;
}

/* Hide the old left rail entirely — its contents move into the masthead */
body.chesshome-zine .li-left { display: none; }

/* Main column */
body.chesshome-zine .li-center {
  min-width: 0;
  max-width: 640px;
}

/* Right rail */
body.chesshome-zine .li-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 92px;
}

@media (max-width: 1023px) {
  body.chesshome-zine .li-cols {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  body.chesshome-zine .li-right {
    position: static;
    display: flex;
  }
}

/* ------------------------------------------------------------
   7. Masthead (injected at top of main column)
   ------------------------------------------------------------ */
.zine-masthead {
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0 14px;
  margin-bottom: 24px;
  position: relative;
}
.zine-masthead .zine-eyebrow-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.zine-masthead-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 1;
  font-size: 54px;
  line-height: 1.0;
  margin: 0;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.zine-masthead-title .zine-flag {
  font-size: 32px;
  margin-left: 10px;
  vertical-align: 6px;
}
.zine-masthead-sub {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 55ch;
  text-wrap: pretty;
}
.zine-masthead-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: "Inter", sans-serif;
}
.zine-masthead-meta .dot { color: var(--rule); }
.zine-masthead-meta .zine-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px 4px;
  background: var(--paper-2);
  border-bottom: 2px solid var(--wood-b);
  border-radius: 2px 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Icon-only quick nav row inside masthead */
.zine-masthead-nav {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
}
.zine-masthead-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule-soft);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background .12s, border-color .12s, color .12s;
}
.zine-masthead-nav a:hover {
  background: var(--paper-2);
  border-color: var(--rule);
  color: var(--ink);
  text-decoration: none;
}
.zine-masthead-nav a .n {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: var(--wood-a);
  font-size: 11px;
}
.zine-masthead-nav .glyph {
  font-family: "Fraunces", serif;
  font-size: 15px;
  color: var(--wood-a);
}

/* Group logo + banner tucked into masthead */
.zine-masthead-hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.zine-masthead-hero .zine-logo {
  flex: 0 0 auto;
  width: 84px; height: 84px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: var(--cream);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", serif;
  font-size: 30px; font-weight: 600; color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 22px rgba(90,70,40,.08);
}
.zine-masthead-hero .zine-logo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.zine-masthead-hero .zine-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.zine-masthead-hero .zine-hero-body { flex: 1; min-width: 0; }

.zine-masthead-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}

/* Home feed masthead (no group) is more compact */
.zine-masthead.zine-masthead-home {
  padding-top: 22px;
}
.zine-masthead.zine-masthead-home .zine-masthead-title {
  font-size: 68px;
}

@media (max-width: 640px) {
  .zine-masthead-title { font-size: 40px; }
  .zine-masthead.zine-masthead-home .zine-masthead-title { font-size: 48px; }
  .zine-masthead-hero { flex-direction: column; }
  .zine-masthead-hero .zine-logo { width: 64px; height: 64px; font-size: 22px; }
}

/* ------------------------------------------------------------
   8. Composer — inline within masthead (no card chrome)
   ------------------------------------------------------------ */
body.chesshome-zine .composer {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
  box-shadow: none;
  padding: 14px 0;
  margin: 0 0 28px;
}
body.chesshome-zine .composer::before,
body.chesshome-zine .composer::after { display: none; }

body.chesshome-zine .composer .composer-cta,
body.chesshome-zine .composer > form > .composer-cta,
body.chesshome-zine .composer button.composer-cta {
  background: transparent;
  border: 0;
  padding: 4px 0 6px;
  color: var(--ink-mute);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 20px;
  display: flex; align-items: center; gap: 12px;
  cursor: text;
  width: 100%;
  text-align: left;
}
body.chesshome-zine .composer .composer-cta::before {
  content: "♟";
  font-style: normal;
  font-size: 22px;
  color: var(--wood-a);
}

/* Mode tabs = chapter markers */
body.chesshome-zine .composer-mode-tabs {
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--rule-soft);
  margin-top: 12px;
  padding-top: 12px;
  background: transparent;
  display: flex;
}
body.chesshome-zine .mode-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 6px 14px 8px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-mute);
  box-shadow: none;
}
body.chesshome-zine .mode-tab:hover { color: var(--ink); background: transparent; }
body.chesshome-zine .mode-tab.is-active {
  color: var(--ink);
  background: transparent;
  border-bottom-color: var(--wood-a);
  box-shadow: none;
}

body.chesshome-zine .composer textarea,
body.chesshome-zine .composer input[type="text"] {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
  padding: 8px 0;
  font-family: "Inter", sans-serif;
  font-size: 15.5px;
  color: var(--ink);
}
body.chesshome-zine .composer textarea:focus,
body.chesshome-zine .composer input[type="text"]:focus {
  outline: none;
  border-bottom-color: var(--wood-a);
  background: transparent;
  box-shadow: none;
}

/* ------------------------------------------------------------
   9. Posts → editorial journal entries (no card chrome)
   ------------------------------------------------------------ */
body.chesshome-zine .feed { background: transparent; }

body.chesshome-zine .post-card,
body.chesshome-zine article.post-card {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 28px 0 32px !important;
  margin: 0 !important;
  position: relative;
}
body.chesshome-zine .post-card::before,
body.chesshome-zine .post-card::after { display: none !important; }

/* Hairline separator + rotating chess-piece glyph between entries */
body.chesshome-zine .feed > .post-card + .post-card::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule);
  position: absolute;
  top: 0; left: 15%; right: 15%;
  display: block !important;
}
body.chesshome-zine .feed > .post-card + .post-card::after {
  display: block !important;
  content: "♟";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 12px;
  color: var(--wood-a);
  font-family: "Fraunces", serif;
  font-size: 20px;
  line-height: 1;
}
body.chesshome-zine .feed > .post-card:nth-of-type(6n+2) + .post-card::after { content: "♞"; }
body.chesshome-zine .feed > .post-card:nth-of-type(6n+3) + .post-card::after { content: "♝"; }
body.chesshome-zine .feed > .post-card:nth-of-type(6n+4) + .post-card::after { content: "♜"; }
body.chesshome-zine .feed > .post-card:nth-of-type(6n+5) + .post-card::after { content: "♛"; }
body.chesshome-zine .feed > .post-card:nth-of-type(6n) + .post-card::after { content: "♚"; }

/* Strip nested card chrome inside post cards */
body.chesshome-zine .post-card > *,
body.chesshome-zine .post-card .card,
body.chesshome-zine .post-card .card-body {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.chesshome-zine .post-card .card { border-radius: 0 !important; }

/* Post header — small-caps eyebrow */
body.chesshome-zine .post-card .post-head,
body.chesshome-zine .post-card .post-author-row,
body.chesshome-zine .post-card .post-meta {
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
}
body.chesshome-zine .post-card .post-head a,
body.chesshome-zine .post-card .post-author-row a,
body.chesshome-zine .post-card .post-meta a {
  color: var(--ink);
}

/* Post title in Fraunces */
body.chesshome-zine .post-card .post-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  color: var(--ink);
  margin: 6px 0 10px;
  text-wrap: balance;
}
body.chesshome-zine .post-card .post-title a { color: inherit; }
body.chesshome-zine .post-card .post-title a:hover { color: var(--forest); text-decoration: none; }

body.chesshome-zine .post-card .post-body,
body.chesshome-zine .post-card .post-body p {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Bot pill → serif italic tag */
body.chesshome-zine .post-card .bot-pill,
body.chesshome-zine .post-card .badge-bot,
body.chesshome-zine .post-card .pill-bot {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: var(--ink-mute) !important;
  font-family: "Fraunces", serif !important;
  font-style: italic !important;
  font-size: 12.5px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  box-shadow: none !important;
}
body.chesshome-zine .post-card .bot-pill::before,
body.chesshome-zine .post-card .badge-bot::before,
body.chesshome-zine .post-card .pill-bot::before {
  content: "(";
}
body.chesshome-zine .post-card .bot-pill::after,
body.chesshome-zine .post-card .badge-bot::after,
body.chesshome-zine .post-card .pill-bot::after {
  content: ")";
}

/* Country flag next to author — shrink */
body.chesshome-zine .post-card .country-badge,
body.chesshome-zine .post-card .country-flag {
  font-size: 12px !important;
}

/* Timestamps in italic serif */
body.chesshome-zine .post-card time,
body.chesshome-zine .post-card .post-time,
body.chesshome-zine .post-card .timestamp {
  font-family: "Fraunces", serif;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 400;
}

/* Reply / like counts — discreet at bottom */
body.chesshome-zine .post-card .post-stats {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  color: var(--ink-mute);
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  letter-spacing: 0.02em;
}

/* Action buttons hidden until hover */
body.chesshome-zine .post-card .post-actions {
  opacity: 0.25;
  transition: opacity .18s;
  border: 0;
  background: transparent;
  padding: 4px 0 0;
}
body.chesshome-zine .post-card:hover .post-actions,
body.chesshome-zine .post-card:focus-within .post-actions {
  opacity: 1;
}
body.chesshome-zine .post-card .post-actions button,
body.chesshome-zine .post-card .post-actions a {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-mute);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
body.chesshome-zine .post-card .post-actions button:hover,
body.chesshome-zine .post-card .post-actions a:hover {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--cream);
}

/* Empty feed message */
body.chesshome-zine .feed-empty {
  background: transparent;
  border: 1px dashed var(--rule);
  border-radius: 4px;
  padding: 22px;
  text-align: center;
  color: var(--ink-mute);
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 15.5px;
}

/* ------------------------------------------------------------
   10. Buttons + chips
   ------------------------------------------------------------ */
body.chesshome-zine .btn {
  border-radius: 999px;
  padding: 8px 18px;
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform .06s ease, background .12s, color .12s, border-color .12s;
}
body.chesshome-zine .btn:active { transform: translateY(1px); }

body.chesshome-zine .btn-primary {
  background: var(--wood-a);
  color: var(--cream);
  border-color: var(--wood-a);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.08);
}
body.chesshome-zine .btn-primary:hover {
  background: var(--wood-a-hi);
  border-color: var(--wood-a-hi);
  color: var(--cream);
}

body.chesshome-zine .btn-outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
body.chesshome-zine .btn-outline:hover {
  background: var(--accent-soft);
  color: var(--forest-hi);
  border-color: var(--forest-hi);
}

body.chesshome-zine .btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: transparent;
}
body.chesshome-zine .btn-ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
  border-color: transparent;
}

body.chesshome-zine .btn-sm { padding: 5px 12px; font-size: 11px; }
body.chesshome-zine .btn-lg { padding: 11px 24px; font-size: 13.5px; }

/* Chips — stamped ticket look */
body.chesshome-zine .chip {
  background: var(--cream);
  border: 1px solid var(--rule-soft);
  border-bottom: 2px solid var(--wood-b);
  border-radius: 2px 2px 0 0;
  color: var(--ink);
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.chesshome-zine .chip:hover {
  background: var(--paper-2);
  border-color: var(--rule);
  border-bottom-color: var(--wood-a);
  color: var(--ink);
  text-decoration: none;
}
body.chesshome-zine .chip-on {
  background: var(--wood-a);
  color: var(--cream);
  border-color: var(--wood-a);
  border-bottom-color: var(--wood-a-hi);
}

body.chesshome-zine .filter-bar {
  gap: 6px;
  padding: 12px 0 20px;
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 24px;
}

/* ------------------------------------------------------------
   11. Right rail — editorial section cards
   ------------------------------------------------------------ */
body.chesshome-zine .li-right .card {
  background: var(--cream);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(90,70,40,.03);
  overflow: hidden;
  margin-top: 0 !important;
}
body.chesshome-zine .li-right .card + .card { margin-top: 0 !important; }

body.chesshome-zine .li-right .card .card-body { padding: 14px 16px; }
body.chesshome-zine .li-right .card .card-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp";
}
body.chesshome-zine .li-right .card .card-title::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--rule-soft);
  margin-top: 8px;
  position: relative;
}
body.chesshome-zine .li-right .card .card-title {
  position: relative;
}
body.chesshome-zine .li-right .card .card-body > .card-title + * {
  margin-top: 6px;
}

/* Diamond divider between rail card head + body list */
body.chesshome-zine .li-right .card > .card-list {
  border-top: 0;
}
body.chesshome-zine .li-right .card-list li {
  border-top: 1px solid var(--rule-soft);
  padding: 10px 16px;
  font-size: 13.5px;
}
body.chesshome-zine .li-right .card-list li:first-child { border-top: 0; }
body.chesshome-zine .li-right .card-list li:hover { background: var(--paper-2); }
body.chesshome-zine .li-right .card-footer {
  border-top: 1px solid var(--rule-soft);
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
body.chesshome-zine .li-right .card-footer a { color: var(--forest); }

/* Members grid – floating avatars, no card frame */
body.chesshome-zine .li-right .member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
  padding: 6px 0 4px;
}
body.chesshome-zine .li-right .member-tile {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 4px 2px;
  color: var(--ink);
  border-radius: 4px;
}
body.chesshome-zine .li-right .member-tile:hover {
  background: var(--paper-2); text-decoration: none;
}
body.chesshome-zine .li-right .member-tile .avatar,
body.chesshome-zine .li-right .member-tile img.avatar {
  border-radius: 50%;
  border: 1px solid var(--rule-soft);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
body.chesshome-zine .li-right .member-tile-name {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
body.chesshome-zine .li-right .member-tile-role {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 10px;
  color: var(--wood-a);
}

/* Live analysis rooms — italic serif single-line */
body.chesshome-zine .li-right .card-list a {
  color: var(--ink);
}
body.chesshome-zine .li-right .card-list .room-line,
body.chesshome-zine .li-right .card-list a[href*="/room/"] {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink);
}
body.chesshome-zine .li-right .card-list a[href*="/room/"] span[style*="border-radius:50%"] {
  display: none !important;
}

/* Event date mini block */
body.chesshome-zine .event-date-mini {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: 4px;
  overflow: hidden;
}
body.chesshome-zine .event-date-mini .m {
  background: var(--wood-a);
  color: var(--cream);
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body.chesshome-zine .event-date-mini .d {
  font-family: "Fraunces", serif;
  color: var(--ink);
}

/* ------------------------------------------------------------
   12. Hide legacy group-head-card on zine club page
       (masthead replaces it — template controls visibility)
   ------------------------------------------------------------ */
body.chesshome-zine .li-center > .group-head-card { display: none; }

/* But keep it visible if the template opts in with .keep-legacy */
body.chesshome-zine .group-head-card.keep-legacy { display: block; }

/* ------------------------------------------------------------
   13. Clubs list grid — editorial tiles
   ------------------------------------------------------------ */
body.chesshome-zine .page-head {
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0 16px;
  margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px;
}
body.chesshome-zine .page-head h1 {
  font-size: 48px;
  margin: 0;
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 1;
  letter-spacing: -0.02em;
}
body.chesshome-zine .page-head p {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink-mute);
  font-size: 15px;
  margin-top: 4px !important;
}

body.chesshome-zine .club-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
body.chesshome-zine .club-card {
  background: var(--cream);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(90,70,40,.04);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
body.chesshome-zine .club-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(90,70,40,.10);
  border-color: var(--rule);
}
body.chesshome-zine .club-card h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 20px;
  margin: 8px 0 4px;
  color: var(--ink);
}
body.chesshome-zine .club-card p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
body.chesshome-zine .club-card-lang {
  background: var(--wood-a);
  color: var(--cream);
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 2px;
}
body.chesshome-zine .club-card-meta {
  color: var(--ink-mute);
  font-size: 12px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 8px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}
body.chesshome-zine .club-card-loc {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--ink-mute);
  font-size: 13px;
}

/* ------------------------------------------------------------
   14. Flashes + landing polish
   ------------------------------------------------------------ */
body.chesshome-zine .flash {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--wood-a);
  color: var(--ink);
  border-radius: 3px;
  font-family: "Fraunces", serif;
  font-size: 15px;
  padding: 10px 14px;
}
body.chesshome-zine .flash-success { border-left-color: var(--forest); }
body.chesshome-zine .flash-error,
body.chesshome-zine .flash-danger { border-left-color: #a4472b; }

/* Footer */
body.chesshome-zine .site-footer {
  margin-top: 80px;
  padding: 24px 32px;
  border-top: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-mute);
  font-family: "Fraunces", serif;
  font-style: italic;
  text-align: center;
  font-size: 14px;
}

/* ------------------------------------------------------------
   15. Profile / people / messages — light polish
   ------------------------------------------------------------ */
body.chesshome-zine .profile-card,
body.chesshome-zine .people-card,
body.chesshome-zine .thread-card,
body.chesshome-zine .inbox-card {
  background: var(--cream);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
}

body.chesshome-zine .thread-item,
body.chesshome-zine .inbox-item {
  border-bottom: 1px solid var(--rule-soft);
}

body.chesshome-zine .msg-bubble,
body.chesshome-zine .message-bubble {
  border-radius: 10px;
  border: 1px solid var(--rule-soft);
  background: var(--cream);
}
body.chesshome-zine .msg-bubble.mine,
body.chesshome-zine .message-bubble.mine {
  background: var(--accent-soft);
  border-color: var(--forest);
}

/* ------------------------------------------------------------
   16. Landing page hero polish
   ------------------------------------------------------------ */
body.chesshome-zine .landing-hero h1 {
  font-family: "Fraunces", serif;
  font-size: 64px;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
  letter-spacing: -0.03em;
}
body.chesshome-zine .landing-hero p {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------
   17. Group-head-body legacy: fold into masthead style if used
   ------------------------------------------------------------ */
body.chesshome-zine .group-head-body h1 {
  font-family: "Fraunces", serif;
  font-size: 44px;
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 1;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------
   18. Focus rings, links
   ------------------------------------------------------------ */
body.chesshome-zine a { color: var(--forest); }
body.chesshome-zine a:hover { color: var(--forest-hi); }

body.chesshome-zine :focus-visible {
  outline: 2px solid var(--wood-a);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   19. Utility helpers for templates
   ------------------------------------------------------------ */
.zine-only { display: none; }
body.chesshome-zine .zine-only { display: initial; }
body.chesshome-zine .zine-hide { display: none; }
.zine-rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 24px 0;
}
.zine-rule.ornament {
  height: 22px;
  background: none;
  text-align: center;
  color: var(--wood-a);
  font-family: "Fraunces", serif;
}
.zine-rule.ornament::before {
  content: "♦ ♦ ♦";
  letter-spacing: 12px;
  font-size: 12px;
}
