/* Chess Home – LinkedIn-inspired light theme. */

:root {
  /* Chessable-inspired: bright leaf-green primary on a clean off-white. */
  --bg:            #f5f7f4;
  --bg-elev:       #ffffff;
  --bg-elev-2:     #eef2ec;
  --bg-hover:      #edf1eb;
  --border:        #e2e6df;
  --border-strong: #b9c1b3;
  --text:          #1c221c;
  --text-soft:     #3d453b;
  --text-muted:    #7a8578;
  --link:          #3a8f3a;
  --link-hover:    #2c6d2c;
  --accent:        #4aa64a;   /* leaf green – primary */
  --accent-hover:  #3a8f3a;
  --accent-soft:   #e2f2df;
  --accent-text:   #ffffff;
  --accent-warm:   #b47324;   /* wood/board – secondary (chips) */
  --accent-warm-soft: #f7eadd;
  --success:       #3a8f3a;
  --danger:        #b53434;
  --info:          #4aa64a;
  --shadow-1:      0 0 0 1px rgba(20,30,20,.02), 0 1px 2px rgba(20,30,20,.06);
  --shadow-2:      0 0 0 1px rgba(20,30,20,.03), 0 3px 12px rgba(20,30,20,.08);
  --radius:        10px;
  --radius-sm:     6px;

  /* Board colors – matches Chessable's warm wood */
  --board-light:   #f0d9b5;
  --board-dark:    #b58863;
  --board-hl-from: #f7e987;
  --board-hl-to:   #f7e987;
  --board-dot:     rgba(45, 90, 40, .35);
  --board-cap-ring: rgba(180, 40, 40, .55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--link-hover); }

.muted { color: var(--text-muted); }
.soft  { color: var(--text-soft); }
.small { font-size: 12.5px; }
.accent { color: var(--accent); }
.hidden { display: none !important; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 52px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  box-shadow: var(--shadow-1);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 18px;
}

.site-nav { display: flex; align-items: center; gap: 4px; height: 100%; }
.site-nav a, .site-nav .nav-item {
  height: 100%;
  padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted);
  font-weight: 400; font-size: 13px;
  border-bottom: 2px solid transparent;
  transition: color .1s, border-color .1s;
}
.site-nav a:hover, .site-nav .nav-item:hover {
  color: var(--text); text-decoration: none;
  border-bottom-color: var(--text);
}
.site-nav a.active { color: var(--text); border-bottom-color: var(--text); }
.site-nav .nav-icon { font-size: 18px; line-height: 1; }
.site-nav .nav-label { font-size: 12px; }

/* Buttons in the nav (e.g. the "Join" CTA for signed-out users) should keep
   their own colors/padding instead of being overridden by the generic nav-link
   rule above. */
.site-nav a.btn {
  height: auto;
  padding: 6px 14px;
  border-bottom: none;
  font-weight: 600;
  margin-left: 6px;
}
.site-nav a.btn-primary { color: #fff; }
.site-nav a.btn-primary:hover { color: #fff; border-bottom: none; }
.site-nav a.btn-secondary { color: var(--text); }

.nav-me {
  flex-direction: column; gap: 2px !important;
  padding: 0 12px !important;
}
.nav-me .nav-label { font-size: 12px; }

.inline-form { display: inline; margin: 0; padding: 0; }
.link-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 0 12px; font: inherit; font-size: 13px;
}
.link-btn:hover { color: var(--text); text-decoration: underline; }

.site-main {
  max-width: 1128px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 20px; text-align: center; font-size: 12.5px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-soft);
  font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover {
  background: var(--bg-hover); text-decoration: none;
  border-color: var(--text); color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  padding: 6px 18px;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent-hover); color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; }
