:root {
  --ink: #f4f7fb;
  --ink-soft: #c5d0df;
  --paper: #05070c;
  --card: #0b1220;
  --rule: rgba(255, 255, 255, 0.1);
  --accent: #7eb6ff;
  --accent-strong: #6ba3ff;
  --chip: #10182a;
  --slot: #0a1222;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  --page: min(1920px, calc(100% - 32px));
  --before: #5ad4c8;
  --during: #38bdf8;
  --retention: #7c5cff;
  --approval: #fb923c;
  --exercises: #4ade80;
  --evaluation: #f43f8a;
  --celebration: #facc15;
  --repeat: #93c5fd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 14px;
}

body {
  font-family: "Figtree", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(47, 124, 255, 0.2), transparent 30%),
    radial-gradient(circle at 90% 6%, rgba(46, 230, 214, 0.1), transparent 24%),
    var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.72;
  font-size: 16px;
}

img,
video,
iframe {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 20px 40px;
  overflow-y: auto;
}

.login-card {
  width: min(480px, 100%);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px 32px 28px;
  margin-top: auto;
  margin-bottom: auto;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.brand-mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 8px 0 0 #7ad7e2, 16px 0 0 var(--accent-strong);
}

.brand-logo {
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: #0b1220;
}

.brand-logo--login {
  width: 112px;
  height: 112px;
  margin: 0 auto 16px;
}

.brand-logo--bar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-card h1,
.course-title h1,
.phase-banner h2,
.stage-head h2,
.step h3,
.empty-tab h2,
.topbar strong {
  font-family: "Figtree", sans-serif;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--white);
}

.login-card h1 {
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  margin-bottom: 10px;
  text-align: center;
}

.login-card p,
.lede,
.step-copy p,
.step-copy li,
.empty-tab p,
.section-note p,
.phase-banner p:last-child {
  color: var(--ink-soft);
}

.login-card p {
  margin-bottom: 28px;
  text-align: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.field input {
  width: 100%;
  border: 1px solid var(--rule);
  background: #080d18;
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--white);
  outline: none;
}

.field input::placeholder {
  color: #66748a;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(62, 196, 212, 0.14);
}

.primary-btn,
.ghost-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
}

.primary-btn {
  width: 100%;
  margin-top: 10px;
  background: var(--white);
  color: #071018;
  padding: 14px 18px;
  font-weight: 700;
}

.primary-btn:hover {
  background: #dce6f3;
}

.primary-btn:disabled,
.video-submit:disabled,
.video-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.login-error {
  min-height: 1.2em;
  margin-top: 12px;
  color: #ff8b7a;
  font-size: 0.92rem;
}

.app-shell {
  display: none;
}

body.is-ready .login-screen {
  display: none;
}

body.is-ready .app-shell {
  display: block;
}

body.is-quiz .app-shell,
body.is-video .app-shell {
  display: none;
}

body.is-quiz .quiz-screen,
body.is-video .video-screen {
  display: block;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 36px;
  background: rgba(5, 7, 12, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

.topbar strong {
  display: block;
  font-size: 1.2rem;
}

.topbar small,
.course-kicker,
.stage-kicker,
.media-slot__label,
.step-num,
.stage-nav h2,
.nav-phase {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.topbar small,
.course-kicker {
  color: var(--accent);
  font-size: 0.78rem;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-box span {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--rule);
  padding: 8px 14px;
  color: var(--white);
}

.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.course-hero,
.tabs,
.layout {
  width: var(--page);
  margin-left: auto;
  margin-right: auto;
}

.course-hero {
  margin-top: 20px;
  margin-bottom: 16px;
  padding: 4px 0;
}

.course-kicker {
  margin-bottom: 10px;
}

.course-title h1 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  max-width: 28ch;
  margin-bottom: 12px;
}

.lede {
  max-width: 80ch;
  font-size: 1.05rem;
}

.tabs {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tab-btn {
  border: 1px solid var(--rule);
  background: var(--chip);
  color: var(--ink-soft);
  border-radius: 20px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
}

.tab-btn strong {
  display: block;
  color: var(--white);
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.tab-btn small {
  color: var(--ink-soft);
}

.tab-btn.is-active {
  background: #101c36;
  border-color: rgba(62, 196, 212, 0.45);
  box-shadow: inset 0 -3px 0 var(--accent-strong);
}

.tab-btn.is-active strong,
.tab-btn.is-active small {
  color: var(--white);
}

.layout {
  margin-bottom: 90px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.stage-nav-wrap {
  position: sticky;
  top: 92px;
}

.stage-nav {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 14px 16px;
}

.stage-nav h2 {
  margin: 0 10px 10px;
  color: var(--accent);
  font-size: 0.74rem;
}

.nav-phase {
  display: block;
  margin: 14px 8px 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--white);
  border: 1px solid transparent;
}

.nav-phase[data-phase="before"] {
  color: var(--before);
  background: color-mix(in srgb, var(--before) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--before) 40%, transparent);
}
.nav-phase[data-phase="during"] {
  color: var(--during);
  background: color-mix(in srgb, var(--during) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--during) 40%, transparent);
}
.nav-phase[data-phase="retention"] {
  color: var(--retention);
  background: color-mix(in srgb, var(--retention) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--retention) 40%, transparent);
}
.nav-phase[data-phase="approval"] {
  color: var(--approval);
  background: color-mix(in srgb, var(--approval) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--approval) 40%, transparent);
}
.nav-phase[data-phase="exercises"] {
  color: var(--exercises);
  background: color-mix(in srgb, var(--exercises) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--exercises) 40%, transparent);
}
.nav-phase[data-phase="evaluation"] {
  color: var(--evaluation);
  background: color-mix(in srgb, var(--evaluation) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--evaluation) 40%, transparent);
}
.nav-phase[data-phase="celebration"] {
  color: var(--celebration);
  background: color-mix(in srgb, var(--celebration) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--celebration) 40%, transparent);
}
.nav-phase[data-phase="repeat"] {
  color: var(--repeat);
  background: color-mix(in srgb, var(--repeat) 16%, #0b1220);
  border-color: color-mix(in srgb, var(--repeat) 40%, transparent);
}

.stage-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 1.12rem;
}

