/* ============================================================================
   Footy Genius — app.css
   The single shared token + atom layer. Every page loads it AFTER its own
   <style> block and BEFORE css/liquid-glass.css:

     <style> … page-specific rules … </style>
     <link rel="stylesheet" href="css/app.css" />
     <link rel="stylesheet" href="css/liquid-glass.css" />

   The old per-page :root blocks (11 copies, all drifting) have been deleted in
   favour of this file. Legacy aliases (--teal, --card, --text, --shadow …) are
   kept pointing at the new values so page rules that still use them keep
   working.

   The direction: glass is CHROME ONLY (app bar, tab bar, sheets, dialogs,
   toast, loading overlay). Content surfaces — cards, rows, inputs, stat tiles
   — are flat, opaque, and carry real elevation instead.
   ========================================================================== */
:root {
  /* Brand + accent */
  --accent: #0E7A6E;
  --accent-ink: #0E6B62;
  --accent-tint: rgba(38, 166, 154, 0.13);
  --teal: #26A69A;
  --teal-dark: #123330;
  --teal-light: #4DB6AC;

  /* Ink */
  --ink: #132F2C;
  --ink-2: #42574F;
  --ink-3: #6B7D7A;
  --ink-4: #8A9A97;
  --ink-5: #A7B5B2;

  /* Surfaces */
  --bg: #F2F6F5;
  --surface: #FFFFFF;
  --surface-2: #EDF3F1;
  --field: #F7FAF9;
  --line: rgba(19, 47, 44, 0.07);
  --line-2: rgba(19, 47, 44, 0.12);

  /* Rating tiers — retuned to share a hue family with the teal.
     Thresholds and meaning are unchanged (see js/rating.js). */
  --elite: #0F7B5A;
  --elite-tint: rgba(15, 123, 90, 0.10);
  --elite-on-tint: #0B5B43;
  --good: #26A69A;
  --good-tint: rgba(38, 166, 154, 0.13);
  --good-on-tint: #0E6B62;
  --developing: #C08A17;
  --developing-tint: rgba(192, 138, 23, 0.12);
  --developing-on-tint: #8A6210;
  --needs-work: #B04A40;
  --needs-work-tint: rgba(176, 74, 64, 0.13);
  --needs-work-on-tint: #8E3A31;

  /* Legacy aliases — the names the page <style> blocks still use. */
  --text: var(--ink);
  --text-2: var(--ink-3);
  --muted: var(--ink-4);
  --gray-400: var(--ink-4);
  --card: var(--surface);
  --teal-50: var(--accent-tint);
  --shadow: var(--el-1);

  /* Gradients */
  --grad-bar: linear-gradient(165deg, #1E8C82 0%, #123330 100%);
  --grad-bar-live: linear-gradient(165deg, #1E8C82 0%, #102D2A 100%);
  --grad-bar-sheen: radial-gradient(80% 100% at 100% 0%, rgba(255,255,255,0.16), transparent 60%);

  /* Radius */
  --r-sheet: 26px;
  --r-card: 16px;
  --r-card-lg: 20px;
  --r-row: 15px;
  --r-control: 13px;
  --r-chip: 7px;
  --r-nav: 22px;

  /* Elevation — flat surfaces */
  --el-1: 0 1px 2px rgba(19, 47, 44, 0.07);
  --el-2: 0 1px 2px rgba(19, 47, 44, 0.07), 0 8px 18px -10px rgba(19, 47, 44, 0.28);
  --el-3: 0 1px 2px rgba(19, 47, 44, 0.08), 0 18px 36px -18px rgba(19, 47, 44, 0.35);
  --el-accent: 0 8px 20px -8px rgba(14, 122, 110, 0.8);

  /* Glass — CHROME ONLY (bar, tab bar, sheets, dialogs, toast) */
  --glass-nav: rgba(255, 255, 255, 0.74);
  --glass-sheet: rgba(255, 255, 255, 0.94);
  --glass-strip: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-blur: 22px;
  --glass-saturate: 170%;
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 14px 32px -10px rgba(19, 47, 44, 0.3);
  --scrim: rgba(16, 45, 42, 0.42);

  /* Type */
  --fs-min: 12px;                        /* smallest content text (meta, row subtitles, notes); uppercase labels and badges keep their own steps */
  --font: Manrope, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-card: Oswald, var(--font);      /* player card ONLY */

  /* Layout */
  --gutter: 15px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 62px;
}

/* ── Type steps ──────────────────────────────────────────────────────────── */
.t-display { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.t-title   { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.t-strong  { font-size: 15px; font-weight: 800; }
.t-body    { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.t-meta    { font-size: var(--fs-min); font-weight: 700; color: var(--ink-3); }
.t-label   { font-size: 10.5px; font-weight: 800; letter-spacing: 0.11em;
             text-transform: uppercase; color: var(--ink-4); }
.t-num     { font-variant-numeric: tabular-nums; }

/* ── Section header ──────────────────────────────────────────────────────── */
.section-h {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 20px 4px 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.11em;
  text-transform: uppercase; color: var(--ink-4);
}
.section-h a, .section-h button {
  font-size: 12px; font-weight: 800; letter-spacing: 0;
  text-transform: none; color: var(--accent-ink);
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font); text-decoration: none;
}

/* ── Card: FLAT. No glass, no ambient gradient. ─────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--el-1);
  overflow: hidden;
  margin-bottom: 12px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.card--hero { border-radius: var(--r-card-lg); box-shadow: var(--el-3); }
.card .pad { padding: 16px; }

/* Rows inside a card are divided by a rule, never by a gap. */
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 12px 14px; width: 100%;
  background: none; border: none; text-align: left; color: inherit;
  font-family: var(--font);
}
.row + .row { border-top: 1px solid var(--line); }
.row__lead { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
             display: flex; align-items: center; justify-content: center;
             background: var(--surface-2); color: var(--ink-2);
             font-size: 12px; font-weight: 800; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-size: 14px; font-weight: 800; }
.row__sub { font-size: var(--fs-min); font-weight: 600; color: var(--ink-4); margin-top: 2px; }
.row__chev { color: #B4C2BF; flex: 0 0 auto; display: flex; }

/* ── Date block (fixtures) ───────────────────────────────────────────────── */
.datecol { width: 44px; flex: 0 0 auto; text-align: center; }
.datecol b { display: block; font-size: 22px; font-weight: 800; line-height: 1;
             font-variant-numeric: tabular-nums; }
.datecol span { display: block; margin-top: 2px; font-size: 10px; font-weight: 800;
                letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.vrule { width: 1px; align-self: stretch; background: var(--line); }

/* ── Rating badge — ONE spec. Replaces .ovr / .rating-ring / .hero .ovr. ─── */
.ovr {
  padding: 7px 11px; border-radius: 10px; text-align: center; flex: 0 0 auto;
  background: var(--good-tint);
}
.ovr b { display: block; font-size: 19px; font-weight: 800; line-height: 1;
         font-variant-numeric: tabular-nums; color: var(--good-on-tint); }
.ovr span { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 800;
            letter-spacing: 0.08em; text-transform: uppercase; color: var(--good-on-tint); }
.ovr[data-tier="elite"]       { background: var(--elite-tint); }
.ovr[data-tier="elite"] b,
.ovr[data-tier="elite"] span  { color: var(--elite-on-tint); }
.ovr[data-tier="developing"]  { background: var(--developing-tint); }
.ovr[data-tier="developing"] b,
.ovr[data-tier="developing"] span { color: var(--developing-on-tint); }
.ovr[data-tier="needs-work"]  { background: var(--needs-work-tint); }
.ovr[data-tier="needs-work"] b,
.ovr[data-tier="needs-work"] span { color: var(--needs-work-on-tint); }
.ovr--none { background: var(--surface-2); }
.ovr--none b, .ovr--none span { color: var(--ink-4); }

/* Result badge (W/D/L) */
.result-badge {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.result-badge.win  { background: var(--elite); }
.result-badge.draw { background: var(--developing); }
.result-badge.loss { background: var(--needs-work); }
.result-badge.up   { background: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 50px; padding: 0 18px;
  border: none; border-radius: 14px; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 800;
  background: var(--accent); color: #fff; box-shadow: var(--el-accent);
  text-decoration: none; transition: transform 0.08s ease;
}
.btn:active { transform: scale(0.985); }
.btn--ghost { background: transparent; color: var(--ink-2);
              border: 1.5px solid var(--line-2); box-shadow: none; }
/* Destructive is never a full-width primary. */
.btn--danger { background: transparent; color: var(--needs-work);
               border: 1.5px solid rgba(176, 74, 64, 0.35); box-shadow: none; }
.btn--danger-solid { background: var(--needs-work); color: #fff; border: none; box-shadow: none; }
.btn--sm { height: 42px; font-size: 13.5px; border-radius: 12px; }
.btn--auto { width: auto; }
/* Legacy names, still used across the page modules' sheets. */
.btn.ghost { background: transparent; color: var(--ink-2);
             border: 1.5px solid var(--line-2); box-shadow: none; }
.btn.danger { background: transparent; color: var(--needs-work);
              border: 1.5px solid rgba(176, 74, 64, 0.35); box-shadow: none; }
.muted { color: var(--ink-4); font-size: 12.5px; font-weight: 600; }
.icon-btn {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-2); color: var(--ink-2);
  cursor: pointer; font-family: var(--font);
}
.icon-btn--danger { border-color: rgba(176, 74, 64, 0.35); color: var(--needs-work); }

/* ── Chips ───────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-chip);
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-3);
}
.chip--accent { background: var(--accent-tint); color: var(--accent-ink); }

/* ── Segmented control (RSVP) ────────────────────────────────────────────── */
.seg { display: flex; padding: 3px; border-radius: 13px; background: var(--surface-2); }
.seg button {
  flex: 1; height: 44px; border: none; border-radius: 10px; cursor: pointer;
  background: none; color: var(--ink-3);
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button[aria-pressed="true"] { color: #fff; font-weight: 800; }
.seg button.going[aria-pressed="true"]  { background: var(--elite);
  box-shadow: 0 2px 6px -2px rgba(15, 123, 90, 0.6); }
.seg button.maybe[aria-pressed="true"]  { background: var(--developing);
  box-shadow: 0 2px 6px -2px rgba(192, 138, 23, 0.6); }
.seg button.not[aria-pressed="true"]    { background: var(--needs-work);
  box-shadow: 0 2px 6px -2px rgba(176, 74, 64, 0.6); }

/* ── Form fields: flat, not glass ───────────────────────────────────────── */
.field-label {
  display: block; margin: 14px 0 6px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-3);
}
input:not([type="checkbox"]):not([type="range"]),
select, textarea {
  width: 100%; height: 50px; padding: 0 14px;
  font-family: var(--font); font-size: 15.5px; font-weight: 700; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line-2); border-radius: var(--r-control);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none;
}
textarea { height: auto; padding: 12px 14px; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 122, 110, 0.12);
}
::placeholder { color: var(--ink-5); }

/* ── Status dots ─────────────────────────────────────────────────────────── */
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.dot.going { background: var(--elite); }
.dot.maybe { background: var(--developing); }
.dot.not { background: var(--needs-work); }
.dot.pending { background: #C6D2CF; }

/* ── Empty / error / state block ─────────────────────────────────────────── */
.state { padding: 26px 20px; text-align: center; }
.state__icon {
  width: 60px; height: 60px; margin: 0 auto; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #EAF4F2, #D7E9E5); color: #3E7A72;
}
.state__icon--error { background: var(--needs-work-tint); color: var(--needs-work); }
.state h3 { margin: 14px 0 0; font-size: 16px; font-weight: 800; }
.state p { margin: 6px auto 0; max-width: 260px; font-size: 12.5px; line-height: 1.5;
           color: var(--ink-3); text-wrap: pretty; }
.state__actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.state__actions .btn { width: auto; flex: 0 1 auto; padding: 0 22px; }

/* ── Skeletons ───────────────────────────────────────────────────────────── */
.sk { background: #E4EDEB; border-radius: 5px; }
.sk--2 { background: #EDF3F1; }
.sk--3 { background: #F0F5F4; }
.sk-shimmer {
  background-image: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.7) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: sk-sweep 1.25s ease-in-out infinite;
}
@keyframes sk-sweep { from { background-position: 180% 0; } to { background-position: -80% 0; } }

/* ── Locked / paywall ────────────────────────────────────────────────────── */
.locked-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: var(--r-chip);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 800; color: var(--ink-3);
}
/* min-height is REQUIRED: the overlay is taller than the blurred child, and
   without it the lock icon and CTA are clipped by overflow:hidden. */
.locked-card { position: relative; min-height: 250px; overflow: hidden; }
.locked-card__under { filter: blur(3.5px); opacity: 0.5; pointer-events: none; }
.locked-card__over {
  position: absolute; inset: 0; padding: 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.92));
}
.locked-card__lock {
  width: 38px; height: 38px; border-radius: 12px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-dark); color: #fff;
}
.locked-card__over h3 { margin: 0; font-size: 15.5px; font-weight: 800; }
.locked-card__over p { margin: 5px 0 14px; max-width: 250px; font-size: 12px;
                       line-height: 1.45; color: var(--ink-3); text-wrap: pretty; }
.locked-card__over .btn { width: auto; padding: 0 22px; }

/* ── Toast with undo ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 16px; right: 16px; max-width: 448px;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  margin: 0 auto; height: 52px; padding: 0 8px 0 16px;
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--r-row); background: rgba(16, 45, 42, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 16px 32px -14px rgba(16, 45, 42, 0.8);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.18s, transform 0.18s; z-index: 90;
}
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast__msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast__undo {
  padding: 8px 14px; border: none; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  font-family: var(--font); font-size: 13px; font-weight: 800; flex: 0 0 auto;
}

/* ── Sheet ───────────────────────────────────────────────────────────────── */
.sheet-bg {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sheet {
  width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto;
  padding: 10px 16px calc(18px + var(--safe-b));
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  background: var(--glass-sheet);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 -20px 48px -20px rgba(16, 45, 42, 0.55);
  color: var(--ink);
}
.sheet__grab { width: 38px; height: 4px; border-radius: 2px;
               background: rgba(19, 47, 44, 0.16); margin: 0 auto 14px; }
.sheet__head { display: flex; align-items: flex-start; gap: 10px; }
.sheet__head > div:first-child { flex: 1; min-width: 0; }
.sheet h2 { margin: 0 2px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em;
            text-transform: none; color: var(--ink); }
.sheet__sub { margin: 5px 2px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.sheet__minute { font-size: var(--fs-min); font-weight: 700; color: var(--ink-3);
                 font-variant-numeric: tabular-nums; flex: 0 0 auto; padding-top: 4px; }
.sheet__list { display: flex; flex-direction: column; gap: 8px; }
.sheet__row {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 14px; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-row);
  box-shadow: var(--el-1); color: var(--ink); text-align: left; cursor: pointer;
  font-family: var(--font);
}
.sheet__row--selected { border: 1.5px solid var(--accent); }
.sheet__row--quiet { min-height: 56px; background: var(--field); box-shadow: none; }
.sheet__row--add { border-style: dashed; border-color: rgba(19, 47, 44, 0.18); }
.sheet__row .row__lead { width: 34px; height: 34px; border-radius: 10px; font-size: 12.5px; }
.sheet__row .row__title { font-size: 15px; }

/* ── App bar (glass chrome, teal gradient) ──────────────────────────────── */
.app-bar {
  position: relative;
  background: var(--grad-bar);
  color: #fff;
  /* The right inset clears the floating "?" help button that js/help.js pins
     to the top-right corner of every screen. */
  padding: calc(var(--safe-t) + 16px) 60px var(--bar-pb, 18px) 18px;
  box-shadow: 0 10px 26px -14px rgba(16, 45, 42, 0.55);
}
.app-bar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--grad-bar-sheen);
}
.app-bar > * { position: relative; z-index: 1; }
.app-bar .row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 0; padding: 0; background: none;
}
.app-bar .row + .row { border-top: none; }
.app-bar h1 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.bar-btn {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.16); color: #fff; border: none; cursor: pointer;
}
.bar-avatar {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: 0.02em;
}
.bar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bar-id { flex: 1; min-width: 0; }
/* The profile button (js/ui.js profileButtonHtml): a 36px initial circle on
   the accent tint inside a 44px touch target, last in a tab page's app bar. */
.bar-profile {
  width: 44px; height: 44px; margin: -5px -5px -5px 0; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 50%;
}
.bar-profile__dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #DDF1EE; color: #0E6B62; /* fixed: the bar is teal in both themes */
  font-family: var(--font); font-size: 15px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}
