/* The hidden attribute has to win. Its only styling is the user agent's
   [hidden] { display: none }, which any class setting display beats on
   specificity - so .profile-photo-blank { display: grid } left "no photo yet"
   sitting under the photo the member had just uploaded, and every other
   display-carrying class we toggle had the same latent bug. */
[hidden] { display: none !important; }

/* MatIQ - shared design system.
 *
 * The defaults below are Gravitas Martial Arts' own tokens, the first gym
 * this was built for: its Squarespace site sets darkAccent hsl(111,11%,12%)
 * (a near-black with a faint green cast), lightAccent hsl(45,12%,87%) (warm
 * cream) and an indigo accent. The crest is monochrome, so it reverses to
 * white cleanly on the dark ground.
 *
 * Another gym re-keys them from its brand.json ("css_vars"), which every page
 * writes into a :root rule after this file (spartracker/branding.py). To
 * re-key the whole UI to a different accent, change --accent-* only.
 */

@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700&family=Graduate&family=Montserrat:wght@700&display=swap");

:root {
  /* Ground: the brand's darkAccent, stepped into a usable surface scale. */
  --ink-900: #0f1310;
  --ink-850: #141813;
  --ink-800: #1d231c;   /* brand darkAccent */
  --ink-700: #263024;
  --ink-600: #33402f;
  --ink-500: #4a5a45;

  /* Type: the brand's warm lightAccent, not pure white. */
  --cream:      #e1dfd9;
  --cream-dim:  #a9a89f;
  --cream-faint:#7c7c73;

  /* Accent: the site's configured indigo, lifted for contrast on dark. */
  --accent:       #6f6ae8;
  --accent-strong:#5a54de;
  --accent-quiet: rgba(111, 106, 232, 0.14);
  --accent-line:  rgba(111, 106, 232, 0.45);

  /* Reserved semantics. Crimson means destructive here, nothing else. */
  --danger:      #d9464f;
  --danger-quiet:rgba(217, 70, 79, 0.14);
  --success:     #4fae7c;
  --warning:     #d1913c;

  --radius:    10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --line: 1px solid var(--ink-700);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);

  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --font-brand: "Graduate", "Barlow Condensed", Impact, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

a { color: var(--accent); }

/* ---------- header / brand lockup ---------- */

header {
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border-bottom: var(--line);
  padding: 0.7rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  position: sticky; top: 0; z-index: 40;
}

.brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand-crest {
  width: 38px; height: 38px; flex: none;
  object-fit: contain;
  /* The crest is white-on-transparent; a faint glow lifts it off the ground. */
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.6));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name {
  font-family: var(--font-brand);
  font-size: 1.05rem; letter-spacing: 0.08em;
  color: var(--cream);
}
.brand-sub {
  font-family: var(--font-head);
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream-faint);
}
/* The MatIQ wordmark inside a label that is otherwise upper-cased: its own
   casing, and the logo's orange (static/img/matiq-logo.svg) whatever the
   gym's accent is. */
.product-name {
  font-family: "Montserrat", var(--font-head);
  text-transform: none; letter-spacing: 0.01em; font-weight: 700;
  color: var(--cream);
}
.product-name-iq { color: #f7502c; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.quick-stat {
  font-size: 0.82rem; color: var(--cream-dim);
  background: var(--ink-800); border: var(--line);
  border-radius: 999px; padding: 0.3rem 0.7rem;
}
.badge-green { color: var(--success); font-weight: 600; }
.badge-red   { color: var(--danger);  font-weight: 600; }

/* ---------- layout ---------- */

.container { max-width: 1320px; margin: 0 auto; padding: 1.5rem; }

/* ---------- navigation: a sidebar on a wide screen, a bottom bar on a phone (2026-10-25) ---------- */

.view-tag {
  display: flex; align-items: baseline; gap: .45rem; font-size: .82rem;
  background: var(--ink-800); border: var(--line); border-radius: 999px; padding: .3rem .75rem;
}
.view-kind { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-family: var(--font-head); color: var(--cream-faint); }
.view-coach .view-kind { color: var(--accent); }
.view-student .view-kind { color: var(--success); }
.view-name { color: var(--cream); }

/* The sidebar: every tab, grouped, left-aligned. */
.container { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.container > .content { min-width: 0; }
.tabs { position: sticky; top: 4.6rem; display: flex; flex-direction: column; gap: .15rem; }
.tabs-group { display: flex; flex-direction: column; gap: .15rem; }
.tabs-group + .tabs-group { margin-top: .9rem; padding-top: .9rem; border-top: var(--line); }
.tabs-heading {
  font-family: var(--font-head); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream-faint); padding: 0 .75rem .35rem;
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  text-decoration: none;   /* the strip holds links as well as buttons */
  font-family: var(--font-head);
  font-size: .9rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream-faint);
  padding: 0.55rem 0.75rem;
  border-left: 2px solid transparent;
  display: flex; align-items: center; gap: 0.55rem; text-align: left;
  transition: color .15s, border-color .15s, background .15s;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tab-btn:hover { color: var(--cream); background: rgba(255,255,255,.03); }
.tab-btn.active { color: var(--cream); border-left-color: var(--accent); background: var(--accent-quiet); }
.tab-icon { width: 1.3em; text-align: center; flex: none; }
.tab-badge {
  background: var(--ink-700); color: var(--cream-dim);
  font-family: var(--font-body); font-size: .72rem; font-weight: 600;
  padding: .1rem .42rem; border-radius: 999px; letter-spacing: 0; margin-left: auto;
}
.tab-btn.active .tab-badge { background: var(--accent-quiet); color: var(--accent); }
.tab-badge[hidden] { display: none; }
/* the coach's Matches: whose */
.who-filter { display: flex; align-items: center; gap: .8rem; margin-left: auto; font-size: .85rem; color: var(--cream-dim); }
.who-filter select { font: inherit; padding: .3rem .5rem; border-radius: var(--radius-sm); background: var(--ink-800); color: var(--cream); border: var(--line); }
.who-filter[hidden] { display: none; }
/* the Assign card's fix line when the view is out past the clip: the next step, lit */
.queue-fix.queue-out { padding: .5rem .7rem; border-radius: var(--radius-sm); background: var(--accent-quiet); }
.queue-fix.queue-out .queue-note { color: var(--cream); }
.tabbar, .tabs-sheet { display: none; }

/* The phone: the sidebar goes, a bar of the primary tabs sits at the bottom, More opens a sheet of the rest. */
@media (max-width: 56rem) {
  .container { display: block; padding: 1rem; }
  nav.tabs { display: none; }
  /* one row: the view tag and Log out; the pipeline light is on the coach's Home as well */
  header { padding: .55rem 1rem; gap: .5rem; }
  #header-pipeline-stat { display: none; }
  .header-actions { gap: .4rem; }
  .brand-crest { width: 30px; height: 30px; }
  body.has-tabbar { padding-bottom: calc(4.2rem + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; justify-content: space-around; align-items: stretch;
    padding: .3rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    background: var(--ink-850); border-top: var(--line);
  }
  .tabbar .tab-btn {
    flex: 1 1 0; flex-direction: column; justify-content: center; gap: .15rem;
    padding: .35rem .2rem; border-left: 0; border-radius: var(--radius-sm);
    font-size: .62rem; letter-spacing: .04em; text-align: center; min-width: 0;
  }
  .tabbar .tab-btn.active { background: none; color: var(--accent); }
  .tabbar .tab-icon { font-size: 1.25rem; width: auto; }
  /* the bar's counts are news, lit like the More dot; the sidebar's grey would vanish on the dark bar */
  .tabbar .tab-badge, .tabbar .tab-btn.active .tab-badge { position: absolute; top: .1rem; right: 12%; margin: 0; background: var(--accent); color: #fff; }
  .tabbar .tab-btn { position: relative; }
  .tabbar .tabbar-more.has-news::after {
    content: ''; position: absolute; top: .3rem; right: 30%;
    width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent);
  }
  .tabs-sheet {
    position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.6);
    align-items: flex-end;
  }
  .tabs-sheet.open { display: flex; }
  .tabs-sheet .tab-btn {
    width: 100%; padding: .85rem 1.25rem; border-left: 0; border-radius: 0; font-size: .9rem;
    background: var(--ink-850); border-bottom: 1px solid rgba(242,239,230,.08);
  }
  .tabs-sheet .tab-btn.active { color: var(--accent); }
  .tabs-sheet > .tab-btn:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .tabs-sheet > .tab-btn:last-child { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  /* the sheet's buttons stack from the bottom, over the bar */
  .tabs-sheet.open { flex-direction: column; justify-content: flex-end; }
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; } }

