@font-face {
  font-family: "Inter";
  src: url("../static/fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #080b10;
  --background-soft: #0d1117;
  --sidebar: #0c1015;
  --surface: #141920;
  --surface-raised: #1b222b;
  --field: #0c1117;
  --line: #2b343e;
  --line-strong: #465361;
  --text: #f4f7fa;
  --muted: #96a3b2;
  --soft: #c8d0da;
  --green: #26e08c;
  --green-dark: #123c29;
  --cyan: #65c9e8;
  --amber: #efbd61;
  --danger: #f18a91;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.014) 1px, transparent 1px),
    var(--background);
  background-size: 72px 72px;
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
}

body.recording-mode-active { overflow: hidden; }

button,
input,
select { font: inherit; letter-spacing: 0; }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 9px 12px;
  border-radius: 5px;
  background: var(--green);
  color: #04110a;
  font-weight: 900;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
}

.brand span { min-width: 0; }
.brand strong { display: block; font-size: 15px; font-weight: 900; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 700; }

.loading-view {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
}

.loading-view img { border-radius: 8px; }
.loading-view strong { margin-top: 5px; font-size: 18px; }
.loading-view span { color: var(--muted); font-size: 12px; }

.auth-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(460px, 1.12fr);
}

.auth-context {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 5vw, 68px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(38,224,140,0.08), transparent 38%),
    rgba(9,13,18,0.94);
}

.auth-message { margin: auto 0 48px; }

.eyebrow,
.header-kicker,
.dialog-kicker,
.navigation-label,
.form-label {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-message h1 {
  max-width: 9ch;
  margin: 17px 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-message p {
  max-width: 560px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 1.7vw, 21px);
  font-weight: 600;
  line-height: 1.55;
}

.auth-facts {
  display: grid;
  gap: 0;
  margin: 0 0 34px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.auth-facts li {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
  font-weight: 750;
}

.auth-facts span { color: var(--green); font-size: 10px; font-weight: 900; }
.back-link { width: fit-content; color: var(--muted); font-size: 12px; font-weight: 750; }
.back-link:hover { color: var(--text); }

.auth-form-area {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card,
.recovery-card,
.reverification-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20,25,32,0.96);
  padding: 28px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.36);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.auth-tabs button:last-child { border-right: 0; }
.auth-tabs button.active { background: var(--green-dark); color: #9cf3bf; }

.form-heading { margin-bottom: 22px; }
.form-heading h1,
.form-heading h2 { margin: 0; font-size: 26px; line-height: 1.15; }
.form-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { color: var(--soft); font-size: 12px; font-weight: 800; }
.field small,
.field-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

input,
select {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--field);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(101,201,232,0.11);
}

input::placeholder { color: #637181; }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.consent-row input { width: 17px; min-width: 17px; min-height: 17px; margin: 1px 0 0; accent-color: var(--green); }
.consent-row a { color: var(--soft); font-weight: 750; }

.primary-button,
.secondary-button,
.text-button,
.icon-button,
.add-workspace-button {
  border-radius: 5px;
  font-weight: 850;
}

.primary-button {
  min-height: 43px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #04110a;
  padding: 0 15px;
}

.primary-button:hover:not(:disabled) { background: #42e99e; }

.secondary-button {
  min-height: 41px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text);
  padding: 0 14px;
}

.secondary-button:hover:not(:disabled) { border-color: var(--line-strong); }
.full-width { width: 100%; }

.text-button {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 11px;
}

.text-button:hover { color: var(--text); }
.auth-help-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 14px;
  margin: -6px 0 15px;
}

.auth-help-actions .text-button { text-align: left; }
.back-button { margin-bottom: 18px; }

.separator {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.separator::before,
.separator::after { content: ""; height: 1px; background: var(--line); }

.form-message {
  margin: 0 0 13px;
  border-left: 3px solid currentColor;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.45;
}

.form-message.error { background: rgba(241,138,145,0.08); color: #f3a7ad; }
.form-message.warning { background: rgba(239,189,97,0.08); color: #f4cf8e; }
.form-message.success { background: rgba(38,224,140,0.08); color: #94edb8; }

.recovery-view,
.reverification-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.recovery-card .brand,
.reverification-card .brand { margin-bottom: 34px; }

.reverification-card .form-label { display: block; margin-bottom: 10px; }
.reverification-account { border-left: 3px solid var(--cyan); background: rgba(101,201,232,0.055); padding: 12px 14px; }
.reverification-account span,
.reverification-account strong { display: block; }
.reverification-account span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.reverification-account strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 12px; }
.reverification-note { margin: 14px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.reverification-card .secondary-button { margin-top: 8px; }
.reverification-back { display: block; width: fit-content; margin: 20px auto 0; color: var(--muted); font-size: 11px; font-weight: 750; }
.reverification-back:hover { color: var(--text); }

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--line);
  background: rgba(12,16,21,0.98);
  padding: 20px 14px;
}

.sidebar-brand { padding: 0 8px; }
.workspace-navigation { min-height: 0; overflow-y: auto; }
.navigation-label { display: block; margin: 0 10px 10px; color: var(--muted); }
#workspaceNav { display: grid; gap: 5px; }

.workspace-button,
.add-workspace-button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  text-align: left;
}

.workspace-button:hover,
.add-workspace-button:hover { background: rgba(255,255,255,0.035); color: var(--text); }
.workspace-button.active { background: var(--surface-raised); color: var(--text); box-shadow: inset 3px 0 var(--green); }

.workspace-icon,
.add-workspace-button > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.workspace-copy { min-width: 0; }
.workspace-copy strong,
.workspace-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy strong { color: inherit; font-size: 12px; }
.workspace-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }
.add-workspace-button { margin-top: 6px; font-size: 12px; }

.operator-navigation {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.help-navigation {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.help-button .workspace-icon {
  border-color: rgba(38,224,140,0.3);
  background: rgba(38,224,140,0.07);
  color: var(--green);
}

.help-button.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 3px 0 var(--green);
}

.operator-button .workspace-icon {
  border-color: rgba(101,201,232,0.3);
  background: rgba(101,201,232,0.08);
  color: var(--cyan);
}

.operator-button.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 3px 0 var(--cyan);
}

.sidebar-account {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 9px 0;
}

.sidebar-account span,
.sidebar-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account span { font-size: 12px; font-weight: 800; }
.sidebar-account small { color: var(--muted); font-size: 10px; }
.sidebar-account button { width: fit-content; margin-top: 8px; border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 11px; }
.sidebar-account button:hover { color: var(--text); }

.portal-main { min-width: 0; }

.portal-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,11,16,0.88);
  padding: 0 30px;
  backdrop-filter: blur(14px);
}