.bar-profile:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.bar-id .nm { font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-id .sub { font-size: var(--fs-min); font-weight: 600; opacity: 0.7; margin-top: 1px;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Floating glass tab bar ─────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-b) + 10px);
  width: min(calc(100% - 24px), 456px);
  height: var(--tabbar-h);
  padding: 0 6px;
  display: flex; align-items: stretch; justify-content: space-around;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-nav);
  background: var(--glass-nav);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  z-index: 50;
}
/* Four tabs, two each side of the + button: every tab is flex:1 and the
   button's slot is a fixed width, so the + sits exactly in the middle and the
   four tabs share the rest evenly (~89px each at 360px). */
.tab {
  flex: 1; min-width: 0; white-space: nowrap; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: none; border: none; cursor: pointer;
  color: var(--ink-4); font-family: var(--font); font-size: 10.5px; font-weight: 700;
}
.tab.active { color: var(--accent); font-weight: 800; }
.tab .ic { display: flex; line-height: 0; }
.tab-fab { flex: 0 0 auto; width: 58px; display: flex; align-items: flex-start; justify-content: center; }
.tab-fab .fab {
  width: 56px; height: 56px; margin-top: -20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  box-shadow: 0 10px 22px -8px rgba(14, 122, 110, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sk-shimmer { animation: none; }
  .toast, .btn { transition: none; }
}

/* ── Tablet / desktop (option 1g) ───────────────────────────────────────── */
/* Option 1g (232px sidebar rail + two-column grid) is NOT implemented. Until a
   page actually provides that layout, every page keeps its own 480px cap at
   every width — unconstraining the body here just lets a phone-width column
   sprawl across a desktop window with nothing to fill it. */

/* ── Dark (option 1d) ───────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E8F1EF; --ink-2: #C3D4D1; --ink-3: #9FB4B1; --ink-4: #7C9793; --ink-5: #5C7572;
    --bg: #0B1918; --surface: #12211F; --surface-2: #1A2B29;
    --field: #162523;
    --line: rgba(255, 255, 255, 0.08); --line-2: rgba(255, 255, 255, 0.12);
    --accent: #2FB3A5; --accent-ink: #6FE3D6; --accent-tint: rgba(47, 179, 165, 0.2);
    --elite: #2F9E76; --elite-tint: rgba(52, 199, 150, 0.18); --elite-on-tint: #5FE0AE;
    --good: #2FB3A5; --good-tint: rgba(47, 179, 165, 0.2); --good-on-tint: #6FE3D6;
    --developing: #B98F2E; --developing-tint: rgba(214, 158, 43, 0.18); --developing-on-tint: #E5BC63;
    --needs-work: #C05A50; --needs-work-tint: rgba(199, 90, 78, 0.2); --needs-work-on-tint: #F0918A;
    --glass-nav: rgba(18, 40, 38, 0.72); --glass-sheet: rgba(18, 40, 38, 0.9);
    --glass-strip: rgba(18, 40, 38, 0.72);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    --glass-shadow: 0 16px 34px -12px rgba(0, 0, 0, 0.9);
    --el-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --el-2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 22px -12px rgba(0, 0, 0, 0.8);
    --el-3: 0 20px 40px -22px rgba(0, 0, 0, 0.9);
    --el-accent: 0 8px 20px -10px rgba(0, 0, 0, 0.9);
    --scrim: rgba(0, 0, 0, 0.55);
  }
  .sk { background: #1D2E2C; }
  .sk--2 { background: #182725; }
  .sk--3 { background: #142320; }
  .sk-shimmer { background-image: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.07) 50%, transparent 80%); }
  .locked-card__over { background: linear-gradient(180deg, rgba(11,25,24,0.55), rgba(11,25,24,0.94)); }
  .state__icon { background: linear-gradient(160deg, #1A2E2B, #14251F); color: #6FE3D6; }
  .row__chev { color: var(--ink-5); }
}

/* ── Positions modal (js/positions-dialog.js) ─────────────────────────────────
   Twelve flat toggle buttons laid out as a pitch, attack at the top. The dialog
   around it is the shared .fg-dialog glass chrome; these are content controls. */
.pos-dialog { max-width: 380px; }
.pos-grid { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px;
            border-radius: 14px; background: var(--surface-2); }
.pos-row { display: flex; justify-content: center; gap: 10px; }
.pos-pick { width: 56px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2);
            background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px;
            font-weight: 800; cursor: pointer; }