.panel {
  background: var(--ink-850); border: var(--line);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem;
}
.panel-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.panel-header h2 {
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--cream);
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; align-items: start; }
.members-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: var(--ink-800); border: var(--line); border-radius: var(--radius); padding: .85rem; min-width: 0; }

/* ---------- controls ---------- */

button, input, select, textarea {
  font-family: inherit; font-size: .92rem;
  padding: .55rem .8rem; border-radius: var(--radius-sm);
  border: var(--line); box-sizing: border-box;
}
button {
  background: var(--accent); color: #fff; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s;
}
button:hover { background: var(--accent-strong); }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
/* Links dressed as buttons take the same classes, so a "Watch" next to an
   "Approve" does not read as a different kind of thing. */
button.secondary, a.secondary { background: var(--ink-700); color: var(--cream); border-color: var(--ink-600); }
button.secondary:hover, a.secondary:hover { background: var(--ink-600); }
button.ghost, a.ghost { background: transparent; color: var(--cream-dim); border-color: var(--ink-600); }
button.ghost:hover, a.ghost:hover { background: var(--ink-800); color: var(--cream); }
a.secondary, a.ghost {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: .55rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--ink-600);
}
button.danger-btn { background: transparent; color: var(--danger); border-color: rgba(217,70,79,.5); }
button.danger-btn:hover { background: var(--danger-quiet); }

button:disabled { opacity: .45; cursor: not-allowed; }

input, select, textarea { background: var(--ink-900); color: var(--cream); }
input::placeholder { color: var(--cream-faint); }

.status { color: var(--cream-dim); font-size: .88rem; min-height: 1.2rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.metrics { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1rem; }
.metric {
  background: var(--ink-800); border: var(--line); border-radius: var(--radius-sm);
  padding: .5rem .8rem; color: var(--cream-dim); font-size: .87rem;
}
.batch-bar {
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center;
  background: var(--ink-800); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: .8rem; margin-bottom: 1rem;
  min-width: 0; max-width: 100%;
}

.face-card.selected { border-color: var(--accent); background: var(--accent-quiet); }

.face-card.selected::after {
  content: '✓'; position: absolute; top: .5rem; right: .5rem;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .74rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.5);
  pointer-events: none;
}
.face-card.selected { border-width: 2px; }
.face-card:not(.selected) img { transition: opacity .12s; }

/* ---------- student progress / timetable ---------- */

.milestone-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.milestone {
  display: inline-flex; align-items: center; gap: .4rem;
  border: var(--line); border-radius: 999px; padding: .3rem .75rem;
  font-size: .8rem; color: var(--cream-faint); background: var(--ink-900);
}
.milestone.reached { color: var(--cream); border-color: var(--accent-line); background: var(--accent-quiet); }
.milestone.reached .milestone-icon { filter: none; }
.milestone-icon { filter: grayscale(1) opacity(.45); }
.milestone-next { width: 100%; font-size: .82rem; color: var(--cream-dim); }
.milestone-bar { height: 6px; background: var(--ink-700); border-radius: 3px; overflow: hidden; margin-top: .3rem; }
.milestone-bar span { display: block; height: 100%; background: var(--accent); }

.timetable-next { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.timetable-next strong { font-size: 1.05rem; color: var(--cream); }
.timetable-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.timetable-day { background: var(--ink-900); border: var(--line); border-radius: var(--radius); padding: .6rem; min-width: 0; }
.timetable-day.is-today { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-line); }
.timetable-day h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-dim); margin: 0 0 .5rem; }
.timetable-day.is-today h4 { color: var(--accent); }
.timetable-class { padding: .4rem .5rem; border-radius: var(--radius-sm); background: var(--ink-800); margin-bottom: .4rem; font-size: .85rem; }
.timetable-class.is-next { outline: 1px solid var(--accent); }
.timetable-class .timetable-time { font-family: var(--font-mono); color: var(--accent); font-size: .8rem; font-variant-numeric: tabular-nums; }
.timetable-class .timetable-name { display: block; color: var(--cream); font-weight: 600; }
.timetable-class .timetable-meta { color: var(--cream-faint); font-size: .74rem; }
.timetable-empty { color: var(--cream-faint); font-size: .8rem; }
.timetable-oneoffs { margin-top: 1rem; }
.timetable-oneoffs h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-dim); margin: 0 0 .5rem; }

.pos-cal-clips { margin-top: 1rem; }
.pos-cal-kind { margin: .9rem 0 .35rem; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--cream-dim); }
.pos-cal-card { margin-top: .6rem; }
.pos-cal-card .match-card { margin: 0; }
/* On a phone a card inside a card inside a card cost the video a quarter of the screen's width. */
@media (max-width: 40rem) {
  .pos-cal-card { margin-inline: -.45rem; }
  .pos-cal-card .match-card { padding: 0; border: 0; background: none; }
}
.pos-cal-day.is-new .pos-cal-num::after { content: ""; display: inline-block; width: .4rem; height: .4rem; margin-left: .25rem; border-radius: 50%; background: #F7502C; vertical-align: middle; }
.every-class { margin-top: .6rem; }
.every-class > summary { cursor: pointer; font-weight: 600; color: var(--cream); padding: .25rem 0; }
.history-card { display: flex; gap: .75rem; align-items: center; }
.history-card img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; background: #000; flex-shrink: 0; }
.history-month { grid-column: 1/-1; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-dim); margin-top: .4rem; }
.history-month:first-child { margin-top: 0; }

/* ---------- player controls, bookmarks, clip sharing, compare ---------- */