.stage-nav a:hover,
.stage-nav a.is-current {
  background: #132038;
  color: var(--white);
}

.stage-nav a.nav-sub {
  display: block;
  margin: 0;
  padding: 8px 10px;
  font-size: 1.12rem;
  text-align: left;
  text-indent: 0;
}

.stage,
.step[id] {
  scroll-margin-top: 108px;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.phase {
  margin-bottom: 28px;
  padding: 10px 10px 6px;
  border-radius: 32px;
  background: color-mix(in srgb, var(--phase, var(--accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--phase, var(--accent)) 28%, transparent);
}

.phase-banner {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  padding: 20px 24px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--phase) 46%, #081018);
  border: 1px solid var(--phase);
  border-left: 10px solid var(--phase);
  color: var(--white);
}

.phase-banner span {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: var(--phase);
}

.phase-banner h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--white);
}

.phase-banner p:last-child {
  font-size: 1.05rem;
  max-width: 70ch;
  color: #d5deea;
}

.phase-before { --phase: var(--before); }
.phase-during { --phase: var(--during); }
.phase-retention { --phase: var(--retention); }
.phase-approval { --phase: var(--approval); }
.phase-exercises { --phase: var(--exercises); }
.phase-evaluation { --phase: var(--evaluation); }
.phase-celebration { --phase: var(--celebration); }
.phase-repeat { --phase: var(--repeat); }

.stage {
  --stage: var(--accent);
  background: color-mix(in srgb, var(--stage) 11%, #0b1220);
  border: 1px solid color-mix(in srgb, var(--stage) 42%, var(--rule));
  border-radius: 24px;
  padding: 32px 36px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-left: 10px solid var(--stage);
}

.stage.phase-before { --stage: var(--before); }
.stage.phase-during { --stage: var(--during); }
.stage.phase-retention { --stage: var(--retention); }
.stage.phase-approval { --stage: var(--approval); }
.stage.phase-exercises { --stage: var(--exercises); }
.stage.phase-evaluation { --stage: var(--evaluation); }
.stage.phase-celebration { --stage: var(--celebration); }
.stage.phase-repeat { --stage: var(--repeat); }

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding-bottom: 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.stage-kicker,
.step-num,
.media-slot__label {
  color: var(--stage, var(--accent));
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.stage-head h2 {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.stage-tag {
  flex-shrink: 0;
  background: color-mix(in srgb, var(--stage) 18%, #0a1224);
  color: var(--white);
  border: 1px solid color-mix(in srgb, var(--stage) 50%, transparent);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.section-note {
  background: #10182a;
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 18px 0;
  font-size: 1.05rem;
}

.section-note p + p {
  margin-top: 8px;
}

.step {
  padding: 28px 0 10px;
  border-top: 1px solid var(--rule);
}

.stage > .step:first-of-type {
  border-top: 0;
}

.step h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin-bottom: 12px;
}

.step-copy {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 72ch;
}

.step-copy p + p,
.step-copy ul,
.step-copy ol {
  margin-top: 12px;
}

.step-copy ul,
.step-copy ol {
  padding-left: 1.2em;
}

.step-copy li + li {
  margin-top: 8px;
}

.step-copy b {
  color: var(--white);
}

.step-copy h4 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
  color: var(--stage, var(--accent));
}

.help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage, var(--accent)) 18%, #0b1220);
  border: 1px solid color-mix(in srgb, var(--stage, var(--accent)) 50%, transparent);
  color: var(--white);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
}

.help-btn:hover {
  background: color-mix(in srgb, var(--stage, var(--accent)) 32%, #0b1220);
}

.media-slot {
  width: min(100%, 1280px);
  margin: 22px 0 8px;
}

.media-repeat-note {
  width: min(100%, 1280px);
  margin: -2px 0 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.media-slot__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: min(56.25vw, 720px);
  border: 1px dashed color-mix(in srgb, var(--stage, var(--accent)) 45%, transparent);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--stage, var(--accent-strong)) 16%, transparent), transparent 46%),
    var(--slot);
  border-radius: 20px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--ink-soft);
  overflow: hidden;
}