.btn-sm { padding: 4px 12px; font-size: 12.5px; }
.btn-lg { padding: 10px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- flash ---------- */
.flash-list { max-width: 1128px; margin: 12px auto 0; padding: 0 20px; }
.flash {
  padding: 10px 14px; border-radius: var(--radius);
  margin-bottom: 8px; background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.flash-error   { border-color: #eabdbd; background: #fbecec; color: #7d2222; }
.flash-success { border-color: #b7dcc3; background: #e9f6ee; color: #205839; }
.flash-info    { border-color: #b7cee0; background: #e9f2fa; color: #1a4569; }

/* ---------- hero / landing ---------- */
.hero { text-align: center; padding: 44px 16px 20px; }
.hero h1 { font-size: 44px; margin: 0 0 12px; letter-spacing: -0.02em; line-height: 1.1; }
.hero-sub { color: var(--text-soft); max-width: 620px; margin: 0 auto 26px; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.pitch {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; margin: 44px 0;
}
.pitch-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-1);
}
.pitch-card h3 { margin: 0 0 6px; color: var(--accent); font-size: 17px; }
.pitch-card p { margin: 0; color: var(--text-soft); }

.featured h2 { margin-bottom: 14px; }

/* ---------- avatars ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
  flex: 0 0 auto; user-select: none;
}
.avatar-24 { width: 24px; height: 24px; font-size: 10px; }
.avatar-28 { width: 28px; height: 28px; font-size: 11px; }
.avatar-32 { width: 32px; height: 32px; font-size: 12px; }
.avatar-40 { width: 40px; height: 40px; font-size: 14px; }
.avatar-48 { width: 48px; height: 48px; font-size: 16px; }
.avatar-56 { width: 56px; height: 56px; font-size: 20px; }
.avatar-72 { width: 72px; height: 72px; font-size: 26px; box-shadow: var(--shadow-1); border: 3px solid var(--bg-elev); }
.avatar-96 { width: 96px; height: 96px; font-size: 34px; box-shadow: var(--shadow-2); border: 4px solid var(--bg-elev); }
.avatar-160 { width: 160px; height: 160px; font-size: 56px; box-shadow: var(--shadow-2); border: 4px solid var(--bg-elev); }
.avatar-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

/* ---------- club/group cards / list ---------- */
.club-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.club-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; color: var(--text);
  display: block; transition: border-color .12s, box-shadow .15s;
  box-shadow: var(--shadow-1);
}
.club-card:hover {
  border-color: var(--border-strong); text-decoration: none;
  box-shadow: var(--shadow-2);
}
.club-card h3 { margin: 8px 0 6px; font-size: 16px; font-weight: 600; }
.club-card p { color: var(--text-soft); margin: 0 0 12px; font-size: 13.5px; }
.club-card-meta { color: var(--text-muted); font-size: 12.5px; display: flex; gap: 10px; align-items: center; }
.club-card-lang {
  display: inline-block; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 9px;
  background: var(--accent-warm-soft);
  border-radius: 999px; color: var(--accent-warm);
  font-weight: 600;
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 22px; }
.chip {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 13px; font-weight: 500;
}
.chip:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.chip-on { background: var(--text); color: #fff; border-color: var(--text); font-weight: 600; }

/* ---------- forms ---------- */
.form-narrow { max-width: 520px; margin: 0 auto; }

.btn-block { display: inline-flex; width: 100%; justify-content: center; }
.btn-secondary {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }

.sso-btn {
  gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.sso-mark {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 22px; padding: 0 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  background: #232f3e; color: #ff9900;
  border-radius: 4px;
}

.or-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 18px;
  color: var(--text-muted); font-size: 12px;
}
.or-sep::before, .or-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.stacked-form label {
  display: block; margin-bottom: 14px;
  color: var(--text-soft); font-size: 13px; font-weight: 600;
}
.stacked-form label small { color: var(--text-muted); font-weight: 400; }
.stacked-form input[type="text"],
.stacked-form input[type="email"],
.stacked-form input[type="password"],
.stacked-form textarea,
.stacked-form select {
  display: block; width: 100%;
  padding: 9px 12px; margin-top: 5px;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
}
.stacked-form input:focus, .stacked-form textarea:focus, .stacked-form select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.stacked-form textarea { min-height: 90px; font-family: inherit; resize: vertical; }
.stacked-form.small input, .stacked-form.small select { padding: 6px 10px; font-size: 13px; }

.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; margin-bottom: 16px; flex-wrap: wrap;
}
.page-head h1 { margin: 4px 0; letter-spacing: -0.01em; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 14px;
}
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }

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

/* =============== LinkedIn-style 3-column layout ================ */
.li-cols {
  display: grid;
  grid-template-columns: 240px minmax(0, 555px) 300px;
  gap: 24px;
  align-items: start;
  justify-content: center;
}
@media (max-width: 1100px) {
  .li-cols { grid-template-columns: 240px minmax(0, 1fr); }
  .li-right { display: none; }
}
@media (max-width: 780px) {
  .li-cols { grid-template-columns: 1fr; }
  .li-left { display: none; }
}

/* LinkedIn "card" */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.card + .card { margin-top: 8px; }
.card-body { padding: 12px 16px; }
.card-title {
  margin: 0; font-size: 14px; font-weight: 600; color: var(--text);
}
.card-list { list-style: none; padding: 0; margin: 0; }
.card-list li {
  padding: 8px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  border-top: 1px solid var(--border);
}
.card-list li:hover { background: var(--bg-hover); }
.card-list li:first-child { border-top: none; }
.card-list a { color: var(--text); display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.card-list a:hover { text-decoration: none; color: var(--link); }
.card-list .role { color: var(--text-muted); font-size: 12px; margin-left: auto; }

.card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}
.card-footer a { color: var(--text-muted); }
.card-footer a:hover { background: var(--bg-hover); color: var(--text); }

/* --- Left rail: mini profile card --- */
.me-card { text-align: center; padding-bottom: 12px; }
.me-cover {
  height: 56px;
  background: linear-gradient(135deg, #cbe4b8 0%, #7bb15a 55%, #3a7d33 100%);
}
.me-avatar-wrap {
  margin-top: -36px;
  display: flex; justify-content: center;
}
.me-name {
  font-size: 15px; font-weight: 600; margin: 10px 0 2px;
  color: var(--text);
}
.me-name a { color: inherit; }
.me-headline { color: var(--text-muted); font-size: 12.5px; padding: 0 12px; }
.me-stats {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border); margin-top: 12px;
}
.me-stats a {
  display: flex; justify-content: space-between;
  padding: 6px 16px; color: var(--text-muted);
  font-size: 12.5px;
}
.me-stats a:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.me-stats .stat-num { color: var(--accent); font-weight: 600; }

/* --- LinkedIn-style composer --- */
.li-composer { padding: 12px 16px 8px; }
.li-composer .composer-row { display: flex; gap: 8px; align-items: center; }
.li-composer .composer-trigger {
  flex: 1; text-align: left;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .1s;
}
.li-composer .composer-trigger:hover { background: var(--bg-hover); }
.li-composer-expanded { display: none; margin-top: 10px; }
.li-composer.expanded .li-composer-expanded { display: block; }
.li-composer.expanded .composer-trigger { display: none; }
.li-composer textarea {
  width: 100%; min-height: 100px; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; font-size: 15px;
  background: var(--bg-elev);
}
.li-composer textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.li-composer .headline-input {
  width: 100%; border: none; padding: 6px 0 10px;
  font: inherit; font-size: 15px; font-weight: 600;
  color: var(--text);
}
.li-composer .headline-input:focus { outline: none; }
.li-composer .composer-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; gap: 8px;
}
.li-composer .composer-hint { color: var(--text-muted); font-size: 12.5px; }
.li-composer-buttons { display: flex; gap: 6px; }

/* --- Post cards (LinkedIn feed style) --- */
.feed { display: flex; flex-direction: column; gap: 8px; }
.post-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.post-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px 6px;
}
.post-head .who { font-weight: 600; color: var(--text); font-size: 14px; line-height: 1.25; }
.post-head .who a { color: inherit; }
.post-head .headline { color: var(--text-muted); font-size: 12.5px; line-height: 1.35; }
.post-head .when { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.post-head .club-tag {
  display: inline-block;
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 2px;
}
.post-head .club-tag a { color: var(--accent); font-weight: 500; }

.post-title {
  padding: 0 16px; margin: 6px 0 4px;
  font-size: 15px; font-weight: 600; color: var(--text);
  line-height: 1.35;
}
.post-title a { color: inherit; }
.post-title a:hover { color: var(--accent); text-decoration: none; }

.post-body {
  padding: 0 16px 12px;
  white-space: pre-wrap;
  font-size: 14px; color: var(--text);
  line-height: 1.55;
}
.post-body.clamp {
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-see-more {
  padding: 0 16px 12px;
  color: var(--text-muted); font-size: 13px; cursor: pointer;
  background: none; border: none;
}
.post-see-more:hover { color: var(--text); text-decoration: underline; }

.post-stats {
  padding: 6px 16px;
  color: var(--text-muted); font-size: 12.5px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.post-stats .like-count { display: inline-flex; align-items: center; gap: 4px; }
.like-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}

.post-actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; padding: 4px 8px;
}
.post-actions .act {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 8px; border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600;
  transition: background .1s, color .1s;
}
.post-actions .act:hover { background: var(--bg-hover); color: var(--text); }
.post-actions .act.on { color: var(--accent); }
.post-actions .act.on:hover { color: var(--accent-hover); background: var(--accent-soft); }
.post-actions .act .icon { font-size: 16px; line-height: 1; }

/* Comments */
.comments {
  border-top: 1px solid var(--border);
  padding: 10px 16px 12px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 10px;
}
.comment-item { display: flex; gap: 8px; align-items: flex-start; }
.comment-bubble {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 12px;
  font-size: 13.5px; color: var(--text);
  white-space: pre-wrap; flex: 1; min-width: 0;
}
.comment-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 2px;
}
.comment-head .who { font-weight: 600; color: var(--text); font-size: 12.5px; }

