/* ClubSyncHQ — base styles. Tokens match the mockups and the logo sheet. */
:root {
  /* Brand */
  --navy: #0F1B26;
  --navy-2: #18283A;
  --navy-3: #22364A;
  --club-blue: #1D4ED8;
  --club-blue-dark: #1E3A8A;
  --relay-blue: #3B82F6;
  --amber: #F5A524;
  --sky: #8FB0F7;

  /* Surfaces & text */
  --bg: #F2F4F6;
  --mist: #F4F5F7;
  --surface: #FFFFFF;
  --border: #DDE2E7;
  --border-soft: #EEF1F4;
  --ink: #14202B;
  --muted: #56626E;
  --muted-on-dark: #9AA8B5;

  /* Status (text on tint) */
  --ok-bg: #DDF2EE;     --ok-fg: #0F5F59;
  --warn-bg: #FDF0E1;   --warn-fg: #9A4A08;
  --info-bg: #E6EDFC;   --info-fg: #1E40AF;
  --neutral-bg: #EEF1F4; --neutral-fg: #44505B;

  /* Type */
  --font-brand: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-ui: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --tap: 44px; /* minimum touch target */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--club-blue); }
a:hover { color: var(--club-blue-dark); }

h1, h2, h3 { line-height: 1.2; margin: 0; }

.brand-type {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid #C5CDD5;
  background: var(--surface);
  color: var(--ink);
  font: 600 14px var(--font-ui);
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--club-blue); border-color: var(--club-blue); color: #FFFFFF; }
.btn-primary:hover { background: var(--club-blue-dark); color: #FFFFFF; }

/* Cards & pills */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-info { background: var(--info-bg); color: var(--info-fg); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }

/* Forms */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--neutral-fg); }
input, select, textarea {
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid #C5CDD5;
  border-radius: var(--radius-sm);
  font: 400 15px var(--font-ui);
  color: var(--ink);
  background: var(--surface);
}
textarea { padding: 10px 12px; }
:focus-visible { outline: 3px solid var(--relay-blue); outline-offset: 2px; }

