/* Kickscribe Director Panel — mobile-first, single column. Signature: squad-number episode numerals. */
:root {
  --ink: #050505;
  --paper: #f5f5f0;
  --gold: #edbb36;
  --surface: #0f0f0e;
  --surface-2: #171715;
  --line: #24241f;
  --muted: #9a9a92;
  --pitch: #7fd49a;
  --danger: #ff8a7a;
  --radius: 8px;
  --gutter: 16px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--paper);
  font: 500 16px/1.5 var(--font);
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Shell ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 5, 5, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark__bracket { color: var(--gold); letter-spacing: 0; }
.wordmark--large { font-size: 24px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who__name {
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px var(--gutter) calc(40px + env(safe-area-inset-bottom));
}
.page--center { display: flex; align-items: center; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn--ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--muted); filter: none; }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 12px; }
.btn--block { width: 100%; }

/* ---------- Login ---------- */
.login { width: 100%; max-width: 380px; padding: 24px 0; }
.login__title {
  margin: 28px 0 4px;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.login__lead { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.login__form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px; /* 16px stops iOS zooming into the field */
}
.field__input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(237, 187, 54, 0.18); }
.form-error { margin: 0; min-height: 1.5em; color: var(--danger); font-weight: 700; font-size: 14px; }
.form-error:empty { display: none; }

/* ---------- Episodes list ---------- */
.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.list-head__title {
  margin: 0;
  font-weight: 900;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.segmented__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.segmented__btn[aria-pressed='true'] { background: var(--paper); color: var(--ink); }
.segmented__count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
}

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 16px 16px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.card:hover { background: var(--surface-2); }
.card--mine { border-left-color: var(--gold); }

/* The signature: episode numbers set like squad numbers on a shirt — faded for the rest, solid gold when it's your turn. */
.card__number {
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 240, 0.3);
  padding-top: 2px;
}
.card--mine .card__number { color: var(--gold); }

.card__body { display: grid; gap: 8px; min-width: 0; }
.card__title {
  font-weight: 900;
  font-size: 19px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}