.comment-form { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.comment-form input {
  flex: 1; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  color: var(--text); font: inherit; font-size: 13.5px;
}
.comment-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.feed-empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: 30px 20px;
  text-align: center; color: var(--text-muted);
  background: var(--bg-elev);
}

/* --- Club header banner (LinkedIn Group style) --- */
.group-banner {
  height: 90px;
  background: linear-gradient(135deg, #cbe4b8 0%, #7bb15a 55%, #3a7d33 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.group-head-card { margin-bottom: 12px; }
.group-head-body { padding: 14px 20px 16px; }
.group-head-body h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.01em; }
.group-head-meta {
  color: var(--text-muted); font-size: 13px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.group-desc { color: var(--text-soft); white-space: pre-wrap; margin: 10px 0 0; font-size: 13.5px; }
.group-actions { display: flex; gap: 8px; margin-top: 12px; }

/* --- Members mini-stack --- */
.member-stack { display: flex; flex-wrap: nowrap; }
.member-stack .avatar {
  border: 2px solid var(--bg-elev);
  margin-left: -6px;
}
.member-stack .avatar:first-child { margin-left: 0; }

/* ---------- profile ---------- */
.profile-hero {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-1);
}
.profile-cover {
  height: 130px;
  background: linear-gradient(135deg, #cbe4b8 0%, #7bb15a 55%, #3a7d33 100%);
}
.profile-hero-body {
  padding: 0 24px 20px;
  position: relative;
}
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-top: -80px;      /* overlap the cover — half above, half below */
  margin-bottom: 12px;
}
.profile-avatar-wrap .avatar {
  display: block;
}
.avatar-cam-btn {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 34px; height: 34px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-2);
  cursor: pointer;
}
.avatar-cam-btn:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.profile-hero h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.profile-hero .handle { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }
.profile-bio { margin-top: 10px; color: var(--text-soft); white-space: pre-wrap; font-size: 14px; }
.profile-links { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.profile-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid transparent;
  color: var(--accent); font-size: 12.5px; font-weight: 500;
}
.profile-link:hover { background: #d1e4f4; color: var(--accent-hover); text-decoration: none; }
.profile-link.muted { background: var(--bg-elev-2); color: var(--text-muted); }

.profile-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.stat {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow-1);
}
.stat-num { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.stat-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

.timeline { display: flex; flex-direction: column; gap: 8px; }
.tl-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.tl-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 15px;
  flex: 0 0 auto;
}
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; color: var(--text); }
.tl-title a { color: inherit; font-weight: 600; }
.tl-title a:hover { color: var(--accent); text-decoration: none; }
.tl-when { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.tl-snippet { color: var(--text-soft); font-size: 13px; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.mini-club {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.mini-club:first-child { border-top: none; }
.mini-club:hover { background: var(--bg-hover); text-decoration: none; color: var(--text); }
.mini-club .name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-club .badge { font-size: 11px; color: var(--text-muted); }

/* ---------- room ---------- */
.room-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
}
.room-head h1 { margin: 4px 0; letter-spacing: -0.01em; font-size: 22px; }
.room-head-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.room-grid {
  display: grid; grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 22px; align-items: start;
}
@media (max-width: 900px) { .room-grid { grid-template-columns: 1fr; } }
.room-board { min-width: 0; }
.board-row { display: flex; gap: 8px; margin-top: 12px; }
.board-row input {
  flex: 1; padding: 8px 12px;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}
.eval-line {
  margin-top: 10px; min-height: 22px; padding: 6px 12px;
  background: var(--bg-elev); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: var(--text-soft);
}
.room-side { display: flex; flex-direction: column; gap: 14px; }
.side-block {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-1);
}
.side-block h3 {
  margin: 0 0 10px; font-size: 12px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600;
}
.presence { display: flex; flex-wrap: wrap; gap: 6px; }
.pres-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-elev-2); padding: 3px 10px;
  border-radius: 999px; font-size: 12.5px;
}
.pgn {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.9;
  max-height: 200px; overflow-y: auto;
}
.mv-num { color: var(--text-muted); margin-right: 2px; }
.mv { color: var(--text); margin-right: 6px; }
.mv-result { color: var(--accent); font-weight: 700; margin-left: 6px; }
.chat-block { display: flex; flex-direction: column; }
.chat {
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13.5px; margin-bottom: 8px;
}
.chat-line { margin-bottom: 5px; word-wrap: break-word; }
.chat-user { color: var(--accent); font-weight: 600; margin-right: 4px; }
.chat-form { display: flex; gap: 6px; }
.chat-form input {
  flex: 1; padding: 7px 12px;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 999px;
  font: inherit;
}
.chat-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.club-actions { display: flex; gap: 8px; }