/* Landing (placeholder home page) */
.landing { background: var(--navy); color: #FFFFFF; min-height: 100vh; }
.landing-main {
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}
.landing-logo { width: min(320px, 80vw); height: auto; }
.landing-title { font-family: var(--font-brand); font-weight: 700; font-size: clamp(30px, 7vw, 44px); letter-spacing: 0.02em; text-transform: uppercase; }
.landing-copy { margin: 0; font-size: 17px; color: #C9D3DC; }
.landing-status { margin: 8px 0 0; font-size: 14px; color: var(--muted-on-dark); }

/* ---------- Join page (/join/<club>) — phone first ---------- */
.join { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.join-header {
  display: flex; align-items: center; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 20px 16px;
  background: var(--navy); color: #FFFFFF;
}
.join-mark { flex: 0 0 auto; }
.join-club { font-family: var(--font-brand); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; }
.join-sub { font-size: 13px; color: var(--muted-on-dark); }
.join-main { flex: 1 0 auto; width: 100%; max-width: 480px; margin: 0 auto; padding: 20px 16px 32px; }
.join-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px 20px; }
.join-title { font-family: var(--font-brand); font-weight: 700; font-size: 32px; letter-spacing: 0.02em; text-transform: uppercase; }
.join-intro { margin: 8px 0 20px; color: var(--muted); }
.join-form { display: flex; flex-direction: column; gap: 16px; }
.join-row label { font-size: 14px; color: var(--ink); }
.join-row input { width: 100%; min-height: 52px; font-size: 17px; border-radius: 10px; }
.join-row input[aria-invalid="true"] { border-color: var(--warn-fg); }
.join-err { margin: 6px 0 0; font-size: 14px; color: var(--warn-fg); font-weight: 600; }
.join-alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-fg); font-weight: 600; }
.join-suggest { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info-fg); }
.join-suggest p { margin: 0 0 10px; }
.join-suggest-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.join-submit { width: 100%; min-height: 56px; font-size: 17px; border-radius: 12px; margin-top: 4px; }
.join-consent { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.join-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.join-done p { margin: 0 0 8px; color: var(--muted); }
.join-check { width: 64px; height: 64px; }
.join-again { margin-top: 8px; }
.join-footer { padding: 16px 16px max(20px, env(safe-area-inset-bottom)); display: flex; justify-content: center; background: var(--navy); }
.join-footer img { height: 20px; width: auto; opacity: 0.85; }

/* ---------- Admin (sign-ups) ---------- */
.admin { background: var(--bg); }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--navy); color: #FFFFFF; }
.admin-bar img { height: 26px; width: auto; }
.admin-bar a { color: var(--sky); font-size: 14px; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.admin-title { font-family: var(--font-brand); font-weight: 700; font-size: 30px; letter-spacing: 0.02em; text-transform: uppercase; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-stat { flex: 1 1 140px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.admin-stat b { display: block; font-family: var(--font-brand); font-size: 28px; }
.admin-stat span { font-size: 13px; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-flash { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info-fg); font-weight: 600; }
.admin-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; padding: 10px 12px; background: #F7F8FA; color: var(--neutral-fg); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--border-soft); vertical-align: top; }
.admin-table .muted { color: var(--muted); font-size: 12px; }
.admin-login { max-width: 380px; margin: 60px auto; }
.admin-login form { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Admin: nav, QR codes, printable sign ---------- */
.admin-bar { flex-wrap: wrap; }
.admin-bar-logo { display: inline-flex; }
.admin-nav { display: flex; gap: 4px; margin-right: auto; }
.admin-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: var(--radius-sm); color: #C9D3DC; text-decoration: none; font-weight: 600; font-size: 14px; }
.admin-nav a:hover { background: var(--navy-2); color: #FFFFFF; }
.admin-nav a[aria-current="page"] { background: var(--navy-3); color: #FFFFFF; }
.admin-lede { margin: 6px 0 0; color: var(--muted); }
.admin-h2 { font-family: var(--font-brand); font-weight: 700; font-size: 22px; letter-spacing: 0.02em; text-transform: uppercase; margin: 0 0 12px; }
.admin-flash-warn { background: var(--warn-bg); color: var(--warn-fg); }
.admin-table-narrow { min-width: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--mist); padding: 1px 6px; border-radius: 6px; }

.qr-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
.qr-form-wide { grid-column: 1 / -1; }
.qr-form .btn { grid-column: 1 / -1; justify-self: start; }
.qr-optional { font-weight: 400; color: var(--muted); }
@media (max-width: 560px) { .qr-form { grid-template-columns: minmax(0, 1fr); } }

.qr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.qr-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px; }
.qr-thumb { flex: 0 0 96px; width: 96px; height: 96px; }
.qr-thumb svg { width: 100%; height: 100%; display: block; }
.qr-info { flex: 1 1 auto; min-width: 0; }
.qr-label { margin: 0; font-size: 17px; }
.qr-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.qr-count { margin: 8px 0 0; font-size: 14px; }
.qr-count b { font-family: var(--font-brand); font-size: 22px; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.sign-toolbar { max-width: 1100px; margin: 0 auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.sign-heading .admin-lede { overflow-wrap: anywhere; }
.sign-sheet { padding: 8px 16px 40px; display: flex; justify-content: center; }
.sign {
  container-type: inline-size;
  width: min(100%, 8.5in); aspect-ratio: 8.5 / 11;
  background: #FFFFFF; color: var(--navy); box-shadow: 0 2px 12px rgba(15, 27, 38, 0.15);
  display: flex; flex-direction: column; font-family: var(--font-brand); overflow: hidden;
}
.sign-top { flex: 0 0 auto; background: var(--navy); color: #FFFFFF; text-align: center; padding: 5.5cqw 7cqw 5cqw; }
.sign-club { font-size: 4.9cqw; font-weight: 600; letter-spacing: 0.06em; color: var(--sky); }
.sign-big { font-size: 12.4cqw; font-weight: 700; line-height: 0.95; letter-spacing: 0.01em; margin-top: 1cqw; }
.sign-mid { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqw; }
.sign-qr { flex: 0 0 auto; width: 55cqw; height: 55cqw; border: 1cqw solid var(--navy); border-radius: 3cqw; padding: 1.2cqw; }
.sign-qr svg { width: 100%; height: 100%; display: block; }
.sign-how { font-size: 4.6cqw; font-weight: 600; letter-spacing: 0.03em; text-align: center; line-height: 1.2; }
.sign-how b { color: var(--club-blue); }
.sign-foot > div { min-width: 0; }
.sign-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: 3.5cqw 7cqw 5cqw; border-top: 0.3cqw solid var(--mist); }
.sign-url { font-size: 2.6cqw; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.sign-tag { display: block; max-width: 62cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.6cqw; padding: 0.4cqw 1.4cqw; border-radius: 999px; background: var(--mist); color: var(--muted); font-size: 1.9cqw; font-weight: 600; letter-spacing: 0.05em; }
.sign-logo { height: 5cqw; width: auto; }

@media print {
  @page { size: letter; margin: 0; }
  .no-print { display: none !important; }
  body.sign-page { background: #FFFFFF; }
  .sign-sheet { padding: 0; }
  html, body { margin: 0; }
  .sign { width: 8.5in; height: 11in; aspect-ratio: auto; break-inside: avoid; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Admin: leaders ---------- */
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-user-name { display: inline-flex; flex-direction: column; justify-content: center; min-height: var(--tap); padding: 0 10px; border-radius: var(--radius-sm); color: #FFFFFF; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.admin-bar a.admin-user-name { color: #FFFFFF; }
.admin-user-name:hover, .admin-user-name[aria-current="page"] { background: var(--navy-3); }
.admin-user-role { font-size: 12px; font-weight: 500; color: var(--sky); }
.btn-danger { border-color: #E3B48A; color: var(--warn-fg); }
.btn-danger:hover { background: var(--warn-bg); color: var(--warn-fg); }
.leader-link { border-color: var(--club-blue); }
.leader-link-url { margin: 12px 0; overflow-wrap: anywhere; }
.leader-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.leader-item { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.leader-name { margin: 0; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.leader-meta { margin: 4px 0 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.leader-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.leader-former summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }
.leader-former ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.admin-login form { margin-top: 4px; }
.admin-login .admin-lede { margin-bottom: 8px; }

/* ---------- Club look (branded public pages) ---------- */
.branded {
  --club-primary: #0F1B26; --club-on-primary: #FFFFFF;
  --club-accent: #1D4ED8; --club-on-accent: #FFFFFF;
  --club-font-heading: var(--font-brand); --club-heading-weight: 700; --club-heading-case: uppercase;
  --club-font-body: var(--font-ui);
  font-family: var(--club-font-body);
}
.branded .btn-primary { background: var(--club-accent); border-color: var(--club-accent); color: var(--club-on-accent); }
.branded .btn-primary:hover { filter: brightness(0.92); color: var(--club-on-accent); }
.branded a { color: var(--club-accent); }
.branded a.btn:not(.btn-primary) { color: var(--ink); }
.branded .join-header { background: var(--club-primary); color: var(--club-on-primary); }
.branded .join-sub { color: var(--club-on-primary); opacity: 0.8; }
.branded .join-club, .branded .join-title, .branded .club-name, .branded .club-card-title {
  font-family: var(--club-font-heading); font-weight: var(--club-heading-weight); text-transform: var(--club-heading-case);
}
.join-mark-link { display: inline-flex; flex: 0 0 auto; }
.join-logo { width: 48px; height: 48px; object-fit: contain; }

/* Club page (/dbg) */
.club-page { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.club-hero { position: relative; overflow: hidden; background: var(--club-primary); color: var(--club-on-primary); text-align: center; }
.club-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.club-hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 16, 24, 0.45) 0%, rgba(10, 16, 24, 0.7) 100%); }
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .club-hero.has-photo::after { background: linear-gradient(180deg, color-mix(in srgb, var(--club-primary) 55%, rgba(10, 16, 24, 0.35)) 0%, color-mix(in srgb, var(--club-primary) 70%, rgba(10, 16, 24, 0.85)) 100%); }
}
.club-hero.has-photo { color: #FFFFFF; }
.club-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: max(40px, env(safe-area-inset-top)) 20px 36px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.club-logo { width: 128px; height: 128px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35)); }
.club-hero.has-photo .club-name, .club-hero.has-photo .club-motto { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.club-name { margin: 0; font-size: clamp(34px, 9vw, 56px); line-height: 1; letter-spacing: 0.01em; }
.club-motto { margin: 6px 0 0; font-family: var(--club-font-heading); font-size: clamp(20px, 5.5vw, 28px); line-height: 1.15; }
.club-motto-2 { margin: 0; font-size: 16px; opacity: 0.85; font-style: italic; }
.club-main { flex: 1 0 auto; width: 100%; max-width: 560px; margin: 0 auto; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 14px; }
.club-intro { margin: 0; font-size: 17px; color: var(--ink); text-align: center; }
.club-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.club-card-title { margin: 0; font-size: 24px; letter-spacing: 0.02em; color: var(--ink); }
.club-card p { margin: 6px 0 14px; color: var(--muted); }
.club-btn { width: 100%; min-height: 52px; font-size: 16px; border-radius: 12px; }
.club-footer { padding: 16px 16px max(20px, env(safe-area-inset-bottom)); display: flex; justify-content: center; background: var(--navy); }
.club-footer img { height: 20px; width: auto; opacity: 0.85; }

/* Home page (clubsynchq.com) */
.home-main { justify-content: flex-start; padding-top: 56px; }
.home-paths { width: 100%; display: grid; gap: 14px; text-align: left; }
.home-card { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 20px; }
.home-card p { margin: 6px 0 14px; color: var(--muted); }
.home-card-title { font-family: var(--font-brand); font-weight: 700; font-size: 24px; letter-spacing: 0.02em; text-transform: uppercase; }
.home-btn { width: 100%; min-height: 52px; font-size: 16px; border-radius: 12px; }
.home-clubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.home-club { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--ink); }
.home-club:hover { border-color: var(--club-blue); color: var(--ink); }
.home-club-logo { flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain; border-radius: 10px; }
.home-club-initials { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-brand); font-weight: 700; font-size: 22px; }
.home-club-name { display: block; font-weight: 600; }
.home-club-motto { display: block; font-size: 13px; color: var(--muted); }
@media (min-width: 720px) { .home-paths { grid-template-columns: 1fr 1fr; } .home-main { max-width: 900px; } }

/* Admin: club page settings */
.brand-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 960px) { .brand-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } .brand-preview-wrap { position: sticky; top: 16px; } }
.brand-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.brand-form .admin-h2 { margin: 10px 0 0; }
.brand-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.brand-image { display: flex; flex-direction: column; gap: 8px; }
.brand-label { font-size: 13px; font-weight: 600; color: var(--neutral-fg); }
.brand-thumb { width: 100%; max-height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--mist); }
.brand-thumb-logo { width: 96px; height: 96px; object-fit: contain; }
.brand-file { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 14px; border: 1px dashed #A9B6C2; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--ink); position: relative; }
.brand-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.brand-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.brand-check input { min-height: 0; width: 18px; height: 18px; }
.brand-hint { font-size: 13px; color: var(--muted); margin: 0; }
.brand-colors { display: flex; flex-wrap: wrap; gap: 16px; }
.brand-colors input[type=color] { width: 120px; height: 48px; padding: 4px; }
.brand-form textarea { width: 100%; }
.brand-preview { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--bg); margin-top: 8px; }
.brand-preview .club-hero-inner { padding: 28px 16px 24px; }
.brand-preview .club-logo { width: 80px; height: 80px; }
.brand-preview .club-name { font-size: 34px; }
.brand-preview .club-main { padding: 14px; }
.brand-preview [hidden] { display: none !important; }

/* ---------- Admin: app-style tab bar on phones ---------- */
.tabbar { display: none; }
@media (max-width: 640px) {
  .admin-nav, .admin-user { display: none; }
  .admin-bar { padding-top: max(12px, env(safe-area-inset-top)); }
  body.admin { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 4px env(safe-area-inset-bottom); background: rgba(15, 27, 38, 0.97); border-top: 1px solid var(--navy-3);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px;
    border-radius: 10px; color: var(--muted-on-dark); text-decoration: none; font-size: 11px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: #FFFFFF; }
  .tabbar a[aria-current="page"] svg { color: var(--amber); }
}
@media print { .tabbar { display: none !important; } body.admin { padding-bottom: 0; } }

/* ---------- Match day ---------- */
.md-main { max-width: 640px; }
.md-event { margin-top: 10px; }
.md-event label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.md-event select { min-height: var(--tap); font-size: 16px; }
.md-card { display: flex; flex-direction: column; gap: 10px; }
.md-card .admin-h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.md-big { min-height: 60px; font-size: 18px; width: 100%; }
.md-qr-row { display: flex; gap: 16px; align-items: center; }
.md-qr-btn { padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #FFFFFF; cursor: zoom-in; }
.md-qr { flex: 0 0 112px; width: 112px; height: 112px; display: block; }
.md-code-label { margin: 0 0 4px; font-weight: 700; }
.md-show { margin-top: 8px; min-height: var(--tap); }
.md-live { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ok-fg); background: var(--ok-bg); border-radius: 999px; padding: 2px 10px; }
.md-live-off { color: var(--warn-fg); background: var(--warn-bg); }
.md-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.md-stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 6px; border-radius: var(--radius-sm); background: var(--mist); font-size: 13px; color: var(--muted); line-height: 1.2; }
.md-num { font-family: var(--font-brand); font-weight: 700; font-size: 40px; line-height: 1; color: var(--ink); }
.md-unsynced { font-size: 14px; }
.md-recent, .md-prices { list-style: none; margin: 0; padding: 0; }
.md-recent li, .md-prices li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.md-recent li:last-child, .md-prices li:last-child { border-bottom: 0; }
.md-recent em { color: var(--muted); font-style: normal; font-size: 13px; }
.md-time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.md-empty { color: var(--muted); justify-content: center !important; }
.md-prices li { font-size: 17px; }
.md-prices strong { white-space: nowrap; }
.md-prices .md-price-head { font-family: var(--font-brand); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-size: 15px; padding-top: 16px; }
.md-notes { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info-fg); }
.md-edit summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; color: var(--club-blue); }
.md-edit form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.md-edit label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.md-edit .brand-hint { font-weight: 400; }
.md-edit textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 100%; }
.md-full { position: fixed; inset: 0; z-index: 50; background: #FFFFFF; display: flex; align-items: center; justify-content: center; padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
.md-full[hidden] { display: none; }
.md-full-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 560px; text-align: center; }
.md-full-title { font-family: var(--font-brand); font-weight: 700; font-size: clamp(28px, 8vw, 44px); text-transform: uppercase; line-height: 1.05; color: var(--navy); }
.md-full-sub { color: var(--muted); font-size: 18px; }
.md-full-qr { width: min(88vw, 62vh, 520px); aspect-ratio: 1; }
.md-full-qr svg { width: 100%; height: 100%; display: block; }
.md-full-close { min-width: 160px; min-height: 52px; font-size: 17px; }
.md-recent li.md-person { display: block; }
.md-person-line { display: flex; justify-content: space-between; gap: 12px; }
.md-paid { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.md-paid-badge { font-size: 14px; font-weight: 600; color: var(--ok-fg); background: var(--ok-bg); border-radius: 999px; padding: 4px 10px; }
.md-link-btn { background: none; border: 0; color: var(--club-blue); font: inherit; font-size: 14px; min-height: var(--tap); padding: 0 6px; cursor: pointer; }
.md-pay { margin-top: 6px; }
.md-pay summary { list-style: none; display: inline-flex; min-height: 40px; padding: 0 16px; font-size: 14px; }
.md-pay summary::-webkit-details-marker { display: none; }
.md-pay[open] summary { background: var(--mist); }
.md-pay-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; padding: 12px; border-radius: var(--radius-sm); background: var(--mist); }
.md-pay-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.md-pay-form select { min-height: var(--tap); font-size: 16px; }
.md-pay-form .btn { grid-column: 1 / -1; min-height: var(--tap); }

/* ---------- Home-screen instructions (/app) ---------- */
.app-main { max-width: 760px; }
.app-hero { display: flex; gap: 16px; align-items: center; }
.app-icon { flex: 0 0 88px; border-radius: 20px; box-shadow: 0 4px 14px rgba(15, 27, 38, 0.18); }
.app-qr-card { display: flex; gap: 16px; align-items: center; }
.app-qr-card[hidden] { display: none; }
.app-qr { flex: 0 0 120px; width: 120px; height: 120px; }
.app-qr-card p { margin: 0; }
.app-install { min-height: 52px; font-size: 17px; }
.app-install[hidden] { display: none; }
.app-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.app-steps .admin-h2 { display: flex; align-items: center; gap: 10px; }
.app-yours { font-family: var(--font-ui); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--info-fg); background: var(--info-bg); border-radius: 999px; padding: 2px 10px; }
.app-yours[hidden] { display: none; }
.app-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.app-notes { padding-left: 18px; color: var(--muted); }
.app-glyph { width: 20px; height: 20px; vertical-align: -4px; color: var(--club-blue); }
.home-app-link { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: 4px; font-weight: 600; }
@media (max-width: 480px) { .app-hero { flex-direction: column; align-items: flex-start; } }

/* ---------- My profile ---------- */
.profile-main { max-width: 720px; }
.profile-card { display: flex; flex-direction: column; gap: 12px; }
.profile-card .admin-h2 { margin: 0; }
.profile-role { display: flex; flex-direction: column; gap: 2px; }
.profile-role-name { font-family: var(--font-brand); font-weight: 700; font-size: 34px; line-height: 1; text-transform: uppercase; color: var(--club-blue); }
.profile-role-meta { color: var(--muted); }
.profile-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.profile-facts div { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--mist); }
.profile-facts dt { font-size: 12px; color: var(--muted); }
.profile-facts dd { margin: 2px 0 0; font-weight: 600; }
.profile-h3 { margin: 4px 0 0; font-size: 15px; }
.profile-can { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.profile-devices, .profile-activity { list-style: none; margin: 0; padding: 0; }
.profile-devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.profile-devices li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-device-name { font-weight: 600; }
.profile-device-meta { font-size: 13px; color: var(--muted); }
.profile-devices .btn { flex: 0 0 auto; white-space: nowrap; }
.profile-this { align-self: flex-start; display: inline-block; font-size: 12px; font-weight: 700; color: var(--ok-fg); background: var(--ok-bg); border-radius: 999px; padding: 1px 8px; }
.profile-activity li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.profile-activity li:last-child, .profile-devices li:last-child { border-bottom: 0; }
.profile-form { display: flex; flex-direction: column; gap: 12px; }
.profile-form .brand-hint { margin: 0; }
.profile-soon { background: var(--mist); }
.me-menu { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.me-menu a, .me-signout { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 16px;
  border: 0; border-bottom: 1px solid var(--border-soft); background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; text-decoration: none; text-align: left; width: 100%; cursor: pointer; }
.me-menu a > span { display: flex; flex-direction: column; }
.me-sub { font-size: 13px; font-weight: 400; color: var(--muted); }
.me-chev { flex: 0 0 18px; width: 18px; height: 18px; color: var(--muted); }
.me-signout { border-bottom: 0; color: #B42318; font-weight: 600; }
.me-menu a:active, .me-signout:active { background: var(--mist); }
.leader-term-edit { margin-top: 6px; }
.leader-term-edit summary { cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; color: var(--club-blue); }
.leader-term-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; padding: 12px; border-radius: var(--radius-sm); background: var(--mist); }
.leader-term-form input[type=date] { min-height: var(--tap); font-size: 16px; }
.leader-term-form .btn { min-height: var(--tap); }
.leader-term-form .brand-hint { grid-column: 1 / -1; }

/* ---------- Avatars, leader photos, public leadership ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 999px; object-fit: cover; background: var(--mist); }
.avatar[hidden] { display: none; }
.avatar-initials { background: var(--club-blue); color: #FFFFFF; font-family: var(--font-brand); font-weight: 700; letter-spacing: 0.02em; }
.avatar-md { width: 52px; height: 52px; font-size: 20px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 112px; height: 112px; font-size: 40px; }
.me-head { display: flex; align-items: center; gap: 14px; }
.me-head .admin-lede { margin-top: 2px; }
.photo-row { display: flex; gap: 16px; align-items: center; }
.photo-actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.photo-form { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-form .btn[hidden] { display: none; }
.leader-item { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; row-gap: 10px; align-items: start; }
.leader-item > :not(.leader-avatar) { grid-column: 2; }
@media (max-width: 480px) { .leader-item > .leader-term-edit, .leader-item > .leader-actions { grid-column: 1 / -1; } }
.club-people-h { margin: 16px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-family: var(--club-font-body, var(--font-ui)); }
.club-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; }
.club-person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.club-person-photo { width: 104px; height: 104px; margin-bottom: 8px; font-size: 34px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--club-accent); }
.branded .avatar-initials.club-person-photo { background: var(--club-primary); color: var(--club-on-primary); }
.club-person-name { font-weight: 700; color: var(--ink); line-height: 1.25; }
.club-person-role { font-size: 14px; color: var(--muted); }
.leader-term-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.leader-term-form label, .leader-term-form input[type=date] { min-width: 0; width: 100%; box-sizing: border-box; }

/* ---------- Chat, tasks, notifications ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: var(--amber); color: var(--navy); font-size: 11px; font-weight: 700; line-height: 1; margin-left: 6px; }
.pill-danger { background: #FDECEA; color: #B42318; }
.admin-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 999px; color: #FFFFFF; background: var(--navy-2); flex: 0 0 auto; }
.admin-bell svg { width: 22px; height: 22px; }
.admin-bell .badge { position: absolute; top: 2px; right: 0; margin: 0; }
.admin-bell[aria-current="page"] { background: var(--navy-3); }
.admin-nav a .badge { margin-left: 6px; }
.tabbar a { position: relative; }
.tabbar .badge { position: absolute; top: 4px; left: 50%; margin-left: 4px; }
@media (max-width: 640px) { .admin-bar { flex-wrap: nowrap; } .admin-bell { margin-left: auto; } }
.page-head { display: flex; align-items: center; gap: 10px; }
.page-head-split { justify-content: space-between; flex-wrap: wrap; }
.page-back { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 999px; color: var(--ink); margin-left: -10px; flex: 0 0 auto; }
.page-back svg { width: 24px; height: 24px; }
.page-head .admin-lede { margin-top: 0; }
.md-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.md-links a { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--ink); font-weight: 600; text-decoration: none; }
.md-links svg { width: 22px; height: 22px; color: var(--club-blue); flex: 0 0 auto; }

/* Chat inbox */
.chat-main { max-width: 720px; }
.chat-inbox { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.chat-inbox li + li { border-top: 1px solid var(--border-soft); }
.chat-inbox-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; color: var(--ink); text-decoration: none; }
.chat-inbox-row:active { background: var(--mist); }
.chat-inbox-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--club-blue); color: #FFFFFF; font-family: var(--font-brand); font-weight: 700; font-size: 18px; }
.chat-inbox-icon.is-channel { border-radius: 12px; background: var(--navy); font-size: 24px; }
.chat-inbox-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.chat-inbox-title { font-weight: 600; font-size: 16px; }
.chat-inbox-last { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-inbox-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-inbox-time { font-size: 12px; color: var(--muted); }
.chat-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.chat-person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; border: 1px solid var(--border-soft); }
.chat-person > span { display: flex; flex-direction: column; min-width: 0; }
.chat-person-name { font-weight: 600; font-size: 14px; }
.chat-person-role { font-size: 12px; color: var(--muted); }
.chat-avatar { width: 34px; height: 34px; font-size: 14px; flex: 0 0 34px; }
.chat-avatar-space { flex: 0 0 34px; }

/* Chat room */
body.chat-room { background: var(--bg); }
.chat-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.chat-back { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 999px; color: var(--ink); flex: 0 0 auto; }
.chat-back svg { width: 24px; height: 24px; }
.chat-head-text { flex: 1 1 auto; min-width: 0; }
.chat-title { margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub { margin: 0; font-size: 12px; color: var(--muted); }
.chat-task-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; background: var(--navy); color: #FFFFFF; border-color: var(--navy); border-radius: 999px; min-height: 40px; padding: 0 14px; }
.chat-task-btn svg { width: 18px; height: 18px; }
.chat-task-btn:hover { background: var(--navy-2); color: #FFFFFF; }
.chat-flash { margin: 8px 12px 0; }
.chat-log { max-width: 760px; margin: 0 auto; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.chat-empty { text-align: center; color: var(--muted); margin: 40px 16px; }
.chat-day { align-self: center; margin: 12px 0 6px; padding: 4px 10px; border-radius: 999px; background: #E3E7EB; font-size: 12px; font-weight: 600; color: var(--neutral-fg); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; margin-top: 8px; }
.msg-grouped { margin-top: 0; }
.msg-body { min-width: 0; display: flex; flex-direction: column; }
.msg-head { font-size: 12px; color: var(--muted); margin: 0 0 3px 2px; }
.msg-head strong { color: var(--ink); font-weight: 600; }
.bubble { padding: 9px 12px; border-radius: 4px 16px 16px 16px; background: var(--surface); border: 1px solid #E3E7EB; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.msg-grouped .bubble { border-radius: 16px; }
.msg-mine { align-self: flex-end; }
.msg-mine .msg-head { text-align: right; margin-right: 2px; }
.msg-mine .bubble { background: var(--club-blue); color: #FFFFFF; border-color: var(--club-blue); border-radius: 16px 4px 16px 16px; }
.msg-mine .bubble a { color: #FFFFFF; }
.chat-compose { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.chat-input-wrap { flex: 1 1 auto; min-width: 0; }
.chat-input-wrap textarea { width: 100%; box-sizing: border-box; min-height: 44px; max-height: 140px; padding: 11px 14px; border: 1px solid #C5CDD5; border-radius: 22px; font: inherit; font-size: 16px; line-height: 1.35; resize: none; }
.chat-send { flex: 0 0 44px; height: 44px; border: 0; border-radius: 999px; background: var(--club-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-send svg { width: 20px; height: 20px; }
.chat-error { margin: 0 12px 8px; }
@media (max-width: 640px) {
  body.chat-room { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .chat-compose { bottom: calc(68px + env(safe-area-inset-bottom)); }
  body.chat-room .admin-bar { display: none; }
}

/* Task cards in chat */
.task-card { display: flex; flex-direction: column; width: min(310px, 78vw); border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.task-card-head { padding: 7px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.task-card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.task-card-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.task-card-meta { font-size: 13px; color: var(--muted); }
.task-card-open { align-self: flex-start; margin-top: 8px; padding: 6px 12px; border-radius: 10px; background: var(--navy); color: #FFFFFF; font-size: 13px; font-weight: 600; }
.task-pending { border-color: #F3D19C; } .task-pending .task-card-head { background: var(--warn-bg); color: var(--warn-fg); }
.task-accepted { border-color: #C9D6F5; } .task-accepted .task-card-head { background: var(--info-bg); color: var(--info-fg); }
.task-done { border-color: #B7E0D8; } .task-done .task-card-head { background: var(--ok-bg); color: var(--ok-fg); }
.task-declined, .task-cancelled { opacity: 0.8; } .task-declined .task-card-head, .task-cancelled .task-card-head { background: var(--neutral-bg); color: var(--neutral-fg); }

/* New task */
.task-new-main, .task-main, .tasks-main, .notif-main { max-width: 680px; }
.task-form { display: flex; flex-direction: column; gap: 16px; }
.task-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.task-form legend { font-size: 13px; font-weight: 600; color: var(--neutral-fg); margin-bottom: 8px; }
.task-form textarea, .task-form input[type=datetime-local], .task-form input[type=time], .task-form select { font: inherit; font-size: 16px; min-height: var(--tap); padding: 8px 12px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); box-sizing: border-box; width: 100%; color: var(--ink); background: #FFFFFF; }
.task-people-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.task-person { position: relative; flex: 0 0 84px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--border); background: #FFFFFF; cursor: pointer; text-align: center; font-weight: 400; color: var(--ink); }
.task-person input { position: absolute; opacity: 0; pointer-events: none; }
.task-person .chat-avatar { width: 42px; height: 42px; font-size: 17px; }
.task-person:has(input:checked) { border: 2px solid var(--club-blue); background: var(--info-bg); padding: 9px 3px; }
.task-person:has(input:focus-visible) { outline: 2px solid var(--club-blue); outline-offset: 2px; }
.task-person-name { font-size: 13px; font-weight: 600; }
.task-person-role { font-size: 11px; color: var(--muted); line-height: 1.2; }
.task-rule { border-bottom: 1px solid var(--border-soft); padding: 4px 0 10px; }
.task-switch { flex-direction: row; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; font-weight: 400; color: var(--ink); }
.task-switch input { appearance: none; -webkit-appearance: none; flex: 0 0 52px; width: 52px; height: 32px; border-radius: 999px; background: #C5CDD5; position: relative; cursor: pointer; transition: background 0.15s; order: 2; margin: 0; }
.task-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: left 0.15s; }
.task-switch input:checked { background: var(--club-blue); }
.task-switch input:checked::after { left: 23px; }
.task-switch input:disabled { opacity: 0.4; }
.task-switch input:focus-visible { outline: 2px solid var(--club-blue); outline-offset: 2px; }
.task-switch > span { flex: 1 1 auto; display: flex; flex-direction: column; }
.task-rule-name { font-size: 15px; font-weight: 600; }
.task-rule-desc { font-size: 13px; color: var(--muted); }
.task-rule-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 6px; }
.task-rule-fields[hidden] { display: none; }
.task-rule-fields label:only-child { grid-column: 1 / -1; }
.task-preview { padding: 12px 14px; border-radius: 12px; background: var(--mist); }
.task-preview[hidden] { display: none; }
.task-preview h2 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--neutral-fg); }
.task-preview ul { list-style: none; margin: 0; padding: 0; }
.task-preview li { display: flex; justify-content: space-between; gap: 10px; padding-top: 7px; font-size: 14px; }
.task-preview li span { color: var(--muted); text-align: right; }
.task-send { min-height: 52px; font-size: 16px; }
.task-send-note { text-align: center; margin-top: -8px; }

/* Task page */
.task-detail { display: flex; flex-direction: column; gap: 12px; }
.task-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.task-title { margin: 0; font-size: 22px; line-height: 1.3; }
.task-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.task-who > div { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.task-who > div > span { display: flex; flex-direction: column; min-width: 0; }
.task-who-label { font-size: 12px; font-weight: 400; color: var(--muted); }
.task-chat-link { font-weight: 600; min-height: var(--tap); display: inline-flex; align-items: center; align-self: flex-start; }
.task-suggestion { padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--info-fg); display: flex; flex-direction: column; gap: 4px; }
.task-rules-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.task-actions { display: flex; flex-direction: column; gap: 10px; }
.task-actions-row { flex-direction: row; flex-wrap: wrap; }
.task-actions-row form { flex: 1 1 160px; }
.task-actions-row .btn { width: 100%; min-height: var(--tap); }
.task-big { width: 100%; min-height: 52px; font-size: 16px; }
.task-more summary { cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; }
.task-more .profile-form { margin-top: 8px; }
.task-danger-text { color: #B42318; }

/* Tasks list */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #E3E7EB; }
.seg a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 9px; color: var(--ink); font-weight: 600; text-decoration: none; font-size: 14px; }
.seg a[aria-current="page"] { background: #FFFFFF; box-shadow: 0 1px 2px rgba(15, 27, 38, 0.12); }
.task-group-h { margin: 6px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.task-list-answer .task-row { border: 2px solid var(--amber); padding: 13px; }
.task-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-row-title { font-size: 15px; font-weight: 600; }
.task-row-meta { font-size: 13px; color: var(--muted); }
.task-next { font-size: 12px; color: var(--info-fg); font-weight: 600; margin-top: 4px; }
.task-row .pill { flex: 0 0 auto; }
.task-empty { color: var(--muted); }
.task-closed summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 600; color: var(--neutral-fg); }

/* Notifications */
.notif-push-note { margin: 0; font-size: 13px; color: var(--muted); }
.notif-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.notif-list li + li { border-top: 1px solid var(--border-soft); }
.notif-row { display: flex; gap: 12px; padding: 14px 16px; color: var(--ink); text-decoration: none; }
.notif-row.is-unread { background: #F5F8FF; }
.notif-icon { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.notif-icon svg { width: 20px; height: 20px; }
.tone-warn { background: var(--warn-bg); color: var(--warn-fg); }
.tone-info { background: var(--info-bg); color: var(--info-fg); }
.tone-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.tone-danger { background: #FDECEA; color: #B42318; }
.notif-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.notif-title { font-size: 15px; font-weight: 500; line-height: 1.35; }
.is-unread .notif-title { font-weight: 700; }
.notif-body { margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.notif-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.notif-time { font-size: 12px; color: var(--muted); }
.notif-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--club-blue); }
.task-card .task-card-title { color: var(--ink); }
.task-card .task-card-meta { color: var(--muted); }
.task-card:hover { border-color: var(--club-blue); }

/* ---------- Game days ---------- */
.gd-main { max-width: 760px; }
.gd-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gd-links a { font-size: 14px; padding: 0 10px; }
@media (max-width: 420px) { .gd-links a { flex-direction: column; justify-content: center; gap: 2px; font-size: 12px; text-align: center; min-height: 60px; } }
.gd-list { display: flex; flex-direction: column; gap: 10px; }
.gd-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.gd-card:hover { border-color: var(--club-blue); }
.gd-card.is-cancelled { opacity: 0.6; }
.gd-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gd-date { font-size: 13px; font-weight: 600; color: var(--muted); }
.gd-title { font-size: 19px; font-weight: 700; line-height: 1.2; }
.gd-where { font-size: 14px; color: var(--neutral-fg); }
.gd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gd-stat { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--mist); }
.gd-stat b { font-family: var(--font-brand); font-size: 22px; line-height: 1; }
.gd-stat span { font-size: 12px; color: var(--muted); }
.gd-kind-pill { vertical-align: middle; font-family: var(--font-ui); font-size: 12px; letter-spacing: 0; text-transform: none; }
.gd-kind { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gd-kind label { flex-direction: row; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-weight: 400; color: var(--ink); }
.gd-kind label:has(input:checked) { border: 2px solid var(--club-blue); background: var(--info-bg); padding: 11px; }
.gd-kind label > span { display: flex; flex-direction: column; }
.gd-kind label > span span { font-size: 12px; color: var(--muted); }
.gd-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gd-grid3 label, .gd-grid3 input { min-width: 0; }
.gd-grid3 input { width: 100%; box-sizing: border-box; min-height: var(--tap); font-size: 16px; padding: 8px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); }
.gd-venue, .gd-new-venue { display: flex; flex-direction: column; gap: 12px; }
[data-for][hidden], .gd-new-venue[hidden] { display: none; }
.gd-venue-card { display: flex; align-items: center; gap: 12px; }
.gd-venue-icon { flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--info-bg); color: var(--info-fg); display: flex; align-items: center; justify-content: center; }
.gd-venue-icon svg { width: 26px; height: 26px; }
.gd-venue-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gd-venue-text span { font-size: 13px; color: var(--muted); }

/* Map */
.gd-map-wrap { display: flex; flex-direction: column; gap: 10px; }
.gd-map { position: relative; border-radius: 14px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: #4B5563; }
.gd-map.is-blank { aspect-ratio: 4 / 3; background-color: #4B5563; background-image: repeating-linear-gradient(90deg, transparent 0 58px, rgba(255,255,255,0.7) 58px 61px); }
.gd-map-photo { display: block; width: 100%; height: auto; pointer-events: none; }
.gd-map-hint { position: absolute; left: 10px; right: 10px; top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(15,27,38,0.8); color: #FFFFFF; font-size: 13px; }
.gd-pin { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; }
.gd-pin:active { cursor: grabbing; }
.gd-pin-icon { width: 38px; height: 38px; border-radius: 10px; color: #FFFFFF; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.35); }
.gd-pin.is-sel .gd-pin-icon { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--amber); }
.gd-pin-label { max-width: 110px; padding: 1px 6px; border-radius: 6px; background: rgba(15,27,38,0.82); color: #FFFFFF; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-map-sel { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.gd-map-sel[hidden] { display: none; }
.gd-map-sel label { flex: 1 1 auto; }
.gd-map-sel input { min-height: 40px; font-size: 16px; padding: 6px 10px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); }
.gd-palette { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gd-pal { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--border); background: #FFFFFF; cursor: pointer; font: 600 11px var(--font-ui); color: var(--ink); }
.gd-pal .gd-pin-icon { width: 32px; height: 32px; border-radius: 8px; box-shadow: none; }
.gd-map-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gd-photo-form { display: flex; flex-direction: column; gap: 8px; }

/* Shifts and bring list */
.gd-shifts, .gd-bring { display: flex; flex-direction: column; gap: 12px; }
.gd-shift { display: flex; flex-direction: column; gap: 8px; }
.gd-shift-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gd-shift-head h2 { margin: 0; font-size: 17px; }
.gd-shift-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.gd-shift-note { margin: 0; font-size: 14px; color: var(--neutral-fg); }
.gd-people { list-style: none; margin: 0; padding: 0; }
.gd-people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 15px; }
.gd-people li .muted { margin-left: auto; font-size: 12px; color: var(--muted); }
.gd-open { color: var(--muted); }
.gd-open-dot { flex: 0 0 34px; height: 34px; border-radius: 999px; border: 2px dashed #A9B6C2; box-sizing: border-box; }
.gd-shift-btn { width: 100%; min-height: 46px; }
.gd-foot { text-align: center; }
.gd-progress { display: flex; flex-direction: column; gap: 8px; }
.gd-bar { display: block; height: 8px; border-radius: 999px; background: #E6EAEE; overflow: hidden; }
.gd-bar span { display: block; height: 100%; background: var(--ok-fg); }
.gd-items { list-style: none; margin: 0; padding: 0 14px; }
.gd-items li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.gd-items li:first-child { border-top: 0; }
.gd-item-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gd-item-name { font-weight: 600; }
.gd-item-who { font-size: 13px; color: var(--warn-fg); }
.gd-item-who.is-claimed { color: var(--ok-fg); }
.gd-items .btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
.gd-x { width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gd-x svg { width: 16px; height: 16px; }
.gd-add-item { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.gd-add-item input { width: 100%; box-sizing: border-box; min-height: var(--tap); font-size: 16px; padding: 8px 10px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); }
.gd-add-item .btn { min-height: var(--tap); }
@media (max-width: 480px) { .gd-add-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .gd-add-item label:first-of-type { grid-column: 1 / -1; } }
.gd-qr { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
/* Map: tent outlines, rotatable long tables, round high-tops */
.gd-zone { position: absolute; z-index: 1; box-sizing: border-box; border: 2px dashed #FFFFFF; border-radius: 6px; background: rgba(29, 78, 216, 0.18); box-shadow: 0 0 0 1px rgba(15, 27, 38, 0.45); cursor: grab; touch-action: none; transform-origin: center; }
.gd-zone.is-sel { border-color: var(--amber); background: rgba(245, 165, 36, 0.18); }
.gd-zone-label { position: absolute; left: 4px; top: 4px; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 8px); padding: 2px 6px; border-radius: 6px; background: rgba(15, 27, 38, 0.82); color: #FFFFFF; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gd-zone-handle { position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; border-radius: 999px; background: #FFFFFF; border: 3px solid var(--club-blue); box-sizing: border-box; cursor: nwse-resize; touch-action: none; }
.gd-zone.is-sel .gd-zone-handle { border-color: var(--amber); }
.gd-zone:not(.is-sel) .gd-zone-handle { opacity: 0.7; }
.gd-pin { z-index: 2; }
.gd-k-table .gd-pin-icon { width: 58px; height: 22px; border-radius: 4px; }
.gd-k-table .gd-pin-icon svg { width: 16px; height: 16px; }
.gd-k-hightop .gd-pin-icon { width: 28px; height: 28px; border-radius: 999px; }
.gd-pin-icon { transition: transform 0.15s; }
.gd-map-sel { flex-wrap: wrap; }
.gd-map-sel .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.gd-map-sel .btn[hidden] { display: none; }
.gd-sel-hint[hidden] { display: none; }
.gd-sel-hint { margin: -4px 2px 0; }
/* Bring it / Do it */
.gd-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.gd-switch-form { display: inline-flex; }
.gd-switch { display: inline-flex; padding: 2px; border: 0; border-radius: 999px; background: #E3E7EB; cursor: pointer; font: 600 11px var(--font-ui); }
.gd-switch span { padding: 3px 8px; border-radius: 999px; color: var(--muted); }
.gd-switch span.is-on { background: var(--navy); color: #FFFFFF; }
.gd-add-kind { grid-column: 1 / -1; display: flex; gap: 16px; margin: 0; padding: 0; border: 0; }
.gd-add-kind label { flex-direction: row; align-items: center; gap: 6px; min-height: 36px; font-weight: 500; color: var(--ink); }
.gd-add-kind input { width: 20px; height: 20px; min-height: 0; margin: 0; }

/* ---------- Calendar ---------- */
.cal-k-home { --cal: #1D4ED8; } .cal-k-away { --cal: #6D28D9; } .cal-k-social { --cal: #BE185D; } .cal-k-tifo { --cal: #B45309; } .cal-k-member { --cal: #0F766E; }
.cal-main { max-width: 760px; }
.cal-dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px; background: var(--cal, var(--muted)); }
.cal-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.cal-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #C5CDD5; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.cal-chip:not(.is-on) { color: var(--muted); }
.cal-chip:not(.is-on) .cal-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--cal); }
.cal-chip.is-on { background: var(--cal); border-color: var(--cal); color: #FFFFFF; }
.cal-chip.is-on .cal-dot { background: #FFFFFF; }
.cal-month { padding: 10px 8px 12px; }
.cal-month-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; }
.cal-month-head h2 { margin: 0; font-family: var(--font-brand); font-size: 22px; letter-spacing: 0.02em; text-transform: uppercase; }
.cal-nav { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 999px; color: var(--ink); }
.cal-nav svg { width: 22px; height: 22px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; padding: 5px 0 4px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.cal-day.is-out { color: #B7C0C9; }
.cal-num { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.cal-day.is-today .cal-num { box-shadow: inset 0 0 0 2px var(--club-blue); color: var(--club-blue); }
.cal-day.is-sel .cal-num { background: var(--navy); color: #FFFFFF; box-shadow: none; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dots .cal-dot { width: 6px; height: 6px; }
.cal-day.is-out .cal-dot { opacity: 0.4; }
a.cal-day:hover { background: var(--mist); }
.cal-agenda { display: flex; flex-direction: column; }
.cal-list { display: flex; flex-direction: column; gap: 8px; }
.cal-entry { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-decoration: none; overflow: hidden; }
.cal-entry:hover { border-color: var(--cal); }
.cal-entry.is-cancelled { opacity: 0.55; }
.cal-entry.is-cancelled .cal-entry-title { text-decoration: line-through; }
.cal-entry-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cal); }
.cal-entry-time { flex: 0 0 64px; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 18px; }
.cal-entry-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cal-entry-kind { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cal); }
.cal-entry-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.cal-entry-meta { font-size: 13px; color: var(--muted); }
.cal-entry-meta.is-warn { color: var(--warn-fg); font-weight: 600; }
.cal-item-title { font-size: 26px; line-height: 1.1; }
.cal-head { display: flex; flex-direction: column; gap: 10px; }
.cal-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cal-where { margin: 0; display: flex; align-items: center; gap: 6px; }
.cal-where svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.cal-notes { margin: 0; color: var(--neutral-fg); white-space: normal; }
.cal-ics { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.cal-ics svg { width: 20px; height: 20px; }
.cal-steps { display: flex; gap: 4px; }
.cal-step { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: var(--tap); padding: 0; border: 0; background: transparent; cursor: pointer; font: 600 12px var(--font-ui); color: #8A96A3; }
.cal-step-bar { width: 100%; height: 8px; border-radius: 999px; background: #E3E7EB; }
.cal-step.is-done { color: var(--ink); }
.cal-step.is-done .cal-step-bar { background: #BE185D; }
.cal-step.is-done.is-posted .cal-step-bar { background: var(--ok-fg); }
.cal-step[aria-current="step"] { font-weight: 700; }
.cal-owner { display: flex; flex-direction: column; gap: 10px; }
.cal-owner-row { display: flex; align-items: center; gap: 10px; }
.cal-owner-row .chat-avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 16px; }
.cal-owner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cal-owner-text span { font-size: 13px; }
.cal-owner-text .is-warn { color: var(--warn-fg); } .cal-owner-text .is-ok { color: var(--ok-fg); }
.cal-nobody { margin: 0; color: var(--warn-fg); font-weight: 600; }
.cal-platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-platforms label { position: relative; flex-direction: row; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #C5CDD5; background: #FFFFFF; color: var(--ink); font-size: 14px; cursor: pointer; }
.cal-platforms input { position: absolute; opacity: 0; pointer-events: none; }
.cal-platforms label:has(input:checked) { background: #BE185D; border-color: #BE185D; color: #FFFFFF; }
.cal-platforms label:has(input:focus-visible) { outline: 3px solid var(--relay-blue); outline-offset: 2px; }
.cal-rsvp { display: flex; flex-direction: column; gap: 12px; }
.cal-rsvp .task-group-h { margin-top: 0; }
.cal-rsvp-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cal-rsvp-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 64px; border-radius: 12px; border: 1px solid #C5CDD5; background: #FFFFFF; color: var(--ink); cursor: pointer; font: 600 14px var(--font-ui); }
.cal-rsvp-n { font-family: var(--font-brand); font-size: 26px; line-height: 1; }
.cal-rsvp-going[aria-pressed="true"] { background: var(--ok-fg); border-color: var(--ok-fg); color: #FFFFFF; }
.cal-rsvp-maybe[aria-pressed="true"] { background: #B45309; border-color: #B45309; color: #FFFFFF; }
.cal-rsvp-no[aria-pressed="true"] { background: #44505B; border-color: #44505B; color: #FFFFFF; }
.cal-people { display: flex; flex-direction: column; gap: 6px; }
.cal-people-label { font-size: 13px; font-weight: 600; color: var(--neutral-fg); }
.cal-faces { display: flex; flex-wrap: wrap; gap: 10px; }
.cal-face { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; font-size: 12px; text-align: center; }
.cal-face > span:last-child { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-kind { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cal-kind label { position: relative; flex-direction: row; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.cal-kind input { position: absolute; opacity: 0; pointer-events: none; }
.cal-kind label:has(input:checked) { background: var(--cal); border-color: var(--cal); color: #FFFFFF; }
.cal-kind label:has(input:checked) .cal-dot { background: #FFFFFF; }
.cal-kind label:has(input:focus-visible) { outline: 3px solid var(--relay-blue); outline-offset: 2px; }
.cal-kind-hint { margin: 8px 0 0; }
.cal-kind-hint[hidden], .task-form [hidden] { display: none; }
.cal-repeat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cal-repeat select, .cal-repeat input { width: 100%; box-sizing: border-box; min-height: var(--tap); font-size: 16px; padding: 8px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); background: #FFFFFF; }
.cal-edit summary { padding: 0; }
.cal-edit[open] > form { margin-top: 12px; }
.cal-cancel { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.cal-when { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cal-when > label:first-child { grid-column: 1 / -1; }
/* Calendar settings: schedules and colors */
.cal-head-actions { display: flex; gap: 8px; align-items: center; }
.cal-settings-btn { width: var(--tap); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.cal-settings-btn svg { width: 22px; height: 22px; }
.cal-feeds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cal-feeds li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.cal-feeds li:first-child { border-top: 0; }
.cal-feed-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.cal-feed-text span { font-size: 13px; color: var(--muted); }
.cal-feed-actions { display: flex; align-items: center; gap: 4px; }
.cal-feed-actions .btn { min-height: 38px; padding: 0 12px; font-size: 13px; }
.cal-sub-h { margin: 8px 0 0; font-size: 15px; }
.cal-league-form { display: flex; gap: 8px; align-items: flex-end; }
.cal-league-form label { flex: 1 1 auto; min-width: 0; }
.cal-league-form select { width: 100%; box-sizing: border-box; min-height: var(--tap); font-size: 16px; padding: 8px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); background: #FFFFFF; }
.cal-league-form .btn[hidden] { display: none; }
.cal-color-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 12px !important; border-top: 1px solid var(--border-soft) !important; }
.cal-color-row legend { float: left; width: 100%; margin-bottom: 8px; }
.cal-swatches { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.cal-swatch { position: relative; width: 36px; height: 36px; min-height: 0; border-radius: 999px; background: var(--sw); cursor: pointer; flex: 0 0 auto; display: block; padding: 0; }
.cal-swatch input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.cal-swatch:has(input[type=radio]:checked) { box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--ink); }
.cal-swatch:has(input[type=radio]:focus-visible) { outline: 3px solid var(--relay-blue); outline-offset: 4px; }
.cal-swatch-custom { background: conic-gradient(#B91C1C, #B45309, #15803D, #0E7490, #1D4ED8, #6D28D9, #BE185D, #B91C1C); overflow: hidden; }
.cal-swatch-custom input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.cal-removed { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cal-removed .btn { min-height: 38px; }
.cal-cancel .brand-hint { margin: 0; }

/* ---------- Socials ---------- */
.soc-compose textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #C5CDD5; border-radius: var(--radius-sm); width: 100%; box-sizing: border-box; resize: vertical; }
.soc-count { margin: -6px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.soc-count.is-over { color: #B42318; }
.soc-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.soc-actions .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.soc-accounts ul { list-style: none; margin: 0; padding: 0; }
.soc-accounts li a { display: flex; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--border-soft); color: var(--ink); text-decoration: none; }
.soc-accounts li:first-child a { border-top: 0; }
.soc-accounts li a > svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.soc-badge { flex: 0 0 36px; height: 36px; border-radius: 10px; color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.soc-acct-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.soc-acct-text span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-x-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.soc-x-head a { font-weight: 600; font-size: 14px; }
.soc-x-frame { display: block; width: 100%; height: 640px; border: 1px solid var(--border-soft); border-radius: 12px; background: #FFFFFF; margin: 8px 0; }
.soc-form label input { width: 100%; box-sizing: border-box; }
.me-menu a > .me-count { flex-direction: row; margin-left: auto; margin-right: -4px; }
/* Me: photo/initials button next to the bell (phones; computers use the name link) */
.admin-me { display: none; position: relative; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 999px; flex: 0 0 auto; text-decoration: none; }
.admin-me .chat-avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 14px; box-shadow: 0 0 0 2px var(--navy-2); }
.admin-me[aria-current="page"] .chat-avatar { box-shadow: 0 0 0 2px var(--amber); }
.admin-me .badge { position: absolute; top: 0; right: -2px; margin: 0; }
@media (max-width: 640px) { .admin-me { display: inline-flex; } }

/* ---------- Documents ---------- */
.leaders-switch { margin-bottom: 4px; }
.docs-main { max-width: 760px; }
.doc-search { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border: 1px solid #C5CDD5; border-radius: 12px; background: #FFFFFF; color: var(--muted); }
.doc-search svg { width: 18px; height: 18px; flex: 0 0 auto; }
.doc-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); min-height: 42px; }
.doc-search:focus-within { outline: 3px solid var(--relay-blue); outline-offset: 1px; }
.doc-chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #C5CDD5; background: #FFFFFF; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.doc-chip.is-on { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.doc-official { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--navy); color: #FFFFFF; text-decoration: none; }
.doc-official > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.doc-official strong { font-size: 17px; }
.doc-official span span { font-size: 13px; color: #C9D3DD; }
.doc-official-label { font-size: 11px !important; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sky) !important; }
.doc-badge { flex: 0 0 38px; height: 46px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; background: #56626E; }
.doc-badge-pdf { background: #B42318; } .doc-badge-doc { background: #1D4ED8; } .doc-badge-sheet { background: #15803D; } .doc-badge-img { background: #6D28D9; }
.doc-badge-official { background: var(--amber); color: var(--navy); }
.doc-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.doc-list li + li { border-top: 1px solid var(--border-soft); }
.doc-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; color: var(--ink); text-decoration: none; }
.doc-row:hover { background: var(--mist); }
.doc-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.doc-row-title { font-weight: 600; font-size: 15px; }
.doc-row-meta { font-size: 12px; color: var(--muted); }
.doc-bk { flex: 0 0 auto; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.doc-bk.is-ok { color: var(--ok-fg); background: var(--ok-bg); }
.doc-bk.is-wait { color: var(--warn-fg); background: var(--warn-bg); }
.doc-group { display: flex; flex-direction: column; }
.doc-drive { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-fg); font-size: 13px; }
.doc-drive.is-ok { background: var(--ok-bg); color: var(--ok-fg); }
.doc-drive svg { width: 22px; height: 22px; flex: 0 0 auto; }
.doc-kind { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-kind label:has(input:checked) { background: var(--club-blue); border-color: var(--club-blue); color: #FFFFFF; }
.doc-minutes { display: flex; flex-direction: column; gap: 10px; }
.doc-minutes[hidden] { display: none; }
.doc-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #E3E7EB; border: 0; margin: 0; }
.doc-seg legend { font-size: 13px; font-weight: 600; margin-bottom: 4px; padding: 0; float: left; width: 100%; }
.doc-seg label { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; position: relative; }
.doc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.doc-seg label:has(input:checked) { background: #FFFFFF; box-shadow: 0 1px 2px rgba(15, 27, 38, 0.12); }
.doc-seg label:has(input:focus-visible) { outline: 3px solid var(--relay-blue); }
.doc-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.doc-pick-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px; border: 2px dashed #A9B6C2; border-radius: 12px; background: #FFFFFF; font-weight: 600; font-size: 14px; text-align: center; cursor: pointer; overflow: hidden; }
.doc-pick-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-pick-btn svg { width: 22px; height: 22px; }
.doc-pick-btn:focus-within { outline: 3px solid var(--relay-blue); outline-offset: 2px; }
.doc-pick-btn span { overflow-wrap: anywhere; }
.doc-picked { margin: 0; font-size: 13px; font-weight: 600; color: var(--ok-fg); }
.doc-drive-note { margin: 0; font-size: 13px; color: var(--muted); }
.doc-title { font-size: 26px; line-height: 1.15; }
.doc-pill-official { background: var(--navy); color: var(--amber); }
.doc-current { display: flex; flex-direction: column; gap: 12px; }
.doc-file { display: flex; align-items: center; gap: 12px; }
.doc-file > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.doc-file strong { overflow-wrap: anywhere; }
.doc-file span span { font-size: 13px; color: var(--muted); }
.doc-versions ul, .doc-activity ul { list-style: none; margin: 0; padding: 0; }
.doc-versions li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.doc-versions li:first-child { border-top: 0; }
.doc-vno { flex: 0 0 36px; height: 36px; border-radius: 999px; background: var(--club-blue); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.doc-vtext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-vtext > a { font-weight: 600; overflow-wrap: anywhere; }
.doc-vtext > span { font-size: 12px; color: var(--muted); }
.doc-vtext .doc-bk-line.is-ok { color: var(--ok-fg); }
.doc-vtext .doc-bk-line.is-wait { color: var(--warn-fg); }
.doc-retry { min-height: 36px; margin-top: 4px; font-size: 13px; }
.doc-activity li { font-size: 13px; color: var(--muted); padding: 3px 0; }
.club-docs { list-style: none; margin: 0; padding: 0; }
.club-docs li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.club-docs li:first-child { border-top: 0; }
.club-docs span { font-size: 13px; opacity: 0.7; white-space: nowrap; }
.doc-official[hidden], .doc-group[hidden] { display: none; }
/* Document viewer */
.doc-view-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-view-actions .btn { text-decoration: none; display: inline-flex; align-items: center; }
.doc-viewer { display: flex; flex-direction: column; gap: 12px; }
.doc-viewer canvas, .doc-viewer img { display: block; width: 100%; height: auto; background: #FFFFFF; border-radius: 6px; box-shadow: 0 1px 4px rgba(15, 27, 38, 0.18); }
.doc-viewer-status { margin: 0; font-size: 13px; color: var(--muted); }
.doc-viewer-text { width: 100%; height: 70vh; border: 1px solid var(--border-soft); border-radius: 8px; background: #FFFFFF; }

/* Roles (Leaders › Roles) */
.role-list { list-style: none; margin: 0; padding: 0; }
.role-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 16px; border-top: 1px solid var(--border-soft); }
.role-row:first-child { border-top: 0; }
.role-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.role-main .leader-meta { margin-top: 2px; }
.role-edit { flex: 0 0 auto; }
.role-edit[open] { flex: 1 1 100%; }
.role-edit summary { cursor: pointer; color: var(--club-blue); font-weight: 600; min-height: var(--tap); display: inline-flex; align-items: center; }
.role-form { display: grid; gap: 12px; margin: 4px 0 12px; }
.role-form .btn { justify-self: start; }

/* @mentions in chat */
.mention { font-weight: 600; color: var(--club-blue); }
.mention.is-me { background: #FDF1DC; color: #7A4A00; border-radius: 4px; padding: 0 3px; }
.msg-mine .bubble .mention { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }
.msg-mine .bubble .mention.is-me { background: transparent; }
.mention-list { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 27, 38, .16); max-height: 288px; overflow-y: auto; z-index: 30; }
.mention-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.mention-opt.is-on, .mention-opt:hover { background: #E8EEFC; }
.mention-opt strong { display: block; font-size: 15px; }
.mention-opt small { display: block; color: var(--muted, #5B6670); font-size: 13px; }
.mention-opt .chat-avatar { width: 32px; height: 32px; flex: none; }

/* Phone notifications (Me › Phone notifications) */
.push-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--mist); border-radius: 12px; }
.push-status { margin: 0; font-size: 15px; line-height: 1.45; }
.push-status.is-on { color: #116329; font-weight: 600; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-actions .btn[hidden] { display: none; }
.push-cats { border: 0; margin: 0; padding: 0; min-width: 0; }
.push-cats legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 4px; }
.push-switch { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-weight: 400; cursor: pointer; }
.push-switch:first-of-type { border-top: 0; }
.push-switch > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.push-switch strong { font-size: 15px; }
.push-switch small { color: var(--muted); font-size: 13px; margin-top: 2px; }
.push-switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; min-height: 0; max-height: 30px; margin: 0; padding: 0; border: 0; box-sizing: border-box; border-radius: 999px; background: #C5CDD5; cursor: pointer; transition: background .15s; }
.push-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(15, 27, 38, .3); transition: transform .15s; }
.push-switch input:checked { background: var(--club-blue); }
.push-switch input:checked::after { transform: translateX(20px); }
.push-switch input:focus-visible { outline: 3px solid var(--relay-blue, #3B82F6); outline-offset: 2px; }
.push-switch input:disabled { opacity: .6; }
.push-cats .brand-hint { margin: 8px 0 0; }

/* Leader activity (Leaders › Activity) */
.act-link { display: flex; align-items: center; gap: 12px; min-height: 56px; text-decoration: none; color: inherit; }
.act-link > svg { width: 24px; height: 24px; color: var(--club-blue); flex: none; }
.act-link span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.act-link small { color: var(--muted); font-size: 13px; margin-top: 2px; }
.act-link .act-link-go { width: 18px; height: 18px; color: var(--muted); }
.act-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .act-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.act-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.act-card.needs-look { border-left: 4px solid var(--amber); }
.act-who { display: flex; align-items: center; gap: 10px; }
.act-who > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.act-who small { color: var(--muted); font-size: 13px; }
.act-who .chat-avatar { width: 40px; height: 40px; flex: none; }
.act-filter { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.act-flags { margin: 0; padding: 6px 10px; border-radius: 8px; background: #FDF1DC; color: #7A4A00; font-size: 14px; font-weight: 600; }
.act-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.act-stats div { min-width: 0; }
.act-stats dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.act-stats dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.act-warn { color: #B42318; }
.act-log-filter { margin-bottom: 8px; }
.act-log { list-style: none; margin: 0 0 12px; padding: 0; }
.act-log li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); font-size: 15px; }
.act-log li:first-child { border-top: 0; }
.act-log-what { min-width: 0; overflow-wrap: anywhere; }
.act-log-detail { color: var(--muted); }
.act-log time { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Notification help page (/notifications) */
.nh-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.nh-shot { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.nh-shot figcaption { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nh-num { width: 24px; height: 24px; border-radius: 50%; background: var(--club-blue); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.nh-phone { width: 190px; height: 220px; border-radius: 26px; border: 6px solid var(--navy); background: var(--bg); padding: 14px 10px; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; position: relative; }
.nh-dim { background: #8A939C; }
.nh-lock { background: linear-gradient(160deg, #1E3A8A, #0F1B26); justify-content: flex-start; }
.nh-card { background: #FFFFFF; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.nh-card-h { font-size: 13px; }
.nh-card-s { color: var(--muted); }
.nh-btn { background: var(--club-blue); color: #FFFFFF; border-radius: 8px; padding: 7px 8px; text-align: center; font-weight: 600; }
.nh-alert { background: rgba(244, 245, 247, .97); border-radius: 12px; text-align: center; font-size: 11px; line-height: 1.35; overflow: hidden; }
.nh-alert strong { display: block; padding: 10px 10px 4px; font-size: 12px; }
.nh-alert > span { display: block; padding: 0 10px 10px; color: var(--muted); }
.nh-alert-btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #C5CDD5; }
.nh-alert-btns span { padding: 8px 0; color: var(--club-blue); }
.nh-alert-btns span + span { border-left: 1px solid #C5CDD5; }
.nh-allow { font-weight: 700; outline: 3px solid var(--amber); outline-offset: -3px; border-radius: 0 0 12px 0; }
.nh-time { color: #FFFFFF; font-size: 34px; font-weight: 600; text-align: center; margin: 4px 0 14px; }
.nh-push { background: rgba(255, 255, 255, .93); border-radius: 12px; padding: 8px; display: flex; gap: 8px; font-size: 11px; line-height: 1.3; text-align: left; }
.nh-push img { border-radius: 6px; flex: none; }
.nh-push strong, .nh-push span { display: block; }
.nh-push-app { color: var(--muted); font-size: 10px; letter-spacing: .04em; display: flex !important; justify-content: space-between; }
.nh-push-app em { font-style: normal; }
.nh-cats { list-style: none; margin: 0; padding: 0; }
.nh-cats li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.nh-cats li:first-child { border-top: 0; }
.nh-cats span { color: var(--muted); font-size: 14px; }

/* Help & Quick Start (Me › Help & Quick Start) */
.help-qs { display: flex; flex-direction: column; gap: 10px; }
.help-qs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.help-qs-head .admin-h2 { margin: 0; }
.help-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.help-page { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.help-page img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); box-shadow: 0 2px 10px rgba(15, 27, 38, .08); background: #FFFFFF; }
.help-view { position: fixed; inset: 0; z-index: 100; background: rgba(15, 27, 38, .96); overflow: auto; -webkit-overflow-scrolling: touch; padding: calc(64px + env(safe-area-inset-top)) 8px calc(16px + env(safe-area-inset-bottom)); }
.help-view[hidden] { display: none; }
.help-view img { display: block; width: 100%; max-width: 900px; height: auto; margin: 0 auto; border-radius: 6px; background: #FFFFFF; }
.help-close { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 101; min-height: 44px; }

/* Photos (Media › Photos, albums, add, one photo, game day/event strip) */
.photos-main { max-width: 900px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; border-radius: 10px; overflow: hidden; }
@media (min-width: 700px) { .ph-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ph-tile { display: block; aspect-ratio: 1 / 1; background: #DDE2E7; overflow: hidden; }
.ph-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-grid-hidden .ph-tile img { opacity: .55; }
.ph-albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 700px) { .ph-albums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ph-album { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.ph-album-cover { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #DCE5F8, #F3E3C3); }
.ph-album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-album-kind { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(15, 27, 38, .72); color: #FFFFFF; font-size: 11px; font-weight: 600; }
.ph-album strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.ph-album small { font-size: 12px; color: var(--muted); }
.ph-new-album summary { cursor: pointer; font-weight: 600; color: var(--club-blue); min-height: var(--tap); display: flex; align-items: center; }
.ph-new-album .qr-form { margin-top: 8px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ph-fab { display: none; }
@media (max-width: 640px) {
  .ph-add-top { display: none; }
  .ph-fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--club-blue); color: #FFFFFF; font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 6px 16px rgba(15, 27, 38, .3); }
  .ph-fab svg { width: 24px; height: 24px; }
  .photos-main { padding-bottom: 96px; }
}
/* Add photos */
.ph-form { display: flex; flex-direction: column; gap: 14px; }
.ph-albums-pick { border: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.ph-albums-pick legend { font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.ph-choice { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--border-soft); border-radius: 12px; cursor: pointer; font-weight: 400; }
.ph-choice:has(input:checked) { border: 2px solid var(--club-blue); background: #EEF3FE; padding: 7px 11px; }
.ph-choice input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--club-blue); }
.ph-choice span { display: flex; flex-direction: column; min-width: 0; }
.ph-choice small { color: var(--muted); font-size: 12px; }
.ph-new-name[hidden] { display: none !important; }
.ph-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ph-pick-btn { position: relative; display: flex !important; flex-direction: column !important; align-items: center; justify-content: center; gap: 6px; min-height: 92px; border-radius: 14px; border: 1px solid #C5CDD5; background: #FFFFFF; color: var(--ink); font-weight: 600; cursor: pointer; }
.ph-pick-btn.is-primary { background: var(--club-blue); border-color: var(--club-blue); color: #FFFFFF; }
.ph-pick-btn svg { width: 28px; height: 28px; }
.ph-pick-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ph-queue ul { list-style: none; margin: 0; padding: 0; }
.ph-up { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.ph-up:first-child { border-top: 0; }
.ph-up img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: #DDE2E7; }
.ph-up > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-up strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-up small { font-size: 12px; font-weight: 600; color: var(--club-blue); }
.ph-up.is-ok small { color: var(--ok-fg); }
.ph-up.is-wait small { color: var(--warn-fg); }
.ph-up.is-bad small { color: #B42318; }
.ph-bar { display: block; height: 4px; border-radius: 999px; background: #E3E7EB; margin: 6px 0 4px; overflow: hidden; }
.ph-bar-fill { display: block; width: 0; height: 100%; background: var(--club-blue); transition: width .2s; }
.ph-up.is-ok .ph-bar-fill { background: var(--ok-fg); }
.ph-up.is-wait .ph-bar-fill { background: var(--warn-fg); }
.ph-up.is-bad .ph-bar-fill { background: #B42318; }
/* One photo */
.ph-view-main { max-width: 900px; }
.ph-view-title { overflow-wrap: anywhere; }
.ph-stage { position: relative; margin: 0 -16px; background: #05090D; display: flex; align-items: center; justify-content: center; min-height: 240px; }
@media (min-width: 641px) { .ph-stage { margin: 0; border-radius: 12px; overflow: hidden; } }
.ph-stage img { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; }
@media (max-width: 640px) {
  .ph-stage img { max-height: 56vh; } .ph-stage { min-height: 200px; }
  /* Keep Save · Share · Cover · Move · Hide in reach above the tab bar. */
  .ph-actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 4px 16px rgba(15, 27, 38, .14); }
}
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; background: rgba(15, 27, 38, .55); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.ph-nav svg { width: 22px; height: 22px; }
.ph-prev { left: 8px; }
.ph-next { right: 8px; }
.ph-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.ph-meta small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ph-inline { margin: 0; }
.ph-inline button { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; min-height: 32px; }
.ph-actions { display: flex; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--border-soft); overflow: hidden; }
.ph-actions > a, .ph-actions > button, .ph-actions form, .ph-actions form button { flex: 1 1 0; }
.ph-actions form { display: flex; margin: 0; }
.ph-actions a, .ph-actions button { min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: var(--ink); font: 600 12px 'IBM Plex Sans', sans-serif; text-decoration: none; cursor: pointer; }
.ph-actions button[hidden] { display: none; }
.ph-actions svg { width: 22px; height: 22px; }
.ph-actions .is-danger { color: #B42318; }
/* Game day / event strip */
.ph-strip { display: flex; flex-direction: column; gap: 10px; }
.ph-strip-head { display: flex; align-items: center; justify-content: space-between; }
.ph-strip-head .task-group-h { margin: 0; }
.ph-strip-head a { font-weight: 600; min-height: var(--tap); display: inline-flex; align-items: center; }
.ph-strip-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ph-strip-row a { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #DDE2E7; }
.ph-strip-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-strip-add { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ph-strip-add svg { width: 20px; height: 20px; }

/* Bring & do: ask someone */
.gd-item-who.is-asked { color: var(--warn-fg); }
.gd-ask { margin-top: 6px; }
.gd-ask summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--club-blue); font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; }
.gd-ask summary::-webkit-details-marker { display: none; }
.gd-ask[open] summary { color: var(--muted); }
.gd-ask-form { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.gd-ask-form label { flex: 1 1 auto; min-width: 0; }
.gd-ask-form select { width: 100%; min-height: 44px; }
.gd-ask-form .btn { flex: none; }
.gd-items .btn { white-space: nowrap; }

/* Money (Leaders › Money) */
.fin-main { max-width: 820px; }
.fin-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fin-card-head .task-group-h { margin: 0 0 8px; }
.fin-card-head a { font-weight: 600; font-size: 14px; min-height: var(--tap); display: inline-flex; align-items: center; }
.fin-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fin-kpis span { display: block; font-size: 12px; color: var(--muted); }
.fin-kpis strong { display: block; font-size: clamp(18px, 5.4vw, 26px); font-weight: 700; white-space: nowrap; }
.is-in { color: var(--ok-fg); }
.is-out { color: var(--warn-fg); }
.is-bad { color: #B42318; }
.fin-bars { display: flex; gap: 6px; height: 110px; margin-top: 14px; }
.fin-bar { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.fin-bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.fin-bar-pair span { width: min(14px, 40%); min-height: 2px; border-radius: 3px 3px 0 0; }
.fin-bar-pair .in, .fin-legend .in { background: #0F766E; }
.fin-bar-pair .out, .fin-legend .out { background: var(--amber); }
.fin-bar small { font-size: 11px; color: var(--muted); }
.fin-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.fin-legend span { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-left: 6px; }
.fin-legend span:first-child { margin-left: 0; }
.fin-alert { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #FEE4E2; color: #7A1A12; text-decoration: none; min-height: 56px; justify-content: center; }
.fin-alert.is-warn { background: #FDF1DC; color: #7A4A00; }
.fin-alert span { font-size: 13px; }
.fin-accounts { list-style: none; margin: 0; padding: 0; }
.fin-accounts li + li { border-top: 1px solid var(--border-soft); }
.fin-acct-row, .fin-set-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); text-decoration: none; min-height: 56px; }
.fin-acct-ico, .fin-acct { flex: none; width: 36px; height: 36px; border-radius: 10px; background: #EEF3FE; color: var(--club-blue); display: inline-flex; align-items: center; justify-content: center; }
.fin-acct { width: 30px; height: 30px; border-radius: 8px; }
.fin-acct-ico svg, .fin-acct svg { width: 18px; height: 18px; }
.fin-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fin-row-main small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.fin-acct-bal { flex: none; font-size: 16px; white-space: nowrap; }
.fin-acct-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.fin-acct-actions form { margin: 0; }
.fin-day { font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 4px; letter-spacing: .02em; }
.fin-list { list-style: none; margin: 0; padding: 2px 14px; }
.fin-list li + li { border-top: 1px solid var(--border-soft); }
.fin-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink); text-decoration: none; min-height: 56px; }
.fin-row-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-row-sub { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 2px; }
.fin-amt { flex: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.fin-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: #EEF1F4; color: #44505B; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fin-chip.is-needs { background: #FEE4E2; color: #B42318; }
.fin-chip.is-transfer { background: #F1F5F9; color: #475569; }
.fin-status { font-weight: 700; color: var(--warn-fg); }
.fin-foot { font-size: 13px; color: var(--muted); text-align: center; }
.fin-fab { display: none; }
@media (max-width: 640px) { .fin-add-top { display: none; } .fin-fab { display: inline-flex; } .fin-main { padding-bottom: 96px; } }
.fin-search { margin-bottom: 0; }
.fin-hero { text-align: center; }
.fin-hero p { margin: 2px 0; }
.fin-hero-who { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.fin-hero-amt { font-size: 36px; font-weight: 700; line-height: 1.15; }
.fin-hero-sub { font-size: 13px; color: var(--muted); }
.fin-hero-desc { font-size: 14px; overflow-wrap: anywhere; }
.fin-label-form { display: flex; flex-direction: column; gap: 10px; }
.fin-split { display: flex; gap: 8px; }
.fin-split label { flex: 1 1 auto; min-width: 0; }
.fin-split .fin-split-amt { flex: 0 0 110px; }
.fin-split-amt[hidden] { display: none; }
.fin-split select, .fin-split input { width: 100%; min-height: 44px; }
.fin-link-btn { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--club-blue); font: inherit; font-weight: 600; font-size: 14px; min-height: 36px; cursor: pointer; }
.fin-check { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; }
.fin-check input { width: 20px; height: 20px; flex: none; }
.fin-split-list { list-style: none; margin: 0; padding: 0; }
.fin-split-list li { display: flex; justify-content: space-between; padding: 6px 0; }
.fin-matched { border: 2px solid #0F766E; }
.fin-matched p { margin: 0; }
.fin-receipt-img { display: block; max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px; }
.fin-receipt-form { margin-top: 8px; }
.fin-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fin-amount-input { font-size: 24px !important; font-weight: 700; }
.fin-receipt-pick { min-height: 56px; }
.fin-help { margin: 0; padding-left: 18px; font-size: 14px; }
.fin-help li { margin: 4px 0; }
.fin-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fin-map select { width: 100%; }
.fin-settings-list { list-style: none; margin: 0 0 8px; padding: 0; }
.fin-settings-list li { border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.fin-settings-list li:first-child { border-top: 0; }
.fin-settings-list li > .fin-set-row { flex: 1 1 220px; }
.fin-settings-list .is-retired { opacity: .6; }
.fin-settings-list .role-edit { flex: 0 0 auto; }
.fin-settings-list .role-edit[open] { flex: 1 1 100%; padding-bottom: 10px; }
.fin-access-form { margin: 0; }
.fin-access-form select { min-height: 44px; }
.fin-decline summary { list-style: none; cursor: pointer; }
.fin-decline summary::-webkit-details-marker { display: none; }
.fin-period { display: flex; gap: 8px; flex-wrap: wrap; }
.fin-period select { min-height: 44px; }
.fin-range { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; }
.fin-range span { font-size: 13px; color: var(--muted); }
.fin-pl-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fin-pl-table th, .fin-pl-table td { padding: 8px 0; text-align: right; border-top: 1px solid var(--border-soft); font-weight: 400; white-space: nowrap; }
.fin-pl-table th:first-child { text-align: left; white-space: normal; padding-right: 8px; }
.fin-pl-table thead th { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding-top: 0; }
.fin-pl-table td + td, .fin-pl-table th + th { padding-left: 12px; }
.fin-pl-table .is-total th, .fin-pl-table .is-total td { font-weight: 700; border-top: 2px solid var(--ink); }
.fin-cmp { color: var(--muted); }
.fin-net { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; background: var(--navy); color: #FFFFFF; }
.fin-net strong { font-size: 26px; }
.fin-net small { flex-basis: 100%; color: #C9D4E6; }
.fin-exports { display: flex; flex-wrap: wrap; gap: 8px; }
.fin-print .admin-main { padding-top: 16px; }
.fin-print-bar { display: flex; justify-content: space-between; align-items: center; }
.md-num.is-ok { color: var(--ok-fg); }
.md-num.is-bad { color: #B42318; }
@media print {
  .fin-print-bar, .admin-bar, .tabbar { display: none !important; }
  .fin-print .card { box-shadow: none; border: 1px solid #CCC; break-inside: avoid; }
  .fin-net { background: #FFFFFF !important; color: #000 !important; border: 2px solid #000; }
  .fin-net small { color: #333 !important; }
}

/* Money › Transactions: Select mode (label several at once) */
.fin-row-pick { flex-direction: row; cursor: pointer; font-size: inherit; font-weight: 400; color: var(--ink); text-align: left; }
.fin-row-pick .fin-pick { width: 22px; height: 22px; min-height: 0; flex: 0 0 22px; margin: 0; padding: 0; accent-color: var(--club-blue); }
.fin-list li:has(.fin-pick:checked) { background: #EEF3FF; margin: 0 -14px; padding: 0 14px; }
.fin-pick-hint { margin: 4px 0 8px; }
.fin-pick-all { min-height: 44px; margin-bottom: 4px; }
.fin-batch { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; margin-top: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 16px rgba(15, 27, 38, .16); }
.fin-batch[hidden] { display: none; }
.fin-batch-row { display: flex; align-items: flex-end; gap: 10px; }
.fin-batch-cat { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fin-batch-cat select { min-height: 44px; width: 100%; }
.fin-batch-row .btn { min-height: 44px; flex: 0 0 auto; }
.fin-batch-rule { display: flex; flex-direction: row; align-items: center; font-weight: 400; color: var(--ink); gap: 8px; margin-top: 10px; font-size: 14px; min-height: 32px; }
.fin-batch-rule[hidden] { display: none; }
.fin-batch-rule input { width: 20px; height: 20px; min-height: 0; flex: 0 0 20px; margin: 0; padding: 0; }
@media (min-width: 641px) { .fin-batch { bottom: 16px; } }