.media-slot.is-filled .media-slot__frame {
  display: block;
  padding: 0;
  border-style: solid;
  background: #000;
}

.media-slot.is-filled img,
.media-slot.is-filled video,
.media-slot.is-filled iframe,
.media-slot.is-filled .media-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  min-height: 0;
  object-fit: contain;
  border: 0;
  background: #000;
}

.media-slot.is-filled img[src$=".svg"] {
  object-fit: cover;
  background: #0b1220;
}

.media-slot.is-filled video {
  display: block;
}

.media-player {
  position: relative;
  display: block;
}

.media-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 118px;
  height: 118px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.media-play:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: scale(1.04);
}

.media-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 10px;
  border-left: 40px solid #fff;
  border-top: 24px solid transparent;
  border-bottom: 24px solid transparent;
}

.media-player.is-playing .media-play {
  display: none;
}

.media-slot__label {
  display: block;
}

.media-slot__hint {
  display: block;
  max-width: 40ch;
  font-size: 1.25rem;
}

.empty-tab {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 28px;
  padding: 56px 40px;
  box-shadow: var(--shadow);
}

.empty-tab h2,
.quiz-launch h2,
.quiz-wrap h1 {
  font-size: 1.55rem;
  margin-bottom: 8px;
}

.quiz-launch {
  margin-top: 18px;
  padding: 36px 32px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--rule);
}

.phase .quiz-launch {
  margin-top: 22px;
  border: 2px solid color-mix(in srgb, var(--phase) 55%, transparent);
  background: color-mix(in srgb, var(--phase) 12%, var(--card));
}

.phase .quiz-launch .course-kicker {
  color: var(--phase);
}

.quiz-launch .primary-btn,
.quiz-form .primary-btn {
  width: auto;
  min-width: 220px;
  margin-top: 18px;
}

.quiz-screen {
  min-height: 100vh;
  padding: 20px 0 56px;
  overflow-y: auto;
}

.quiz-wrap {
  width: var(--page);
  margin: 0 auto;
}

.quiz-status {
  min-height: 1.4em;
  margin: 8px 0 14px;
  color: var(--accent);
}

.quiz-sections {
  display: grid;
  gap: 14px;
}

.quiz-sections[hidden],
.quiz-form[hidden],
.quiz-result[hidden] {
  display: none;
}

.quiz-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.quiz-card[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.quiz-card small {
  color: var(--ink-soft);
}

.quiz-lock,
.quiz-pass {
  font-size: 1.2rem;
  line-height: 1;
}

.quiz-pass {
  color: #4ade80;
}

.quiz-card.is-passed {
  border-color: color-mix(in srgb, var(--exercises) 50%, transparent);
}

.quiz-form {
  margin-top: 8px;
}

.quiz-q {
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 146, 60, 0.22), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(74, 222, 128, 0.16), transparent 32%),
    #121a14;
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 24px;
  padding: 22px 24px;
  margin-bottom: 16px;
}

.quiz-q > p:first-of-type {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--white);
}

.quiz-q label {
  display: block;
  padding: 12px 16px;
  margin-top: 8px;
  border-radius: 14px;
  background: rgba(8, 16, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1.4;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quiz-q label:hover {
  border-color: rgba(251, 146, 60, 0.45);
  background: rgba(251, 146, 60, 0.12);
}

.quiz-q label:has(input:checked) {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.22);
  color: #ecfdf3;
}

.quiz-q label.is-right {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.28);
  color: #ecfdf3;
}

.quiz-q label.is-wrong {
  border-color: #fb923c;
  background: rgba(251, 146, 60, 0.28);
  color: #fff7ed;
}

.quiz-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.4;
}

.quiz-feedback.is-right {
  background: rgba(74, 222, 128, 0.18);
  color: #bbf7d0;
}

.quiz-feedback.is-wrong {
  background: rgba(251, 146, 60, 0.2);
  color: #fed7aa;
}

.quiz-form .primary-btn {
  min-width: 220px;
  padding: 14px 20px;
  font-size: 1.05rem;
}

