/* ============================================================
   Student Club Hub — Global Styles (styles/main.css)
   Pure CSS3. Palette tokens, dark theme, reset, header/nav,
   buttons, badges, forms, directory cards, and club-detail.
   Page layouts live in styles/pages.css; reusable overlay/modal
   widgets in styles/components.css (both loaded after this file).
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  /* Neutral cool palette (MP31): Deep Space Blue · Cerulean · Frosted Blue · Alabaster.
     One accent (cerulean) — no clashing warm color. Gold is reserved for the Save star. */
  --navy: #003249;                 /* Deep Space Blue — header, dark surfaces, display headings */
  --brand: #007EA7;                /* Cerulean — primary actions, links */
  --brand-dark: #00617f;           /* deeper cerulean — hover / accent text */
  --brand-light: #80CED7;          /* Frosted Blue — soft accents, backings, borders */
  --brand-50: #eaf5f7;             /* pale cerulean tint — chips, soft fills */
  --grad-brand: linear-gradient(135deg, #12a0c4 0%, #007EA7 60%, #005f7d 100%);
  --grad-brand-strong: linear-gradient(135deg, #17a7c9 0%, #007EA7 48%, #003249 100%);
  --header-color: #0b1437;         /* Galaxy Blue — deep indigo-navy header strip */
  --header-galaxy: linear-gradient(100deg, #0a1030 0%, #141c53 46%, #21205f 72%, #0d1a44 100%);
  --accent: #007EA7;               /* legacy alias → cerulean (folds the old orange) */
  --accent-dark: #00617f;
  --star: #f5b301;                 /* warm gold — Save / favorite star ONLY */
  color-scheme: light;
  --join: #12a594;                 /* teal-green success (harmonizes with the cool palette) */
  --join-dark: #0c8375;
  --ink: #0e2a37;                  /* deep teal-navy — primary text */
  --muted: #5a7581;                /* muted slate-teal — secondary text */
  --faint: #92a8b1;
  --line: #d9e6e9;                 /* cool light border (alabaster-derived) */
  --bg: #f3f8f9;                   /* soft cool off-white page ground */
  --card: #ffffff;
  --surface: #eef5f6;              /* subtle raised surfaces (rows, chips) */
  --surface-2: #e2eef0;            /* button / tab tracks */
  --input-bg: #ffffff;
  --danger: #e5484d;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-bg-hover: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.6);
  --header-bg: rgba(0, 50, 73, 0.9);

  --r-sm: 9px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 40, 60, 0.05), 0 2px 6px rgba(0, 40, 60, 0.07);
  --shadow-md: 0 10px 30px rgba(0, 40, 60, 0.10);
  --shadow-lg: 0 24px 60px rgba(0, 40, 60, 0.20);

  --header-h: 104px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Hero background photo. Drop your image in as styles/hero.jpg (same folder as this file).
     A dark overlay + gradient fallback (in .hero) keep the white text readable, and the
     fallback shows automatically until the file is present. */
  --hero-img: url("hero.jpg");
}

/* ============================================================
   DARK APPEARANCE — remap tokens + override hardcoded surfaces
   ============================================================ */
:root[data-theme="dark"] {
  color-scheme: dark;      /* native selects, option popups & scrollbars render dark */
  --navy: #001e2c;
  --brand: #34b3d4;
  --brand-dark: #86d4dd;   /* light frosted so accent text stays readable on dark surfaces */
  --brand-light: #80CED7;
  --brand-50: #0a3547;
  --ink: #e7eef1;
  --muted: #97afb8;
  --faint: #62808b;
  --line: #234450;
  --bg: #06171f;
  --card: #0c2733;
  --surface: #0a222d;
  --surface-2: #123542;
  --input-bg: #06171f;
  --header-color: #070c22;
  --header-galaxy: linear-gradient(100deg, #05081f 0%, #0e1440 48%, #17163f 74%, #070d2c 100%);
  --glass-bg: rgba(12, 39, 51, 0.72);
  --glass-bg-hover: rgba(12, 39, 51, 0.92);
  --glass-border: rgba(128, 206, 215, 0.22);
  --header-bg: rgba(0, 26, 38, 0.9);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .btn { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .btn:hover { background: #31415c; }
[data-theme="dark"] .btn.ghost { background: transparent; }
[data-theme="dark"] .field input, [data-theme="dark"] .field select, [data-theme="dark"] .field textarea,
[data-theme="dark"] .search input, [data-theme="dark"] .select, [data-theme="dark"] .share-link-row input,
[data-theme="dark"] .link-row .mg-link, [data-theme="dark"] .chat-compose input[type=text], [data-theme="dark"] .roster-row select {
  /* background-COLOR only — never the shorthand, which would reset background-repeat/image
     and cause the chevron SVG to tile into rows of arrows on <select> elements */
  background-color: var(--input-bg); color: var(--ink); border-color: var(--line);
}
[data-theme="dark"] .tab-row, [data-theme="dark"] .settings-tabs { background: var(--surface-2); }
[data-theme="dark"] .tab-row button.active, [data-theme="dark"] .settings-tab.active { background: var(--card); color: var(--ink); }
[data-theme="dark"] .switch { background: #475569; }
[data-theme="dark"] .leader-row, [data-theme="dark"] .roster-row, [data-theme="dark"] .cm-body,
[data-theme="dark"] .cm-body.deleted, [data-theme="dark"] .chat-locked, [data-theme="dark"] .banner-preview,
[data-theme="dark"] .pick-row, [data-theme="dark"] .spot-card { background: var(--surface); }
/* Details drawer rows sit directly on the card surface — no dark background strips */
[data-theme="dark"] .info-line { background: transparent; }
[data-theme="dark"] .info-line .k { color: var(--muted); }
/* Header profile username stays crisp white in dark mode */
[data-theme="dark"] .user-chip .name { color: #ffffff; }
/* Custom white dropdown arrow for selects in dark mode — always co-set repeat + position */
[data-theme="dark"] .select, [data-theme="dark"] .field select.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
[data-theme="dark"] .roster-row select { background-image: none; }
/* Catch-all: ANY <select> in dark mode gets the dark fill + light text (Language, School, District, etc.).
   !important beats the light `.field select.select { background-color:#fff }` base rule. */
[data-theme="dark"] select,
[data-theme="dark"] .select,
[data-theme="dark"] .field select,
[data-theme="dark"] select.select { background-color: var(--input-bg) !important; color: var(--ink) !important; border-color: var(--line) !important; }
[data-theme="dark"] select option { background-color: var(--card); color: var(--ink); }
/* Upload dropzone + file-picker buttons conform to the dark theme (no white blocks) */
[data-theme="dark"] .uploader { background: var(--surface); border-color: var(--line); color: var(--muted); }
[data-theme="dark"] .uploader:hover, [data-theme="dark"] .uploader.drag { background: var(--surface-2); border-color: var(--brand); color: var(--brand-dark); }
[data-theme="dark"] .leader-row:hover, [data-theme="dark"] .pick-row:hover { background: var(--surface-2); }
[data-theme="dark"] .badge.gray, [data-theme="dark"] .tag, [data-theme="dark"] .mini-x-inline { background: var(--surface-2); color: var(--muted); }
[data-theme="dark"] .icon-btn, [data-theme="dark"] .logout-btn { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .fav-btn { background: var(--brand-50); color: var(--brand-dark); border-color: var(--brand-light); }
[data-theme="dark"] .fav-btn.on { background: var(--brand-light); color: var(--navy); }
[data-theme="dark"] .card-cover .cover-fav, [data-theme="dark"] .qr-box { background: var(--card); }
[data-theme="dark"] .step, [data-theme="dark"] .tcard, [data-theme="dark"] .stat { background: var(--card); }
[data-theme="dark"] .cat-pill { background: var(--card); }
[data-theme="dark"] .btn.primary { color: #fff; }
[data-theme="dark"] .btn.join { color: #fff; }
/* Dark chat: elevated surfaces + high-contrast text */
[data-theme="dark"] .chat-msg .cm-body { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .chat-msg.announce .cm-body { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.3); }
[data-theme="dark"] .cm-body.deleted { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .cm-who, [data-theme="dark"] .cm-text { color: #F8FAFC; }
[data-theme="dark"] .cm-time, [data-theme="dark"] .cm-ctrls button, [data-theme="dark"] .cm-body.deleted em { color: #94A3B8; }
[data-theme="dark"] .cm-ctrls button:hover { color: var(--brand-light); }
[data-theme="dark"] .chat-system { background: rgba(255, 255, 255, 0.05); color: #94A3B8; }
[data-theme="dark"] .chat-system strong { color: #F8FAFC; }

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;              /* contain full-bleed sections without breaking sticky */
  line-height: 1.55;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Display type — Space Grotesk for headings, brand, and big numerals */
h1, h2, h3, h4, .brand, .hero h1, .pb-title, .gp-title, .stat .n,
.spotlight-head, .soon-card h2, .confirm h3, .club-head h2, .page-head h1,
.reviews-head-main h1, .poly-front h3, .prow-body h3 {
  font-family: var(--font-head); letter-spacing: -0.02em;
}
/* Buttons & nav get the display face too — a crisper, more designed feel */
.btn, .fav-btn, .nav-trigger, .logout-btn, .cat-pill, .shop-tab, .club-tab, .settings-tab {
  font-family: var(--font-head); letter-spacing: -0.005em;
}
/* Sticky footer: main grows to fill, footer anchored to the bottom with breathing room */
main { flex: 1 0 auto; padding-bottom: 40px; }
.app-view { min-height: 40vh; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; font-size: 0.95rem; }
.hidden { display: none !important; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  min-height: var(--header-h);
  flex-shrink: 0;                 /* never shrink in the column flex layout, even on short pages */
  background: var(--header-color);
  background: var(--header-galaxy); /* galaxy-blue gradient strip */
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 2px 18px rgba(9, 14, 45, 0.35);
}
/* three-column grid keeps the nav visually centered */
.header-inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px; padding-left: 4px;
  font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.02em;
}
.brand-logo { display: inline-flex; width: 40px; height: 40px; flex-shrink: 0; }
.brand-logo svg, .brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Header links are always white on the navy bar (both themes) */
.site-header .nav-trigger { color: rgba(255,255,255,0.9); }
.site-header .nav-trigger:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-header .nav-trigger.active { background: rgba(255,255,255,0.16); color: #fff; }
.site-header .nav-toggle { color: #fff; }
.site-header .nav-toggle:hover { background: rgba(255,255,255,0.12); }
/* Unified header CTAs — Log In (outlined) + Sign Up (orange), matching in both themes */
.site-header .btn.header-outline { background: transparent; border: 1.5px solid rgba(255,255,255,0.55); color: #fff; }
.site-header .btn.header-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.site-header .btn.header-cta { background: var(--grad-brand); color: #fff; border: none; box-shadow: 0 2px 10px rgba(0,126,167,0.4); }
.site-header .btn.header-cta:hover { filter: brightness(1.05); box-shadow: 0 5px 16px rgba(0,126,167,0.55); }
/* Vertically centered caret — a mask so it always matches the trigger's text color */
.caret { display: inline-block; width: 14px; height: 14px; margin-left: 6px; font-size: 0; vertical-align: middle;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6z'/%3E%3C/svg%3E") center / 14px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6z'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .18s ease; }
.nav { justify-self: center; display: flex; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--brand-50); color: var(--brand-dark); }

/* ---- Dropdown navigation ---- */
.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
}
.nav-trigger:hover { background: var(--surface-2); color: var(--ink); }
.nav-trigger.active { background: var(--brand-50); color: var(--brand-dark); }
.nav-trigger .caret { font-size: 0.85rem; transition: transform .18s ease; opacity: .8; }
.nav-item.has-menu:hover .nav-trigger .caret, .nav-item.open .nav-trigger .caret { transform: rotate(180deg); }
.nav-menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 210px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-md); padding: 6px; z-index: 60;
}
.nav-menu::before {   /* hover bridge so the menu doesn't close in the gap */
  content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.nav-menu button {
  display: flex; align-items: center; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 600; color: var(--ink);
  transition: background .12s, color .12s;
}
.nav-menu button:hover { background: var(--brand-50); color: var(--brand-dark); }
.nav-item.open > .nav-menu { display: block; animation: navMenuIn .16s ease; }
@media (min-width: 900px) { .nav-item.has-menu:hover > .nav-menu { display: block; } }
@keyframes navMenuIn { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
/* Mobile hamburger — hidden on desktop */
.nav-toggle { display: none; justify-self: end; font-size: 1.4rem; color: var(--ink); padding: 6px 10px; border-radius: var(--r-sm); }
.nav-toggle:hover { background: var(--surface-2); }
.auth-area { justify-self: end; display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
}
.user-chip .name { font-size: 0.9rem; font-weight: 600; }
/* Profile area sits on the navy header — keep it crisp white in both themes */
.site-header .user-chip .name { color: #fff; }
.site-header .user-chip:hover { background: rgba(255,255,255,0.12); }
.site-header .user-chip .avatar { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
/* Logout: translucent-white pill matching the white profile name on the navy bar */
.logout-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  border-radius: var(--r); background: #f1f5f9; color: var(--ink); font-weight: 700; font-size: 0.85rem; }
.logout-btn:hover { background: #fee2e2; color: var(--danger); }
.site-header .logout-btn { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.site-header .logout-btn:hover { background: rgba(255,255,255,0.26); color: #fff; }

/* ---- Avatar ---- */
.avatar {
  border-radius: var(--r-pill);
  background: var(--brand-50); color: var(--brand-dark);
  display: grid; place-items: center; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: 0.8rem; }
.avatar.md { width: 44px; height: 44px; font-size: 1rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.6rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--r);
  font-size: 0.9rem; font-weight: 700; color: var(--ink);
  background: #f1f5f9; transition: background .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--brand-50); }
/* Primary / CTA — cerulean gradient. A paired button uses the soft .btn.blue for contrast. */
.btn.primary, .btn.cta { background: var(--grad-brand); color: #fff; box-shadow: 0 3px 10px rgba(0,90,120,.26); }
.btn.primary:hover, .btn.cta:hover { filter: brightness(1.05); box-shadow: 0 8px 22px rgba(0,126,167,.4); }
.btn.cta { background: var(--grad-brand-strong); }
[data-theme="dark"] .btn.primary, [data-theme="dark"] .btn.cta { color: #fff; }
/* Secondary — soft frosted (distinct from a solid primary when they sit side by side) */
.btn.blue { background: var(--brand-50); color: var(--brand-dark); border: 1px solid var(--brand-light); }
.btn.blue:hover { background: var(--brand-light); color: var(--navy); }
.btn.join { background: var(--join); color: #fff; }
.btn.join:hover { background: var(--join-dark); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: #fdecec; color: var(--danger); }
.btn.danger:hover { background: #fbdcdc; }
.btn.block { width: 100%; }
.btn.lg { padding: 13px 22px; font-size: 1rem; }
.btn.sm-btn { padding: 7px 12px; font-size: 0.82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
/* hero buttons on the gradient */
.btn.white { background: #fff; color: var(--brand-dark); }
.btn.white:hover { background: #f1f5f9; }
.btn.glass { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.btn.glass:hover { background: rgba(255,255,255,.24); }

/* ---- Save Club — solid blue (its gold star distinguishes it from the orange View button) ---- */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--r);
  font-size: 0.9rem; font-weight: 600;
  background: var(--brand-50); border: 1px solid var(--brand-light); color: var(--brand-dark);
  transition: background .15s, color .15s, box-shadow .15s;
}
.fav-btn:hover { background: var(--brand-light); color: var(--navy); }
.fav-btn.on { background: var(--brand-light); border-color: var(--brand-light); color: var(--navy); }
/* SVG gold star (outline when un-saved, solid gold when saved) — used on cards + banner */
.star-ico { flex-shrink: 0; display: inline-block; vertical-align: -3px; }
.banner-star .star-ico { width: 21px; height: 21px; vertical-align: middle; }

/* ---- Badges / chips ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 700; letter-spacing: .01em;
  background: var(--brand-50); color: var(--brand-dark);
}
.badge.gray { background: #f1f5f9; color: var(--muted); }
.badge.join { background: #ecfdf5; color: var(--join-dark); }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 0.74rem; font-weight: 600; color: var(--muted);
  background: #f1f5f9;
}

/* ---- Hero, feature cards, testimonials, Top Clubs → styles/pages.css ---- */

/* ---- Filter bar ---- */
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 22px 0 18px;
}
.search {
  flex: 1; min-width: 220px; position: relative;
}
.search input {
  width: 100%; padding: 12px 14px 12px 40px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; outline: none;
}
.search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
/* Single source of truth for custom-arrow selects — background-COLOR (not shorthand) so the
   chevron never tiles; one chevron, no-repeat, positioned 1rem from the right. */
.select, .field select.select {
  padding: 12px 2.5rem 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background-color: #fff; outline: none; color: var(--ink);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.select:focus { border-color: var(--brand); }

.cat-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.cat-pill {
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
  background: #fff; border: 1px solid var(--line);
}
.cat-pill:hover { border-color: var(--brand); color: var(--brand-dark); }
.cat-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---- Directory grid + cards ---- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding-bottom: 60px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-cover {
  height: 118px; position: relative;
  display: grid; place-items: center; color: #fff; font-size: 2.2rem;
}
.card-cover .cover-fav {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.9); color: var(--faint);
  display: grid; place-items: center; font-size: 1.15rem; box-shadow: var(--shadow-sm);
}
.card-cover .cover-fav.on { color: var(--star); }
/* Cover branding: big translucent category glyph + a small category label */
.card-cover .cover-mark { font-size: 3.4rem; opacity: 0.9; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); pointer-events: none; }
.card-cover .cover-cat { position: absolute; left: 12px; bottom: 10px; font-size: 0.68rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #fff;
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.28); backdrop-filter: blur(4px);
  padding: 3px 9px; border-radius: var(--r-pill); pointer-events: none; }
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
/* Inline flex header — Club ID + Joined badge lock beside the title on single/multi-line cards */
.card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; cursor: pointer; }
.card-title h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.card-title:hover h3 { color: var(--brand-dark); }
.card-meta { font-size: 0.8rem; color: var(--faint); }
.card-desc { font-size: 0.9rem; color: var(--muted); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; gap: 8px; margin-top: auto; }   /* pin to card bottom so footers align across a row */
.card-foot .btn, .card-foot .fav-btn { flex: 1; white-space: nowrap; min-width: 0; }
.card-idline { margin-top: -2px; }
/* Saved → the bookmark icon turns gold */
.fav-btn.on .bm-ico, .banner-ico.on .bm-ico { color: var(--star); }

.empty {
  text-align: center; color: var(--muted); padding: 60px 20px;
}
.empty .big { font-size: 2.6rem; }

/* ---- Generic page section ---- */
.view { padding-top: 12px; }
.page-head { padding: 30px 0 8px; }
.page-head h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* ---- Forms ---- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: #fff; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50);
}
.field textarea { resize: vertical; min-height: 88px; }
.form-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px; box-shadow: var(--shadow-sm);
  max-width: 680px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 0.82rem; color: var(--faint); }
/* Live bio character counter */
.char-count { text-align: right; font-size: 0.75rem; color: var(--faint); margin-top: 4px; }
.char-count.warn { color: #d97706; }
.char-count.max { color: var(--danger); font-weight: 700; }

/* ---- Overlays, modal shell, lightbox, confirm, toast, share → styles/components.css ---- */

/* Club modal specifics */
.club-hero { height: 150px; margin-top: -62px; display: grid; place-items: center; color: #fff; font-size: 3rem; }
.club-head { padding: 16px 22px 4px; }
.club-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.club-head .sub { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.section-title { font-size: 0.78rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint); margin: 18px 0 8px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery .thumb {
  height: 72px; border-radius: var(--r-sm); overflow: hidden; cursor: pointer;
  background: #f1f5f9; display: grid; place-items: center; color: var(--faint);
}
.gallery .thumb img, .gallery .thumb video { width: 100%; height: 100%; object-fit: cover; }
/* Fixed 4×2 gallery box — always reserves the 2-row footprint so the column never resizes */
.gallery-fixed { grid-template-rows: repeat(2, 72px); }
.gallery-empty { display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 152px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm);
  color: var(--faint); font-size: 0.88rem; }
/* Video thumbnail play badge (so clips read as video even before a frame paints) */
.gallery .thumb .vid-badge, .gp-item .vid-badge { position: absolute; bottom: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff;
  font-size: 0.55rem; display: grid; place-items: center; pointer-events: none; }
/* "+N more" gateway tile (the 8th cell when more media exist) */
.gallery .thumb.more .more-overlay { position: absolute; inset: 0; background: rgba(17,24,39,0.6);
  color: #fff; font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; }
.leader-row {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 8px; width: 100%; text-align: left;
}
.leader-row:hover { background: #f1f5f9; }
.leader-row .who { flex: 1; min-width: 0; }
.leader-row .who .n { font-size: 0.9rem; font-weight: 600; }
.leader-row .who .r { font-size: 0.76rem; color: var(--muted); }
.info-line { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; font-size: 0.9rem; }
.info-line .k { color: var(--faint); width: 90px; flex-shrink: 0; }

.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions > * { flex: 1; }

/* Auth modal, Lightbox, Confirm → styles/components.css */

/* ---- Profile page ---- */
.profile-head { display: flex; gap: 18px; align-items: center; padding: 26px 0 6px; }
.profile-head .meta h1 { font-size: 1.6rem; font-weight: 800; }
.profile-head .meta p { color: var(--muted); }

/* ---- Toast → styles/components.css ---- */

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: #fff; flex-shrink: 0;
  text-align: center; padding: 30px; margin-top: 48px; color: var(--faint); font-size: 0.85rem; }

/* ---- Hero extras, feature cards, reviews header, testimonials → styles/pages.css ---- */

/* ---- Browse result meta ---- */
.result-meta { color: var(--muted); font-size: 0.88rem; margin: 2px 0 14px; }

/* ---- Recruitment badges ---- */
.badge.recruit-open { background: #ecfdf5; color: var(--join-dark); }
.badge.recruit-app { background: #fffbeb; color: #b45309; }
.badge.recruit-all { background: var(--brand-50); color: var(--brand-dark); }
/* Public / Private status — identical purple pill for both, white text */
.badge.privacy-badge { background: var(--brand-dark); color: #fff; border: none; }
[data-theme="dark"] .badge.privacy-badge { background: var(--brand); color: var(--navy); }

/* ---- Contact Leader button icon alignment ---- */
.btn svg, .badge svg { display: block; }

/* ---- Reviews & ratings (club modal) ---- */
.reviews-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 20px 0 12px; }
.rating-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.rating-line strong { font-size: 1rem; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review-top { display: flex; align-items: center; gap: 10px; }
.review-who .n { font-size: 0.9rem; font-weight: 700; }
.review-text { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.star-picker { display: flex; gap: 6px; }
.star-picker button { color: #d1d5db; padding: 4px; border-radius: 8px; transition: color .12s, transform .05s; }
.star-picker button svg { width: 26px; height: 26px; }
.star-picker button:hover { transform: scale(1.1); }
.star-picker button.on { color: var(--star); }

/* ---- Invite-code field ---- */
.invite-field { background: var(--brand-50); border: 1px dashed var(--brand-light); border-radius: var(--r-sm); padding: 14px; }
.form-note.ok { color: var(--join-dark); font-weight: 600; }
.form-note.bad { color: var(--danger); font-weight: 600; }

/* ---- Layout helpers ---- */
.container.narrow { max-width: 720px; }
.center-page { display: flex; flex-direction: column; align-items: center; }
.center-page .form-card { width: 100%; }

/* ---- Top Clubs spotlight → styles/pages.css ---- */

/* ---- Full-page Club Detail ---- */
/* Floating Back pill — ONLY the pill is sticky (no full-width strip/backdrop), flush with the card */
.back-pill {
  position: sticky; top: calc(var(--header-h) + 12px); z-index: 30;
  display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 12px 2px;
  padding: 9px 16px; border-radius: var(--r-pill);
  background: var(--glass-bg); color: var(--ink); font-weight: 700; font-size: 0.85rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.back-pill:hover { background: var(--glass-bg-hover); }
/* Share Club pill — top-right of the club banner */
.share-pill {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--glass-bg); color: var(--ink); font-weight: 700; font-size: 0.82rem;
  box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.share-pill:hover { background: var(--glass-bg-hover); }
/* Banner Star — top-left of the club banner, mirrors the Share pill */
.banner-star {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.2rem; line-height: 1;
  display: grid; place-items: center; color: var(--faint);
  background: var(--glass-bg); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.banner-star:hover { background: var(--glass-bg-hover); }
.banner-star.on { color: #F59E0B; }
/* Review author controls (Edit / Delete) */
.review-ctrls { display: flex; gap: 12px; margin-top: 6px; }
.review-ctrls button { font-size: 0.76rem; font-weight: 600; color: var(--faint); }
.review-ctrls button:hover { color: var(--brand-dark); }
/* Officer replies to a review (President / VP / Treasurer / Secretary only) */
.review-reply { margin: 10px 0 0 44px; padding: 9px 12px; background: var(--brand-50); border-radius: var(--r-sm); }
.review-reply .rr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .review-reply { margin-left: 0; } }
.review-reply .rr-name { font-weight: 700; font-size: 0.82rem; }
.review-reply .rr-text { font-size: 0.88rem; color: var(--ink); margin-top: 4px; }
.review-reply .rr-del { font-size: 0.72rem; font-weight: 600; color: var(--faint); }
.review-reply .rr-del:hover { color: var(--danger); }
.review-reply-btn { margin-top: 8px; font-size: 0.78rem; font-weight: 700; color: var(--brand-dark); }
.review-reply-btn:hover { text-decoration: underline; }
[data-theme="dark"] .review-reply { background: var(--surface-2); }
/* Full vertical gallery page (opened from the "+N" tile) */
.gallery-page { position: fixed; inset: 0; z-index: 150; background: var(--bg); overflow-y: auto; padding: 20px 16px 40px; }
.gp-head { display: flex; align-items: center; gap: 16px; max-width: 720px; margin: 0 auto 18px; }
.gp-head .back-pill { position: static; margin: 0; }
.gp-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-grid { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; }
.gp-item { position: relative; border-radius: var(--r); overflow: hidden; cursor: pointer; background: #f1f5f9; }
.gp-item img, .gp-item video { width: 100%; display: block; }
[data-theme="dark"] .gp-item { background: var(--surface-2); }
/* Share modal → styles/components.css */
/* Public Club ID chip (e.g. #A8K9X2) */
.club-id-chip { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 0.72rem; font-weight: 700;
  color: var(--brand-dark); background: var(--brand-50); border-radius: var(--r-pill); padding: 2px 8px; letter-spacing: .02em; }
.club-head .club-id-chip { font-size: 0.8rem; }
/* "✓ Joined" membership pill next to the Club ID — normalized across all cards */
.joined-chip { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 700; line-height: 1.4;
  white-space: nowrap; color: var(--join-dark); background: #ecfdf5; border: 1px solid #a7f3d0;
  border-radius: var(--r-pill); padding: 2px 8px; }
[data-theme="dark"] .joined-chip { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
/* Narrow, centered search bar for Saved / My Clubs */
.search-narrow { max-width: 420px; margin: 0 auto 18px; }
.club-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.club-page.club-manage { max-width: 860px; margin: 0 auto 20px; }   /* Manage = single readable column */
.club-page .club-hero { height: 180px; margin: 0; position: relative; }
.club-page .club-head { padding: 18px 24px 6px; }

/* ---- Club Detail layout: left main + right (roster/chat) grid, reviews full-width below ---- */
/* Columns stretch to equal height so the right column (chat) reaches the bottom of the left. */
.club-detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr); gap: 1.5rem; align-items: stretch; margin-bottom: 20px; }
.club-main-content { min-width: 0; }
/* Grid owns the bottom spacing, so the left card drops its own margin (keeps both columns level) */
.club-detail-grid .club-main-content.club-page { margin-bottom: 0; }
.club-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sidebar-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 18px; }
.side-roster .section-title:first-child, .side-chat .section-title:first-child { margin-top: 0; }
/* Officers & Members: ~6 rows visible, then scroll */
.roster-scroll { max-height: 21rem; overflow-y: auto; padding-right: 2px; }
.roster-scroll .leader-row:last-child { margin-bottom: 0; }
/* Chat is a large, fixed-height section that fills the column and scrolls (older messages up top) */
.side-roster { flex: 0 0 auto; }
.side-chat { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 260px; }
/* Capped so the feed scrolls instead of stretching the column as messages pile up */
.side-chat .chat-feed { flex: 1 1 auto; min-height: 0; max-height: 46vh; overflow-y: auto; }
.side-chat .chat-locked { flex: 0 0 auto; }
.club-reviews-full { margin-bottom: 24px; }
/* Action button row in the left main column wraps cleanly */
.modal-actions.wrap { flex-wrap: wrap; }
.club-actions { margin: 2px 0 22px; }   /* gap so the buttons don't touch the Officers/Members card */
.club-actions > * { min-width: 130px; }
.club-actions svg { vertical-align: -3px; }
/* About: mini box capped at ~3 lines, then scroll (keeps the main column a fixed size) */
.about-box { margin: 0 0 4px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--muted); font-size: 0.92rem; line-height: 1.55;
  max-height: 4.65em; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 960px) {
  .club-detail-grid { grid-template-columns: 1fr; gap: 1rem; }
}
.club-tabs { display: flex; justify-content: center; gap: 8px; padding: 6px 24px 0; border-bottom: 1px solid var(--line); }
.club-tab { padding: 12px 32px; font-weight: 700; font-size: 0.95rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.club-tab:hover { color: var(--ink); }
.club-tab.active { color: var(--brand-dark); border-color: var(--brand); }
.club-content { padding: 20px 24px 28px; }

/* Social links (public About) */
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.social-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--brand-50); color: var(--brand-dark); font-size: 0.82rem; font-weight: 600; }
.social-pill:hover { background: var(--brand-light); color: var(--navy); }
/* 2 rows × 4 equal-length pills; long links truncate with … so every pill stays the same size */
.socials-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.socials-grid .social-pill { width: 100%; min-width: 0; justify-content: flex-start; }
.socials-grid .sp-ico { flex-shrink: 0; }
.socials-grid .sp-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .socials-grid { grid-template-columns: repeat(2, 1fr); } }
/* Invalid link input feedback */
.mg-link.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }

/* Roster / management */
.roster-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.roster-row .who { flex: 1; min-width: 0; }
.roster-row .who .n { font-size: 0.9rem; font-weight: 600; }
.roster-row select { padding: 7px 28px 7px 10px; }
.danger-zone { display: flex; gap: 10px; flex-wrap: wrap; }

/* Chat */
.chat-feed { max-height: 340px; overflow-y: auto; padding: 6px 0; display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.chat-msg { display: flex; gap: 10px; }
.chat-msg .cm-body { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; flex: 1; }
.chat-msg.announce .cm-body { background: #fffbeb; border-color: #fde68a; }
.cm-body.deleted { color: var(--faint); background: #f1f5f9; }
.cm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.cm-who { font-size: 0.82rem; font-weight: 700; }
.cm-time { font-size: 0.72rem; color: var(--faint); margin-left: auto; }
.cm-text { font-size: 0.92rem; color: var(--ink); }
.cm-ctrls { display: flex; gap: 10px; margin-top: 4px; }
.cm-ctrls button { font-size: 0.74rem; color: var(--faint); font-weight: 600; }
.cm-ctrls button:hover { color: var(--brand-dark); }
.chat-compose { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.chat-compose input[type=text] { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); outline: none; }
.chat-compose input[type=text]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.chat-ann { display: flex; align-items: center; gap: 4px; font-size: 1.1rem; cursor: pointer; }
.chat-locked { text-align: center; padding: 12px; background: #f8fafc; border: 1px dashed var(--line); border-radius: var(--r-sm); }

/* Transfer / picker */
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.pick-row:hover { background: #f8fafc; }

/* Settings */
.settings-tabs { display: flex; gap: 6px; background: #f1f5f9; padding: 4px; border-radius: var(--r); margin-bottom: 16px; max-width: 360px; }
.settings-tab { flex: 1; padding: 9px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.settings-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.avatar-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tr-title { font-weight: 700; }
.switch { width: 48px; height: 28px; border-radius: var(--r-pill); background: #cbd5e1; position: relative; transition: background .15s; flex-shrink: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: var(--shadow-sm); }
.switch.on { background: var(--brand); } .switch.on span { left: 23px; }

/* Create media */
.media-row { display: flex; gap: 10px; align-items: center; }
.media-row input[type=url] { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); outline: none; }
.banner-preview { margin-top: 10px; border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 14px; color: var(--faint); font-size: 0.85rem; text-align: center; position: relative; }
.banner-preview.has-img { padding: 0; border-style: solid; overflow: hidden; }
.banner-preview img { width: 100%; height: 150px; object-fit: cover; display: block; }
.mini-x { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(17,24,39,.8); color: #fff; font-size: 0.75rem; display: grid; place-items: center; }
.gallery .thumb { position: relative; }

/* ---- Upload dropzone (Start-a-Club + Manage banner) ---- */
.uploader { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px;
  padding: 18px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); color: var(--muted);
  font-size: 0.88rem; cursor: pointer; background: #fbfcfe; text-align: center; }
.uploader:hover, .uploader.drag { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-50); }
.up-ico { font-size: 1.05rem; }

/* ---- Dynamic link rows ---- */
.link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.link-row .mg-link { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); outline: none; }
.link-row .mg-link:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.mini-x-inline { width: 36px; height: 40px; border-radius: var(--r-sm); background: #f1f5f9; color: var(--muted); flex-shrink: 0; }
.mini-x-inline:hover { background: #fee2e2; color: var(--danger); }

/* ---- Misc ---- */
.link { color: var(--brand-dark); font-weight: 600; font-size: 0.85rem; }
.link:hover { text-decoration: underline; }
.link.disabled { opacity: .5; pointer-events: none; cursor: default; text-decoration: none; }
.review-time { color: var(--faint); font-size: 0.76rem; margin-left: auto; white-space: nowrap; }
/* Main-page review timestamp sits BELOW the author details, not on the right */
.ttime { display: block; color: var(--faint); font-size: 0.74rem; margin-top: 3px; }

/* Centered page headers (My Clubs, Settings) — headers/toggles center, card grid stays left */
.page-head.centered { text-align: center; }
.centered-tabs { margin-left: auto; margin-right: auto; max-width: 420px; }
.settings-tabs.centered-tabs { max-width: 360px; }

/* President role lock note */
.role-lock { font-size: 0.78rem; color: #b45309; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--r-sm); padding: 7px 10px; margin: 4px 0 8px 44px; }
.roster-row select:disabled { background: #f1f5f9; color: var(--faint); cursor: not-allowed; }
.profile-edit { margin-top: 14px; }

/* Centered card grids (Saved Clubs + My Clubs) — fixed-width columns centered in the row */
.grid.center { justify-content: center; grid-template-columns: repeat(auto-fill, minmax(300px, 340px)); }

/* Three-action form footer (Cancel / Save as Draft / Publish) */
.modal-actions.three { display: flex; gap: 10px; }
.modal-actions.three > * { flex: 1; }
.btn.amber { background: #f59e0b; color: #fff; }
.btn.amber:hover { background: #d97706; }

/* Draft cards */
.draft-card .draft-cover { height: 118px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, #64748b, #475569); font-size: 1.1rem; letter-spacing: .04em; }
.draft-card .card-foot .btn { flex: 1; }

/* Bot system notification line in club chat */
.chat-system { text-align: center; font-size: 0.82rem; color: var(--muted); background: var(--brand-50);
  border: 1px solid var(--brand-light); border-radius: var(--r-pill); padding: 6px 14px; align-self: center; max-width: 90%; margin: 2px auto; }

/* Full-width select inside a settings field */
.block-select { width: 100%; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .logout-btn span { display: none; }
  .modal-actions.three { flex-direction: column; }
}
@media (max-width: 720px) {
  .brand { font-size: 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; text-align: center; }
  .reviews-head { flex-direction: column; align-items: flex-start; }
}

/* ---- Standalone About-Us pages (banner / prose / FAQ / shops) → styles/pages.css ---- */

/* ---- Mobile dropdown nav (hamburger) ---- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-inner { grid-template-columns: 1fr auto auto; gap: 10px; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: 10px 16px 16px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open-mobile { display: flex; }
  .nav-trigger { width: 100%; justify-content: space-between; }
  /* Panel is a light card — override the white-on-navy header link colors */
  .site-header .nav .nav-trigger { color: var(--ink); }
  .site-header .nav .nav-trigger:hover, .site-header .nav .nav-trigger.active { background: var(--surface-2); color: var(--brand-dark); }
  .nav-menu { position: static; transform: none; min-width: 0; box-shadow: none; border: none;
    padding: 2px 0 6px 10px; display: none; animation: none; }
  .nav-item.open > .nav-menu { display: block; }
}