code {
  background: var(--bg-elev-2);
  padding: 1px 6px; border-radius: 4px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- voice button ---------- */
.voice-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-muted);
  cursor: pointer; font-size: 16px;
  transition: background .1s, color .1s, border-color .1s;
  flex: 0 0 auto;
}
.voice-btn:hover { background: var(--bg-hover); color: var(--text); }
.voice-btn.recording {
  background: #ffe4e4; border-color: #e07070; color: #b53434;
  animation: voicePulse 1.2s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 112, 112, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(224, 112, 112, 0); }
}
.voice-btn[disabled] { opacity: .35; cursor: not-allowed; }

/* ---------- events ---------- */
.event-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-1);
  display: flex; gap: 14px; align-items: flex-start;
}
.event-date {
  flex: 0 0 auto; width: 60px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.event-date .m {
  background: var(--accent); color: #fff;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; padding: 3px 0;
}
.event-date .d {
  font-size: 22px; font-weight: 700;
  color: var(--text); padding: 6px 0;
}
.event-body { flex: 1; min-width: 0; }
.event-body h3 { margin: 0 0 4px; font-size: 15px; }
.event-body h3 a { color: var(--text); }
.event-body h3 a:hover { color: var(--accent); text-decoration: none; }
.event-meta { color: var(--text-muted); font-size: 12.5px; margin-bottom: 4px; }
.event-desc { color: var(--text-soft); font-size: 13.5px; }

/* ---------- messages / DMs ---------- */
.dm-wrap {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: calc(100vh - 140px);
  min-height: 460px;
  box-shadow: var(--shadow-1);
}
@media (max-width: 800px) {
  .dm-wrap { grid-template-columns: 1fr; height: auto; min-height: 460px; }
  .dm-list { border-right: none; border-bottom: 1px solid var(--border); max-height: 40vh; }
}
.dm-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--bg-elev);
}
.dm-list-head {
  padding: 14px 16px;
  font-weight: 600; font-size: 15px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-elev); z-index: 1;
}
.dm-item {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
.dm-item:hover { background: var(--bg-hover); text-decoration: none; }
.dm-item.active { background: var(--accent-soft); }
.dm-item .body { flex: 1; min-width: 0; }
.dm-item .who { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item .preview { color: var(--text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-item .when { color: var(--text-muted); font-size: 11.5px; margin-left: auto; }
.dm-empty { padding: 32px 20px; color: var(--text-muted); text-align: center; font-size: 13px; }

.dm-thread {
  display: flex; flex-direction: column;
  min-height: 0; background: var(--bg);
}
.dm-thread-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.dm-thread-head .who { font-weight: 600; font-size: 15px; }
.dm-thread-head .status { color: var(--text-muted); font-size: 12px; }
.dm-messages {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.dm-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.dm-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.dm-bubble {
  padding: 8px 12px; border-radius: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text); font-size: 14px;
  white-space: pre-wrap; word-wrap: break-word;
}
.dm-msg.me .dm-bubble {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.dm-msg .when {
  font-size: 11px; color: var(--text-muted);
  margin: 0 4px;
}
.dm-compose {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  background: var(--bg-elev);
  display: flex; gap: 8px; align-items: center;
}
.dm-compose input {
  flex: 1; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 14px;
}
.dm-compose input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.dm-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted);
  padding: 40px; text-align: center;
}

/* ---------- games ---------- */
.game-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.game-row:first-child { border-top: 1px solid var(--border); }
.game-row:hover { background: var(--bg-hover); }
.game-row .g-title { font-weight: 600; font-size: 14px; color: var(--text); }
.game-row .g-title a { color: inherit; }
.game-row .g-meta { color: var(--text-muted); font-size: 12.5px; }
.game-row .g-result {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; font-size: 13px;
  background: var(--bg-elev-2); padding: 2px 8px; border-radius: 999px;
}

.game-viewer {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 900px) { .game-viewer { grid-template-columns: 1fr; } }
.game-controls {
  display: flex; gap: 4px; margin-top: 10px; align-items: center;
}
.game-controls button {
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 6px 12px;
  cursor: pointer; font: inherit; font-size: 13px;
}
.game-controls button:hover { background: var(--bg-hover); }
.game-move-list {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.9;
  max-height: 320px; overflow-y: auto;
  padding: 10px 12px;
}
.game-move-list .move {
  padding: 1px 4px; border-radius: 3px; cursor: pointer;
}
.game-move-list .move:hover { background: var(--accent-soft); }
.game-move-list .move.current { background: var(--accent); color: #fff; }

/* ---------- image upload preview / trigger ---------- */
.upload-btn {
  position: absolute;
  background: rgba(255,255,255,0.95);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; color: var(--text);
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.upload-btn:hover { background: #fff; text-decoration: none; }
.upload-cover-btn { top: 12px; right: 12px; }
.upload-avatar-btn { top: 96px; left: 96px; padding: 4px 8px; font-size: 11px; }

.cover-img-bg {
  background-size: cover;
  background-position: center;
}

/* ============ Members card (Chesscube-style right rail) ============ */
.members-card { overflow: hidden; }
.members-head { padding: 14px 16px 12px; }
.members-head .card-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-muted); font-weight: 600;
  margin-bottom: 12px;
}
.members-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 8px;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; font-weight: 700; font-size: 12px;
  letter-spacing: 0;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.member-tile {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: center;
  transition: background .1s;
  overflow: hidden;
}
.member-tile:hover {
  background: var(--bg-hover); text-decoration: none;
}
.member-tile-name {
  font-size: 11px; color: var(--text-soft);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}
.member-tile-role {
  font-size: 10px; color: var(--accent);
  text-transform: uppercase; font-weight: 700; letter-spacing: .05em;
}

/* ============ Reply comment form (thread page) ============ */
.comment-form {
  display: flex; gap: 8px; align-items: center;
}
.comment-form input {
  flex: 1;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  color: var(--text); font: inherit; font-size: 13.5px;
}
.comment-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.comment-form .voice-btn { width: 32px; height: 32px; font-size: 14px; }

/* ============ Chessable-style study room ============ */
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1000px) {
  .study-layout { grid-template-columns: 1fr; }
}

.study-board-col { min-width: 0; }
.board-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-1);
}
#board {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

/* chessboard.js square base colors → warm wood */
#board .white-1e1d7 { background-color: var(--board-light) !important; color: #a97a55 !important; }
#board .black-3c85d { background-color: var(--board-dark)  !important; color: #f0d9b5 !important; }

/* Last-move highlight (yellow tint) */
#board .square-55d63.hl-from,
#board .square-55d63.hl-to {
  box-shadow: inset 0 0 0 3px rgba(247, 233, 135, 0.9);
}