.pos-pick.sel { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-ink); }
.pos-pick.main { border-width: 2px; }
.pos-pick:focus-visible { outline: 3px solid rgba(14, 122, 110, 0.4); outline-offset: 2px; }
.pos-summary { margin: 10px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.pos-clear { background: none; border: none; padding: 4px 0 12px; font: inherit; font-size: 13px;
             font-weight: 800; color: var(--accent-ink); cursor: pointer; }
.pos-clear[hidden] { display: none; }

/* ── Squad tools (js/coach-squad.js): roster rows, the player sheet, invites.
   Used by Team Hub and Home's Coach view. ─────────────────────────────── */
.chev { color:#B4C2BF; display:flex; align-items:center; flex:0 0 auto; }
    .roster-row { display:flex; align-items:center; gap:11px; padding:11px 14px; min-height:56px;
                  width:100%; text-align:left; background:none; color:inherit; font-family:var(--font); }
    .roster-row + .roster-row { border-top:1px solid var(--line); }
    .shirt { width:30px; height:30px; border-radius:9px; background:var(--accent-tint); color:var(--accent-ink);
             display:flex; align-items:center; justify-content:center; font-weight:800; font-size:12px;
             flex:0 0 auto; font-variant-numeric:tabular-nums; }
    .avatar { width:30px; height:30px; border-radius:9px; overflow:hidden; background:var(--surface-2);
              color:var(--ink-2); font-size:11px; font-weight:800; display:flex; align-items:center;
              justify-content:center; flex:0 0 auto; }
    .roster-main { flex:1; min-width:0; overflow:hidden; }
    .roster-name { font-weight:800; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .roster-pos { font-size:9.5px; font-weight:800; letter-spacing:0.04em; color:var(--ink-3);
                background:var(--surface-2); padding:2px 6px; border-radius:6px; vertical-align:2px; margin-left:4px; }
    .parent-name { font-size: var(--fs-min); color:var(--ink-4); font-weight:600; margin-top:2px;
                   white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .roster-pt { font-size: var(--fs-min); color:var(--accent-ink); font-weight:700; margin-top:2px; }
    .you { font-size:10px; font-weight:800; letter-spacing:0.07em; text-transform:uppercase;
           color:var(--accent-ink); background:var(--accent-tint); padding:4px 8px; border-radius:7px; }

    .roster-right { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
    .remove-roster-btn { background:none; border:none; color:var(--needs-work); display:flex;
                         padding:4px; cursor:pointer; line-height:1; }

    .att-person { display:flex; align-items:center; gap:10px; padding:10px 0;
                  border-top:1px solid var(--line); font-size:14px; font-weight:700; }
    .att-person:first-of-type { border-top:none; }
    .att-person .nm { flex:1; } .att-person .st { font-size: var(--fs-min); font-weight:800; }
    .code-box { font-size:28px; font-weight:800; letter-spacing:4px; text-align:center; padding:16px;
                background:var(--accent-tint); border-radius:14px; margin-top:8px; color:var(--accent-ink);
                font-variant-numeric:tabular-nums; }

    /* player detail sheet */
    .pl-detail-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-top:1px solid var(--line); font-size:14px; }
    .pl-detail-row:first-child { border-top:none; }
    .pl-dl { color:var(--text-2); font-weight:600; font-size:13px; }
    .edit-link { background:none; color:var(--teal); font-weight:700; font-size:13px; padding:0; cursor:pointer; }
    .foot-row { display:flex; gap:8px; }
    .foot-btn { flex:1; padding:11px; border:1.5px solid var(--line); border-radius:12px; background:#fff; font-size:14px; font-weight:600; color:var(--text); cursor:pointer; }
    .foot-btn.sel { border-color:var(--teal); background:var(--teal-50); color:var(--teal-dark); }

    /* coach roster player extra: rating hero + stats (reused/adapted from players view) */
    .hero { display:flex; gap:14px; align-items:center; padding:14px; }
    .hero .meta { flex:1; min-width:0; }
    .hero .name { font-weight:800; font-size:16px; }
    .pos-chip { display:inline-block; font-size:11px; font-weight:700; color:var(--teal-dark); background:var(--teal-50); padding:2px 8px; border-radius:999px; margin:4px 0; }
    .hero-sub { display:flex; gap:14px; margin-top:4px; font-size:12px; color:var(--text-2); }
    .hero-sub b { display:block; font-size:15px; color:var(--text); font-weight:800; }
    /* .ovr is the one shared rating badge — see css/app.css. */
    .ovr.big { padding:9px 13px; }
    .ovr.big b { font-size:22px; }
    .pct-grid { display:flex; gap:8px; flex-wrap:wrap; }
    .pct { flex:1 1 30%; min-width:80px; background:var(--teal-50); border-radius:10px; padding:8px 10px; text-align:center; font-size:12px; }
    .pct b { display:block; font-size:18px; font-weight:800; color:var(--teal-dark); }
    .pct span { font-size: var(--fs-min); color:var(--text-2); font-weight:600; }
    .stat-line { display:flex; justify-content:space-between; align-items:center; padding:7px 0; border-top:1px solid var(--line); font-size:13px; }
    .stat-line:first-of-type { border-top:none; }
    .stat-line .v { font-weight:800; font-variant-numeric:tabular-nums; }
    .stat-line .avg { color:var(--muted); font-size: var(--fs-min); margin-left:6px; font-weight:600; }


.sheet label { display:block; font-size:11px; font-weight:800; letter-spacing:0.07em;
               text-transform:uppercase; color:var(--ink-3); margin:14px 0 6px; }
.coach-note { display:flex; align-items:center; gap:10px; width:100%; text-align:left; margin:14px 0 4px;
              padding:12px 14px; border-radius:var(--r-row, 15px); background:var(--accent-tint); color:var(--accent-ink);
              font-family:var(--font); font-size:13px; font-weight:600; border:none; }
.coach-note span { flex:1; }

/* ── Team form (js/team-form.js): club-first create, team details edit ──── */
.age-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(54px, 1fr)); gap:6px; margin-bottom:4px; }
.age-grid button { height:40px; border-radius:10px; border:1px solid var(--line-2); background:var(--surface);
                   color:var(--ink-2); font-family:var(--font); font-size:13.5px; font-weight:700; cursor:pointer; }
.age-grid button[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:800; }
.seg.pick button[aria-pressed="true"] { background:var(--accent); }
.club-chip-row { display:flex; align-items:center; gap:10px; padding:10px 12px; margin-bottom:6px;
                 border-radius:var(--r-row, 15px); background:var(--surface-2); }
.club-chip-row .fg-opt-crest { width:32px; height:32px; object-fit:contain; border-radius:8px; flex:0 0 auto; }
.club-chip-row .fg-opt-crest--empty { display:inline-block; background:var(--surface); }
.club-chip-row .fg-opt-name { flex:1; min-width:0; font-weight:800; color:var(--ink); }
.link-btn { background:none; border:none; padding:6px; color:var(--accent-ink); font-family:var(--font);
            font-size:13px; font-weight:800; cursor:pointer; }
.tf-preview { margin:14px 0 4px; padding:12px 14px; border-radius:var(--r-row, 15px); background:var(--accent-tint);
              color:var(--ink); font-size:13.5px; }
.tf-preview .muted { margin-top:4px; font-size:12px; }
.tf-warn { margin:10px 0 0; padding:12px 14px; border-radius:var(--r-row, 15px); background:var(--developing-tint, #fff4dc);
           color:var(--ink); font-size:13px; }
.fg-opt-row .tf-area { display:block; font-size: var(--fs-min); font-weight:600; color:var(--ink-4); overflow:hidden; text-overflow:ellipsis; }
.coach-note__sub { display:block; margin-top:2px; font-size:12px; font-weight:500; color:var(--ink-3); }

/* ── Session clips sheet (js/media.js openSessionClips): a training session's
   private clips and who can see them. Flat clip blocks; the sheet is the glass. */
.clip-list { display:flex; flex-direction:column; gap:10px; }
.clip-item { padding:10px; border-radius:var(--r-row, 15px); background:var(--surface); border:1px solid var(--line);
             box-shadow:var(--el-1); }
.clip-media { display:block; width:100%; max-height:240px; object-fit:contain; border-radius:10px; background:var(--surface-2); }
.clip-meta { display:flex; align-items:center; gap:8px; margin-top:8px; }
.clip-status { flex:1; min-width:0; font-size:12px; font-weight:600; color:var(--ink-3); }
.clip-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.clip-actions .btn { flex:1 1 auto; width:auto; margin:0; }
.sheet label.clip-add { display:flex; margin:14px 0 0; font-size:15px; letter-spacing:0; text-transform:none; color:#fff; }
.clip-add.is-busy { opacity:0.6; pointer-events:none; }
.sheet .btn.clip-close { margin-top:10px; }

/* ── Training pages (js/drill-views.js, training*.html) ─────────────────────
   Choice pills, a switch, the drill row and drill sheet, sheet action stacks.
   Flat content controls; the sheet around them is the shared glass chrome. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.ellipsis { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fg-pills { display:flex; flex-wrap:wrap; gap:6px; }
.fg-pill { min-height:36px; padding:0 13px; border-radius:999px; border:1px solid var(--line-2); background:var(--surface);
           color:var(--ink-2); font-family:var(--font); font-size:13px; font-weight:700; cursor:pointer; }
.fg-pill[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:800; }
.fg-switch { position:relative; display:inline-block; width:50px; height:30px; flex:0 0 auto; margin:0; }
.fg-switch input { position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; z-index:1; }
.fg-switch span { position:absolute; inset:0; border-radius:999px; background:var(--line-2); transition:background 0.2s; }
.fg-switch span::before { content:''; position:absolute; width:24px; height:24px; left:3px; top:3px; border-radius:50%;
                          background:#fff; box-shadow:0 1px 3px rgba(0,0,0,0.25); transition:transform 0.2s; }
.fg-switch input:checked + span { background:var(--accent); }
.fg-switch input:checked + span::before { transform:translateX(20px); }
.fg-switch input:focus-visible + span { box-shadow:0 0 0 3px rgba(14, 122, 110, 0.25); }
.switch-row { display:flex; align-items:center; gap:12px; margin-top:14px; }
.switch-row > div:first-child { flex:1; min-width:0; }
.sheet-actions { display:flex; flex-direction:column; gap:8px; margin-top:16px; }
.btn-row { display:flex; gap:8px; margin-top:12px; }
.btn-row .btn { flex:1; width:auto; }
.stepper { display:flex; align-items:center; gap:12px; }
.stepper b { min-width:24px; text-align:center; font-size:19px; font-weight:800; }
.drill-filters { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.drill-row { padding:0; gap:0; }
.drill-row__main { display:flex; align-items:center; gap:10px; flex:1; min-width:0; min-height:56px; padding:11px 14px;
                   background:none; border:none; color:inherit; text-align:left; cursor:pointer; font-family:var(--font); }
.drill-row > :not(.drill-row__main) { margin-right:12px; }
.drill-row__title, .drill-row__sub { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.drill-sheet__diagram { margin:4px 0 6px; border-radius:var(--r-control); overflow:hidden; }
.drill-sheet__key { margin:0 2px 4px; font-size: var(--fs-min); font-weight:600; color:var(--ink-4); }
.drill-sheet__h { margin:14px 2px 4px; font-size:11px; font-weight:800; letter-spacing:0.07em; text-transform:uppercase; color:var(--ink-3); }
.drill-sheet__p { margin:0 2px; font-size:14px; line-height:1.5; font-weight:500; color:var(--ink-2); }
.drill-sheet__list { margin:0; padding-left:22px; font-size:14px; line-height:1.5; font-weight:500; color:var(--ink-2); }
.drill-sheet__list li + li { margin-top:4px; }
.drill-sheet__actions { display:flex; flex-direction:column; gap:8px; margin-top:18px; }
.drill-sheet__actions .locked-chip { margin-left:4px; }

/* ── Touch targets (2026-10-06) ──────────────────────────────────────────────
   On touch screens, controls drawn smaller than 44 px get an invisible ring
   (::after) that takes the tap area to about 44 px. The drawn size and the
   layout are unchanged; the ring spills into the gap around the control. */
@media (pointer: coarse) {
  .icon-btn, .bar-btn, .fg-pill, .remove-roster-btn, .edit-link, .link-btn,
  .toast__undo, .pos-clear, .section-h a, .section-h button { position: relative; }
  .icon-btn::after, .bar-btn::after, .fg-pill::after, .remove-roster-btn::after,
  .edit-link::after, .link-btn::after, .toast__undo::after, .pos-clear::after,
  .section-h a::after, .section-h button::after { content: ''; position: absolute; }
  .icon-btn::after { inset: -3px; }              /* 38 px */
  .bar-btn::after { inset: -5px; }               /* 34 px */
  .fg-pill::after { inset: -4px 0; }             /* 36 px tall */
  .remove-roster-btn::after { inset: -10px; }    /* 24 px icon */
  .edit-link::after, .section-h a::after, .section-h button::after { inset: -13px -6px; } /* bare text */
  .link-btn::after { inset: -7px -4px; }         /* 30 px */
  .toast__undo::after { inset: -6px 0; }         /* 32 px */
  .pos-clear::after { inset: -4px -6px 0; }      /* 34 px; bottom padding already 12 */
}

/* ── Report sheet (js/report-sheet.js: media, chat, team feed) ─────────────
   Scoped under .sheet so they outrank `.sheet label` / a page's `.sheet input`
   (the reasons are labels round radio inputs). */
.sheet .report-sheet__intro { margin:4px 0 14px; font-size:14px; }
.sheet .report-sheet__label { display:block; margin:0 0 6px; padding:0; font-size:11px; font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-4); }
.sheet .report-sheet__reasons { border:0; margin:0 0 16px; padding:0; display:flex; flex-direction:column; gap:8px; }
.sheet .report-reason { display:flex; align-items:center; gap:10px; min-height:48px; margin:0; padding:10px 12px; border-radius:12px; border:1px solid var(--line); background:var(--surface); font-size:15px; font-weight:700; letter-spacing:0; text-transform:none; color:var(--ink); cursor:pointer; }
.sheet .report-reason:has(input:checked) { border-color:var(--accent); }
.sheet .report-reason input { width:20px; height:20px; flex:0 0 auto; margin:0; padding:0; accent-color:var(--accent); }
.sheet .report-sheet__count { text-align:right; font-size:12px; margin-top:4px; }
.sheet .report-sheet__error { margin-top:8px; font-size:13px; font-weight:700; color:var(--needs-work-on-tint); }
.sheet .report-sheet__error.hidden { display:none; }
.sheet .report-sheet__actions { display:flex; gap:8px; margin-top:16px; }
.sheet .report-sheet__actions .btn { flex:1; width:auto; margin-top:0; }

/* ── Report / Block affordance on someone else's chat message or comment ── */
.mod-more { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
            width:32px; height:32px; border-radius:50%; border:none; background:transparent;
            color:var(--ink-3); cursor:pointer; padding:0; }
.mod-more:hover, .mod-more:focus-visible { background:var(--accent-tint); color:var(--accent-ink); }

/* ── Settings → Blocked users ─────────────────────────────────────────────── */
.blocked-row__main { flex:1; min-width:0; }
.blocked-row__name { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.blocked-row__sub { font-size:var(--fs-min); color:var(--ink-4); margin-top:1px; font-variant-numeric:tabular-nums; }
@media (pointer: coarse) { .mod-more { width:44px; height:44px; } }

/* ── Team feed (js/feed-ui.js: feed.html and Team Hub's preview) ──────────
   A Facebook / WhatsApp feel (2026-10-06). Post cards, the prompt card,
   composer controls and comment bubbles are flat surfaces; the composer and
   comments sheets, the reaction bubble and the viewer's buttons are chrome.
   On a phone the cards run edge to edge with an 8 px gap; from 600 px they
   are rounded cards in the page column. */
.fp-list { display:flex; flex-direction:column; gap:8px; }
.fp { position:relative; overflow:hidden; background:var(--surface); color:var(--ink); box-shadow:var(--el-1); }
.fp--compact, .feed-embed .fp { border:1px solid var(--line); border-radius:var(--r-card); }
@media (min-width: 600px) { .fp { border:1px solid var(--line); border-radius:var(--r-card); } }
.fp--notice::before { content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--accent); z-index:1; }
.fp-head { display:flex; align-items:center; gap:10px; padding:12px 6px 6px 16px; }
.fp-av { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; border-radius:50%;
         background:var(--accent-tint); color:var(--accent-ink); font-weight:800; letter-spacing:0.02em; }
.fp-av--40 { width:40px; height:40px; font-size:15px; }
.fp-av--32 { width:32px; height:32px; font-size:12px; }
.fp-who { flex:1; min-width:0; }
.fp-name { font-size:15px; font-weight:800; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fp-meta { display:flex; flex-wrap:wrap; align-items:center; gap:2px 5px; margin-top:2px;
           font-size:13px; font-weight:600; color:var(--ink-3); }
.fp-tag { display:inline-flex; align-items:center; gap:3px; }
.fp-tag--notice { color:var(--accent-ink); font-weight:800; }
.fp-tag--pin { color:var(--ink-2); font-weight:700; }
.fp-menu { width:44px; height:44px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
           border:0; border-radius:50%; background:none; color:var(--ink-3); cursor:pointer; }
.fp-menu:hover, .fp-menu:focus-visible { background:var(--surface-2); }
.fp-pad { padding:0 16px; }
.fp-text { padding-top:2px; padding-bottom:2px; }
.fp-title { margin:0 0 4px; font-size:17px; font-weight:800; line-height:1.3; letter-spacing:-0.01em; overflow-wrap:anywhere; }
.fp-body { font-size:16px; font-weight:500; line-height:1.4; white-space:pre-wrap; overflow-wrap:anywhere;
           display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:var(--lines, 6); line-clamp:var(--lines, 6); overflow:hidden; }
.fp-body.is-open { display:block; -webkit-line-clamp:unset; line-clamp:none; }
.fp-seemore { display:block; margin:2px 0 0; padding:2px 0; border:0; background:none; cursor:pointer;
              font-family:var(--font); font-size:15px; font-weight:800; color:var(--ink-3); }
.fp-seemore[hidden] { display:none; }
.fp--compact .fp-title { font-size:15.5px; }
.fp--compact .fp-body { font-size:14.5px; }

/* Media, edge to edge inside the card */
.fp-media { display:grid; gap:2px; margin-top:10px; background:var(--surface-2); }
.fp-tile { position:relative; display:block; min-width:0; min-height:0; padding:0; border:0; overflow:hidden;
           background:var(--surface-2); cursor:pointer; }
.fp-tile img, .fp-tile video { display:block; width:100%; height:100%; object-fit:cover; }
.fp-media--one .fp-tile img, .fp-media--one .fp-tile video { height:auto; min-height:200px; max-height:520px; }
.fp--compact .fp-media--one .fp-tile img, .fp--compact .fp-media--one .fp-tile video { min-height:160px; max-height:280px; }
.fp-media--two { grid-template-columns:1fr 1fr; }
.fp-media--two .fp-tile { aspect-ratio:1; }
.fp-media--three { grid-template-columns:2fr 1fr; grid-template-rows:1fr 1fr; aspect-ratio:4 / 3; }
.fp-media--three .fp-tile:first-child { grid-row:span 2; }
.fp-media--four { grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; aspect-ratio:1; }
.fp-play { position:absolute; inset:0; margin:auto; width:52px; height:52px; border-radius:50%; pointer-events:none;
           display:flex; align-items:center; justify-content:center; padding-left:3px;
           background:rgba(0, 0, 0, 0.5); color:#fff; box-shadow:0 0 0 2px rgba(255, 255, 255, 0.85); }
.fp-plus { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
           background:rgba(0, 0, 0, 0.48); color:#fff; font-size:28px; font-weight:800; }
.fp-embed { position:relative; aspect-ratio:16 / 9; margin-top:10px; background:#000; }
.fp-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Link preview */
.fp-linkcard { display:flex; align-items:center; gap:12px; margin-top:8px; padding:12px; border-radius:12px;
               background:var(--surface-2); color:var(--ink); text-decoration:none; }
.fp-linkcard:hover { background:var(--accent-tint); }
.fp-linkcard__ic { width:40px; height:40px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
                   border-radius:10px; background:var(--surface); color:var(--accent-ink); }
.fp-linkcard__txt { min-width:0; display:flex; flex-direction:column; gap:2px; }
.fp-linkcard__txt b { font-size:15px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fp-linkcard__txt span { font-size:13px; font-weight:600; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Poll */
.fp-poll { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.fp-poll__opt { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px;
                min-height:46px; padding:10px 14px; overflow:hidden; border-radius:12px; border:1.5px solid var(--line-2);
                background:var(--surface); color:var(--ink); font-family:var(--font); text-align:left; cursor:pointer; }
.fp-poll__opt.is-mine { border-color:var(--accent); }
.fp-poll__bar { position:absolute; left:0; top:0; bottom:0; background:var(--accent-tint); transition:width 0.3s ease; }
.fp-poll__lbl { position:relative; min-width:0; display:flex; align-items:center; gap:6px; font-size:15px; font-weight:700; overflow-wrap:anywhere; }
.fp-poll__lbl svg { flex:0 0 auto; color:var(--accent-ink); }
.fp-poll__pct { position:relative; flex:0 0 auto; font-size:14px; font-weight:800; color:var(--accent-ink); font-variant-numeric:tabular-nums; }
.fp-poll__total { font-size:13px; font-weight:600; color:var(--ink-3); }

/* Summary row and action bar */
.fp-summary { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 16px 0; }
.fp-summary button { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:0; border:0; background:none;
                     font-family:var(--font); font-size:14px; font-weight:600; color:var(--ink-3); cursor:pointer; }
.fp-summary button:hover { text-decoration:underline; }
.fp-emo { display:inline-flex; }
.fp-emo span { width:22px; height:22px; margin-left:-5px; display:inline-flex; align-items:center; justify-content:center;
               border-radius:50%; background:var(--surface-2); box-shadow:0 0 0 2px var(--surface); font-size:12.5px; line-height:1; }
.fp-emo span:first-child { margin-left:0; }
.fp-actions { display:flex; gap:4px; margin:8px 8px 0; padding:4px 0; border-top:1px solid var(--line-2); }
.fp-act { flex:1; min-width:0; min-height:44px; display:flex; align-items:center; justify-content:center; gap:8px;
          border:0; border-radius:10px; background:none; color:var(--ink-3); cursor:pointer;
          font-family:var(--font); font-size:15px; font-weight:700; }
.fp-act:hover, .fp-act:focus-visible { background:var(--surface-2); }
.fp-like.is-on { color:var(--accent-ink); font-weight:800; }
.fp-like-emo { font-size:19px; line-height:1; }
.fp--skeleton .fp-actions { justify-content:space-around; padding:14px 0; }
.fp--skeleton .fp-pad { padding-top:4px; }

/* Reaction bubble over the Like button (chrome) */
.fp-picker { position:fixed; z-index:95; display:flex; gap:2px; padding:5px; border-radius:999px;
             background:var(--glass-sheet); border:1px solid var(--glass-border);
             -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(var(--glass-saturate));
             backdrop-filter:blur(var(--glass-blur)) saturate(var(--glass-saturate));
             box-shadow:var(--glass-shadow), var(--glass-highlight); }
.fp-picker button { width:44px; height:44px; border:0; border-radius:50%; background:none; cursor:pointer;
                    font-size:26px; line-height:1; transition:transform 0.12s ease; }
.fp-picker button:hover, .fp-picker button:focus-visible { transform:translateY(-3px) scale(1.18); outline:none; }
.fp-picker button.is-on { background:var(--accent-tint); }

/* "Share something with …" */
.fp-prompt { padding:12px 12px 4px 16px; }
.fp-prompt__row { display:flex; align-items:center; gap:10px; }
.fp-prompt__pill { flex:1; min-width:0; min-height:42px; padding:0 16px; border-radius:999px; border:1px solid var(--line-2);
                   background:var(--field); color:var(--ink-3); cursor:pointer; text-align:left;
                   font-family:var(--font); font-size:15px; font-weight:600;
                   white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fp-prompt__pill:hover { background:var(--surface-2); }
.fp-prompt__acts { display:flex; margin-top:10px; padding-top:4px; border-top:1px solid var(--line-2); }
.fp-prompt__act { flex:1; min-width:0; min-height:44px; display:flex; align-items:center; justify-content:center; gap:7px;
                  border:0; border-radius:10px; background:none; color:var(--ink-2); cursor:pointer;
                  font-family:var(--font); font-size:14px; font-weight:700; }
.fp-prompt__act:hover { background:var(--surface-2); }
.fp-prompt__act--photo svg { color:var(--elite); }
.fp-prompt__act--poll svg { color:var(--accent); }
.fp-prompt__act--notice svg { color:var(--developing); }
.feed-embed > .fp-prompt { margin-bottom:8px; }   /* Team Hub: the prompt above the preview */
.fp-empty .state { padding:34px 20px; }
.fp-open-full { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; min-height:44px; margin-top:8px;
                border:0; border-radius:var(--r-row); background:var(--surface); box-shadow:var(--el-1); color:var(--accent-ink);
                font-family:var(--font); font-size:14px; font-weight:800; cursor:pointer; }

/* Post options */
.fp-opt { gap:12px; font-size:15px; font-weight:700; }
.fp-opt__ic { display:flex; color:var(--ink-3); }
.fp-opt--danger, .fp-opt--danger .fp-opt__ic { color:var(--needs-work); }

/* "Create post": full height on a phone, a centred dialog from 600 px */
.sheet-bg--fc { align-items:stretch; }
.sheet.fc { display:flex; flex-direction:column; height:100dvh; max-height:none; max-width:none; padding:0;
            overflow:hidden; border-radius:0; border-top:0; }
@media (max-width: 599px) {   /* a full page on a phone: opaque, no blur */
  .sheet.fc { background:var(--surface); -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none; }
}
@media (min-width: 600px) {
  .sheet-bg--fc { align-items:center; padding:24px; }
  .sheet.fc { max-width:560px; height:auto; max-height:min(760px, 90dvh); border-radius:20px; border:1px solid var(--glass-border); }
}
.fc-top { display:flex; align-items:center; gap:8px; padding:calc(var(--safe-t) + 8px) 12px 8px 8px; border-bottom:1px solid var(--line-2); }
@media (min-width: 600px) { .fc-top { padding-top:8px; } }
.sheet .fc-top h2 { flex:1; min-width:0; margin:0; text-align:center; font-size:17px; }
.fc-iconbtn { width:44px; height:44px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
              border:0; border-radius:50%; background:none; color:var(--ink-2); cursor:pointer; }
.fc-iconbtn:hover, .fc-iconbtn:focus-visible { background:var(--surface-2); }
.fc-post { min-width:76px; height:38px; flex:0 0 auto; padding:0 18px; display:flex; align-items:center; justify-content:center;
           border:0; border-radius:999px; background:var(--accent); color:#fff; cursor:pointer;
           font-family:var(--font); font-size:15px; font-weight:800; }
.fc-post:disabled { background:var(--surface-2); color:var(--ink-4); cursor:default; }
.fc-post.is-posting { background:var(--accent); }
.fc-scroll { flex:1; min-height:0; overflow-y:auto; padding:14px 16px 16px; }
.fc-author { display:flex; align-items:center; gap:10px; }
.fc-author__name { font-size:15px; font-weight:800; }
.fc-aud { display:inline-flex; align-items:center; gap:4px; max-width:100%; margin-top:3px; padding:3px 8px; border-radius:7px;
          background:var(--surface-2); color:var(--ink-2); font-size:12px; font-weight:700; }
.fc-aud span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sheet.fc .fc-headline, .sheet.fc .fc-text { display:block; width:100%; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--ink); }
.sheet.fc .fc-headline { height:auto; margin-top:12px; padding:6px 0; font-size:19px; font-weight:800; }
.sheet.fc .fc-text { min-height:96px; padding:6px 0; resize:none; font-size:18px; font-weight:500; line-height:1.4; }
.sheet.fc .fc-headline:focus, .sheet.fc .fc-text:focus { box-shadow:none; }
.fc-strip { display:flex; gap:8px; overflow-x:auto; padding:6px 0 4px; }
.fc-thumb { position:relative; flex:0 0 auto; width:96px; height:96px; overflow:hidden; border-radius:12px; background:var(--surface-2); }
.fc-thumb img, .fc-thumb video { display:block; width:100%; height:100%; object-fit:cover; }
.fc-thumb .fp-play { width:32px; height:32px; }
.fc-thumb--add { display:flex; align-items:center; justify-content:center; border:1.5px dashed var(--line-2); background:var(--surface);
                 color:var(--ink-3); cursor:pointer; }
.fc-x { width:28px; height:28px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; padding:0;
        border:0; border-radius:50%; background:rgba(0, 0, 0, 0.62); color:#fff; cursor:pointer; }
.fc-thumb .fc-x { position:absolute; top:4px; right:4px; }
.fc-card { margin-top:10px; padding:12px; border-radius:14px; background:var(--surface); border:1px solid var(--line-2); box-shadow:var(--el-1); }
.fc-card__head { display:flex; align-items:center; gap:8px; margin-bottom:10px; color:var(--ink-2); font-size:14px; font-weight:800; }
.fc-card__head span { flex:1; }
.fc-card .fc-x, .fc-opt .fc-x { background:var(--surface-2); color:var(--ink-2); }
.fc-card__hint { margin:-4px 0 10px; font-size:13px; font-weight:600; color:var(--ink-3); }
.fc-opt { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.fc-opt input { flex:1; min-width:0; height:44px; }
.fc-addopt { display:flex; align-items:center; gap:6px; padding:8px 0; border:0; background:none; cursor:pointer;
             color:var(--accent-ink); font-family:var(--font); font-size:14px; font-weight:800; }
.fc-tools { padding:8px 10px calc(8px + var(--safe-b)) 16px; border-top:1px solid var(--line-2); }
@media (min-width: 600px) { .fc-tools { padding-bottom:10px; } }
.fc-hint { display:flex; align-items:center; gap:6px; padding:2px 0 8px; font-size:13px; font-weight:600; color:var(--developing-on-tint); }
.fc-tools__row { display:flex; align-items:center; gap:8px; }
.fc-tools__lbl { flex:1; min-width:0; font-size:14px; font-weight:700; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fc-tools__btns { display:flex; gap:2px; }
.fc-tool { width:44px; height:44px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:6px; padding:0;
           border:0; border-radius:12px; background:none; color:var(--ink-2); cursor:pointer;
           font-family:var(--font); font-size:13px; font-weight:700; }
.fc-tool span { display:none; }
.fc-tool:hover:not(:disabled) { background:var(--surface-2); }
.fc-tool--photo svg { color:var(--elite); }
.fc-tool--poll svg { color:var(--accent); }
.fc-tool--video svg { color:var(--needs-work); }
.fc-tool--notice svg { color:var(--developing); }
.fc-tool.is-on { background:var(--accent-tint); color:var(--accent-ink); }
.fc-tool--notice.is-on { background:var(--developing-tint); color:var(--developing-on-tint); }
.fc-tool:disabled { opacity:0.35; cursor:default; }
@media (max-width: 379px) {
  .fc-tools__lbl { display:none; }
  .fc-tools__btns { flex:1; justify-content:space-between; }
}
@media (min-width: 600px) {
  .fc-tool { width:auto; padding:0 10px; }
  .fc-tool span { display:inline; }
}
.fc-spin { display:inline-block; width:18px; height:18px; border-radius:50%; border:2px solid rgba(255, 255, 255, 0.4);
           border-top-color:#fff; animation:fc-spin 0.8s linear infinite; }
@keyframes fc-spin { to { transform:rotate(360deg); } }

/* Comments: bubbles, and the composer pinned at the bottom */
.sheet.fcm { display:flex; flex-direction:column; height:min(82dvh, 720px); padding:0; overflow:hidden; }
.fcm-top { display:flex; align-items:center; gap:8px; padding:10px 8px 8px 18px; border-bottom:1px solid var(--line-2); }
.sheet .fcm-top h2 { flex:1; margin:0; font-size:17px; }
.fcm-list { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:12px; padding:14px 12px 10px; }
.fcm-note { padding:28px 8px; text-align:center; font-size:14px; font-weight:600; color:var(--ink-3); }
.fcm-c { display:flex; align-items:flex-start; gap:8px; }
.fcm-c__main { flex:1; min-width:0; }
.fcm-bubble { display:inline-block; max-width:100%; padding:8px 12px; border-radius:18px; background:var(--surface-2);
              -webkit-touch-callout:none; }
.fcm-bubble__name { font-size:13.5px; font-weight:800; }
.fcm-bubble__text { margin-top:1px; font-size:15px; font-weight:500; line-height:1.35; white-space:pre-wrap; overflow-wrap:anywhere; }
.fcm-meta { display:flex; align-items:center; gap:6px; padding:3px 12px 0; font-size:12px; font-weight:600; color:var(--ink-3); }
.fcm-link { padding:2px 0; border:0; background:none; cursor:pointer; font-family:var(--font); font-size:12px; font-weight:800; color:var(--ink-3); }
.fcm-link:hover { text-decoration:underline; }
.fcm-compose { display:flex; align-items:flex-end; gap:8px; padding:8px 10px calc(8px + var(--safe-b)) 12px; border-top:1px solid var(--line-2); }
.fcm-compose .fp-av { margin-bottom:4px; }
.sheet.fcm .fcm-compose textarea { flex:1; min-width:0; height:40px; min-height:40px; max-height:120px; padding:9px 14px; resize:none;
                               border-radius:20px; border:1px solid var(--line-2); background:var(--field);
                               font-size:15px; font-weight:500; line-height:1.4; }
.fcm-send { width:40px; height:40px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
            border:0; border-radius:50%; background:none; color:var(--ink-4); cursor:pointer; }
.fcm-send.is-ready { color:var(--accent); }
.fcm-send:disabled { cursor:default; }

/* Photos and videos, full screen */
.fv { position:fixed; inset:0; z-index:150; background:#000; color:#fff; touch-action:pan-y; }
.fv-stage { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.fv-stage img, .fv-stage video { max-width:100%; max-height:100%; object-fit:contain; display:block; }
.fv-top { position:absolute; left:0; right:0; top:0; display:flex; align-items:center; justify-content:space-between;
          padding:calc(var(--safe-t) + 8px) 8px 18px; background:linear-gradient(rgba(0, 0, 0, 0.6), transparent); pointer-events:none; }
.fv-top > * { pointer-events:auto; }
.fv-count { font-size:15px; font-weight:800; }
.fv-btn { width:44px; height:44px; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%;
          background:rgba(0, 0, 0, 0.45); color:#fff; cursor:pointer;
          -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }
.fv-btn:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.fv-nav { position:absolute; top:50%; transform:translateY(-50%); }
.fv-nav--prev { left:8px; }
.fv-nav--next { right:8px; }
.fv-nav[hidden] { display:none; }
.fv-err { font-size:15px; font-weight:700; }
.fc-spin--light { width:32px; height:32px; border-width:3px; }

@media (pointer: coarse) {
  .fcm-link, .fp-summary button { position:relative; }
  .fcm-link::after { content:''; position:absolute; inset:-12px -6px; }
  .fp-summary button::after { content:''; position:absolute; inset:-6px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fp-poll__bar, .fp-picker button { transition:none; }
  .fc-spin { animation-duration:1.6s; }
}