.portal-header > div:first-child { min-width: 0; }
.portal-header strong { display: block; max-width: min(50vw, 660px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.header-kicker { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.connection-indicator { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.connection-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(38,224,140,0.12); }

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
}

.icon-button:hover { border-color: var(--line-strong); }

.dashboard {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 34px 32px 44px;
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-heading h1 { margin: 9px 0 7px; font-size: clamp(27px, 4vw, 42px); line-height: 1.1; }
.dashboard-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.role-badge { flex: 0 0 auto; min-height: 30px; display: inline-flex; align-items: center; border: 1px solid rgba(38,224,140,0.3); border-radius: 999px; background: rgba(38,224,140,0.08); color: #9cf3bf; padding: 0 10px; font-size: 10px; font-weight: 900; text-transform: uppercase; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.status-item {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-right: 1px solid var(--line);
  padding: 19px 21px;
}

.status-item:last-child { border-right: 0; }
.status-item > span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.status-item strong { font-size: 22px; }
.status-item small { color: var(--muted); font-size: 11px; }

.content-band { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 28px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading > div { display: flex; align-items: center; gap: 11px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading p { max-width: 470px; margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.section-index { color: var(--green); font-size: 10px; font-weight: 900; }

.help-start,
.help-contact {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.help-start h2,
.help-contact h2 {
  margin: 6px 0 5px;
  font-size: 19px;
}

.help-start p,
.help-contact p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.help-start .primary-button,
.help-contact .secondary-button {
  flex: 0 0 auto;
  text-decoration: none;
}

.help-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
}

.help-section-heading h2 {
  margin: 6px 0 0;
  font-size: 20px;
}

.help-section-heading p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.help-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--line);
}

.help-topic {
  min-height: 250px;
  background: var(--surface);
  padding: 24px;
}

.help-topic-number {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.help-topic h2 {
  margin: 10px 0 16px;
  font-size: 18px;
}

.help-topic p {
  margin: 0 0 12px;
  color: #c8d0da;
  font-size: 11px;
  line-height: 1.65;
}

.help-topic p:last-child { margin-bottom: 0; }

.help-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 19px;
  color: #c8d0da;
  font-size: 11px;
  line-height: 1.55;
}

.help-steps li::marker {
  color: var(--green);
  font-weight: 900;
}

.help-role-list { margin: 0; }
.help-role-list > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.help-role-list > div:last-child { border-bottom: 0; }
.help-role-list dt { color: var(--text); font-size: 11px; font-weight: 850; }
.help-role-list dd { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.help-contact { margin-top: 22px; }

.program-guide {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.program-guide-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.program-guide-heading h2 {
  margin: 7px 0 6px;
  font-size: 25px;
}

.program-guide-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.program-guide-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.program-guide-index {
  display: flex;
  gap: 6px;
  margin: 20px 0 14px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: thin;
}

.program-guide-index a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #c8d0da;
  padding: 0 11px;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.program-guide-index a:hover,
.program-guide-index a:focus-visible {
  border-color: rgba(38,224,140,0.5);
  color: var(--green);
}

.visual-guide-rail {
  position: fixed;
  z-index: 30;
  top: 96px;
  right: 14px;
  width: 112px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(13,18,25,0.96);
  padding: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.34);
  backdrop-filter: blur(14px);
}

.visual-guide-rail > header {
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.visual-guide-rail > header span,
.visual-guide-rail > header small { display: block; }
.visual-guide-rail > header small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }

.visual-guide-thumbnails {
  max-height: calc(100dvh - 205px);
  display: grid;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.visual-guide-thumb {
  width: 100%;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-raised);
  color: var(--soft);
  padding: 5px;
  text-align: left;
}

.visual-guide-thumb:hover,
.visual-guide-thumb:focus-visible {
  border-color: rgba(38,224,140,0.58);
  color: var(--green);
  outline: 0;
}

.visual-guide-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 3px;
  object-fit: cover;
}

.visual-guide-thumb span {
  overflow: hidden;
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-guide-hover-preview {
  position: fixed;
  z-index: 31;
  top: 96px;
  right: 140px;
  width: min(900px, calc(100vw - 470px));
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #0b0f15;
  padding: 10px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.visual-guide-hover-preview.visible {
  opacity: 1;
  transform: translateX(0);
}

.visual-guide-hover-preview > strong,
.visual-guide-hover-preview > span { display: block; }
.visual-guide-hover-preview > strong { margin: 10px 3px 3px; font-size: 13px; }
.visual-guide-hover-preview > span { margin: 0 3px 2px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.visual-shot {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #05070a;
  overflow: hidden;
}

.visual-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.visual-hotspot {
  position: absolute;
  border: 2px solid var(--green);
  border-radius: 5px;
  background: rgba(38,224,140,0.09);
  box-shadow: 0 0 0 4px rgba(38,224,140,0.16), 0 0 24px rgba(38,224,140,0.42);
  pointer-events: none;
}

.visual-callout {
  position: absolute;
  border-radius: 4px;
  background: var(--green);
  color: #04110b;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 900;
  pointer-events: none;
}

.visual-shot-cuts .visual-hotspot { top: 1.4%; left: 13.4%; width: 13.5%; height: 6.3%; }
.visual-shot-cuts .visual-callout { top: 8.8%; left: 14%; }
.visual-shot-menu .visual-hotspot { top: 42.4%; left: 42.1%; width: 15.7%; height: 5.8%; }
.visual-shot-menu .visual-callout { top: 34.8%; left: 43%; }
.visual-shot-player .visual-hotspot { top: 45.2%; left: 15.7%; width: 13.8%; height: 9%; }
.visual-shot-player .visual-callout { top: 37.2%; left: 16%; }
.visual-shot-control .visual-hotspot { top: 23.6%; left: 49.8%; width: 25.2%; height: 4%; }
.visual-shot-control .visual-callout { top: 15.5%; left: 56%; }

.program-guide-list {
  border-top: 1px solid var(--line);
}

.program-guide-chapter {
  scroll-margin-top: 18px;
  border-bottom: 1px solid var(--line);
}

.program-guide-chapter > summary {
  min-height: 82px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  cursor: pointer;
  list-style: none;
  padding: 14px 4px;
}

.program-guide-chapter > summary::-webkit-details-marker { display: none; }

.program-guide-chapter > summary:hover .chapter-title strong,
.program-guide-chapter > summary:focus-visible .chapter-title strong {
  color: var(--green);
}

.chapter-number {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.chapter-title { min-width: 0; }
.chapter-title strong,
.chapter-title small { display: block; }
.chapter-title strong { font-size: 16px; }
.chapter-title small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.chapter-toggle {
  position: relative;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.chapter-toggle::before,
.chapter-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 1px;
  background: var(--text);
  transform: translate(-50%, -50%);
}

.chapter-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.program-guide-chapter[open] .chapter-toggle::after { display: none; }

.chapter-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  padding: 2px 45px 26px 51px;
}

.chapter-content h3 {
  margin: 0 0 13px;
  color: var(--text);
  font-size: 12px;
}

.chapter-content p,
.chapter-list {
  margin: 0 0 11px;
  color: #c8d0da;
  font-size: 11px;
  line-height: 1.65;
}

.chapter-content p:last-child { margin-bottom: 0; }

.chapter-note {
  border-left: 2px solid var(--green);
  color: var(--muted) !important;
  padding-left: 11px;
}

.chapter-list {
  display: grid;
  gap: 9px;
  padding-left: 17px;
}

.chapter-list li::marker { color: var(--green); }

.chapter-control-list { margin: 0 0 12px; }
.chapter-control-list > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.chapter-control-list > div:first-child { padding-top: 0; }
.chapter-control-list > div:last-child { border-bottom: 0; }
.chapter-control-list dt { color: var(--text); font-size: 10px; font-weight: 850; }
.chapter-control-list dd { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.visual-guide-dialog { width: min(1180px, calc(100% - 28px)); }
.visual-guide-dialog-content { padding: 18px; }
.visual-guide-dialog-content > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.visual-guide-dialog-content h2 { margin: 5px 0 0; font-size: 23px; }
.visual-guide-dialog-content p { margin: 13px 3px 2px; color: var(--soft); font-size: 12px; line-height: 1.6; }

.personal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface);
}

.account-details,
.code-form { padding: 22px; }
.account-details { border-right: 1px solid var(--line); }
.account-details dl { margin: 0; }
.account-details dl > div { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.account-details dl > div:last-child { border-bottom: 0; }
.account-details dt { color: var(--muted); font-size: 11px; font-weight: 750; }
.account-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 800; }

.code-form { display: grid; align-content: center; }
.code-form p { margin: 5px 0 16px; color: var(--muted); font-size: 11px; }
.inline-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

.code-disclosure { min-width: 0; }
.code-disclosure > summary {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
}
.code-disclosure > summary::-webkit-details-marker { display: none; }
.personal-code-disclosure:not([open]) > summary { height: 100%; }
.code-disclosure[open]:not(.always-open) > summary { border-bottom: 1px solid var(--line); }
.code-disclosure.always-open > summary { display: none; }
.code-disclosure-copy { min-width: 0; }
.code-disclosure-copy strong,
.code-disclosure-copy small { display: block; }
.code-disclosure-copy strong { font-size: 12px; }
.code-disclosure-copy small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.code-disclosure-action { flex: 0 0 auto; color: var(--green); font-size: 9px; font-weight: 850; }
.personal-code-disclosure .code-form { height: 100%; }

.member-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.member-group { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.member-group > header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 14px 17px; }
.member-group h3 { margin: 0; font-size: 14px; }
.member-group header span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.member-group header > strong { min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--green); font-size: 12px; }

.member-list { min-height: 86px; }
.member-row { min-height: 64px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 9px 14px; }
.member-row:last-child { border-bottom: 0; }
.member-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--green-dark); color: #9cf3bf; font-size: 11px; font-weight: 900; }
.member-copy { min-width: 0; }
.member-copy strong,
.member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-copy strong { font-size: 11px; }
.member-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.member-role { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.member-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.remove-member-button {
  min-width: 76px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  border: 1px solid rgba(241,138,145,0.3);
  border-radius: 5px;
  background: rgba(241,138,145,0.07);
  color: #f2a3a9;
  padding: 0 7px;
  font-size: 8px;
  font-weight: 850;
}
.remove-member-button:hover,
.remove-member-button:focus-visible { border-color: rgba(241,138,145,0.62); background: rgba(241,138,145,0.15); color: #ffd0d3; }
.remove-member-button svg { width: 13px; height: 13px; flex: 0 0 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-members { min-height: 86px; display: grid; place-content: center; color: var(--muted); padding: 16px; text-align: center; font-size: 11px; }

.team-management { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.team-management-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.team-management-heading > div { display: flex; align-items: baseline; gap: 10px; }
.team-management-heading h2 { margin: 0; font-size: 19px; }
.team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.empty-team-list { grid-column: 1 / -1; min-height: 94px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--muted); font-size: 11px; }
.club-team-card { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.club-team-card > header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 12px 14px; }
.club-team-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.club-team-identity > div { min-width: 0; }
.club-team-identity h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.club-team-identity div > span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.team-icon { flex: 0 0 32px; color: #9cf3bf; }
.team-edit-button { min-height: 30px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-raised); color: var(--text); padding: 0 10px; font-size: 9px; font-weight: 850; }
.team-edit-button:hover { border-color: rgba(38,224,140,0.35); color: var(--green); }
.team-card-coaches { min-height: 64px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--line); }
.team-coach-identity { min-width: 0; display: flex; align-items: center; gap: 9px; background: var(--surface); padding: 10px 12px; }
.team-coach-identity > span:last-child { min-width: 0; }
.team-coach-identity strong,
.team-coach-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-coach-identity strong { font-size: 10px; }
.team-coach-identity small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.team-coach-avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 9px; }
.team-card-empty { grid-column: 1 / -1; display: grid; place-items: center; background: var(--surface); color: var(--muted); padding: 18px; font-size: 10px; }
.unassigned-team-row { min-height: 62px; display: grid; grid-template-columns: minmax(190px, 0.7fr) minmax(260px, 1.3fr) auto; align-items: center; gap: 16px; margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 10px 14px; }
.unassigned-team-row > div:first-child strong,
.unassigned-team-row > div:first-child span { display: block; }
.unassigned-team-row > div:first-child strong { font-size: 11px; }
.unassigned-team-row > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.unassigned-coach-list { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.unassigned-coach-list .team-coach-identity { border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); padding: 6px 8px; }
.unassigned-coach-list .team-coach-avatar { width: 24px; height: 24px; flex-basis: 24px; }
.all-assigned-label { color: var(--green); font-size: 9px; font-weight: 850; }
.team-count { min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--green); font-size: 11px; }

.club-code-row {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(340px, 1.2fr);
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 17px;
}

.club-code-disclosure { margin-top: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.club-code-disclosure .club-code-row { margin-top: 0; border: 0; border-radius: 0; background: transparent; }

.club-code-row strong,
.club-code-row span { display: block; }
.club-code-row strong { font-size: 12px; }
.club-code-row span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.club-code-row .form-message { grid-column: 2; margin: -10px 0 0; }

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--field);
}

.admin-view-switch button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 15px;
  font-size: 11px;
  font-weight: 850;
}

.admin-view-switch button:last-child { border-right: 0; }
.admin-view-switch button.active { background: var(--surface-raised); color: var(--text); }

.admin-search {
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-search input { min-width: 0; }

.admin-list-heading {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: var(--field);
  padding: 0 16px;
}

.admin-list-heading strong { font-size: 12px; }
.admin-list-heading span { color: var(--muted); font-size: 10px; font-weight: 750; }

.admin-list {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
  background: var(--surface);
  overflow: hidden;
}

.admin-record {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(180px, 0.85fr) minmax(400px, 1.4fr) 20px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 13px 16px;
  text-align: left;
}

.admin-record:last-child { border-bottom: 0; }
.admin-record:hover { background: rgba(255,255,255,0.025); }
.admin-record:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.admin-record-avatar { width: 36px; height: 36px; }
.admin-record-identity { min-width: 0; }
.admin-record-identity strong,
.admin-record-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-record-identity strong { font-size: 12px; }
.admin-record-identity small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.admin-record-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-record-meta span,
.admin-record-meta strong { display: block; }
.admin-record-meta span { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-record-meta strong { overflow: hidden; color: var(--soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.admin-record-arrow {
  width: 18px;
  height: 18px;
  color: var(--cyan);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-empty {
  min-height: 180px;
  display: grid;
  place-content: center;
  color: var(--muted);
  padding: 24px;
  text-align: center;
  font-size: 11px;
}

.admin-detail-dialog { width: min(760px, calc(100% - 28px)); }

.admin-gate-dialog { width: min(520px, calc(100% - 28px)); }
.admin-gate-intro { margin: 0 0 20px; color: var(--soft); font-size: 13px; line-height: 1.5; }
.admin-gate-note { margin: 4px 0 18px; border-left: 3px solid var(--cyan); background: rgba(101,201,232,0.055); color: var(--muted); padding: 10px 12px; font-size: 10px; line-height: 1.5; }

.admin-detail-loading {
  min-height: 220px;
  display: grid;
  place-content: center;
  color: var(--muted);
  font-size: 12px;
}

.admin-detail-identity {
  border-left: 3px solid var(--cyan);
  background: rgba(101,201,232,0.055);
  padding: 12px 14px;
}

.admin-detail-identity span,
.admin-detail-identity strong,
.admin-detail-identity small { display: block; }
.admin-detail-identity span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-detail-identity strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 12px; }
.admin-detail-identity small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.admin-name-field { grid-column: 1 / -1; }

.admin-license-grant {
  margin-top: 22px;
  border: 1px solid rgba(38,224,140,0.3);
  border-radius: 7px;
  background: rgba(38,224,140,0.035);
  padding: 15px;
}

.admin-license-grant > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-license-grant h3 { margin: 0; font-size: 12px; }
.admin-license-grant header p {
  max-width: 560px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.admin-license-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr);
  gap: 12px;
  margin-top: 15px;
}

.admin-license-preview {
  margin-top: 12px;
  border-left: 3px solid var(--green);
  background: rgba(0,0,0,0.16);
  color: var(--soft);
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
}

.admin-license-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 13px 0;
  color: var(--soft);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.admin-license-confirmation input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--green);
}

.admin-license-grant .form-message { margin: 9px 0; }
.admin-license-grant .primary-button { margin-top: 3px; }

.admin-reverification {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 15px;
}

.admin-reverification > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-reverification h3 { margin: 0; font-size: 12px; }
.admin-reverification header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.verification-status { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; background: var(--field); color: var(--muted); padding: 5px 7px; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.verification-status[data-status="completed"] { border-color: rgba(38,224,140,0.3); background: rgba(38,224,140,0.08); color: #94edb8; }
.verification-status[data-status="pending"] { border-color: rgba(239,189,97,0.3); background: rgba(239,189,97,0.08); color: #f4cf8e; }
.admin-reverification dl { display: grid; gap: 8px; margin: 15px 0; }
.admin-reverification dl > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.admin-reverification dt { color: var(--muted); font-size: 10px; }
.admin-reverification dd { margin: 0; overflow-wrap: anywhere; color: var(--soft); font-size: 10px; font-weight: 750; }
.admin-reverification .secondary-button { width: 100%; }

.admin-associations {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.admin-associations > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--field);
  padding: 0 14px;
}

.admin-associations h3 { margin: 0; font-size: 12px; }
.admin-associations header span { color: var(--muted); font-size: 10px; font-weight: 800; }
.admin-association-row { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 9px 14px; }
.admin-association-row:last-child { border-bottom: 0; }
.admin-association-row strong,
.admin-association-row small { display: block; }
.admin-association-row strong { font-size: 10px; }
.admin-association-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-association-row > span { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }

.recording-navigation-button { margin-top: 6px; }
.recording-navigation-button .workspace-icon {
  border-color: rgba(239,189,97,0.34);
  background: rgba(239,189,97,0.08);
  color: var(--amber);
}
.recording-navigation-button.active {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 3px 0 var(--amber);
}

.recording-admin-heading { margin-bottom: 18px; }
.recording-test-badge {
  border-color: rgba(239,189,97,0.36);
  background: rgba(239,189,97,0.08);
  color: #f5d493;
}

.recording-review-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border-block: 1px solid rgba(239,189,97,0.28);
  background: rgba(239,189,97,0.055);
  padding: 15px 18px;
}
.recording-review-notice strong { color: #f5d493; font-size: 11px; }
.recording-review-notice span { color: var(--muted); font-size: 10px; line-height: 1.55; }

.recording-setup,
.recording-history { margin-top: 28px; }
.recording-setup > header,
.recording-history > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}
.recording-setup > header > div,
.recording-history > header > div { display: flex; align-items: center; gap: 11px; }
.recording-setup h2,
.recording-history h2 { margin: 0; font-size: 19px; }
.recording-setup > header > span,
.recording-history > header > span { color: var(--muted); font-size: 10px; }

.recording-setup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border-block: 1px solid var(--line);
  padding: 21px 0;
}
.recording-setup-form .field { margin: 0; }
.recording-setup-form label span,
.recording-person-grid label span { color: var(--muted); font-size: 9px; font-weight: 650; }
.recording-setup-message { grid-column: 1 / -1; margin: 0; }
.recording-start-button { grid-column: 2; justify-self: end; min-width: 220px; }

.recording-history-list {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.recording-history-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.7fr) auto auto minmax(210px, auto);
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 12px 15px;
}
.recording-history-row:last-child { border-bottom: 0; }
.recording-history-row strong,
.recording-history-row small { display: block; }
.recording-history-row strong { font-size: 11px; }
.recording-history-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.recording-history-meta { color: var(--muted); font-size: 10px; }
.recording-history-meta > span,
.recording-history-meta > small { display: block; }
.recording-history-meta > small { margin-top: 4px; font-size: 8px; }
.recording-history-expiry-alert[data-level="notice"] { color: #f5d493; }
.recording-history-expiry-alert[data-level="warning"] { color: #ffb977; }
.recording-history-expiry-alert[data-level="urgent"] { color: #ffc1c5; font-weight: 800; }
.recording-history-count { min-width: 76px; color: var(--soft); font-size: 10px; text-align: right; }
.recording-history-status {
  min-width: 78px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}
.recording-history-status[data-status="active"] {
  border-color: rgba(38,224,140,0.3);
  background: rgba(38,224,140,0.07);
  color: #9cf3bf;
}
.recording-history-status[data-status="planned"] {
  border-color: rgba(239,189,97,0.34);
  background: rgba(239,189,97,0.07);
  color: #f5d493;
}
.recording-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.recording-history-action,
.recording-history-delete {
  min-height: 32px;
  border: 1px solid rgba(158,175,194,0.28);
  border-radius: 4px;
  background: rgba(158,175,194,0.06);
  color: var(--soft);
  padding: 0 10px;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.recording-history-action:hover { background: rgba(158,175,194,0.13); }
.recording-history-start {
  border-color: rgba(38,224,140,0.28);
  background: rgba(38,224,140,0.07);
  color: #9cf3bf;
}
.recording-history-start:hover { background: rgba(38,224,140,0.14); }
.recording-history-delete {
  border: 1px solid rgba(241,138,145,0.3);
  background: rgba(241,138,145,0.07);
  color: #ffc1c5;
}
.recording-history-delete:hover { background: rgba(241,138,145,0.16); }
.recording-link-expiry { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.recording-link-expiry strong { color: var(--soft); }
.recording-empty { min-height: 88px; display: grid; place-items: center; color: var(--muted); padding: 18px; font-size: 11px; text-align: center; }

.recording-field-view {
  position: fixed;
  inset: 0;
  z-index: 200;
  min-width: 320px;
  min-height: 100dvh;
  background: #070a0e;
  overflow: auto;
}
.recording-field-header {
  position: sticky;
  z-index: 5;
  top: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,11,16,0.96);
  padding: 10px 22px;
  backdrop-filter: blur(16px);
}
.recording-field-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}
.recording-field-brand img { border: 1px solid var(--line); border-radius: 6px; }
.recording-field-brand strong,
.recording-field-brand small { display: block; }
.recording-field-brand strong { font-size: 13px; }
.recording-field-brand small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.recording-field-session { min-width: 190px; text-align: center; }
.recording-field-session > span,
.recording-field-session > small { display: block; }
.recording-field-session > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 850; }
.recording-field-session > small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.recording-field-session small strong { color: var(--green); }
.recording-finish-button { justify-self: end; }

.recording-field-shell {
  min-height: calc(100dvh - 68px);
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(540px, 1.28fr);
}
.recording-field-context {
  position: sticky;
  top: 68px;
  height: calc(100dvh - 68px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(101,201,232,0.08), transparent 42%),
    #0b0f14;
  padding: clamp(30px, 5vw, 72px);
}
.recording-field-status {
  width: fit-content;
  border: 1px solid rgba(239,189,97,0.34);
  border-radius: 4px;
  background: rgba(239,189,97,0.08);
  color: #f4cf8e;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.recording-field-context h1 { max-width: 11ch; margin: 20px 0 14px; font-size: clamp(34px, 4vw, 50px); line-height: 1.02; }
.recording-field-context > p { max-width: 460px; margin: 0; color: #c7d0da; font-size: 14px; line-height: 1.65; }
.recording-field-context dl { margin: 34px 0 0; border-top: 1px solid var(--line); }
.recording-field-context dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 14px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.recording-field-context dt { color: var(--muted); font-size: 10px; }
.recording-field-context dd { margin: 0; overflow-wrap: anywhere; color: var(--soft); font-size: 10px; font-weight: 750; }
.recording-field-context > small { max-width: 430px; margin-top: 22px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.recording-consent-panel { display: grid; place-items: start center; padding: clamp(24px, 4vw, 54px); }
.recording-consent-panel > form,
.recording-success { width: min(760px, 100%); }
.recording-form-heading { margin-bottom: 25px; }
.recording-form-heading > span { color: var(--green); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.recording-form-heading h2 { margin: 7px 0 0; font-size: clamp(25px, 4vw, 36px); }
.recording-person-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.recording-person-grid .field { margin: 0; }

.recording-age-fieldset,
.recording-scope-fieldset { margin: 22px 0 0; border: 0; padding: 0; }
.recording-age-fieldset legend,
.recording-scope-fieldset legend { margin-bottom: 11px; color: var(--soft); font-size: 11px; font-weight: 850; }
.recording-age-fieldset { display: flex; flex-wrap: wrap; gap: 8px; }
.recording-age-fieldset legend { flex: 0 0 100%; }
.recording-age-fieldset label {
  min-width: 120px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--field);
  padding: 0 13px;
  color: var(--soft);
  font-size: 11px;
  cursor: pointer;
}
.recording-age-fieldset input,
.recording-scope-option input { width: 18px; height: 18px; accent-color: var(--green); }
.recording-guardian-field { margin-top: 15px; }

.recording-notice-copy {
  margin-top: 24px;
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
  padding: 17px 3px;
}
.recording-notice-copy header { display: flex; align-items: center; gap: 11px; }
.recording-notice-copy header strong { font-size: 12px; }
.recording-notice-copy p { margin: 12px 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.recording-notice-copy a { color: var(--cyan); font-size: 10px; font-weight: 750; }

.recording-scope-fieldset { display: grid; gap: 8px; }
.recording-scope-option {
  min-height: 72px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 13px 15px;
  cursor: pointer;
}
.recording-scope-option:has(input:checked) { border-color: rgba(38,224,140,0.44); background: rgba(38,224,140,0.055); }
.recording-scope-option:has(input:disabled) { cursor: not-allowed; opacity: 0.52; }
.recording-scope-option strong,
.recording-scope-option small { display: block; }
.recording-scope-option strong { font-size: 11px; }
.recording-scope-option small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }

.recording-signature-section { margin-top: 25px; }
.recording-signature-section > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.recording-signature-section h3 { margin: 5px 0 0; font-size: 15px; }
.recording-signature-pad {
  position: relative;
  height: 220px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #f5f7f8;
  overflow: hidden;
}
.recording-signature-pad::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: 48px;
  left: 8%;
  border-bottom: 1px solid #a9b0b6;
  pointer-events: none;
}
.recording-signature-pad canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; touch-action: none; }
.recording-signature-pad > span { position: absolute; z-index: 1; right: 8%; bottom: 26px; color: #8a9299; font-size: 9px; }
.recording-consent-submit { width: 100%; min-height: 50px; margin-top: 18px; }

.recording-success { align-self: center; justify-self: center; padding: 24px 0; text-align: center; }
.recording-success-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(38,224,140,0.45);
  border-radius: 50%;
  background: rgba(38,224,140,0.1);
  color: var(--green);
  font-size: 30px;
  font-weight: 900;
}
.recording-success > span:not(.recording-success-mark) { color: var(--green); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.recording-success h2 { margin: 10px 0 8px; font-size: 34px; }
.recording-success p { margin: 0 0 22px; color: var(--muted); font-size: 11px; }
.recording-success p strong { color: var(--soft); }
.recording-success .primary-button { min-width: 230px; }

.account-footer-band { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 20px; }
.account-footer-band a { color: var(--muted); font-size: 10px; font-weight: 750; }
.account-footer-band a:hover { color: var(--text); }

dialog {
  width: min(470px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0;
  box-shadow: 0 28px 90px rgba(0,0,0,0.58);
  overflow-y: auto;
}

dialog::backdrop { background: rgba(3,5,8,0.76); backdrop-filter: blur(6px); }
.dialog-content { padding: 23px; }
.dialog-content > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.dialog-content h2 { margin: 5px 0 0; font-size: 23px; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-raised); color: var(--text); font-size: 22px; line-height: 1; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.danger-button { min-height: 42px; border: 1px solid rgba(241,138,145,0.42); border-radius: 5px; background: rgba(241,138,145,0.12); color: #ffc1c5; padding: 0 16px; font-weight: 850; }
.danger-button:hover { background: rgba(241,138,145,0.2); }
.danger-button:disabled { cursor: wait; opacity: 0.58; }
.remove-member-summary { border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); padding: 13px 15px; }
.remove-member-summary strong,
.remove-member-summary span { display: block; overflow-wrap: anywhere; }
.remove-member-summary strong { font-size: 12px; }
.remove-member-summary span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.dialog-explanation { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.team-dialog { width: min(620px, calc(100% - 28px)); }
.team-coach-fieldset { margin: 19px 0 0; border: 0; padding: 0; }
.team-coach-fieldset legend { margin-bottom: 9px; font-size: 11px; font-weight: 850; }
.team-coach-options { max-height: 280px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-raised); overflow-y: auto; }
.team-coach-option { min-height: 54px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 7px 11px; cursor: pointer; }
.team-coach-option:last-child { border-bottom: 0; }
.team-coach-option:hover { background: rgba(38,224,140,0.04); }
.team-coach-option input { width: 16px; height: 16px; accent-color: var(--green); }
.team-coach-option .team-coach-identity { background: transparent; padding: 0; }
.team-selection-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.team-selection-status strong { color: var(--green); }
.empty-team-options { min-height: 72px; display: grid; place-items: center; color: var(--muted); padding: 15px; font-size: 10px; text-align: center; }
.team-dialog-actions .dialog-action-spacer { flex: 1 1 auto; }

.admin-detail-dialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 20px -23px -23px;
  border-top: 1px solid var(--line);
  background: rgba(20,25,32,0.98);
  padding: 14px 23px;
  backdrop-filter: blur(10px);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  max-width: min(390px, calc(100% - 36px));
  border: 1px solid rgba(38,224,140,0.3);
  border-radius: 6px;
  background: #15241c;
  color: #c8f7da;
  padding: 12px 15px;
  font-size: 12px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(241,138,145,0.35); background: #2b191c; color: #f4b2b7; }

@media (max-width: 900px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-context { min-height: auto; padding: 26px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-message { margin: 44px 0 28px; }
  .auth-message h1 { max-width: 12ch; font-size: 46px; }
  .auth-facts { display: none; }
  .back-link { margin-top: 24px; }
  .auth-form-area { min-height: auto; padding: 28px 18px 46px; }
  .portal-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .member-groups { grid-template-columns: 1fr; }
  .personal-layout { grid-template-columns: 1fr; }
  .account-details { border-right: 0; border-bottom: 1px solid var(--line); }
  .club-code-row { grid-template-columns: 1fr; }
  .club-code-row .form-message { grid-column: 1; }
  .admin-record { grid-template-columns: 38px minmax(150px, 0.7fr) minmax(300px, 1.3fr) 20px; }
  .team-list { grid-template-columns: 1fr; }
  .recording-field-shell { grid-template-columns: minmax(230px, 0.6fr) minmax(470px, 1.4fr); }
  .recording-field-context { padding: 32px; }
  .recording-consent-panel { padding: 30px 24px; }
}

@media (max-width: 1550px) {
  .visual-guide-rail {
    position: static;
    width: 100%;
    margin: 6px 0 18px;
    box-shadow: none;
  }
  .visual-guide-rail > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  .visual-guide-rail > header small { margin-top: 0; text-align: right; }
  .visual-guide-thumbnails { max-height: none; display: flex; gap: 7px; overflow-x: auto; overflow-y: hidden; padding-bottom: 3px; }
  .visual-guide-thumb { flex: 0 0 142px; }
  .visual-guide-hover-preview { display: none !important; }
}

@media (max-width: 820px) {
  .recording-field-header { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 14px; }
  .recording-field-session { grid-column: 1 / -1; grid-row: 2; min-width: 0; border-top: 1px solid var(--line); padding-top: 8px; text-align: left; }
  .recording-field-session > span { white-space: normal; }
  .recording-field-shell { display: block; }
  .recording-field-context { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 24px; }
  .recording-field-context h1 { max-width: 14ch; margin: 14px 0 10px; font-size: 38px; }
  .recording-field-context > p { font-size: 13px; }
  .recording-field-context dl { margin-top: 20px; }
  .recording-field-context > small { margin-top: 15px; }
  .recording-consent-panel { padding: 30px 24px 42px; }
}

@media (max-width: 700px) {
  .portal-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 14px; }
  .workspace-navigation { grid-column: 1 / -1; order: 3; overflow: visible; }
  .help-navigation { grid-column: 1 / -1; order: 4; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-top: 10px; }
  .operator-navigation { grid-column: 1 / -1; order: 5; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-top: 10px; }
  .help-navigation .navigation-label,
  .operator-navigation .navigation-label { display: block; flex: 0 0 auto; margin: 0 4px 0 0; }
  .help-button,
  .operator-button { min-width: 190px; width: auto; }
  .navigation-label { display: none; }
  #workspaceNav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
  .workspace-button { min-width: 150px; width: auto; }
  .add-workspace-button { width: auto; min-height: 42px; margin: 6px 0 0; }
  .sidebar-account { margin: 0; border: 0; padding: 0; text-align: right; align-content: center; }
  .sidebar-account button { margin-left: auto; }
  .portal-header { min-height: 60px; padding: 0 16px; }
  .connection-indicator { display: none; }
  .dashboard { padding: 25px 16px 34px; }
  .dashboard-heading { align-items: start; }
  .status-grid { grid-template-columns: 1fr; }
  .status-item { min-height: 84px; border-right: 0; border-bottom: 1px solid var(--line); }
  .status-item:last-child { border-bottom: 0; }
  .section-heading { align-items: start; }
  .section-heading p { display: none; }
  .club-code-row .inline-field,
  .code-form .inline-field { grid-template-columns: 1fr; }
  .club-code-row .primary-button,
  .code-form .primary-button { width: 100%; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .admin-search { width: 100%; }
  .admin-record { grid-template-columns: 38px minmax(0, 1fr) 18px; }
  .admin-record-meta { grid-column: 1 / -1; }
  .admin-record-arrow { grid-column: 3; grid-row: 1; }
  .admin-license-grid { grid-template-columns: 1fr; }
  .unassigned-team-row { grid-template-columns: minmax(0, 1fr) auto; }
  .unassigned-coach-list { grid-column: 1 / -1; grid-row: 2; }
  .team-count { grid-column: 2; grid-row: 1; }
  .help-topic-grid { grid-template-columns: 1fr; }
  .help-topic { min-height: 0; padding: 20px; }
  .help-section-heading,
  .program-guide-heading { align-items: start; flex-direction: column; gap: 9px; }
  .help-section-heading p { text-align: left; }
  .chapter-content { grid-template-columns: 1fr; gap: 22px; padding: 2px 4px 24px 47px; }
  .visual-guide-dialog-content { padding: 12px; }
  .visual-guide-dialog-content h2 { font-size: 18px; }
  .visual-guide-dialog-content p { font-size: 10px; }
  .visual-callout { padding: 3px 5px; font-size: 7px; }
  .help-start,
  .help-contact { align-items: stretch; flex-direction: column; gap: 16px; }
  .help-start .primary-button,
  .help-contact .secondary-button { width: 100%; }
  .recording-review-notice { grid-template-columns: 1fr; gap: 5px; }
  .recording-setup-form { grid-template-columns: 1fr; }
  .recording-start-button { grid-column: 1; width: 100%; justify-self: stretch; }
  .recording-history-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; }
  .recording-history-meta { grid-column: 1; }
  .recording-history-count { grid-column: 2; grid-row: 1; }
  .recording-history-status { grid-column: 2; grid-row: 2; }
  .recording-history-actions { grid-column: 1 / -1; flex-wrap: wrap; justify-content: stretch; }
  .recording-history-actions button { flex: 1 1 120px; }
  .recording-field-header { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 12px; }
  .recording-field-session { grid-column: 1 / -1; grid-row: 2; min-width: 0; border-top: 1px solid var(--line); padding-top: 8px; text-align: left; }
  .recording-field-session > span { white-space: normal; }
  .recording-finish-button { min-height: 38px; padding-inline: 10px; font-size: 10px; }
  .recording-field-shell { display: block; }
  .recording-field-context { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 18px; }
  .recording-field-context h1 { max-width: 14ch; margin: 14px 0 10px; font-size: 34px; }
  .recording-field-context > p { font-size: 12px; }
  .recording-field-context dl { margin-top: 20px; }
  .recording-field-context > small { margin-top: 15px; }
  .recording-consent-panel { padding: 25px 16px 38px; }
  .recording-person-grid { grid-template-columns: 1fr; }
  .recording-signature-pad { height: 190px; }
}

@media (max-width: 430px) {
  .auth-context { padding: 20px 18px; }
  .auth-message { margin: 34px 0 14px; }
  .auth-message h1 { font-size: 38px; }
  .auth-message p { font-size: 15px; }
  .back-link { display: none; }
  .auth-card,
  .recovery-card,
  .reverification-card { padding: 21px 17px; }
  .sidebar-brand small { display: none; }
  .sidebar-account span { max-width: 120px; }
  .dashboard-heading { display: block; }
  .role-badge { margin-top: 14px; }
  .section-heading { display: block; }
  .section-heading .secondary-button { width: 100%; margin-top: 14px; }
  .account-details,
  .code-form { padding: 17px; }
  .account-details dl > div { grid-template-columns: 76px minmax(0, 1fr); }
  .member-row { grid-template-columns: 32px minmax(0, 1fr); }
  .member-actions { grid-column: 2; justify-content: space-between; }
  .team-management-heading { align-items: stretch; flex-direction: column; }
  .team-management-heading .secondary-button { width: 100%; }
  .team-card-coaches { grid-template-columns: 1fr; }
  .program-guide-chapter > summary { grid-template-columns: 27px minmax(0, 1fr) 24px; gap: 9px; padding: 14px 0; }
  .chapter-content { padding-left: 36px; }
  .team-coach-option { grid-template-columns: 18px minmax(0, 1fr); }
  .team-coach-option > .member-role { grid-column: 2; }
  .team-dialog-actions { grid-template-columns: 1fr 1fr; }
  .team-dialog-actions .dialog-action-spacer { display: none; }
  .team-dialog-actions #archiveTeamButton { grid-column: 1 / -1; }
  .team-dialog-actions button { min-width: 0; padding-inline: 9px; font-size: 11px; white-space: nowrap; }
  .admin-view-switch { width: 100%; }
  .admin-view-switch button { flex: 1 1 50%; }
  .admin-search { grid-template-columns: 1fr; }
  .admin-search .secondary-button { width: 100%; }
  .admin-record-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-edit-grid { grid-template-columns: 1fr; }
  .admin-name-field { grid-column: 1; }
  .admin-reverification > header { display: block; }
  .verification-status { display: inline-block; margin-top: 10px; }
  .admin-reverification dl > div { grid-template-columns: 1fr; gap: 3px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .recording-setup > header,
  .recording-history > header { align-items: start; flex-direction: column; gap: 7px; }
  .recording-field-brand small { display: none; }
  .recording-field-context dl > div { grid-template-columns: 76px minmax(0, 1fr); }
  .recording-age-fieldset label { flex: 1 1 120px; }
  .recording-notice-copy header { align-items: start; flex-direction: column; gap: 5px; }
  .recording-signature-section > header { align-items: start; }
  .recording-success h2 { font-size: 28px; }
  .recording-success .primary-button { width: 100%; min-width: 0; }
}