/* Legal-move dots + capture rings */
#board .square-55d63.hl-move-dot {
  position: relative;
}
#board .square-55d63.hl-move-dot::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 30%; height: 30%;
  margin: -15% 0 0 -15%;
  border-radius: 50%;
  background: var(--board-dot);
  pointer-events: none;
  z-index: 3;
}
#board .square-55d63.hl-move-cap {
  position: relative;
}
#board .square-55d63.hl-move-cap::after {
  content: "";
  position: absolute; inset: 0;
  border: 3px solid var(--board-cap-ring);
  border-radius: 50%;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 3;
}

.presence-row { margin-top: 10px; }

/* Right-side tabs panel */
.study-side {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 160px);
  min-height: 480px;
}
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.tab {
  flex: 1;
  padding: 10px 12px;
  border: none; background: transparent;
  color: var(--text-muted);
  font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .1s, border-color .1s, background .1s;
}
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-elev);
}
.tab-panel {
  display: none;
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.tab-panel.active { display: flex; flex-direction: column; }
.side-block-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600;
  margin-bottom: 8px;
}

.eval-panel {
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 10px;
  min-height: 60px;
  word-break: break-word;
}

.mv.current { background: var(--accent); color: #fff; padding: 1px 4px; border-radius: 3px; }

/* ============ Group chat channel (Discord-like) ============ */
.chat-channel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  height: calc(100vh - 140px);
  min-height: 500px;
}
.chat-channel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.chat-channel-head > div:first-child {
  display: flex; align-items: center; gap: 10px;
}
.ch-hash {
  font-size: 22px; font-weight: 700;
  color: var(--text-muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev-2); border-radius: 8px;
}
.ch-name { font-weight: 600; font-size: 15px; }
.ch-meta { font-size: 12px; color: var(--text-muted); }

.chat-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 8px;
}
.ch-empty {
  color: var(--text-muted); text-align: center;
  padding: 40px 20px; font-size: 13px;
}
.ch-msg {
  display: flex; gap: 10px; align-items: flex-start;
}
.ch-msg.me .ch-bubble { background: var(--accent-soft); border-color: var(--accent-soft); }
.ch-msg-body { flex: 1; min-width: 0; }
.ch-msg-head {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12.5px; color: var(--text-muted);
  margin-bottom: 2px;
}
.ch-msg-head .who { color: var(--text); font-weight: 600; }
.ch-bubble {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  white-space: pre-wrap; word-wrap: break-word;
  display: inline-block;
  max-width: 100%;
}
.ch-audio {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-block;
  max-width: 100%;
}
.ch-audio audio { display: block; max-width: 280px; }
.ch-audio-meta { margin-top: 4px; }

.chat-compose {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  background: var(--bg-elev);
  display: flex; gap: 8px; align-items: center;
}
.chat-compose input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: 14px;
}
.chat-compose input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.chat-locked {
  padding: 14px 16px;
  background: var(--bg-elev-2);
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}

/* voice note push-to-record button */
.voice-note-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-muted);
  cursor: pointer; font: inherit; font-size: 15px;
  transition: background .1s, color .1s, border-color .1s;
  user-select: none;
  touch-action: none;
}
.voice-note-btn:hover { background: var(--bg-hover); color: var(--text); }
.voice-note-btn[disabled] { opacity: .35; cursor: not-allowed; }
.voice-note-btn .vn-rec { display: none; color: var(--danger); font-weight: 700; font-size: 13px; }
.voice-note-btn.recording {
  background: #ffe4e4; border-color: #e07070;
  animation: voicePulse 1.2s ease-in-out infinite;
}
.voice-note-btn.recording .vn-idle { display: none; }
.voice-note-btn.recording .vn-rec  { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- thread page ---------- */
.thread { padding: 12px 0; }
.roster { width: 100%; border-collapse: collapse; margin-top: 12px; }
.roster th, .roster td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.roster th { color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }

/* ---------- People discovery page ---------- */
.cross-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 20px;
  margin: 6px 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(30,140,90,0.08), rgba(210,180,110,0.10));
}
.cross-banner-flags {
  font-size: 22px; letter-spacing: 2px; white-space: nowrap;
}
.cross-banner-body { font-size: 14px; color: var(--text-soft); }
.cross-banner-body strong { color: var(--text); }

.chip-accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-weight: 600;
}
.chip-accent.chip-on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chip-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  font-size: 11px;
  font-weight: 600;
}
.chip-on .chip-count { background: rgba(255,255,255,0.2); }

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.person-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
  transition: transform .08s, box-shadow .08s;
}
.person-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }

.person-cover {
  height: 68px;
  background: linear-gradient(135deg, #86b98a, #d2b46e);
  background-size: cover; background-position: center;
}
.person-cover.has-img { background-color: #333; }

.person-body {
  padding: 0 16px 16px;
  position: relative;
}
.person-avatar-wrap { margin-top: -34px; margin-bottom: 8px; }

.person-name {
  font-weight: 700; font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}
.person-name a { color: inherit; }
.person-name a:hover { color: var(--accent); text-decoration: none; }

.person-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}

.country-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600;
  vertical-align: middle;
}
.country-badge.sm { padding: 0 6px; font-size: 13px; background: transparent; }

.lang-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0,0,0,0.05); color: var(--text-soft);
  font-size: 12px; font-weight: 500;
}

.person-bio {
  font-size: 13px; color: var(--text-soft); line-height: 1.4;
  min-height: 36px;
  margin-bottom: 10px;
}