.card__comments { color: var(--paper); font-weight: 700; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--wait { background: var(--gold); color: var(--ink); }
.badge--work { background: rgba(245, 245, 240, 0.1); color: var(--paper); }
.badge--done { background: rgba(127, 212, 154, 0.14); color: var(--pitch); }
.badge--idle { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

.chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chip--gold { color: var(--gold); }
.chip--gold::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(237, 187, 54, 0.2);
}

/* ---------- Episode page ---------- */
.backlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.backlink:hover { color: var(--paper); }

.ep-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  align-items: start;
  margin-bottom: 18px;
}
.ep-head__number {
  font-weight: 900;
  font-size: 40px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: rgba(245, 245, 240, 0.3);
}
.ep-head__number--live { color: var(--gold); }
.ep-head__body { display: grid; gap: 8px; min-width: 0; justify-items: start; }
.ep-head__title {
  margin: 0;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.ep-head__meta { font-size: 13px; color: var(--muted); }
.ep-head__tools {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  min-width: 0;
}
.ep-head__tools > * { min-width: 0; max-width: 100%; }
.ep-head__edit { flex: 1 1 100%; }
.oldbanner {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(237, 187, 54, 0.1);
  box-shadow: inset 0 0 0 1px rgba(237, 187, 54, 0.35);
  font-size: 14px;
}
.oldbanner p { margin: 0; flex: 1 1 200px; }

.vpick { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.vpick__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.vpick__select {
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 0 32px 0 12px;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23edbb36'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  appearance: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--paper);
}
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.edit-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.edit-form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.edit-form__actions, .cform__actions { display: flex; justify-content: flex-end; gap: 8px; }
.edit-form .field { min-width: 0; }
.edit-form .field__input { min-width: 0; }
/* Small-looking buttons on this page still get full 44px touch targets. */
.ep-head .btn--small, .tabpanel .btn--small, .dbar .btn--small { min-height: 44px; }

/* Tabs: underline in gold, counts as small gold pucks. */
.tabs {
  display: flex;
  gap: 4px;
  margin: 0 calc(-1 * var(--gutter)) 18px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.tabs__btn:hover { color: var(--paper); }
.tabs__btn[aria-selected='true'] { color: var(--paper); border-bottom-color: var(--gold); }
.tabs__count {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  letter-spacing: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.toolbar__changed { color: var(--gold); font-weight: 700; }
.toolbar__badge { margin-left: 8px; vertical-align: middle; }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.switch__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 0.15s ease;
}
.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.switch[aria-pressed='true'] .switch__track { background: rgba(237, 187, 54, 0.35); }
.switch[aria-pressed='true'] .switch__track::after { transform: translateX(16px); background: var(--gold); }

/* Scenes read like a shooting script: a slug line (mono id + speaker), then the spoken Bulgarian, large. */
.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.scene {
  display: grid;
  gap: 12px;
  padding: 16px 16px 14px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
.scene--changed { border-left-color: var(--gold); }
.scene__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.scene__id {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.speaker {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.speaker--narrator { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.speaker--commentator { background: var(--paper); color: var(--ink); }
.scene__changed {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scene__text {
  margin: 0;
  font-weight: 500;
  font-size: 19px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.scene__text .tag {
  font-family: var(--mono);
  font-size: 0.68em;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.85;
}
.scene__visual { font-size: 14px; color: var(--muted); }
.scene__visual summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  min-height: 44px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.scene__visual summary::-webkit-details-marker { display: none; }
.scene__visual summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid var(--gold);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}
.scene__visual[open] summary::before { transform: rotate(90deg); }
.scene__visual p { margin: 4px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.comment-btn { justify-self: start; }
.comment-btn span { color: var(--gold); font-size: 16px; }

/* Comments */
.cmts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cmt {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 14px;
}
.cmt__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.cmt__author { font-weight: 900; color: var(--paper); }
.cmt__ver { font-family: var(--mono); }
.cstatus {
  margin-left: auto;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cstatus--open { color: var(--gold); }
.cstatus--carried { color: var(--paper); }
.cstatus--resolved { color: var(--pitch); }
.cstatus--superseded { color: var(--muted); }
.cmt__body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.cmt--superseded .cmt__body, .cmt--resolved .cmt__body { color: var(--muted); }
.cmt--superseded .cmt__body { text-decoration: line-through; text-decoration-color: rgba(154, 154, 146, 0.5); }
.cmt__fix { margin: 0; color: var(--pitch); overflow-wrap: anywhere; }
.cmt__fixby { color: var(--muted); }
.cmt__resolve { justify-self: start; }
.cform { display: grid; gap: 8px; }
.field__input--area { min-height: 88px; padding: 10px 14px; line-height: 1.45; resize: vertical; }

.block { display: grid; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.block__title {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.block__lead { margin: -4px 0 0; font-size: 14px; color: var(--muted); }

/* Research (rendered Markdown) */
.prose { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-weight: 900; line-height: 1.25; margin: 1.6em 0 0.5em; }
.prose h1 { font-size: 22px; text-transform: uppercase; letter-spacing: 0.02em; }
.prose h2 { font-size: 18px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 16px; color: var(--gold); }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.3em; }
.prose a { color: var(--gold); text-underline-offset: 2px; }
.prose strong { font-weight: 700; color: #fff; }
.prose blockquote { padding: 2px 0 2px 14px; border-left: 3px solid var(--gold); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.88em; padding: 1px 4px; border-radius: 4px; background: var(--surface-2); }
.prose pre { overflow-x: auto; padding: 12px; border-radius: var(--radius); background: var(--surface); }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
/* Wide tables scroll inside themselves, never the page. */
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.prose th, .prose td {
  min-width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word; /* whole words; the table scrolls instead of splitting names */
}
.prose th { background: var(--surface-2); font-weight: 700; }

/* Activity */
.feed { list-style: none; margin: 0; padding: 0; }
.feed__item {
  display: grid;
  gap: 2px;
  padding: 12px 0 12px 18px;
  border-left: 1px solid var(--line);
  position: relative;
}
.feed__item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.feed__item--decision::before, .feed__item--script_pushed::before, .feed__item--video_pushed::before { background: var(--gold); }
.feed__item--notify_failed .feed__line { color: var(--danger); }
.feed__line { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.feed__who { font-weight: 900; }
.feed__time { font-size: 12px; color: var(--muted); }

/* Decision bar: fixed to the bottom, above the home indicator. */
.page--bar { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.dbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: rgba(15, 15, 14, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(237, 187, 54, 0.45);
  padding-bottom: env(safe-area-inset-bottom);
}
.dbar__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px var(--gutter) 12px;
  display: grid;
  gap: 10px;
}
.dbar__info { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.dbar__label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.dbar__ver { font-size: 13px; color: var(--muted); }
.dbar__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.dbar__actions .btn { padding: 0 8px; font-size: 13px; letter-spacing: 0.04em; }
.dbar__sheet { display: grid; gap: 8px; }

/* ---------- States ---------- */
.loading, .empty { margin: 32px 0; color: var(--muted); text-align: center; }
.notice { display: grid; justify-items: center; gap: 14px; margin: 32px 0; text-align: center; }
.notice p { margin: 0; color: var(--muted); }

@media (min-width: 600px) {
  .page { padding-top: 32px; }
  .list-head__title { font-size: 32px; }
  .card { padding: 20px 20px 20px 17px; gap: 20px; }
  .card__number { font-size: 40px; }
  .card__title { font-size: 21px; }
  .ep-head { gap: 8px 22px; margin-bottom: 24px; }
  .ep-head__number { font-size: 64px; }
  .ep-head__title { font-size: 30px; }
  .scene { padding: 20px 22px 18px 19px; }
  .scene__text { font-size: 21px; }
  .prose { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Task 12: header nav, video tab, users ---------- */
.topbar .btn--small { min-height: 44px; white-space: nowrap; }
/* Phones: with the admin's Users link the bar is full; the name gives way (the page says "You" where it matters). */
@media (max-width: 420px) {
  .who:has(.navlink) .who__name { display: none; }
}
.navlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-top: 2px solid transparent; /* balances the underline so the label sits centred */
  border-bottom: 2px solid transparent;
}
.navlink:hover { color: var(--paper); }
.navlink[aria-current='page'] { color: var(--paper); border-bottom-color: var(--gold); }

.tiktok-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gold);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-underline-offset: 3px;
}
.field__hint { margin: 0; font-size: 13px; color: var(--muted); }

/* Player: a full-bleed black letterbox on phones; the 9:16 frame never exceeds 70% of the viewport height. */
.player {
  display: flex;
  justify-content: center;
  margin: 0 calc(-1 * var(--gutter));
  background: #000;
}
.player__video {
  display: block;
  width: min(100%, calc(70vh * 9 / 16));
  width: min(100%, calc(70svh * 9 / 16));
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  max-height: 70svh;
  background: #000;
  object-fit: contain;
  scroll-margin-top: 72px; /* a chip's seek scrolls the player clear of the sticky topbar */
}
.vactions { margin-top: 12px; }
.vactions__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(5, 5, 5, 0.25);
}
.cform--video { margin-top: 12px; }
.cform__label { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Signature: timecodes set like a stadium scoreboard clock — gold mono digits on an ink plate. */
.tc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(237, 187, 54, 0.4);
  border-radius: 4px;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
}
button.tc { min-height: 44px; min-width: 64px; cursor: pointer; }
button.tc::before { content: '▶'; font-size: 8px; margin-right: 6px; opacity: 0.8; }
button.tc:hover { background: rgba(237, 187, 54, 0.12); border-color: var(--gold); }
.tc--static { color: var(--muted); border-color: var(--line); }
.cmt__head:has(> .tc) { align-items: center; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 16px;
  margin: 20px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts__row { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.kit { display: grid; gap: 10px; margin-top: 20px; }
.kit__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kit__head .block__title { margin-right: auto; }
.kit__status { font-size: 13px; font-weight: 700; color: var(--pitch); }
.kit__status:empty { display: none; }
.kit__text {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.kit__text p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.kit__caption { font-size: 17px; font-weight: 700; }
.kit__tags { margin-top: 10px !important; color: var(--gold); font-size: 14px; }

/* Users */
.flash { margin: -6px 0 14px; color: var(--pitch); font-weight: 700; font-size: 14px; }
.flash:empty { display: none; }
.list-head .btn--small, .users .btn--small, .user-form .btn--small { min-height: 44px; }
.list-head .btn span { color: inherit; font-size: 16px; }
.user-form { margin: 0 0 18px; }
.field__select { width: 100%; min-height: 48px; font-size: 16px; }
.ucards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ucard {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
.ucard__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ucard__name { font-weight: 900; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.ucard__meta { margin: -4px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ucard__login { font-family: var(--mono); color: var(--paper); }
.role {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.role--admin { background: var(--gold); color: var(--ink); }
.role--reviewer { color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.ucard__sub { margin: 4px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ucard__tokens { display: grid; gap: 6px; }
.ucard__none { margin: 0; font-size: 14px; color: var(--muted); }
.tokens { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.token {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  min-width: 0;
}
.token__body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.token__label { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.token__meta { font-size: 12px; color: var(--muted); }
.token--revoked .token__label { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(154, 154, 146, 0.5); }
.token__state { margin: 0 6px 0 0; }
.ucard__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ucard .edit-form { margin-top: 0; background: var(--surface-2); }

/* One-time token dialog */
.sheet {
  width: min(100% - 32px, 480px);
  max-width: none;
  padding: 20px;
  border: 1px solid rgba(237, 187, 54, 0.45);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--paper);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.75); }
.sheet__title { margin: 0 0 6px; font-size: 18px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; }
.sheet__lead { margin: 0 0 14px; color: var(--gold); font-weight: 700; font-size: 14px; }
.secret {
  display: block;
  padding: 12px;
  border-radius: 6px;
  background: var(--ink);
  border: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 14px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.sheet__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sheet__actions .kit__status { margin-right: auto; }
/* Fields scrolled into view on a page with the fixed decision bar stop above it, not under it. */
.page--bar :is(textarea, input, select) { scroll-margin-bottom: calc(170px + env(safe-area-inset-bottom)); scroll-margin-top: 90px; }