.player-wrap { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.player-controls { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.player-controls button { padding: .28rem .55rem; font-size: .78rem; font-family: var(--font-mono); }
.player-controls button.is-active { background: var(--accent-quiet); color: var(--accent); border-color: var(--accent-line); }
.player-label { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); margin-right: .15rem; }
.player-controls .player-label:not(:first-child) { margin-left: .5rem; }
.player-time { margin-left: auto; font-family: var(--font-mono); font-size: .8rem; color: var(--cream-dim); font-variant-numeric: tabular-nums; }

.bookmarks { display: flex; flex-direction: column; gap: .45rem; }
.bookmark-add { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.bookmark-add input { flex: 1; min-width: 180px; padding: .4rem .6rem; font-size: .85rem; }
.bookmark-add button { padding: .4rem .7rem; font-size: .85rem; }
.bookmark-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.bookmark-empty { font-size: .78rem; color: var(--cream-faint); }
.bookmark-chip { display: inline-flex; align-items: stretch; border: var(--line); border-radius: 999px; overflow: hidden; background: var(--ink-900); }
.bookmark-jump { background: transparent; border: none; color: var(--cream); font-size: .8rem; padding: .25rem .6rem; font-weight: 500; }
.bookmark-jump:hover { background: var(--accent-quiet); }
.bookmark-time { font-family: var(--font-mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.bookmark-remove { background: transparent; border: none; border-left: var(--line); color: var(--cream-faint); padding: 0 .5rem; font-size: .95rem; line-height: 1; }
.bookmark-remove:hover { color: var(--danger); background: var(--danger-quiet); }

.clip-card { display: flex; flex-direction: column; gap: .6rem; }
.clip-card.is-hidden { opacity: .6; }
.clips-section-head { grid-column: 1/-1; display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.clips-section-head:first-child { margin-top: 0; }
.clips-section-head h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: .45rem; }
.clip-flag { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .18rem .5rem; border-radius: 999px; background: rgba(209,145,60,.16); color: var(--warning); white-space: nowrap; }
.clip-flag.is-done { background: rgba(79,174,124,.16); color: var(--success); }
.clip-flag.is-shared { background: var(--accent-quiet); color: var(--accent); }
.clip-action-link { display: inline-block; background: var(--ink-700); color: var(--cream); text-decoration: none; border-radius: var(--radius-sm); padding: .5rem .7rem; font-weight: 600; font-size: .92rem; border: 1px solid var(--ink-600); }
.clip-action-link:hover { background: var(--ink-600); }
.compare-toggle { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--cream-dim); cursor: pointer; padding: .3rem .1rem; }
.compare-toggle input { accent-color: var(--accent); margin: 0; }

.shared-with { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.person-chip { display: inline-flex; align-items: center; gap: .2rem; border: var(--line); border-radius: 999px; padding: .15rem .3rem .15rem .6rem; font-size: .78rem; color: var(--cream); background: var(--ink-900); }
.person-chip.is-coach { border-color: var(--accent-line); color: var(--accent); }
.person-chip .bookmark-remove { border-left: none; padding: 0 .3rem; }
.share-picker { background: var(--ink-900); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: .7rem .85rem; }
.share-group { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; margin-bottom: .45rem; }
.share-option { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--cream); border: var(--line); border-radius: 999px; padding: .2rem .6rem; cursor: pointer; }
.share-option:has(input:checked) { border-color: var(--accent); background: var(--accent-quiet); }
.share-option input { accent-color: var(--accent); margin: 0; }

.clip-comments { display: flex; flex-direction: column; gap: .4rem; border-top: var(--line); padding-top: .55rem; }
.clip-comment { background: var(--ink-900); border: var(--line); border-radius: var(--radius-sm); padding: .45rem .65rem; }
.clip-comment.is-coach { border-color: var(--accent-line); }
.clip-comment-head { display: flex; align-items: center; gap: .45rem; font-size: .76rem; color: var(--cream-faint); }
.clip-comment-head strong { color: var(--cream); font-size: .84rem; }
.clip-comment-head .bookmark-remove { margin-left: auto; border-left: none; }
.coach-badge { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-quiet); padding: .08rem .4rem; border-radius: 4px; }
.clip-comment-text { font-size: .88rem; color: var(--cream); margin-top: .15rem; white-space: pre-wrap; }
.clip-comment-form { display: flex; gap: .4rem; margin: 0; }
.clip-comment-form input { flex: 1; min-width: 0; padding: .4rem .6rem; font-size: .85rem; }
.clip-comment-form button { padding: .4rem .7rem; font-size: .85rem; }

.compare-panel { background: var(--ink-850); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); padding: .9rem; margin-top: .75rem; }
.compare-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.compare-head button { padding: .4rem .7rem; font-size: .85rem; }
.compare-videos { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.compare-videos video { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); border: var(--line); }
@media (max-width: 720px) { .compare-videos { grid-template-columns: 1fr; } }

/* ---------- the gym feed ---------- */
/* One column, like the app's: a clip is watched one at a time, and a grid of
   small players invites nobody to watch any of them. */
.feed-list, #feed-requests { display: flex; flex-direction: column; gap: 1rem; max-width: 40rem; margin: 0 auto; }
#feed-requests:not(:empty) { margin-bottom: 1.25rem; }
.feed-card, .feed-request { display: flex; flex-direction: column; gap: .6rem; }
.feed-request { border-color: var(--accent-line); }
.feed-card.is-waiting { border-color: var(--warning); }
.feed-head { display: flex; align-items: baseline; gap: .1rem .5rem; flex-wrap: wrap; color: var(--cream); }
.feed-head strong { font-size: 1.02rem; }
.feed-meta { flex-basis: 100%; font-size: .82rem; color: var(--cream-dim); }
.feed-video { display: block; width: 100%; max-height: 70vh; aspect-ratio: 16/9; background: #000; border-radius: var(--radius-sm); border: var(--line); object-fit: contain; }
.feed-waiting { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; background: rgba(209,145,60,.08); border: 1px solid rgba(209,145,60,.45); border-radius: var(--radius-sm); padding: .6rem .75rem; font-size: .85rem; color: var(--cream-dim); }
.feed-waiting strong { color: var(--warning); font-size: .92rem; }
.feed-waiting button { padding: .4rem .7rem; font-size: .85rem; }
.feed-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.feed-actions button { padding: .4rem .7rem; font-size: .85rem; }
.feed-like { background: transparent; color: var(--cream-dim); border-color: var(--ink-600); }
.feed-like:hover { background: var(--ink-800); color: var(--cream); }
.feed-like.is-liked, .feed-like.is-liked:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-quiet); }
.feed-empty { display: flex; flex-direction: column; gap: .35rem; align-items: center; text-align: center; padding: 1.5rem 1.25rem; color: var(--cream-dim); }
.feed-empty strong { color: var(--cream); }
.feed-empty a { color: var(--accent); }
.feed-more { display: flex; justify-content: center; margin-top: 1rem; }

/* ---------- clip editor ---------- */