.person-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 10px;
  min-height: 0;
}
.person-links a {
  font-size: 12px; color: var(--text-muted);
}
.person-links a:hover { color: var(--accent); }

.person-actions {
  display: flex; gap: 6px; align-items: center;
  margin-top: auto;
}

/* ---------- Event page: CTA + share bar ---------- */
.event-cta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.event-rsvp { display: inline-flex; gap: 6px; }

.event-share {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: 10px;
}
.event-share-label {
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 8px;
}
.event-share-buttons {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.share-url {
  flex: 1; min-width: 260px;
  padding: 8px 12px; font: inherit; font-size: 13px;
  background: #fff; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 6px;
}

.share-chip {
  display: inline-flex; align-items: center;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px; font-weight: 600;
  color: #fff;
  border: 1px solid transparent;
  transition: transform .06s, filter .1s;
}
.share-chip:hover { transform: translateY(-1px); filter: brightness(1.05); text-decoration: none; color: #fff; }
.share-whatsapp { background: #25d366; }
.share-twitter  { background: #000; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0a66c2; }
.share-telegram { background: #229ed9; }

.btn.copied { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Compact event date badge used in the home-feed right rail */
.event-date-mini {
  display: inline-flex; flex-direction: column; align-items: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  line-height: 1;
}
.event-date-mini .m { font-size: 10px; font-weight: 700; text-transform: uppercase; padding-top: 6px; }
.event-date-mini .d { font-size: 17px; font-weight: 700; margin-top: 1px; }

/* ---------- Composer: mode toggle (Post / Event) ---------- */
.composer-cta-event {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  margin-left: 6px;
}
.composer-cta-event:hover { background: var(--accent-soft); }

.composer-mode-tabs {
  display: flex; gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: var(--bg);
  border-radius: 8px;
  width: fit-content;
}
.mode-tab {
  padding: 6px 14px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .1s, color .1s;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.is-active { background: var(--bg-elev); color: var(--accent); box-shadow: var(--shadow-1); }

.composer-event-fields {
  margin-top: 12px;
  padding: 12px;
  background: var(--accent-soft);
  border-radius: 8px;
}
.composer-event-fields .lbl {
  display: block;
  font-size: 11px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 4px;
}
.composer-event-fields label {
  display: block;
  margin-bottom: 10px;
}
.composer-event-fields input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: #fff; font: inherit; font-size: 13px;
}
.composer-event-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (max-width: 500px) {
  .composer-event-row { grid-template-columns: 1fr; }
}

/* ---------- Event card rendered inside a feed post ---------- */
.post-event {
  display: flex; align-items: center; gap: 14px;
  margin: 8px 0 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%);
  color: var(--text);
  transition: border-color .1s, transform .05s;
}
.post-event:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.post-event .event-date {
  flex-shrink: 0;
}
.post-event-body { flex: 1; min-width: 0; }
.post-event-title { font-weight: 700; font-size: 15px; color: var(--text); }
.post-event-when { font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.post-event-loc { margin-top: 4px; }
.post-event-cta {
  flex-shrink: 0;
  font-size: 13px; font-weight: 600;
  color: var(--accent);
}

/* =====================================================================
   Onboarding — LinkedIn-style multi-step flow
   ===================================================================== */
.ob-shell {
  max-width: 640px;
  margin: 24px auto 60px;
}

/* Progress bar */
.ob-progress-wrap { margin-bottom: 14px; }
.ob-progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7cc084);
  border-radius: 999px;
  transition: width .35s cubic-bezier(.2, .8, .2, 1);
}
.ob-progress-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  font-size: 12px; color: var(--text-muted);
}
.ob-skip {
  font-weight: 600;
  color: var(--text-muted);
}
.ob-skip:hover { color: var(--accent); text-decoration: none; }

/* Card */
.ob-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px 24px;
  box-shadow: var(--shadow-2);
}
.ob-head { margin-bottom: 20px; }
.ob-head h1 {
  margin: 0;
  font-size: 24px; line-height: 1.2;
  color: var(--text);
}
.ob-sub {
  margin: 6px 0 0;
  color: var(--text-muted); font-size: 14px;
}

/* Step 1 hero */
.ob-hero {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
}
.ob-avatar-wrap { position: relative; }
.ob-avatar-edit {
  position: absolute; bottom: -4px; right: -4px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: var(--shadow-1);
}
.ob-avatar-edit:hover { text-decoration: none; background: var(--accent-soft); }
.ob-name { font-weight: 700; font-size: 18px; color: var(--text); }
.ob-handle { color: var(--text-muted); font-size: 13px; }

/* Fields */
.ob-form { display: flex; flex-direction: column; gap: 6px; }
.ob-field {
  display: block;
  margin-bottom: 18px;
}
.ob-label {
  display: block;
  font-size: 13px; font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.ob-label .req { color: #b3505a; font-weight: 900; }
.ob-field input[type="text"],
.ob-field input[type="number"],
.ob-field textarea,
.ob-field select {
  width: 100%;
  padding: 10px 12px;
  font: inherit; font-size: 14px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  transition: border-color .1s, box-shadow .1s;
}
.ob-field input:focus,
.ob-field textarea:focus,
.ob-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ob-field small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted); font-size: 12px;
}

/* Tile picker (play style) */
.ob-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.ob-tile {
  position: relative;
  display: block; cursor: pointer;
  padding: 14px 14px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  transition: border-color .1s, background .1s, transform .05s;
}
.ob-tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.ob-tile input { position: absolute; opacity: 0; pointer-events: none; }
.ob-tile-title { font-weight: 700; color: var(--text); font-size: 14px; }
.ob-tile-desc { color: var(--text-muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.ob-tile.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Chip picker (time control, gender) */
.ob-chip-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ob-chip-grid-tight .ob-chip { padding: 8px 14px; }
.ob-chip {
  position: relative; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  transition: border-color .1s, background .1s;
}
.ob-chip:hover { border-color: var(--border-strong); }
.ob-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ob-chip-label { font-weight: 600; color: var(--text); font-size: 13px; }
.ob-chip-sub { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.ob-chip.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ob-chip.is-selected .ob-chip-label { color: var(--accent); }

/* Group picker (step 4) */
.ob-picks { display: flex; flex-direction: column; gap: 10px; }
.ob-pick {
  position: relative; cursor: pointer;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  transition: border-color .1s, background .1s, transform .05s;
}
.ob-pick:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.ob-pick input { margin-top: 3px; accent-color: var(--accent); }
.ob-pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ob-pick-title { font-weight: 700; color: var(--text); font-size: 15px; }
.ob-pick-reason { color: var(--accent); font-size: 12px; font-weight: 600; }
.ob-pick-desc { color: var(--text-soft); font-size: 13px; line-height: 1.4; }
.ob-pick-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.ob-pick-check {
  align-self: center;
  color: transparent; font-size: 20px; font-weight: 900;
}
.ob-pick.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.ob-pick.is-selected .ob-pick-check { color: var(--accent); }
.ob-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px; font-weight: 700;
  vertical-align: middle;
}

/* People (step 5) */
.ob-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.ob-person {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
}
.ob-person-body { flex: 1; min-width: 0; }
.ob-person-name { font-weight: 700; color: var(--text); font-size: 14px; }
.ob-person-reason { color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 2px; }
.ob-person-bio { color: var(--text-muted); font-size: 12px; margin-top: 3px; line-height: 1.4; }

/* Invite (step 6) */
.ob-invite { text-align: center; }
.ob-invite-illus { font-size: 42px; margin-bottom: 8px; }

/* Actions row */
.ob-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Home-feed nudge */
.ob-nudge {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--accent-soft), transparent 80%);
  border-left: 4px solid var(--accent);
  color: var(--text);
  text-decoration: none;
}
.ob-nudge:hover { text-decoration: none; background: linear-gradient(90deg, var(--accent-soft), var(--accent-soft)); }
.ob-nudge-icon { font-size: 28px; }
.ob-nudge-title { font-weight: 700; font-size: 15px; }
.ob-nudge-sub { color: var(--text-soft); font-size: 13px; margin-top: 2px; }
.ob-nudge-cta { color: var(--accent); font-weight: 700; font-size: 13px; margin-left: 8px; }

/* =========================================================================
   Chess Home skin — visual identity layer
   Tasteful chess-themed touches on top of the base LinkedIn-style layout.
   Goal: within one second, someone thinks "this is a chess community".
   ========================================================================= */

:root {
  --card-cream:     #fbf8f2;  /* warm parchment card */
  --card-cream-2:   #f6f1e6;  /* stripe alternate */
  --wood-1:         #d9b98a;  /* light board square */
  --wood-2:         #a97c50;  /* dark board square */
  --wood-edge:      #8b5f3a;  /* wooden frame edge */
  --skin-radius-lg: 14px;
  --skin-radius-sm: 3px;
}

/* Subtle 32px checkered watermark on the app background.
   Very low contrast — visible on close inspection, invisible from a distance. */
html, body {
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, rgba(169, 124, 80, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(169, 124, 80, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(169, 124, 80, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(169, 124, 80, 0.035) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 0 16px, 16px -16px, -16px 0;
}

/* Cards: warm cream background + asymmetric corners (chess "torn-scoresheet" look).
   The top edge gets a thin checkered strip via ::before, which is the signature
   chess flourish that differentiates us from every generic feed. */
.card,
.post-card {
  background: var(--card-cream);
  border: 1px solid #e8dfcb;
  border-radius: var(--skin-radius-sm) var(--skin-radius-lg)
                 var(--skin-radius-lg) var(--skin-radius-lg);
  box-shadow: 0 0 0 1px rgba(139, 95, 58, 0.03),
              0 2px 6px rgba(139, 95, 58, 0.06);
  position: relative;
  overflow: hidden;
}
.card::before,
.post-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--wood-1) 0 24px,
      var(--wood-2) 24px 48px
    );
  pointer-events: none;
  z-index: 1;
}
/* Opt-out for cards where the checkered strip looks noisy
   (empty states, tiny sidebar tiles, etc.). Add class="card card-plain". */
.card-plain::before, .post-card.card-plain::before { display: none; }
.card-plain, .post-card.card-plain {
  border-radius: var(--radius);
}

/* Composer: warm cream + a chess-piece watermark in the bottom-right corner
   that only appears when collapsed (a friendly "come play" nudge). */
.composer {
  background: var(--card-cream);
  border: 1px solid #e8dfcb;
  border-radius: var(--skin-radius-sm) var(--skin-radius-lg)
                 var(--skin-radius-lg) var(--skin-radius-lg);
  position: relative;
  overflow: hidden;
}
.composer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--wood-1) 0 24px,
      var(--wood-2) 24px 48px
    );
  pointer-events: none;
}
.composer::after {
  content: "♞";
  position: absolute;
  right: 14px; bottom: 6px;
  font-size: 68px;
  line-height: 1;
  color: var(--wood-2);
  opacity: 0.06;
  pointer-events: none;
  transform: rotate(-8deg);
  transition: opacity .2s ease;
}
.composer.is-expanded::after { opacity: 0.03; }