.quiz-result {
  margin-top: 20px;
  padding: 28px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  font-size: 1.28rem;
}

.quiz-result.is-fail {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fee2e2;
}

.quiz-result.is-pass {
  background: #14532d;
  border-color: #4ade80;
  color: #dcfce7;
}

.video-screen {
  min-height: 100vh;
  padding: 16px 0 48px;
  overflow-y: auto;
}

.video-wrap {
  width: var(--page);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 20px 24px 24px;
  box-shadow: var(--shadow);
}

.video-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.88fr) minmax(300px, 1.12fr);
  gap: 24px;
  align-items: start;
}

.video-copy h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.15;
  margin-bottom: 8px;
}

.video-copy h2 {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  margin-bottom: 8px;
}

.video-copy .lede {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.video-questions {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  counter-reset: video-q;
}

.video-questions li {
  counter-increment: video-q;
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
}

.video-questions li::before {
  content: counter(video-q) ".";
  color: var(--ink-soft);
  font-weight: 700;
}

.video-questions li.is-current span {
  display: inline-block;
  background: #152033;
  border: 1px solid rgba(126, 182, 255, 0.28);
  border-radius: 12px;
  padding: 6px 10px;
  color: var(--white);
}

.video-copy .ghost-btn {
  margin-top: 8px;
  min-width: 110px;
}

.video-note {
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.28);
  color: #fde68a;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 12px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 640px;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.video-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-left: 20px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.video-frame.is-live .video-play,
.video-frame.is-playback .video-play {
  display: none;
}

.video-clock {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.video-frame.is-recording .video-clock {
  color: #fda4af;
}

.video-hint {
  margin: 10px 0 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.video-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  padding: 10px 20px;
  min-width: 150px;
}

.video-btn:hover {
  background: #2563eb;
}

.video-file {
  margin-bottom: 12px;
}

.video-file p {
  font-weight: 700;
  margin-bottom: 8px;
}

.video-file span {
  font-weight: 500;
  color: var(--ink-soft);
}

.video-file-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #070b14;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
}

.video-file-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.video-file-box span {
  background: #1f2937;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}

.video-file-box small {
  color: var(--ink-soft);
}

.video-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #070b14;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  cursor: pointer;
}

.video-consent input {
  margin-top: 6px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.video-submit {
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  min-width: 170px;
  font-weight: 700;
  background: #1d4ed8;
  color: #dbeafe;
  cursor: pointer;
}

.video-submit:not(:disabled) {
  background: #3b82f6;
  color: #fff;
}

.video-status {
  min-height: 1.4em;
  margin-top: 12px;
  color: var(--accent);
}

.video-status.is-ok {
  color: #86efac;
}

.video-status.is-bad {
  color: #fda4af;
}

@media (max-width: 980px) {
  :root {
    --page: calc(100% - 20px);
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .stage-nav,
  .stage-nav-wrap {
    position: static;
  }

  .topbar,
  .stage-head,
  .user-box,
  .phase-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .stage {
    padding: 24px 20px 12px;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-wrap {
    padding: 24px 18px 28px;
  }

  .media-play {
    width: 72px;
    height: 72px;
  }

  .media-play span {
    margin-left: 6px;
    border-left-width: 24px;
    border-top-width: 14px;
    border-bottom-width: 14px;
  }
}

.site-legal {
  margin-top: 18px;
  text-align: center;
}

.site-legal a,
.legal-back,
.storage-note a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
}

.site-legal a:hover,
.legal-back:hover,
.storage-note a:hover {
  color: var(--white);
  text-decoration: underline;
}

.site-footer {
  width: var(--page);
  margin: 28px auto 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer .site-legal {
  margin-top: 8px;
  text-align: left;
}

.storage-note {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}

.storage-note.is-open {
  display: flex;
}

.storage-note[hidden] {
  display: none;
}

.storage-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.storage-note .ghost-btn {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 16px;
}

.legal-page .legal-wrap {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.legal-page h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
  color: var(--white);
  margin: 8px 0 16px;
}

.legal-page h2 {
  margin: 36px 0 12px;
  color: var(--white);
  font-size: 1.4rem;
}

.legal-page p,
.legal-page li {
  color: var(--ink-soft);
}

.legal-page ul {
  margin: 0 0 16px 22px;
}

.legal-page .legal-back {
  display: inline-block;
  margin: 8px 0 28px;
}

@media (max-width: 700px) {
  .storage-note {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-height: 820px) {
  .brand-logo--login {
    width: 96px;
    height: 96px;
    margin-bottom: 12px;
  }

  .login-card {
    padding: 22px 24px 20px;
  }

  .login-card h1 {
    font-size: 1.45rem;
  }

  .login-card p {
    margin-bottom: 18px;
  }
}