.clip-stage { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 16/9; max-height: 420px; background: #000; border-radius: var(--radius); border: var(--line); overflow: hidden; }
/* A match on the class scrubber, watched beside its class. A roll's card is opened
   one at a time with its clip controls on the video, so it takes the width (.match-card). */
.clip-stage.is-compact { max-width: 30rem; }
/* The other camera, inset top-right and in step (angleInsetHtml). Swapped, the
   inset fills the stage and the main video becomes the inset. Dragged, the small
   one sits where it was put (placeAngleInset); folded, it is a pill. */
.angle-inset { position: absolute; top: .45rem; right: .45rem; width: 34%; aspect-ratio: 16/9; padding: 0;
  border: 1px solid rgba(255,255,255,.35); border-radius: 6px; overflow: hidden; background: #000; z-index: 4; cursor: pointer;
  touch-action: none; user-select: none; }
.angle-inset.is-dragging { cursor: grabbing; }
.clip-stage.angle-placed .angle-inset, .clip-stage.angle-placed.angles-swapped > video { left: var(--angle-x); top: var(--angle-y); right: auto; }
.angle-inset-hide { position: absolute; top: .2rem; right: .2rem; width: 1.5rem; height: 1.5rem; padding: 0; line-height: 1;
  font-size: 1rem; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.clip-stage:not(.angles-swapped) .angle-inset.is-folded { width: auto; aspect-ratio: auto; background: rgba(0,0,0,.6); }
.clip-stage:not(.angles-swapped) .angle-inset.is-folded video,
.clip-stage:not(.angles-swapped) .angle-inset.is-folded .angle-gap,
.angle-inset.is-folded .angle-inset-hide, .clip-stage.angles-swapped .angle-inset-hide { display: none; }
.clip-stage:not(.angles-swapped) .angle-inset.is-folded .angle-label { position: static; display: block; padding: .15rem .5rem;
  font-size: .75rem; background: none; }
.clip-stage:not(.angles-swapped) .angle-inset.is-folded .angle-label::before { content: "+ "; }
.angle-inset video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.angle-inset .angle-label, .angle-inset .angle-gap { position: absolute; left: .3rem; bottom: .2rem; font-size: .7rem;
  color: #fff; background: rgba(0,0,0,.55); padding: 0 .3rem; border-radius: 3px; }
.angle-inset .angle-gap { left: auto; right: .3rem; }
.clip-stage.angles-swapped .angle-inset { top: 0; right: 0; left: 0; width: 100%; height: 100%; border: 0; border-radius: 0; z-index: 1; }
.clip-stage.angles-swapped > video { position: absolute; top: .45rem; right: .45rem; width: 34%; height: auto;
  aspect-ratio: 16/9; z-index: 4; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; }
.clip-stage.angles-swapped .clip-zoom-layer, .clip-stage.angles-swapped .clip-zoom-badge { display: none; }
.angle-side { position: absolute; top: 2.1rem; left: .45rem; z-index: 5; font-size: .75rem; padding: .15rem .45rem;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; }
/* Both cameras side by side, full screen, in step (openSideBySide). */
.angle-theatre { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; flex-direction: column; }
.angle-theatre-views { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; min-height: 0; }
.angle-theatre-views figure { margin: 0; position: relative; min-height: 0; display: flex; }
.angle-theatre-views video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.angle-theatre-views figcaption { position: absolute; left: .5rem; top: .4rem; color: #fff; font-size: .85rem;
  background: rgba(0,0,0,.55); padding: .1rem .45rem; border-radius: 4px; }
.angle-theatre-views .angle-gap { margin-left: .4rem; color: #f2c26b; }
.angle-theatre-bar { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; background: #111; color: #eee; flex-wrap: wrap; }
.angle-theatre-bar input[type=range] { flex: 1; min-width: 8rem; }
@media (max-aspect-ratio: 1/1) { .angle-theatre-views { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } }
.angle-swap { position: absolute; top: .45rem; left: .45rem; z-index: 5; font-size: .75rem; padding: .15rem .45rem;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; }
.clip-stage video { width: 100%; height: 100%; display: block; background: #000; object-fit: contain; transform-origin: 0 0; will-change: transform; }
.clip-zoom-layer { position: absolute; inset: 0; display: none; cursor: crosshair; touch-action: none; background: rgba(15,19,16,.3); }
.clip-stage.zoom-arming .clip-zoom-layer { display: block; }
.clip-zoom-box { position: absolute; border: 2px solid var(--accent); background: var(--accent-quiet); box-shadow: 0 0 0 9999px rgba(15,19,16,.55); display: none; pointer-events: none; }
.clip-zoom-hint { position: absolute; left: 50%; top: .6rem; transform: translateX(-50%); background: rgba(15,19,16,.88); color: var(--cream); font-size: .76rem; padding: .3rem .7rem; border-radius: 999px; pointer-events: none; border: var(--line); }
.clip-zoom-badge { position: absolute; right: .5rem; top: .5rem; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; display: none; pointer-events: none; }

/* The clip controls, floating on the video (clipDockHtml): one pill folded, a small panel open. Over footage, so the
   colours are the scoreboard's rather than the page's. Dragged anywhere; until then, above the player's own controls. */
.clip-dock { position: absolute; right: .45rem; bottom: 4.2rem; z-index: 6; max-width: calc(100% - .9rem); color: #f2efe6; user-select: none; }
.clip-dock.is-open { width: min(26rem, calc(100% - .9rem)); }
/* a phone's video is too short for all of it: In and Out at the playhead, up top, so the player's own scrubber stays in reach */
@container (max-width: 420px) {
  .clip-dock.is-open { right: .3rem; top: .3rem; bottom: auto; }
  .clip-dock .clip-timeline { display: none; }
}
.clip-dock-pill { display: block; white-space: nowrap; padding: .22rem .65rem; font-size: .8rem; font-weight: 600; border-radius: 999px;
  background: rgba(10, 13, 11, .78); backdrop-filter: blur(3px); color: #f2efe6; border: 1px solid rgba(242, 239, 230, .25);
  cursor: grab; touch-action: none; transition: opacity .15s; }
.clip-dock.is-open .clip-dock-pill { display: none; }
.clip-dock.is-dragging, .clip-dock.is-dragging * { cursor: grabbing; }
@media (hover: hover) { .clip-stage:not(:hover) .clip-dock:not(.is-open) .clip-dock-pill { opacity: .6; } }
/* out of the way of the box being drawn, scoreboard too; swapped, the video on screen is not the one being cut, so there is no box */
.clip-stage.zoom-arming:not(.angles-swapped) .clip-dock, .clip-stage.zoom-arming:not(.angles-swapped) .tb-ov { visibility: hidden; }
.clip-stage.angles-swapped [data-zoom-select] { display: none; }
.clip-editor { display: flex; flex-direction: column; gap: .35rem; padding: .4rem; border-radius: .45rem;
  background: rgba(10, 13, 11, .78); backdrop-filter: blur(3px); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); cursor: grab; }

.clip-timeline {
  position: relative; height: 30px; width: 100%; max-width: 100%; min-width: 0; flex: none;
  background: rgba(0, 0, 0, .4); border: 1px solid rgba(242, 239, 230, .18); border-radius: var(--radius-sm);
  overflow-x: auto; overflow-y: hidden; touch-action: pan-x; user-select: none;
  cursor: crosshair; scrollbar-width: thin; scrollbar-color: var(--ink-600) var(--ink-900);
}
.clip-timeline::-webkit-scrollbar { height: 8px; }
.clip-timeline::-webkit-scrollbar-thumb { background: var(--ink-600); border-radius: 4px; }
.clip-timeline-track { position: relative; height: 100%; min-width: 100%; }
.clip-timeline-ticks { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(225,223,217,.10) 0 1px, transparent 1px); background-repeat: repeat-x; pointer-events: none; }
.clip-selection {
  position: absolute; top: 0; bottom: 0;
  background: var(--accent-quiet);
  border-left: 2px solid var(--accent); border-right: 2px solid var(--accent);
  cursor: grab; touch-action: none;
  box-shadow: 0 0 12px rgba(111, 106, 232, 0.15);
}
.clip-selection.dragging { cursor: grabbing; }

/* Flush edge resizers: sleek boundary touch/grab zones with an illuminated grip bar on hover */
.clip-edge, .clip-handle {
  position: absolute; top: 0; bottom: 0; width: 14px;
  cursor: ew-resize; touch-action: none; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.clip-edge::after, .clip-handle::after {
  content: ''; width: 3px; height: 16px; background: var(--accent);
  border-radius: 2px; opacity: 0.75;
  transition: opacity .12s, height .12s, background .12s, transform .12s;
}
.clip-edge:hover::after, .clip-edge.active::after,
.clip-handle:hover::after, .clip-handle.active::after {
  opacity: 1; height: 22px; background: var(--cream);
  box-shadow: 0 0 8px var(--accent);
  transform: scaleX(1.2);
}
.clip-edge-start, .clip-handle-start { left: -7px; }
.clip-edge-end, .clip-handle-end { right: -7px; }

.clip-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--cream); pointer-events: none; box-shadow: 0 0 8px rgba(225,223,217,.9); z-index: 3; }
.clip-playhead::before {
  content: ''; position: absolute; top: -1px; left: -4px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid var(--cream);
}
.clip-toolbar { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; touch-action: none; }
.clip-toolbar button { padding: .22rem .45rem; font-size: .76rem; line-height: 1.3; border-radius: var(--radius-sm); cursor: pointer;
  background: rgba(242, 239, 230, .1); color: #f2efe6; border: 1px solid rgba(242, 239, 230, .2); }
.clip-toolbar button:hover:not(:disabled) { background: rgba(242, 239, 230, .2); }
.clip-toolbar .clip-publish { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.clip-toolbar .clip-publish:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
.clip-toolbar .clip-publish:disabled { opacity: .5; cursor: default; }
.clip-toolbar .clip-dock-fold { background: none; border-color: transparent; padding: .22rem .3rem; }
.clip-mark-time, .clip-length { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.clip-length { font-size: .76rem; font-weight: 600; color: #F7502C; }
.clip-toolbar-spacer { flex: 1; }

.clip-toolgroup-label { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-faint); }

.clip-actions .clip-publish { padding: .55rem 1.1rem; font-size: .92rem; }

@media (max-width: 720px) {
  .container { padding: 1rem; }
  header { padding: .6rem 1rem; }
}

/* Role, in the header where the identity already is: the last setting left
   on a person's card once member name and check-in moved out, so a small
   toggle beside their name earns its place better than a bar of its own. */
.role-toggle { display: inline-flex; gap: .3rem; }
.role-toggle button {
  padding: .2rem .55rem; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; border-radius: 999px;
  background: var(--ink-700); color: var(--cream-dim); border: 1px solid transparent;
}
.role-toggle button:hover:not([aria-current="true"]) { color: var(--cream); }
.role-toggle button[aria-current="true"] { background: var(--accent); color: #fff; }
.role-toggle button[data-set-role="admin"][aria-current="true"] { background: var(--success); }

.match-thumb-strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.6rem;
}
.match-thumb {
  display: block; text-decoration: none; color: var(--cream);
  border: var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--ink-850); transition: border-color .15s, transform .15s;
}
.match-thumb:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.match-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.match-thumb-blank {
  display: grid; place-items: center; aspect-ratio: 16/9;
  color: var(--cream-faint); font-size: 0.78rem;
}
.match-thumb-meta {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  padding: 0.4rem 0.5rem; font-size: 0.78rem; color: var(--cream-dim);
}
.tag {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem; border-radius: 999px;
  border: 1px solid var(--ink-600); font-style: normal;
}
.tag-pending  { color: var(--warning); border-color: var(--warning); }
.tag-approved { color: var(--success); border-color: var(--success); }
.tag-rejected { color: var(--danger);  border-color: var(--danger); }
/* A member said "not me" to a match a coach put on their page. For the
   coach's attention, not an error: reach for a different name. */
.tag-declined { color: var(--warning); border-color: var(--warning); border-style: dashed; }

/* The gym's guess at who is in an unnamed match, one click to agree. How
   sure it is shows in the border: the other camera's named pair is solid
   and lit, a guess backed by this class is solid, the timetable alone is
   dashed - so a coach knows when to glance at the video first. */
.same-pair { border-style: dashed; }
.same-pair.basis-likely { border-style: solid; }
.same-pair.basis-facelink { border-style: solid; }
.same-pair.basis-twin { border-style: solid; border-color: var(--accent-line); background: var(--accent-quiet); color: var(--cream); }

/* A match played where it was listed, instead of in a tab holding the raw
   file. Full row width, one modest player. */
.inline-play { flex-basis: 100%; width: 100%; margin-top: .4rem; }
.inline-play video { display: block; width: 100%; max-width: 30rem; aspect-ratio: 16/9;
                     background: #000; border-radius: var(--radius-sm); border: var(--line); }

/* Match tags waiting on a coach's decision. */
.match-tag-row {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.6rem 0.75rem; background: var(--ink-800);
  border: var(--line); border-radius: var(--radius-sm);
}
.match-tag-thumb {
  width: 128px; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--ink-850); flex: none;
}

/* Revoking a match a coach or student attached. */
.match-thumb-wrap { position: relative; }
.match-thumb-wrap .match-revoke {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; min-width: 0; padding: 0;
  display: grid; place-items: center; line-height: 1;
  border-radius: 50%; border: 1px solid var(--danger);
  background: rgba(15, 19, 16, 0.82); color: var(--danger);
  font-size: 0.9rem; cursor: pointer;
}
.match-thumb-wrap .match-revoke:hover { background: var(--danger); color: #fff; }

/* Asked once at sign-in, until answered. */
.profile-prompt { border-color: var(--accent-line); background: var(--accent-quiet); margin-bottom: 1rem; }
.belt-pick { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Framing your own photo. The outline is the instruction: without it people
   send waist-up shots where the face is a fraction of the frame. */
.selfie-block { margin-top: 1.1rem; padding-top: .9rem; border-top: var(--line); }
.selfie-block h3 { font-size: .95rem; margin: 0; }
.selfie-stage { position: relative; width: 320px; max-width: 100%; margin-top: .5rem; }
.selfie-stage canvas {
  display: block; width: 100%; border-radius: var(--radius-sm);
  border: var(--line); background: var(--ink-900); cursor: grab; touch-action: none;
}
.selfie-stage canvas:active { cursor: grabbing; }
.selfie-guide {
  position: absolute; inset: 0; pointer-events: none;
  border-radius: var(--radius-sm);
  background: radial-gradient(ellipse 30% 38% at 50% 46%,
              transparent 0 98%, rgba(15,19,16,.55) 100%);
}
.selfie-guide::after {
  content: ""; position: absolute; left: 20%; top: 8%; width: 60%; height: 76%;
  border: 2px dashed var(--accent); border-radius: 50% / 45% 45% 55% 55%;
}
.selfie-controls { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .5rem; }
.selfie-controls label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--cream-dim); }
.selfie-controls .hint { font-size: .8rem; color: var(--cream-faint); }

/* A member's own profile: what the system knows about them, and what it is
   still missing - the gaps are the point, since they are what improves matching. */
.profile-grid { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.profile-photo { flex: 0 0 auto; }
.profile-photo img, .profile-photo-blank {
  width: 116px; height: 116px; border-radius: var(--radius-sm);
  object-fit: cover; border: var(--line); background: var(--ink-850);
}
.profile-photo-blank {
  display: grid; place-items: center; color: var(--cream-faint); font-size: .76rem; text-align: center;
}
.profile-facts { flex: 1 1 260px; display: grid; gap: .35rem; align-content: start; }
.profile-row { display: flex; gap: .8rem; align-items: baseline; font-size: .88rem; }
.profile-row > span:first-child { flex: 0 0 7.5rem; color: var(--cream-dim); }
.profile-row ul { margin: 0; padding-left: 1rem; }

/* The belt itself, drawn: strap, bar, and the marks sewn across the bar. Used
   wherever a rank is shown or picked, so the two are never out of step. */
.belt-strap { position: relative; display: block; height: 1.4rem; width: 100%;
              border-radius: 3px; overflow: hidden;
              background: var(--strap, #efece2);
              box-shadow: inset 0 -.35rem .5rem rgba(0, 0, 0, .28),
                          inset 0 .3rem .4rem rgba(255, 255, 255, .1),
                          0 0 0 1px rgba(255, 255, 255, .14); }
.belt-bar { position: absolute; top: 0; bottom: 0; right: 11%; width: 30%;
            background: var(--bar, #17191c); display: flex; align-items: center;
            justify-content: center; gap: .18rem;
            box-shadow: inset 0 -.35rem .5rem rgba(0, 0, 0, .3); }
.belt-stripe { width: .17rem; height: 68%; border-radius: 1px; background: #f4f1e8; }
.belt-strap-white  { --strap: #eae7dd; }
.belt-strap-blue   { --strap: #2a55c8; }
.belt-strap-purple { --strap: #6a3fbb; }
.belt-strap-brown  { --strap: #7a4a26; }
/* A black belt wears a red bar, and its marks are degrees on that bar. */
.belt-strap-black  { --strap: #17191c; --bar: #a01f1f; }

.belt-swatch { display: grid; gap: .35rem; width: 7.4rem; padding: .4rem; cursor: pointer;
               border-radius: var(--radius-sm); border: 2px solid transparent;
               background: var(--ink-850); color: var(--cream); }
.belt-swatch:hover { border-color: var(--ink-600); }
.belt-swatch[aria-current="true"] { border-color: var(--accent); background: var(--accent-quiet); }
.belt-swatch-name { font-size: .78rem; text-transform: capitalize; letter-spacing: .02em; }

/* The rank as it reads in the profile: the belt, then what it is called. */
.rank-shown { display: inline-flex; align-items: center; gap: .55rem; vertical-align: middle; }
.rank-shown .belt-strap { width: 6.5rem; }
.rank-name { text-transform: capitalize; }
.rank-count { font-weight: 400; font-size: .8rem; color: var(--cream-dim); }

.rank-editor { display: grid; gap: .8rem; margin-top: .9rem; padding-top: .8rem;
               border-top: var(--line); }
.rank-tip-pick { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }
.rank-tip-btn { display: grid; gap: .3rem; justify-items: center; cursor: pointer;
                padding: .4rem .55rem; border-radius: var(--radius-sm);
                font-size: .78rem; font-weight: 600;
                border: 2px solid transparent; background: var(--ink-850); color: var(--cream); }
.rank-tip-btn:hover:not(:disabled) { border-color: var(--ink-600); }
.rank-tip-btn:disabled { opacity: .5; cursor: default; }
.rank-tip-btn[aria-current="true"] { border-color: var(--accent); background: var(--accent-quiet); }
/* An empty bar is a real answer - "no tips yet" - so it has to be visible. */
.rank-tip-bar { display: flex; align-items: center; justify-content: center; gap: .18rem;
                width: 2.6rem; height: 1.1rem; border-radius: 2px; background: #17191c;
                box-shadow: inset 0 -.3rem .4rem rgba(0, 0, 0, .3),
                            0 0 0 1px rgba(255, 255, 255, .14); }
.rank-tip-bar.is-black { background: #a01f1f; }

/* Declaring which classes you train, rather than us guessing from history. */
.usual-block { margin-top: 1.1rem; padding-top: .9rem; border-top: var(--line); }
.usual-block h3 { font-size: .95rem; margin: 0; }
.usual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .8rem; }
.usual-day {
  grid-column: 1 / -1; margin-top: .5rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--cream-faint);
}
.usual-item { display: flex; align-items: center; gap: .45rem; font-size: .86rem; cursor: pointer; }
.usual-item input { margin: 0; }

/* The declared-classes summary: what you picked, once you have picked it. */
.usual-summary { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .2rem; }
.usual-chip {
  background: var(--ink-800); border: 1px solid var(--ink-700); border-radius: 999px;
  padding: .25rem .7rem; font-size: .85rem; color: var(--cream);
}

/* ---- The scrubber: watch a class, find your matches, tag them. ----
   Lived in its own page's <style> until it became a tab; the rules that
   duplicated .tag here were dropped in favour of the ones above. */
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
/* Grid children are min-width:auto by default, so a wide row inside one
   stretches the track and the whole page scrolls sideways. */
.layout > * { min-width: 0; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.class-list { display: grid; gap: .4rem; }
.class-pick {
  text-align: left; width: 100%; padding: .6rem .7rem; border-radius: var(--radius-sm);
  background: var(--ink-800); border: var(--line); color: var(--cream); cursor: pointer;
}
.class-pick[aria-current="true"] { border-color: var(--accent-line); background: var(--accent-quiet); }
.class-pick .when { display: block; color: var(--cream-faint); font-size: .78rem; margin-top: .15rem; }

.scrubber video { width: 100%; border-radius: var(--radius); background: #000; display: block; }

/* The timeline is the point of the page: it shows where in the class the
   matches are, and which of them have somebody attached (green). */
.timeline { position: relative; height: 46px; margin-top: .6rem;
            background: var(--ink-850); border: var(--line); border-radius: var(--radius-sm); }
.tl-match { position: absolute; top: 6px; bottom: 6px; border-radius: 4px;
            background: var(--ink-600); border: 1px solid var(--ink-500); cursor: pointer; }
.tl-match:hover { border-color: var(--accent); }
.tl-match[data-state="pending"]  { background: var(--warning); border-color: var(--warning); }
.tl-match[data-state="approved"] { background: var(--success); border-color: var(--success); }
.tl-match.is-active { outline: 2px solid var(--accent); outline-offset: 1px; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }
.tl-band { position: absolute; left: 0; right: 0; height: 1px;
           background: var(--ink-700); pointer-events: none; }
.timeline-wrap { display: flex; gap: .4rem; align-items: stretch; margin-top: .6rem; }
.tl-legend { flex: 0 0 auto; display: flex; flex-direction: column; }
.tl-legend-item { display: flex; align-items: center; font-size: .66rem;
                  color: var(--cream-faint); letter-spacing: .04em; white-space: nowrap; }
.timeline-wrap .timeline { flex: 1 1 auto; margin-top: 0; }
.tl-scale { display: flex; justify-content: space-between; color: var(--cream-faint);
            font-size: .72rem; margin-top: .25rem; }

.matches { display: grid; gap: .5rem; margin-top: 1rem; }
.match-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
             padding: .6rem .75rem; background: var(--ink-800);
             border: var(--line); border-radius: var(--radius-sm); }
.match-row.is-active { border-color: var(--accent-line); }
.match-when { font-variant-numeric: tabular-nums; min-width: 8.5rem; padding: 0; background: none; border: 0;
              color: inherit; font: inherit; text-align: left; cursor: pointer; }
.match-when:hover { color: var(--accent); text-decoration: underline; }
.match-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.match-row button.ghost { padding: .3rem .65rem; font-size: .85rem; }
.match-row > * { min-width: 0; }
.match-meta { color: var(--cream-faint); font-size: .8rem; }
.spacer { flex: 1 1 auto; }
.tag-suggested { color: var(--accent); border-color: var(--accent-line); }
.match-who { font-size: .85rem; display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.match-name { display: inline-flex; align-items: center; gap: .15rem; padding: .1rem .15rem .1rem .5rem;
              border: var(--line); border-radius: 999px; }
.match-name-off { background: none; border: 0; color: var(--cream-faint); cursor: pointer; font-size: 1rem;
                  line-height: 1; padding: .2rem .4rem; min-width: 1.6rem; border-radius: 999px; }
.match-name-off:hover, .match-name-off:focus-visible { color: var(--cream); background: var(--ink-850); }
.attach-pick { font-size: .8rem; padding: .3rem .4rem; border-radius: var(--radius-sm);
               background: var(--ink-850); color: var(--cream); border: var(--line); }
.camera-pick { display: flex; gap: .4rem; margin-bottom: .5rem; }
.cam-btn { padding: .3rem .7rem; font-size: .8rem; border-radius: var(--radius-sm);
           background: var(--ink-800); border: var(--line); color: var(--cream-dim); cursor: pointer; }
.cam-btn[aria-current="true"] { border-color: var(--accent-line);
           background: var(--accent-quiet); color: var(--cream); }
.empty { color: var(--cream-dim); padding: 1.5rem 0; }

@media (max-width: 560px) {
  /* Classes become a horizontal strip rather than a stack that pushes the
     video off the first screen. */
  .class-list { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; }
  .class-pick { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .layout > aside > h2 { margin-bottom: .35rem; }
  /* Time first on its own line, then the buttons across the full width -
     tap targets stay big enough to hit. */
  .match-row { gap: .4rem .6rem; }
  .match-row .match-when { min-width: 100%; font-weight: 600; text-align: left; }
  .match-actions { margin-left: 0; width: 100%; }
  .match-row button, .match-row a.ghost, .match-row .attach-pick { flex: 1 1 auto; text-align: center; }
  .match-row .match-name-off { flex: 0 0 auto; }
  .timeline { height: auto; }
  .note { font-size: .78rem; }
}
.note { color: var(--cream-faint); font-size: .82rem; margin-top: .5rem; }

/* A match played, and cut from, under the row where you found it. */
.match-watch { display: flex; flex-direction: column; gap: .6rem;
               margin: -.15rem 0 .35rem; padding: .6rem .75rem; background: var(--ink-850);
               border: var(--line); border-radius: var(--radius-sm); }

/* A match of your own: header, then the same workbench a recording gets. */
.match-card { display: flex; flex-direction: column; gap: .6rem; }
/* As big as the card and the window allow, still 16:9 so the overlay and the dock sit on the picture. */
.match-card .clip-stage { max-width: none; width: min(100%, calc(80vh * 16 / 9)); max-height: 80vh; margin-inline: auto; }
.match-card-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.match-card-head .match-meta { color: var(--cream-dim); font-size: .85rem; }
.match-card-list { display: grid; gap: 1rem; }

/* The positions Claude read off this roll. Hidden until there is a reading: a
   coach pays per press, so an empty strip would claim one had been made.

   Twenty-one classes as twenty-one colours could not be read, on a phone or
   anywhere - two of them were 4.9 ΔE apart to normal vision. So the roll is a
   three-colour band saying where it is, with shaped marks on top for what
   happened, and the words are always available: on the run when it fits, in the
   legend, and on touch. See spartracker/position_timeline.py. */
/* min-width: 0 on both, or the band never scrolls: a flex item defaults to
   min-width: auto, which refuses to shrink below its content, so the strip grew
   the card instead of scrolling inside it and took the legend off-screen. */
.roll { display: flex; flex-direction: column; gap: .4rem; min-width: 0; max-width: 100%; }
.roll[hidden] { display: none; }

/* The dot beside a position name, in the label editor and on home. */
.moment-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .3rem; }

.pos-standing { background: var(--cream-faint); }
.pos-scramble { background: var(--warning); }
.pos-guard { background: var(--accent); }
.pos-side_control { background: var(--success); }
.pos-mount { background: var(--danger); }
.pos-back { background: #4aa3c9; }
.pos-none { background: var(--ink-600); }
.pos-drill { background: #c98a4a; }

/* Drilling and sparring: the member's matches in two sections, and a drill's
   name and reps under its heading. */
.kind-heading { display: flex; align-items: baseline; gap: .6rem; margin: .5rem 0 -.25rem;
  font-family: var(--font-display, inherit); letter-spacing: .04em; }
.kind-heading h3, .kind-heading h4 { margin: 0; font-size: 1rem; text-transform: uppercase; }
/* A member's matches by class, newest first; each class's demos, sparring and
   drilling under it (2026-09-29). */
.class-heading { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: 1.1rem 0 -.1rem;
  padding-top: .6rem; border-top: 1px solid var(--line, rgba(242,239,230,.12)); }
.class-heading:first-child { margin-top: .2rem; padding-top: 0; border-top: 0; }
.class-heading h3 { margin: 0; font-size: 1.15rem; }
.class-heading span { color: var(--cream-dim); font-size: .9rem; }
.kind-heading h4 { font-size: .85rem; opacity: .85; }
/* A member's matches, one expander a class (2026-09-29). A class with coach
   demos says so on its heading, and its demos lead inside it. */
details.class-group { border-top: 1px solid var(--line, rgba(242,239,230,.12)); padding: .2rem 0 .4rem; }
details.class-group:first-of-type { border-top: 0; }
details.class-group > summary.class-heading { cursor: pointer; list-style: none; margin: .5rem 0 .2rem;
  padding: 0; border-top: 0; align-items: center; }
details.class-group > summary.class-heading::-webkit-details-marker { display: none; }
details.class-group > summary.class-heading::before { content: "▸"; color: var(--cream-dim); width: 1rem; }
details.class-group[open] > summary.class-heading::before { content: "▾"; }
.class-heading .class-counts { color: var(--cream-dim); font-size: .85rem; }
.demo-pill { font-style: normal; font-size: .85rem; font-weight: 600; color: var(--cream);
  background: var(--accent-quiet); border: 1px solid var(--accent-line); border-radius: 999px; padding: .1rem .55rem; }
.class-body { padding-left: 1rem; }
.kind-heading.is-demo h4 { color: var(--accent, var(--cream)); }
.match-card.demo-match { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent-line); }
/* The coach's Demos tab: each class's demos as a grid of players. */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .8rem; margin: .6rem 0 .4rem; }
.demo-card { padding: .6rem; }
.demo-card video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; display: block; }
.demo-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .45rem; }
.demo-meta span { color: var(--cream-dim); font-size: .85rem; margin-right: auto; }
.demo-meta button.on, .demo-scope button.on { border-color: var(--accent-line); background: var(--accent-quiet); color: var(--cream); }
.kind-heading span { color: var(--cream-dim); font-size: .85rem; }
.drill-line { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.drill-line input { flex: 1 1 12rem; max-width: 22rem; }
.drill-line .drill-reps { color: var(--cream-dim); font-size: .85rem; }
.drill-line .status { margin: 0; }
/* A technique: its name and numbers on one line, the bar under them. */
.position-bar.technique-bar { grid-template-columns: minmax(0, 1fr) auto; row-gap: .3rem; }
.position-bar.technique-bar .position-track { grid-column: 1 / -1; grid-row: 2; }

/* Given the width, the tools sit beside the match rather than under it. Stacked,
   one match is most of a screen, and a list of them is a scroll. */
@media (min-width: 62rem) {
  .match-watch {
    display: grid; align-items: start;
    grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
    column-gap: 1rem; row-gap: .6rem;
  }
  .match-watch > .match-card-head { grid-column: 1 / -1; }
  .match-watch > .player-wrap { grid-column: 1; grid-row: 2; }
  /* Who was on top, under the video it seeks (templates/_top_bottom.html). */
  .match-watch > .tb { grid-column: 1; grid-row: 3; }
  .match-watch > .clip-status-row { grid-column: 1; grid-row: 4; }
  .match-watch > .clip-editor { grid-column: 2; grid-row: 2 / span 3; }
}

/* ---------- home ---------- */

/* Attendance over time: one bar per week, this week last. Heights are set
   inline against the busiest week, so a quiet quarter still fills the box. */
.week-bars { display: flex; align-items: flex-end; gap: .3rem; height: 5.5rem; padding: .4rem 0 0; }
.week-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; }
.week-bar-fill { display: block; min-height: 2px; background: var(--accent-line); border-radius: 3px 3px 0 0; }
.week-bar.is-now .week-bar-fill { background: var(--accent); }
.week-bar-label { font-size: .62rem; color: var(--cream-faint); text-align: center; margin-top: .25rem; white-space: nowrap; overflow: hidden; text-overflow: clip; height: .9rem; }
.week-bar-value { position: absolute; top: -1.1rem; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--cream-dim); font-variant-numeric: tabular-nums; }
.home-note { margin-top: .6rem; color: var(--cream-dim); font-size: .85rem; }
.home-note strong { color: var(--cream); }

/* Time in each position, longest first. The colour is the same one the
   match strips use for that position, so the two read as one system. */
.position-bars { display: grid; gap: .45rem; }
.position-bar { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 6.5rem; align-items: center; gap: .6rem; font-size: .88rem; }
.position-bar .position-name { color: var(--cream); display: flex; align-items: center; gap: .4rem; }
.position-bar .position-track { height: .7rem; background: var(--ink-900); border-radius: 4px; overflow: hidden; }
.position-bar .position-track span { display: block; height: 100%; }
.position-bar .position-time { color: var(--cream-dim); text-align: right; font-variant-numeric: tabular-nums; }
.home-empty { color: var(--cream-dim); font-size: .88rem; line-height: 1.45; max-width: 36rem; }

/* Submissions: what you finished with beside what caught you. */
.finish-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.finish-column h3 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-dim); margin: 0 0 .5rem; }
.finish-column ol { margin: 0; padding-left: 1.3rem; color: var(--cream); font-size: .9rem; display: grid; gap: .3rem; }
.finish-column li b { color: var(--cream-dim); font-weight: 500; margin-left: .35rem; }

/* A coach's regulars: a row each, the name a link to their People card. */
.regulars { display: grid; gap: .4rem; }
.regular { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .8rem;
           padding: .5rem .7rem; background: var(--ink-800); border: var(--line); border-radius: var(--radius-sm); font-size: .9rem; }
.regular .regular-name { color: var(--cream); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regular button.regular-name { all: unset; cursor: pointer; color: var(--cream); font-weight: 600; }
.regular button.regular-name:hover { color: var(--accent); }
.regular .regular-share { color: var(--cream-dim); font-variant-numeric: tabular-nums; }
.regular .regular-seen { color: var(--cream-faint); font-size: .8rem; }
.regular .regular-seen.cold { color: var(--warning); }
.class-stat { display: flex; flex-direction: column; gap: .25rem; }
.class-stat .class-stat-name { color: var(--cream); font-size: 1.02rem; font-weight: 600; }
.class-stat .class-stat-when { color: var(--cream-dim); font-size: .85rem; }
.class-stat .class-stat-nums { display: flex; gap: .9rem; flex-wrap: wrap; color: var(--cream-dim); font-size: .82rem; margin-top: .2rem; }
.class-stat .class-stat-nums b { color: var(--cream); font-weight: 600; }
/* The People card a home-screen link landed on. */
.card.is-focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-quiet); }

/* What waits on a coach: three counts, each a button to the tab that clears it. */
.waiting-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .7rem; }
.waiting-tile {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .2rem;
  background: var(--ink-800); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: .7rem .9rem;
}
.waiting-tile:hover { background: var(--accent-quiet); }
.waiting-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.waiting-tile.is-clear { border-color: var(--ink-700); }
.waiting-tile .waiting-count { font-size: 1.5rem; font-weight: 700; color: var(--cream); font-variant-numeric: tabular-nums; }
.waiting-tile.is-clear .waiting-count { color: var(--cream-faint); }
.waiting-tile .waiting-label { color: var(--cream-dim); font-size: .85rem; }
.waiting-tile .waiting-go { color: var(--accent); font-size: .78rem; }

/* A class's own twelve weeks, drawn small under its numbers. */
.sparkline { display: block; width: 100%; height: 2rem; margin-top: .4rem; }
.sparkline .spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sparkline .spark-area { fill: var(--accent-quiet); }
.sparkline .spark-dot { fill: var(--accent); }

/* ---------- your roll, labelled ---------- */

/* Under the match player: what you said the roll was, stretch by stretch,
   and the editor for saying it. The bar uses the same position colours as
   the moments strips, so the two read as one system. */
.labels { border-top: var(--line); padding-top: .7rem; display: flex; flex-direction: column; gap: .6rem; }
/* The day's ask on the Label tab, beside the one button that deals the next roll. */
.label-today { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .7rem .9rem; border-radius: 10px; background: var(--ink-800, #151a16); margin: .25rem 0 .5rem; }
.label-today-count { display: grid; gap: .15rem; }
.label-today button { font-size: 1rem; padding: .55rem 1rem; }
.label-today[hidden] { display: none; }
/* Labelled seconds a week by source (label_tally): a summary line, the table behind it. */
.label-tally { margin: 0 0 .75rem; font-size: .85rem; color: var(--cream-dim); }
.label-tally[hidden] { display: none; }
.label-tally summary { cursor: pointer; }
.label-tally table { border-collapse: collapse; margin-top: .4rem; width: 100%; max-width: 40rem; }
.label-tally th, .label-tally td { text-align: right; padding: .15rem .5rem; border-bottom: 1px solid rgba(242,239,230,.08); white-space: nowrap; }
.label-tally th:first-child, .label-tally td:first-child { text-align: left; }
.label-tally th { font-weight: 500; color: var(--cream-dim); }
.label-tally td.learns { color: var(--cream, #f2efe6); }
.label-tally .zero { opacity: .45; }

/* A stretch whose side nobody has said yet: hatched, so it asks to be settled. */
.labels-seg.unsided { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0,0,0,.3) 5px 10px); }

.labels-finish-mark.theirs { border-top-color: var(--danger); }

.labels-event-mark.theirs { background: var(--danger); }

.labels-change.done { opacity: .25; }

.labels-walk-tools button.ghost { background: transparent; color: var(--cream-dim); }

.labels-answers button .moment-dot { margin-right: .35rem; }

.labels-answers button.pressed { background: var(--accent-strong); border-color: var(--accent); }
.labels-answers button.break { color: var(--cream-dim); }
.labels-answers button.unsided { color: var(--cream-dim); border-style: dashed; }

.labels-row .t { font-family: var(--font-mono); color: var(--accent); font-variant-numeric: tabular-nums; cursor: pointer; }
.labels-row .what { color: var(--cream); display: flex; align-items: center; gap: .4rem; min-width: 0; }
.labels-row .what span.text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.labels-row .what.finish::before { content: '🏁'; }
.labels-row .what.event::before { content: '⚡'; }
.labels-row .tools { display: flex; gap: .25rem; }
.labels-row .tools button {
  all: unset; cursor: pointer; padding: .05rem .4rem; color: var(--cream-dim);
  border: 1px solid var(--ink-600); border-radius: 4px; font-size: .78rem; line-height: 1.4;
}
.labels-row .tools button:hover { color: var(--cream); border-color: var(--ink-500); }


/* The position mix month by month: one column per month, filled to 100%
   with the six families, so a busy month and a quiet one read the same. */
.position-months { display: flex; align-items: flex-end; gap: .5rem; height: 6.5rem; margin-top: .9rem; }
.position-month { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.position-stack { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 4px; overflow: hidden; background: var(--ink-900); }
.position-stack span { display: block; min-height: 0; }
.position-month.is-quiet .position-stack { background: repeating-linear-gradient(45deg, var(--ink-900), var(--ink-900) 4px, var(--ink-850) 4px, var(--ink-850) 8px); }
.position-month-label { font-size: .68rem; color: var(--cream-faint); text-align: center; margin-top: .25rem; }
.position-month.is-now .position-month-label { color: var(--cream); }
.position-changes { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .85rem; color: var(--cream-dim); }
.position-changes b { color: var(--cream); }
.position-changes .up { color: var(--success); }
.position-changes .down { color: var(--warning); }

/* The positions calendar on Progress: a month of days, Monday first, each day
   with rolls a button holding its mix as a bar, and its week at the row's end. */
.pos-cal-person { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--cream-dim); }
.pos-cal-person select { max-width: 12rem; }
.pos-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .5rem 0; }
.pos-cal-nav button { min-width: 2.4rem; font-size: 1.2rem; line-height: 1; }
.pos-cal-nav button:disabled { opacity: .3; cursor: default; }
.pos-cal-summary { margin-bottom: .6rem; }
.pos-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.25fr); gap: 3px; }
.pos-cal-head { font-size: .68rem; color: var(--cream-faint); text-align: center; padding-bottom: .15rem; }
.pos-cal-day, .pos-cal-week { min-width: 0; min-height: 3.1rem; padding: .2rem; border-radius: 5px; background: var(--ink-900);
  border: 1px solid transparent; display: flex; flex-direction: column; gap: .2rem; text-align: left; font: inherit; color: var(--cream-dim); }
.pos-cal-week { background: transparent; }
.pos-cal-day.is-outside { opacity: .35; }
.pos-cal-day.is-today { border-color: var(--ink-500); }
button.pos-cal-day, button.pos-cal-week { cursor: pointer; background: var(--ink-850); }
button.pos-cal-day:hover, button.pos-cal-week:hover { border-color: var(--ink-500); }
.pos-cal-day.is-picked, .pos-cal-week.is-picked { border-color: var(--accent); }
.pos-cal-num { font-size: .72rem; }
.pos-cal-day.has-rolls .pos-cal-num { color: var(--cream); font-weight: 600; }
.pos-cal-count { font-size: .64rem; color: var(--cream-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cal-bar { display: flex; height: .55rem; border-radius: 3px; overflow: hidden; background: var(--ink-700); }
.pos-cal-bar span { display: block; min-width: 0; }
.pos-cal-bar.is-wide { height: .8rem; margin: .2rem 0; }
.is-unread .pos-cal-bar { background: repeating-linear-gradient(45deg, var(--ink-900), var(--ink-900) 3px, var(--ink-700) 3px, var(--ink-700) 6px); }
.pos-cal-legend { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin-top: .5rem; font-size: .75rem; color: var(--cream-dim); }
.pos-cal-words { margin: .1rem 0; font-size: .85rem; color: var(--cream); }
.pos-cal-detail { margin-top: .9rem; }
.pos-cal-detail h3 { margin: 0 0 .3rem; font-size: 1rem; }
.pos-cal-rolls { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
.pos-cal-roll { padding: .6rem; border-radius: 7px; background: var(--ink-900); }
.pos-cal-roll-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.pos-cal-actions { display: flex; gap: .4rem; margin-top: .35rem; }
.pos-cal-week .moment-dot { width: .45rem; height: .45rem; margin-right: .2rem; }
@media (max-width: 40rem) { .pos-cal-top-name { display: none; } }
.pos-cal-stage { margin-top: .5rem; border-radius: 6px; overflow: hidden; }
.pos-cal-player video { width: 100%; background: #000; display: block; }

/* What a class means to this person, under its name on the timetable. */
.timetable-tags { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .3rem; }
.timetable-next .timetable-tags { margin-top: 0; }
.tt-tag { font-size: .68rem; letter-spacing: .04em; padding: .12rem .45rem; border-radius: 999px; border: var(--line); color: var(--cream-faint); }
.tt-tag.was-there { color: var(--success); border-color: rgba(79,174,124,.45); }
.tt-tag.usual { color: var(--cream-dim); }
.tt-plan {
  all: unset; cursor: pointer; font-size: .72rem; padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid var(--ink-500); color: var(--cream-dim); line-height: 1.4;
}
.tt-plan:hover { color: var(--cream); border-color: var(--accent-line); }
.tt-plan.on { color: var(--cream); background: var(--accent-quiet); border-color: var(--accent-line); }
.timetable-class.is-planned { box-shadow: inset 3px 0 0 var(--accent); }
.timetable-class.is-past { opacity: .75; }
/* Lately: each weekly class's last four occurrences, ticked where this person was. */
.timetable-lately { margin-top: 1rem; display: grid; gap: .4rem; }
.timetable-lately h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-dim); margin: 0 0 .2rem; }
.lately-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .8rem; padding: .4rem .6rem; background: var(--ink-800); border-radius: var(--radius-sm); font-size: .85rem; }
.lately-name { color: var(--cream); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lately-marks { display: inline-flex; gap: .3rem; }
.lately-mark { width: 1.35rem; height: 1.35rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink-900); color: var(--cream-faint); font-size: .8rem; }
.lately-mark.there { background: rgba(79,174,124,.18); color: var(--success); }
.lately-count { color: var(--cream-dim); font-size: .8rem; white-space: nowrap; }

/* Schedule: who coaches each class, set by any coach (2026-09-29). */
.class-coaches { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: .45rem;
  font-size: .85rem; color: var(--cream-dim); }
.class-coaches em { font-style: normal; opacity: .7; }
.class-coaches select { font-size: .85rem; padding: .2rem .4rem; }
.coach-chip { display: inline-flex; align-items: center; gap: .2rem; color: var(--cream); background: var(--accent-quiet);
  border: 1px solid var(--accent-line); border-radius: 999px; padding: .05rem .15rem .05rem .55rem; }
.coach-chip-x { background: none; border: 0; color: var(--cream-dim); cursor: pointer; font-size: 1rem; line-height: 1;
  padding: 0 .3rem; min-height: 0; }
.demo-actions { display: flex; justify-content: flex-end; margin-top: .35rem; }
.demo-actions button { font-size: .8rem; padding: .25rem .6rem; }

/* The deck's opener over a member's own timeline (2026-10-12). */
.tb-deal { display: flex; justify-content: flex-end; margin-top: .5rem; }
.tb-deal button { font-size: .82rem; }