/* Header + brand: give the knight logo a slight wooden gradient. */
.brand-mark {
  background: linear-gradient(135deg, var(--accent), #2f7a2f);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12),
              0 1px 2px rgba(0, 0, 0, 0.08);
}
.site-header {
  border-bottom: 1px solid #e8dfcb;
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf3 100%);
}

/* Primary buttons: slightly warmer bevel so they don't read as generic LinkedIn. */
.btn-primary {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}
.btn-primary:hover {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.20);
}

/* Section dividers inside cards get a subtle wood tone. */
.post-card .post-stats,
.post-card .post-actions {
  border-color: #ece3cf;
}

/* =========================================================================
   Game post card — PGN shared in the feed
   ========================================================================= */

.post-game {
  margin: 4px 16px 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(217, 185, 138, 0.10) 0%, transparent 60%),
    #fffdf7;
  border: 1px solid #e5d9bd;
  border-left: 4px solid var(--wood-2);
  border-radius: 8px;
  position: relative;
}
.post-game-head {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.post-game-mark {
  font-size: 28px;
  color: var(--wood-2);
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.08));
}
.post-game-players {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
  font-weight: 700; font-size: 15px; color: var(--text);
  letter-spacing: -0.01em;
}
.pg-side {
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #d9c9a5;
}
.pg-white { background: #f5ecd6; color: #4a3a1a; }
.pg-black { background: #2a2318; color: #f5ecd6; border-color: #2a2318; }
.pg-vs {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); font-weight: 600;
}
.pg-result {
  margin-left: auto;
  font-family: 'SFMono-Regular', ui-monospace, monospace;
  font-size: 13.5px;
  background: var(--wood-2);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.post-game-meta {
  width: 100%;
  color: var(--text-muted);
  font-size: 12.5px;
  margin-top: 4px;
}
.post-game-actions {
  display: flex; gap: 8px;
  margin-top: 12px;
}
.post-game-actions .btn-block { width: 100%; }
.post-game-actions .btn-secondary {
  padding: 8px 14px;
  font-size: 15px;
}

/* Composer game-fields textarea has a subtle "board" feel. */
.composer-game-fields textarea {
  background: #fffdf7;
  border: 1px solid #d9c9a5 !important;
  border-radius: 6px;
}
.composer-game-fields small {
  display: block; margin-top: 4px;
  color: var(--text-muted); font-size: 12px;
}

/* =========================================================================
   Club images — banner (wide cover) + logo (square avatar).
   ========================================================================= */

/* Banner on the group detail page: real image when uploaded, wooden gradient
   fallback that hints at chess without being noisy. */
.group-banner {
  height: 160px;
  background:
    linear-gradient(135deg, #cbe4b8 0%, #7bb15a 55%, #3a7d33 100%);
  background-size: cover;
  background-position: center;
  border-radius: var(--skin-radius-sm) var(--skin-radius-lg) 0 0;
  position: relative;
}
.group-banner.has-image { background-color: #1c221c; }

/* Admin edit buttons floating on the banner (top-right). */
.banner-edit-form {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; gap: 6px;
  margin: 0;
}
.banner-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 14px;
  transition: background .12s;
}
.banner-edit-btn:hover { background: rgba(0, 0, 0, 0.75); }

/* Logo overlaps the banner (like an avatar over a cover). */
.group-head-avatar-row {
  display: flex; align-items: flex-end; gap: 14px;
  margin-top: -46px;
  margin-bottom: 6px;
}
.group-logo-wrap {
  position: relative;
  flex: 0 0 auto;
}
.group-logo {
  width: 80px; height: 80px;
  border-radius: 12px;
  border: 4px solid var(--card-cream);
  background: var(--card-cream);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  display: block;
}
.group-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 26px;
  letter-spacing: -0.01em;
}
.logo-cam-btn {
  position: absolute;
  right: -6px; bottom: -6px;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--card-cream);
  border: 2px solid var(--card-cream);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.logo-cam-btn:hover { background: #fff; }

/* On the group head, drop the top checkered strip because the banner already
   provides the visual identity for this card. */
.group-head-card::before { display: none; }
.group-head-card {
  border-top-left-radius: var(--skin-radius-sm);
  border-top-right-radius: var(--skin-radius-lg);
}

/* --- Club cards on /clubs list --- */
.club-card.has-cover {
  padding: 0;
  overflow: hidden;
}
.club-card-cover {
  height: 84px;
  background:
    linear-gradient(135deg, #cbe4b8 0%, #7bb15a 55%, #3a7d33 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.club-card-cover.has-image { background-color: #1c221c; }
.club-card-cover .club-card-lang {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,0.92);
}
.club-card-body { padding: 8px 16px 14px; }
.club-card-logo-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.club-card-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 3px solid var(--card-cream);
  background: var(--card-cream);
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  display: block;
  flex: 0 0 auto;
  margin-top: -22px;
}
.club-card-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}
.club-card-loc {
  color: var(--text-soft); font-size: 12.5px;
  margin: -4px 0 8px;
}
.club-card.has-cover::before {
  /* Cover art replaces the checkered strip for these cards. */
  display: none;
}
.club-card.has-cover {
  border-top-left-radius: var(--skin-radius-sm);
  border-top-right-radius: var(--skin-radius-lg);
}

/* =========================================================================
   Post media — images (1/2/3+ grid) + video attachments
   ========================================================================= */

/* --- Composer attach buttons + preview strip --- */
.composer-attach {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.attach-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.attach-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.attach-label { font-size: 12.5px; }
@media (max-width: 520px) {
  .attach-label { display: none; }
}

.composer-club-hint {
  padding: 0 16px 12px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.composer-media-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  padding: 0 16px 8px;
}
.composer-media-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #1c221c;
  border: 1px solid var(--border);
}
.composer-media-thumb img,
.composer-media-thumb video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.composer-media-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.composer-media-remove:hover { background: rgba(0,0,0,0.85); }

/* --- Post-card media grid --- */
.post-media {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  border-top: 1px solid var(--border);
  background: #1c221c;
  max-height: 520px;
  overflow: hidden;
}
.post-media-1 { grid-template-columns: 1fr; grid-template-rows: auto; }
.post-media-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 300px; }
.post-media-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 220px;
}
.post-media-3 .post-media-item:first-child { grid-row: span 2; }
.post-media-many {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 220px;
}
.post-media-item {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1c221c;
}
.post-media-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.post-media-item:hover img { transform: scale(1.02); }

.post-media-1 .post-media-item {
  max-height: 520px;
}
.post-media-1 .post-media-item img {
  max-height: 520px;
  object-fit: contain;
  background: #1c221c;
}

.post-media-more {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.01em;
}

.post-media-video {
  margin: 6px 0 0;
  border-top: 1px solid var(--border);
  background: #000;
}
.post-media-video video {
  width: 100%;
  max-height: 520px;
  display: block;
  background: #000;
}

/* ---------- bot pill (see chess_home/bot_api.py) ---------- */
/* Small "bot" chip rendered next to usernames on posts, replies, DMs
 * and member lists whenever `user.is_bot` is true. Users should be able
 * to tell an automated community member from a human at a glance. */
.bot-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-warm, #b47324);
  border-radius: 4px;
  vertical-align: middle;
}
