:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: #090b0f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #090b0f; }
button { font: inherit; }

.app {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #1c222c 0%, #090b0f 60%);
}

.camera,
.overlay,
.vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.camera {
  object-fit: cover;
  background: #090b0f;
}

.overlay { z-index: 2; pointer-events: none; }
.vignette {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(4,5,8,.72) 0%, rgba(4,5,8,.08) 23%, rgba(4,5,8,0) 55%, rgba(4,5,8,.78) 100%);
}

.topbar {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 18px 12px;
}

.brand { display: flex; gap: 9px; align-items: center; font-weight: 700; letter-spacing: -.02em; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #9cff77; box-shadow: 0 0 18px rgba(156,255,119,.75); }
.pill { padding: 7px 10px; border-radius: 999px; background: rgba(12,15,20,.52); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); font-size: 12px; color: rgba(255,255,255,.8); }

.guide {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: min(32vw, 200px);
  aspect-ratio: 50 / 11;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: .72;
  transition: opacity 120ms ease-out;
}

.guide-corner { position: absolute; width: 18px; height: 18px; border-color: rgba(255,255,255,.8); }
.guide-corner.tl { left: 0; top: 0; border-left: 2px solid; border-top: 2px solid; border-radius: 12px 0 0 0; }
.guide-corner.tr { right: 0; top: 0; border-right: 2px solid; border-top: 2px solid; border-radius: 0 12px 0 0; }
.guide-corner.bl { left: 0; bottom: 0; border-left: 2px solid; border-bottom: 2px solid; border-radius: 0 0 0 12px; }
.guide-corner.br { right: 0; bottom: 0; border-right: 2px solid; border-bottom: 2px solid; border-radius: 0 0 12px 0; }
.guide[data-aligned="true"] .guide-corner { border-color: #9cff77; }

.status-wrap {
  position: absolute;
  z-index: 5;
  top: calc(73px + env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  text-align: center;
  pointer-events: none;
  transition: opacity 140ms ease;
}
html[data-challenge-visible="true"] .status-wrap { opacity: 0; }
html[data-challenge-visible="true"] .guide { opacity: 0; }
.status { font-size: clamp(17px, 4.5vw, 22px); font-weight: 750; letter-spacing: -.025em; text-shadow: 0 1px 15px rgba(0,0,0,.55); }
.substatus { margin-top: 4px; font-size: 13px; color: rgba(255,255,255,.69); text-shadow: 0 1px 12px rgba(0,0,0,.6); }

.motion-challenge {
  --challenge-color: #d8ffb4;
  position: absolute;
  z-index: 7;
  top: calc(62px + env(safe-area-inset-top));
  left: 50%;
  width: min(520px, calc(100vw - 28px));
  min-height: 76px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(8,12,16,.9);
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
  backdrop-filter: blur(14px) saturate(1.15);
  transition: opacity 150ms ease;
}
.motion-challenge.panel-open { opacity: 0; pointer-events: none; }
.motion-challenge[data-status="success"] { --challenge-color: #9cff77; }
.motion-challenge[data-status="inconclusive"] { --challenge-color: #ffd56a; }
.challenge-symbol { display: grid; place-items: center; color: var(--challenge-color); }
.challenge-symbol svg { grid-area: 1 / 1; width: 42px; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.challenge-depth-target { transform-box: fill-box; transform-origin: center; animation: challenge-depth 900ms cubic-bezier(.16,1,.3,1) infinite alternate; }
.motion-challenge[data-stage="return"] .challenge-depth-target { animation-direction: alternate-reverse; }
.challenge-check { display: none; width: 38px !important; }
.motion-challenge[data-status="success"] .challenge-depth { display: none; }
.motion-challenge[data-status="success"] .challenge-check { display: block; }
.motion-challenge[data-status="inconclusive"] .challenge-depth { width: 38px; opacity: .72; }
.motion-challenge[data-status="inconclusive"] .challenge-depth-target { animation: none; }
.challenge-copy { min-width: 0; display: grid; gap: 4px; }
.challenge-copy strong { color: #fff; font-size: 14px; line-height: 1.15; letter-spacing: -.02em; }
.challenge-copy > span { color: rgba(255,255,255,.66); font-size: 10px; line-height: 1.25; }
.challenge-copy small { color: color-mix(in srgb, var(--challenge-color) 78%, white); font-size: 9px; font-variant-numeric: tabular-nums; }
.challenge-progress { --challenge-scale: 0; height: 5px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.11); }
.challenge-progress i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--challenge-color); transform: scaleX(var(--challenge-scale)); transform-origin: left; transition: transform 180ms cubic-bezier(.16,1,.3,1); }
.challenge-retry {
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0b0d10;
  font-weight: 750;
  font-size: 11px;
  cursor: pointer;
}
.challenge-retry:focus-visible { outline: 2px solid var(--challenge-color); outline-offset: 2px; }

@keyframes challenge-depth {
  from { transform: scale(.68); opacity: .55; }
  to { transform: scale(1); opacity: 1; }
}

.controls {
  position: absolute;
  z-index: 7;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 18px;
  right: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  border: 0;
  border-radius: 17px;
  padding: 0 20px;
  font-weight: 750;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.primary-button { flex: 1; background: #fff; color: #0b0d10; }
.controls .game-button { flex: 1 1 180px; }
.controls .primary-button { flex: 1 1 180px; }
.primary-button:disabled { opacity: .58; }
.secondary-button { background: rgba(14,17,22,.72); color: #fff; border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(16px); }
.secondary-button.active { background: #d8ffb4; color: #0b0d10; }

.result-card {
  position: absolute;
  z-index: 8;
  left: 14px;
  right: 14px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 92px 1fr 34px;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 20px;
  background: rgba(11,14,18,.8);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
}

.plate-preview { width: 92px; height: 42px; border-radius: 8px; background: #eee; object-fit: contain; }
.result-copy { min-width: 0; }
.result-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.55); }
.plate-text { margin-top: 2px; font-size: 25px; line-height: 1.05; font-weight: 800; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.confidence-text { margin-top: 3px; font-size: 12px; color: rgba(255,255,255,.58); }
.icon-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; font-size: 25px; line-height: 30px; }

.debug-panel {
  position: absolute;
  z-index: 6;
  left: 14px;
  top: calc(116px + env(safe-area-inset-top));
  width: min(320px, calc(100vw - 28px));
  font-size: 11px;
  color: rgba(255,255,255,.68);
  opacity: .72;
}
.debug-panel summary { width: fit-content; cursor: pointer; padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,.32); }
.debug-grid { margin-top: 5px; display: grid; grid-template-columns: 88px 1fr; gap: 4px 8px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.5); backdrop-filter: blur(10px); }
.debug-grid strong { color: rgba(255,255,255,.92); font-weight: 650; overflow-wrap: anywhere; }

.anti-cheat-panel {
  --risk-accent: #9cff77;
  position: absolute;
  z-index: 9;
  left: 10px;
  right: 10px;
  bottom: calc(206px + env(safe-area-inset-bottom));
  max-height: min(58dvh, 620px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(9,12,16,.93);
  box-shadow: 0 16px 46px rgba(0,0,0,.42);
  color: rgba(255,255,255,.86);
}
.anti-cheat-panel[open] { overflow-y: auto; overscroll-behavior: contain; }
.anti-cheat-panel[data-risk="uncertain"] { --risk-accent: #ffd56a; }
.anti-cheat-panel[data-risk="elevated"] { --risk-accent: #ff8b73; }
.anti-cheat-panel[hidden] { display: none; }
.result-card.hidden ~ .anti-cheat-panel { bottom: calc(88px + env(safe-area-inset-bottom)); }
.risk-summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.risk-summary::-webkit-details-marker { display: none; }
.risk-summary:focus-visible { outline: 2px solid var(--risk-accent); outline-offset: -3px; }
.risk-summary > span:first-child { min-width: 0; display: grid; gap: 2px; }
.risk-summary strong { color: #fff; font-size: 14px; letter-spacing: -.01em; }
.risk-summary small { color: rgba(255,255,255,.55); font-size: 10px; font-weight: 600; }
.risk-chevron { color: var(--risk-accent); font-size: 18px; transition: transform .16s ease; }
.anti-cheat-panel:not([open]) .risk-chevron { transform: rotate(180deg); }
.risk-panel-body { padding: 0 14px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); }
.risk-verdict-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; }
.risk-category { color: var(--risk-accent); font-size: 12px; font-weight: 750; }
.risk-confidence { color: rgba(255,255,255,.55); font-size: 11px; }
.risk-reason { margin: 8px 0 12px; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.45; }
.risk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.risk-stats div { min-width: 0; padding: 8px 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.035); }
.risk-stats dt { color: rgba(255,255,255,.47); font-size: 9px; line-height: 1.2; }
.risk-stats dd { margin: 3px 0 0; color: #fff; font-size: 12px; font-weight: 720; overflow-wrap: anywhere; }
.risk-section-title { margin: 16px 0 7px; color: rgba(255,255,255,.52); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.risk-signal-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.risk-signal { padding: 8px 9px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; background: rgba(255,255,255,.035); }
.risk-signal.is-unavailable { border-color: rgba(255,255,255,.04); }
.risk-signal-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.risk-signal-heading strong { color: rgba(255,255,255,.91); font-size: 10px; }
.risk-signal-heading span { color: var(--risk-accent); font-size: 9px; white-space: nowrap; }
.risk-signal.is-unavailable .risk-signal-heading span { color: rgba(255,255,255,.36); }
.risk-signal p { margin: 3px 0 0; color: rgba(255,255,255,.55); font-size: 9px; line-height: 1.35; }
.risk-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.risk-actions button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.risk-actions button:disabled { cursor: default; opacity: .52; }
.risk-actions button:focus-visible { outline: 2px solid var(--risk-accent); outline-offset: 2px; }
.risk-actions button[data-action="proof"] { grid-column: 1 / -1; }
.risk-disclaimer { margin: 12px 0 0; color: rgba(255,255,255,.42); font-size: 9px; line-height: 1.45; }

.recorder-root,
.recorder-reticle { display: none; }

html[data-recorder-mode="true"] .guide,
html[data-recorder-mode="true"] .motion-challenge,
html[data-recorder-mode="true"] .result-card,
html[data-recorder-mode="true"] .anti-cheat-panel,
html[data-recorder-mode="true"] .debug-panel,
html[data-recorder-mode="true"] #soloButton,
html[data-recorder-mode="true"] #soloGameRoot { display: none !important; }
html[data-recorder-mode="true"] .recorder-root,
html[data-recorder-mode="true"] .recorder-reticle { display: block; }
html[data-recorder-mode="true"] .brand .dot { background: #ffcf4a; box-shadow: none; }
html[data-recorder-mode="true"] .controls {
  top: calc(70px + env(safe-area-inset-top));
  bottom: auto;
  justify-content: center;
}
html[data-recorder-mode="true"] .controls .primary-button { flex: 0 1 320px; }
html[data-recorder-mode="true"][data-camera-ready="true"] .status-wrap { display: none; }

.recorder-reticle {
  --recorder-reticle-scale: 1;
  --recorder-reticle-shift-x: 0%;
  --recorder-reticle-shift-y: 0%;
  position: absolute;
  z-index: 4;
  top: 66%;
  left: 50%;
  width: min(48vw, 260px);
  aspect-ratio: 4.25 / 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.recorder-reticle[data-profile="fixed-angle-tilt-v1"] {
  top: 54%;
  width: min(48vw, 260px);
}
.recorder-reticle[data-profile="diagonal-target-shift-v1"] {
  top: 31%;
  left: 31%;
  width: min(44vw, 230px);
}
.recorder-reticle__plate {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255,255,255,.78);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,.32);
  transform: translate(var(--recorder-reticle-shift-x), var(--recorder-reticle-shift-y)) scale(var(--recorder-reticle-scale));
  transform-origin: center;
  transition: transform 520ms cubic-bezier(.16,1,.3,1), border-color 180ms ease, box-shadow 180ms ease;
}
.recorder-reticle[data-phase="recording"] .recorder-reticle__plate {
  border-color: #ffcf4a;
  background: rgba(255,207,74,.06);
  box-shadow: 0 12px 36px rgba(0,0,0,.32), 0 0 0 2px rgba(255,207,74,.2);
}
.recorder-reticle[data-vector="COMPLETE"] .recorder-reticle__plate { border-color: rgba(156,255,119,.88); }
.recorder-reticle__plate::before,
.recorder-reticle__plate::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,.55);
}
.recorder-reticle__plate::before { left: 50%; top: -28%; bottom: -28%; width: 1px; }
.recorder-reticle__plate::after { top: 50%; left: -7%; right: -7%; height: 1px; }
.recorder-reticle__plate i { position: absolute; width: 18px; height: 18px; border-color: #ffcf4a; }
.recorder-reticle__plate i:nth-child(1) { left: -2px; top: -2px; border-left: 3px solid; border-top: 3px solid; border-radius: 12px 0 0; }
.recorder-reticle__plate i:nth-child(2) { right: -2px; top: -2px; border-right: 3px solid; border-top: 3px solid; border-radius: 0 12px 0 0; }
.recorder-reticle__plate i:nth-child(3) { left: -2px; bottom: -2px; border-left: 3px solid; border-bottom: 3px solid; border-radius: 0 0 0 12px; }
.recorder-reticle__plate i:nth-child(4) { right: -2px; bottom: -2px; border-right: 3px solid; border-bottom: 3px solid; border-radius: 0 0 12px; }
.recorder-reticle > span {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.76);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0,0,0,.75);
}

.recorder-coach {
  --recorder-progress: 0;
  position: absolute;
  z-index: 10;
  top: calc(68px + env(safe-area-inset-top));
  left: 50%;
  width: min(560px, calc(100vw - 24px));
  min-height: 82px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 15px;
  background: #12161d;
  box-shadow: 0 18px 42px rgba(0,0,0,.38);
}
.recorder-coach__icon { display: grid; place-items: center; color: #ffcf4a; }
.recorder-coach__icon svg { grid-area: 1 / 1; width: 42px; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.recorder-coach__check { display: none; }
.recorder-coach__icon[data-vector="BACKWARD"] .recorder-coach__arrow { transform: rotate(180deg); }
.recorder-coach__icon[data-vector="LEFT"] .recorder-coach__arrow { transform: rotate(-90deg); }
.recorder-coach__icon[data-vector="RIGHT"] .recorder-coach__arrow { transform: rotate(90deg); }
.recorder-coach__icon[data-vector="TILT_UP"] .recorder-coach__arrow { transform: rotate(0); }
.recorder-coach__icon[data-vector="DIAGONAL_DOWN_RIGHT"] .recorder-coach__arrow { transform: rotate(135deg); }
.recorder-coach__icon[data-vector="COMPLETE"] .recorder-coach__arrow { display: none; }
.recorder-coach__icon[data-vector="COMPLETE"] .recorder-coach__check { display: block; }
.recorder-coach__copy { min-width: 0; display: grid; gap: 4px; }
.recorder-coach__copy strong { font-size: 15px; letter-spacing: -.02em; }
.recorder-coach__copy span { color: rgba(255,255,255,.68); font-size: 11px; }
.recorder-coach__progress { height: 5px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.11); }
.recorder-coach__progress i { display: block; width: 100%; height: 100%; border-radius: inherit; background: #ffcf4a; transform: scaleX(var(--recorder-progress)); transform-origin: left; transition: transform 150ms cubic-bezier(.16,1,.3,1); }
.recorder-coach > b { color: rgba(255,255,255,.64); font-size: 11px; font-variant-numeric: tabular-nums; }

.recorder-dock,
.recorder-review {
  position: absolute;
  z-index: 11;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  max-height: min(49dvh, 470px);
  overflow-y: auto;
  padding: 15px;
  border-radius: 16px;
  background: #11151b;
  box-shadow: 0 18px 48px rgba(0,0,0,.5);
  overscroll-behavior: contain;
}
.recorder-dock header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.recorder-dock h1,
.recorder-review h2 { margin: 0; font-size: 20px; line-height: 1; letter-spacing: -.025em; }
.recorder-dock header p,
.recorder-review p { margin: 6px 0 0; color: rgba(255,255,255,.68); font-size: 11px; line-height: 1.4; }
.recorder-dock header > span {
  flex: 0 0 auto;
  color: #ffdf7e;
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.recorder-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.recorder-form label { min-width: 0; display: grid; gap: 5px; }
.recorder-form label > span { color: rgba(255,255,255,.58); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.recorder-form input,
.recorder-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  padding: 0 11px;
  background: #1b2028;
  color: #fff;
  outline: 0;
}
.recorder-form input::placeholder { color: rgba(255,255,255,.45); }
.recorder-form input:focus,
.recorder-form select:focus { border-color: #ffcf4a; box-shadow: 0 0 0 3px rgba(255,207,74,.16); }
.recorder-form__wide { grid-column: 1 / -1; }
.recorder-dock__actions,
.recorder-review__actions { display: flex; gap: 8px; margin-top: 12px; }
.recorder-dock__actions button,
.recorder-review__actions button {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  font-weight: 780;
  cursor: pointer;
}
.recorder-auto-cue {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border-radius: 13px;
  background: #24281f;
  color: #ffdf7e;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}
.recorder-auto-cue i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffcf4a;
  box-shadow: 0 3px 10px rgba(255,207,74,.28);
}
.recorder-review__actions button:first-child { flex: 1; background: #ffcf4a; color: #15120a; }
.recorder-queue-button,
.recorder-review__actions button:not(:first-child) { background: #262c35; color: #fff; }
.recorder-dock__actions button:disabled,
.recorder-review__actions button:disabled { cursor: default; opacity: .48; }
.recorder-dock__actions button:focus-visible,
.recorder-review__actions button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.recorder-state { margin: 9px 0 0; color: #ffd968; font-size: 10px; line-height: 1.35; }
.recorder-storage-note { margin: 6px 0 0; color: rgba(255,255,255,.52); font-size: 9px; line-height: 1.4; }
.recorder-review { display: grid; align-content: start; gap: 8px; }
.recorder-review__actions { flex-wrap: wrap; }
.recorder-review__actions button { flex: 1 1 135px; }
.recorder-review__actions [data-action="recorder-next"] { background: #ffcf4a; color: #15120a; }

html[data-recorder-mode="true"] ::selection { background: #ffcf4a; color: #17120a; }

.recorder-root[data-profile="adaptive-lateral-v2"] .recorder-auto-cue span::after {
  content: " · без команды или 1 сдвиг";
}
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-auto-cue span::after {
  content: " · один боковой проход";
}
.recorder-root[data-profile="fixed-angle-tilt-v1"] .recorder-auto-cue span::after {
  content: " · один наклон на 6°";
}

.hidden, .hidden-canvas { display: none !important; }

.account-root:not(:empty) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  background: #090b0f;
  color: #f6f5f0;
}
.account-gate { display: grid; gap: 16px; width: min(100%, 430px); }
.account-gate__mark { display: flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: -.04em; }
.account-gate__mark i { width: 28px; height: 2px; background: #ffb000; }
.account-gate__kicker { margin: 20px 0 0; color: #ffb000; font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.account-gate h1 { margin: 0; max-width: 390px; font-size: clamp(38px, 11vw, 62px); line-height: .92; letter-spacing: -.06em; }
.account-gate p { margin: 0; max-width: 390px; color: rgba(255,255,255,.62); font-size: 15px; line-height: 1.5; }
.account-gate .account-gate__message { color: #ff8b73; }
.account-gate button,
.account-gate__telegram-link { min-height: 58px; margin-top: 12px; border: 0; border-radius: 16px; background: #ffb000; color: #111318; font: inherit; font-weight: 850; cursor: pointer; }
.account-gate__telegram-link { display: flex; align-items: center; justify-content: center; padding: 0 20px; text-align: center; text-decoration: none; }
.account-gate button span,
.account-gate__telegram-link span { margin-left: 12px; }
.account-gate button:focus-visible,
.account-gate__telegram-link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.account-gate .account-gate__secondary { margin-top: 0; background: transparent; color: rgba(255,255,255,.62); }
.account-spinner { display: flex; gap: 8px; }
.account-spinner i { width: 10px; height: 10px; border-radius: 50%; background: #ffb000; animation: account-pulse 1s infinite alternate; }
.account-spinner i:nth-child(2) { animation-delay: .2s; }
.account-spinner i:nth-child(3) { animation-delay: .4s; }
@keyframes account-pulse { to { opacity: .2; transform: translateY(-6px); } }

@media (max-width: 899px) {
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-dock {
    max-height: none;
    padding: 12px;
  }
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-dock header,
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-form__wide,
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-storage-note {
    display: none;
  }
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-form {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 72px;
    gap: 7px;
    margin-top: 0;
  }
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-root[data-profile="adaptive-lateral-v2"] .recorder-form,
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-form,
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-root[data-profile="fixed-angle-tilt-v1"] .recorder-form {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-form input,
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-form select {
    min-height: 40px;
    padding: 0 8px;
    font-size: 12px;
  }
  html[data-recorder-mode="true"][data-camera-ready="true"] .recorder-queue-button:disabled {
    display: none;
  }
}

.recorder-reticle[data-profile="guided-lateral-capture-v1"] {
  --recorder-progress: 0;
  opacity: 0;
  transition: opacity 160ms ease;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"][data-phase="recording"],
.recorder-reticle[data-profile="guided-lateral-capture-v1"][data-phase="post-roll"],
.recorder-reticle[data-profile="guided-lateral-capture-v1"][data-phase="finalizing"] {
  opacity: 1;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__plate {
  border-color: #74ff9b;
  background: rgba(116,255,155,.035);
  box-shadow: 0 12px 36px rgba(0,0,0,.32), 0 0 0 1px rgba(116,255,155,.2), 0 8px 28px rgba(35,255,111,.12);
  transform: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  animation: guided-lateral-lock 260ms cubic-bezier(.16,1,.3,1) both;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__plate::before {
  left: 0;
  right: 0;
  top: auto;
  bottom: -3px;
  width: auto;
  height: 3px;
  border-radius: 3px;
  background: #b7ffc9;
  box-shadow: 0 3px 12px rgba(63,255,119,.38);
  transform: scaleX(var(--recorder-progress));
  transform-origin: center;
  transition: transform 90ms linear;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__plate::after {
  display: none;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__plate i {
  border-color: #74ff9b;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] > span {
  top: calc(100% + 9px);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 5px 9px 6px;
  border-radius: 8px;
  background: rgba(5,17,10,.82);
  color: #c9ffd6;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.01em;
  text-align: center;
  text-transform: none;
  white-space: normal;
  box-shadow: 0 7px 20px rgba(0,0,0,.26);
}
.recorder-reticle__motion { display: none; }
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__motion {
  position: absolute;
  top: calc(100% + 42px);
  left: 50%;
  display: block;
  width: 76px;
  height: 24px;
  transform: translateX(-50%);
  color: #c9ffd6;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__motion-rail {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(116,255,155,.12), rgba(116,255,155,.72), rgba(116,255,155,.12));
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__motion svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.65));
  animation: guided-lateral-phone 960ms cubic-bezier(.45,0,.55,1) infinite alternate;
}
.recorder-reticle[data-profile="guided-lateral-capture-v1"] > small {
  position: absolute;
  top: calc(100% + 72px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(20,16,5,.82);
  color: #ffe18b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,.65);
}
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-coach {
  display: none !important;
}
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-form,
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-dock__actions,
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-storage-note,
.recorder-root[data-profile="guided-lateral-capture-v1"] [data-recorder-budget],
.recorder-root[data-profile="guided-lateral-capture-v1"] [data-recorder-metrics] {
  display: none !important;
}
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-dock header {
  display: block;
}
.recorder-root[data-profile="guided-lateral-capture-v1"] .recorder-dock header p {
  margin-top: 5px;
}

.recorder-reticle[data-profile="movement-trainer-v1"] {
  --recorder-progress: 0;
  opacity: 0;
  transition: none;
}
.recorder-reticle[data-profile="movement-trainer-v1"][data-phase="recording"] { opacity: 1; }
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__plate {
  border-color: #74ff9b;
  background: rgba(116,255,155,.035);
  box-shadow: 0 12px 36px rgba(0,0,0,.32), 0 0 0 1px rgba(116,255,155,.2), 0 8px 28px rgba(35,255,111,.12);
  transform: none;
  animation: none;
}
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__plate::before {
  left: 0;
  right: 0;
  top: auto;
  bottom: -3px;
  width: auto;
  height: 3px;
  border-radius: 3px;
  background: #b7ffc9;
  box-shadow: 0 3px 12px rgba(63,255,119,.38);
  transform: scaleX(var(--recorder-progress));
  transform-origin: center;
  transition: transform 90ms linear;
}
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__plate::after { display: none; }
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__plate i { border-color: #74ff9b; }
.recorder-reticle[data-profile="movement-trainer-v1"] > span {
  top: calc(100% + 9px);
  padding: 5px 9px 6px;
  border-radius: 8px;
  background: rgba(5,17,10,.94);
  color: #c9ffd6;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -.01em;
  text-transform: none;
  box-shadow: 0 7px 20px rgba(0,0,0,.26);
}
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__motion {
  position: absolute;
  top: calc(100% + 42px);
  left: 50%;
  display: block;
  width: 76px;
  height: 24px;
  transform: translateX(-50%);
  color: #c9ffd6;
}
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__motion-rail {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(116,255,155,.12), rgba(116,255,155,.72), rgba(116,255,155,.12));
}
.recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__motion svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.65));
  animation: guided-lateral-phone 960ms cubic-bezier(.45,0,.55,1) infinite alternate;
}
.recorder-reticle[data-profile="movement-trainer-v1"] > small {
  position: absolute;
  top: calc(100% + 72px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(20,16,5,.94);
  color: #ffe18b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,.65);
}
.recorder-root[data-profile="movement-trainer-v1"] .recorder-coach,
.recorder-root[data-profile="movement-trainer-v1"] .recorder-form,
.recorder-root[data-profile="movement-trainer-v1"] .recorder-queue-button { display: none !important; }
.recorder-root[data-profile="movement-trainer-v1"] .recorder-auto-cue span::after { content: " · без отправки"; }

.movement-trainer-result {
  position: fixed;
  z-index: 42;
  left: 14px;
  right: 14px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(116,255,155,.28);
  border-radius: 10px;
  background: rgba(10,14,18,.94);
  box-shadow: 0 18px 50px rgba(0,0,0,.46);
  backdrop-filter: blur(18px);
}
.movement-trainer-result[data-result="retry"] { border-color: rgba(255,207,74,.32); }
.movement-trainer-result__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(116,255,155,.12);
  color: #74ff9b;
}
.movement-trainer-result[data-result="retry"] .movement-trainer-result__mark { background: rgba(255,207,74,.12); color: #ffe18b; }
.movement-trainer-result__mark svg { width: 25px; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.movement-trainer-result h2 { margin: 0; color: #fff; font-size: 24px; line-height: 1; letter-spacing: -.035em; }
.movement-trainer-result p { margin: 8px 0 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.4; }
.movement-trainer-result small { display: block; margin-top: 8px; color: rgba(255,255,255,.45); font-size: 9px; line-height: 1.35; }
.movement-trainer-result button {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #74ff9b;
  color: #07120b;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.movement-trainer-result[data-result="retry"] button { background: #ffcf4a; color: #17120a; }
.movement-trainer-result button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@keyframes guided-lateral-lock {
  from { opacity: .45; filter: blur(2px); }
  to { opacity: 1; filter: blur(0); }
}

@keyframes guided-lateral-phone {
  from { transform: translate(-31px, -50%); opacity: .62; }
  to { transform: translate(14px, -50%); opacity: 1; }
}

@media (min-width: 700px) {
  .controls, .result-card { width: 440px; left: 50%; right: auto; transform: translateX(-50%); }
  .guide { width: min(24vw, 200px); }
}

@media (min-width: 900px) {
  .anti-cheat-panel {
    left: auto;
    right: 16px;
    top: calc(76px + env(safe-area-inset-top));
    bottom: 16px;
    width: 370px;
    max-height: none;
  }
  .app .result-card.hidden ~ .anti-cheat-panel { bottom: 16px; }
  .app .anti-cheat-panel:not([open]) { bottom: auto; }
  .recorder-dock,
  .recorder-review {
    left: auto;
    right: 16px;
    top: calc(78px + env(safe-area-inset-top));
    bottom: 16px;
    width: 390px;
    max-height: none;
  }
  .recorder-review { bottom: auto; max-height: calc(100dvh - 94px); }
  .movement-trainer-result { left: auto; right: 16px; bottom: auto; top: calc(78px + env(safe-area-inset-top)); width: 390px; }
  .recorder-reticle { width: min(34vw, 420px); left: calc(50% - 195px); }
  .recorder-coach { left: calc(50% - 180px); }
}

@media (prefers-reduced-motion: reduce) {
  .risk-chevron, .challenge-progress i, .motion-challenge { transition: none; }
  .challenge-depth-target { animation: none; }
  .recorder-coach__progress i { transition: none; }
  .recorder-reticle__plate { transition: none; }
  .recorder-reticle[data-profile="guided-lateral-capture-v1"],
  .recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__plate,
  .recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__plate::before { animation: none; transition: none; }
  .recorder-reticle[data-profile="guided-lateral-capture-v1"] .recorder-reticle__motion svg {
    animation: none;
    transform: translate(-50%, -50%);
  }
  .recorder-reticle[data-profile="movement-trainer-v1"],
  .recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__plate,
  .recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__plate::before { animation: none; transition: none; }
  .recorder-reticle[data-profile="movement-trainer-v1"] .recorder-reticle__motion svg { animation: none; transform: translate(-50%, -50%); }
}
