:root {
  --drsknn-safe-left: env(safe-area-inset-left);
  --drsknn-safe-right: env(safe-area-inset-right);
  --drsknn-safe-top: env(safe-area-inset-top);
  --drsknn-safe-bottom: env(safe-area-inset-bottom);
}

body.ar-hud-body {
  margin: 0;
  font-family: var(--drsknn-font-body);
  color: rgb(var(--rgb-text-2));
  background:
    radial-gradient(circle at 20% 10%, rgb(var(--rgb-success-2) / 0.08), transparent 45%),
    radial-gradient(circle at 80% 20%, rgb(var(--rgb-accent) / 0.08), transparent 40%),
    radial-gradient(circle at 50% 80%, rgb(var(--rgb-surface) / 0.6), transparent 60%),
    rgb(var(--rgb-bg));
  min-height: var(--ar-hud-vh, 100vh);
  overflow: hidden;
}

body.ar-hud-collapsed .ar-hud-gutter-left,
body.ar-hud-collapsed .ar-hud-gutter-right {
  display: none;
}

body.ar-hud-collapsed .ar-hud-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.ar-hud-collapsed .ar-hud-topbar {
  opacity: 0;
  pointer-events: none;
  height: 0;
  margin: 0;
  overflow: hidden;
}

body.ar-hud-collapsed .ar-hud-mobile-sheet {
  display: none;
}

body.ar-hud-collapsed .ar-hud-ar-rail {
  display: none;
}

body.ar-hud-collapsed .ar-hud-ar-recommend,
body.ar-hud-collapsed .ar-hud-ar-detail {
  display: none;
}

body.ar-hud-collapsed .ar-hud-root {
  padding: clamp(8px, 1.4vw, 16px);
}

body.ar-hud-fullscreen .ar-hud-root {
  padding: clamp(12px, 1.6vw, 18px);
}

body.ar-hud-fullscreen .ar-hud-topbar {
  margin-bottom: 0.5rem;
}

body.ar-hud-faux-fullscreen .ar-hud-gutter-left,
body.ar-hud-faux-fullscreen .ar-hud-gutter-right {
  display: none;
}

body.ar-hud-faux-fullscreen .ar-hud-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.ar-hud-faux-fullscreen .ar-hud-topbar {
  display: none;
}

body.ar-hud-faux-fullscreen .ar-hud-stage {
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

body.ar-hud-faux-fullscreen .ar-hud-video-wrap {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  aspect-ratio: auto;
  border-radius: 1.2rem;
}

/* Immersive AR mode: edge-to-edge camera with in-video overlays only */
body.ar-hud-immersive .ar-hud-root {
  padding: 0;
  gap: 0;
}

body.ar-hud-immersive .ar-hud-topbar,
body.ar-hud-immersive .ar-hud-gutter-left,
body.ar-hud-immersive .ar-hud-gutter-right,
body.ar-hud-immersive .ar-hud-mobile-sheet {
  display: none;
}

body.ar-hud-immersive .ar-hud-ui-pill {
  display: none !important;
}

body.ar-hud-immersive .ar-hud-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body.ar-hud-immersive .ar-hud-stage {
  height: 100%;
  align-items: stretch;
  justify-content: stretch;
  min-height: 0;
}

body.ar-hud-immersive .ar-hud-video-wrap {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  border: 0;
  aspect-ratio: auto;
}

body.ar-hud-immersive .ar-hud-zoom {
  transition: none;
}

body.ar-hud-immersive .ar-hud-ar-ribbon {
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
}

body.ar-hud-immersive .ar-hud-ar-rail {
  right: calc(12px + env(safe-area-inset-right));
}

body.ar-hud-immersive .ar-hud-ar-rail.left {
  left: calc(12px + env(safe-area-inset-left));
  right: auto;
}

body.ar-hud-immersive .ar-hud-ar-drawer {
  top: calc(12px + env(safe-area-inset-top));
  max-height: calc(100% - (24px + env(safe-area-inset-top) + env(safe-area-inset-bottom)));
}

body.ar-hud-immersive .ar-hud-ar-drawer.is-open {
  right: calc(12px + env(safe-area-inset-right));
}

body.ar-hud-immersive .ar-hud-help-chip {
  bottom: calc(12px + env(safe-area-inset-bottom));
}

.ar-hud-ar-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  margin-right: 0.35rem;
  opacity: 0.95;
}

.ar-hud-root {
  height: var(--ar-hud-vh, 100vh);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(16px, 2.6vw, 28px);
  box-sizing: border-box;
}

.ar-hud-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.ar-hud-brand {
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.ar-hud-logo {
  width: clamp(92px, 12vw, 136px);
  height: auto;
  max-height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgb(var(--rgb-overlay) / 0.5));
}

.ar-hud-brand-copy {
  min-width: 0;
}

.ar-hud-kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.68rem;
  color: rgb(var(--rgb-text-2) / 0.6);
}

.ar-hud-title {
  margin: 0.4rem 0 0.2rem;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  font-weight: 700;
  color: rgb(var(--rgb-text));
}

.ar-hud-subtitle {
  margin: 0;
  color: rgb(var(--rgb-text-muted) / 0.9);
  font-size: 0.95rem;
}

.ar-hud-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.ar-hud-btn {
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: rgb(var(--rgb-text-2));
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.ar-hud-btn.small {
  padding: 0.42rem 0.9rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.ar-hud-btn.primary {
  background: linear-gradient(135deg, rgb(var(--rgb-success-2) / 0.95), rgb(var(--rgb-success) / 0.95));
  color: rgb(var(--rgb-on-accent));
  border-color: rgb(var(--rgb-success-2) / 0.3);
  box-shadow: 0 16px 40px rgb(var(--rgb-success-2) / 0.25);
}

.ar-hud-btn.ghost {
  background: rgb(var(--rgb-surface) / 0.6);
  border-color: rgb(var(--rgb-border) / 0.7);
}

.ar-hud-btn.active {
  border-color: rgb(var(--rgb-success-2) / 0.7);
  color: rgb(var(--rgb-success) / 0.95);
}

.ar-hud-btn.ghost.active {
  background: rgb(var(--rgb-success-2) / 0.14);
  box-shadow: 0 0 0 1px rgb(var(--rgb-success-2) / 0.18);
}

.ar-hud-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ar-hud-gesture-hover {
  border-color: rgb(var(--rgb-info) / 0.85) !important;
  box-shadow: 0 0 0 2px rgb(var(--rgb-info) / 0.25);
  filter: brightness(1.05);
}

.ar-hud-gesture-locked {
  border-color: rgb(var(--rgb-warning) / 0.95) !important;
  box-shadow: 0 0 0 2px rgb(var(--rgb-warning) / 0.35);
  filter: brightness(1.08);
}

.ar-hud-test-status {
  font-weight: 600;
}

.ar-hud-shell {
  flex: 1;
  display: grid;
  gap: clamp(20px, 2.6vw, 32px);
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2.2fr) minmax(280px, 1fr);
  min-height: 0;
}

.ar-hud-gutter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ar-hud-card,
.ar-hud-panel {
  background: rgb(var(--rgb-surface) / 0.65);
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  border-radius: 1.25rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 24px 70px rgb(var(--rgb-overlay) / 0.45);
  backdrop-filter: blur(16px);
}

.ar-hud-panel {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 100%;
}

.ar-hud-label {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  color: rgb(var(--rgb-text-muted) / 0.8);
  margin: 0 0 0.4rem;
}

.ar-hud-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ar-hud-chip {
  font-size: 0.7rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--rgb-border) / 0.8);
  background: rgb(var(--rgb-bg) / 0.6);
  color: rgb(var(--rgb-text-2));
  font-family: inherit;
  cursor: default;
}

.ar-hud-chip.accent {
  border-color: rgb(var(--rgb-accent) / 0.6);
  color: rgb(var(--rgb-accent-wash));
}

button.ar-hud-chip {
  cursor: pointer;
}

button.ar-hud-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ar-hud-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.ar-hud-metric-label {
  margin: 0;
  font-size: 0.68rem;
  color: rgb(var(--rgb-text-muted) / 0.85);
}

.ar-hud-metric-value {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgb(var(--rgb-text));
}

.ar-hud-disclaimer {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgb(var(--rgb-text-muted) / 0.95);
  background: rgb(var(--rgb-bg) / 0.55);
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  border-radius: 0.9rem;
  padding: 0.75rem 0.9rem;
}

.ar-hud-stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: clamp(360px, 60vh, 820px);
}

.ar-hud-video-wrap {
  position: relative;
  width: 100%;
  height: clamp(360px, 60vh, 820px);
  max-height: 100%;
  aspect-ratio: var(--hud-video-aspect, 16 / 9);
  border-radius: 1.6rem;
  overflow: hidden;
  background: rgb(var(--rgb-bg) / 0.8);
  border: 1px solid rgb(var(--rgb-surface-2) / 0.8);
}

.ar-hud-event-intake {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1.8vw, 24px);
  border-radius: 1.8rem;
  background:
    radial-gradient(circle at 20% 20%, rgb(var(--event-grid) / 0.12), transparent 45%),
    radial-gradient(circle at 80% 15%, rgb(var(--event-glow) / 0.14), transparent 42%),
    linear-gradient(180deg, rgb(var(--event-panel) / 0.94), rgb(var(--event-panel-soft) / 0.88));
  backdrop-filter: blur(12px) saturate(130%);
  --event-ink: 31 37 43; /* #1F252B */
  --event-ink-soft: 110 106 101; /* #6E6A65 */
  --event-accent: 79 109 138; /* #4F6D8A */
  --event-accent-strong: 46 74 98; /* #2E4A62 */
  --event-panel: 246 246 244; /* #F6F6F4 */
  --event-panel-soft: 240 242 240;
  --event-border: 79 109 138; /* #4F6D8A */
  --event-grid: 76 167 163; /* #4CA7A3 */
  --event-glow: 76 167 163; /* #4CA7A3 */
  --event-accent-gold: 198 168 90; /* #C6A85A */
}

.ar-hud-event-intake[data-event-theme="holo"] {
  --event-ink: 31 37 43;
  --event-ink-soft: 110 106 101;
  --event-accent: 76 167 163; /* #4CA7A3 */
  --event-accent-strong: 46 74 98; /* #2E4A62 */
  --event-panel: 246 246 244;
  --event-panel-soft: 236 238 236;
  --event-border: 79 109 138;
  --event-grid: 76 167 163;
  --event-glow: 76 167 163;
  --event-accent-gold: 198 168 90;
}

.ar-hud-event-intake[hidden] {
  display: none !important;
}

.ar-hud-event-intake-card {
  position: relative;
  width: min(1320px, calc(100vw - 24px));
  max-height: min(96dvh, 920px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  padding: clamp(1.35rem, 3vw, 2.4rem);
  border-radius: 1.8rem;
  border: 1px solid rgb(var(--event-border) / 0.5);
  background:
    radial-gradient(circle at var(--event-pointer-x, 50%) var(--event-pointer-y, 15%), rgb(var(--event-glow) / 0.12), transparent 55%),
    linear-gradient(150deg, rgb(var(--event-panel) / 0.98), rgb(var(--event-panel-soft) / 0.9));
  box-shadow: 0 28px 80px rgb(31 37 43 / 0.16), inset 0 0 0 1px rgb(255 255 255 / 0.5);
  backdrop-filter: blur(14px);
  color: rgb(var(--event-ink));
}

.ar-hud-event-intake-card::before {
  content: "";
  position: absolute;
  inset: 1.1rem;
  border-radius: 1.2rem;
  background-image:
    linear-gradient(90deg, rgb(var(--event-grid) / 0.12) 1px, transparent 1px),
    linear-gradient(rgb(var(--event-grid) / 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: event-intake-grid 8s linear infinite;
  pointer-events: none;
}

.ar-hud-event-intake-card::after {
  content: "";
  position: absolute;
  inset: -30% -10%;
  background: linear-gradient(120deg, transparent 0%, rgb(var(--event-accent-strong) / 0.16) 45%, transparent 70%);
  opacity: 0.5;
  animation: event-intake-sweep 6s ease-in-out infinite;
  pointer-events: none;
}

.ar-hud-event-intake-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
  position: relative;
  z-index: 2;
}

.ar-hud-event-intake-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgb(var(--event-accent-gold));
}

.ar-hud-event-intake-headline {
  margin: 0;
  font-family: var(--drsknn-font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.3rem);
  color: rgb(var(--event-ink));
}

.ar-hud-event-intake-subtitle {
  margin: 0.4rem 0 0;
  max-width: 40ch;
  color: rgb(var(--event-ink-soft) / 0.95);
}

.ar-hud-event-intake-theme {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgb(var(--event-panel) / 0.7);
  border: 1px solid rgb(var(--event-border) / 0.45);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
}

.ar-hud-event-theme-btn {
  border: none;
  background: transparent;
  color: rgb(var(--event-ink-soft));
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.ar-hud-event-theme-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgb(var(--event-accent) / 0.95), rgb(var(--event-accent-strong) / 0.95));
  color: #ffffff;
  box-shadow: 0 10px 18px rgb(var(--event-accent) / 0.25);
}

.ar-hud-event-intake-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: clamp(1.4rem, 2vw, 2.1rem);
}

.ar-hud-event-intake-form {
  display: grid;
  gap: 1rem;
}

.ar-hud-event-intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ar-hud-event-field--full {
  grid-column: 1 / -1;
}

.ar-hud-event-dob {
  display: grid;
  gap: 0.4rem;
}

.ar-hud-event-dob-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(var(--event-ink-soft));
}

.ar-hud-event-dob-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.ar-hud-event-dob-inputs input {
  text-align: center;
  letter-spacing: 0.16em;
}

.ar-hud-event-field {
  display: grid;
  gap: 0.35rem;
  color: rgb(var(--event-ink-soft));
}

.ar-hud-event-field span {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ar-hud-event-intake-form input[type='text'],
.ar-hud-event-intake-form input[type='date'],
.ar-hud-event-intake-form input[type='email'],
.ar-hud-event-intake-form input[type='tel'] {
  width: 100%;
  min-height: 54px;
  padding: 0.65rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--event-border) / 0.45);
  background: rgb(var(--event-panel) / 0.95);
  color: rgb(var(--event-ink));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.35);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  box-sizing: border-box;
}

.ar-hud-event-intake-form input:focus {
  outline: none;
  border-color: rgb(var(--event-grid) / 0.85);
  box-shadow: 0 0 0 3px rgb(var(--event-grid) / 0.18);
}

.ar-hud-event-intake-footer {
  display: grid;
  gap: 0.7rem;
}

.ar-hud-event-intake-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.ar-hud-event-domain-help {
  margin: 0;
  font-size: 0.84rem;
  color: rgb(var(--event-ink-soft) / 0.95);
}

.ar-hud-event-consent-shell {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--event-border) / 0.35);
  background: rgb(var(--event-panel) / 0.72);
}

.ar-hud-event-consent-title {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--event-ink-soft));
}

.ar-hud-event-consent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.ar-hud-event-domain-shell {
  min-height: 0.5rem;
}

.ar-hud-event-domain-shell:empty {
  display: none;
}

.ar-hud-event-intake-checkbox {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: rgb(var(--event-ink-soft));
  font-size: 0.9rem;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border-radius: 0.95rem;
  border: 1px solid rgb(var(--event-border) / 0.28);
  background: rgb(var(--event-panel) / 0.8);
}

.ar-hud-event-intake-checkbox input {
  margin-top: 0.2rem;
}

.ar-hud-event-legal {
  margin: 0;
  font-size: 0.82rem;
  color: rgb(var(--event-ink-soft) / 0.92);
}

.ar-hud-event-legal a {
  color: rgb(var(--event-accent));
  text-decoration: none;
  font-weight: 600;
}

.ar-hud-event-legal a:hover,
.ar-hud-event-legal a:focus-visible {
  text-decoration: underline;
}

.ar-hud-event-intake-message {
  margin: 0.2rem 0 0;
  min-height: 1.1rem;
  color: rgb(var(--event-ink-soft) / 0.9);
}

.ar-hud-event-intake-aside {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid rgb(var(--event-border) / 0.35);
  background: rgb(var(--event-panel) / 0.86);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.45);
  color: rgb(var(--event-ink-soft));
  height: fit-content;
}

.ar-hud-event-intake-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

.ar-hud-event-intake-index {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgb(var(--event-accent-gold));
  letter-spacing: 0.12em;
}

.ar-hud-event-intake-step-title {
  margin: 0;
  font-weight: 700;
  color: rgb(var(--event-ink));
}

.ar-hud-event-intake-step-copy {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}

.ar-hud-event-intake-footnote {
  font-size: 0.78rem;
  color: rgb(var(--event-ink-soft) / 0.85);
}

.ar-hud-event-camera-panel {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgb(var(--event-border) / 0.28);
}

.ar-hud-event-camera-status {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgb(var(--event-ink));
}

.ar-hud-event-camera-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.ar-hud-event-camera-actions .ar-hud-btn {
  min-height: 48px;
}

@keyframes event-intake-grid {
  0% { background-position: 0 0, 12px 12px; }
  100% { background-position: 44px 0, 22px 22px; }
}

@keyframes event-intake-sweep {
  0%, 100% { transform: translateX(-10%) rotate(2deg); opacity: 0.35; }
  50% { transform: translateX(10%) rotate(-1deg); opacity: 0.65; }
}

@keyframes event-holo-scan {
  0%, 100% { transform: translateX(-6%) translateY(-2%) rotate(1deg); opacity: 0.35; }
  50% { transform: translateX(6%) translateY(2%) rotate(-1deg); opacity: 0.7; }
}

@media (max-width: 900px) {
  .ar-hud-event-intake-layout {
    grid-template-columns: 1fr;
  }

  .ar-hud-event-intake-grid {
    grid-template-columns: 1fr;
  }

  .ar-hud-event-consent-grid {
    grid-template-columns: 1fr;
  }

  .ar-hud-event-camera-actions {
    grid-template-columns: 1fr;
  }

  .ar-hud-event-intake-aside {
    order: 2;
  }
}

@media (max-width: 700px) {
  .ar-hud-event-intake-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ar-hud-event-intake-theme {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .ar-hud-event-intake-card {
    width: min(100vw - 10px, 100%);
    max-height: min(98dvh, 100%);
    padding: 1rem;
    border-radius: 1.25rem;
  }

  .ar-hud-event-intake-headline {
    font-size: 1.45rem;
  }

  .ar-hud-event-dob-inputs {
    gap: 0.45rem;
  }

  .ar-hud-event-intake-form input[type='text'],
  .ar-hud-event-intake-form input[type='date'],
  .ar-hud-event-intake-form input[type='email'],
  .ar-hud-event-intake-form input[type='tel'] {
    min-height: 48px;
    font-size: 0.95rem;
  }

  .ar-hud-event-intake-checkbox {
    min-height: 0;
  }
}

body.ar-hud-event-mode .ar-hud-root {
  padding: 0;
}

body.ar-hud-event-mode .ar-hud-footer,
body.ar-hud-event-mode .ar-hud-gesture-toast,
body.ar-hud-event-mode [data-hud-gesture-status],
body.ar-hud-event-mode [data-hud-hand-toggle] {
  display: none;
}

.ar-hud-zoom {
  position: absolute;
  inset: 0;
  transform: translate(var(--hud-zoom-x, 0px), var(--hud-zoom-y, 0px)) scale(var(--hud-zoom, 1));
  transform-origin: 0 0;
  transition: transform 160ms ease;
  touch-action: none;
}

.ar-hud-zoom video,
.ar-hud-zoom canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ar-hud-ar-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.ar-hud-ar-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(var(--rgb-bg) / 0.28);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
  z-index: 18;
}

.ar-hud-ar-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.ar-hud-ar-ribbon {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  max-width: min(62vw, 640px);
  padding: 0.45rem 0.6rem;
  border-radius: 0.9rem;
  background: rgb(var(--rgb-bg) / 0.65);
  border: 1px solid rgb(var(--rgb-border) / 0.55);
  box-shadow: 0 16px 36px rgb(var(--rgb-overlay) / 0.35);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  z-index: 10;
}

.ar-hud-ar-recommend {
  position: absolute;
  max-width: 300px;
  background: rgb(var(--rgb-surface) / 0.8);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 40px rgb(var(--rgb-overlay) / 0.45);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 10;
}

.ar-hud-ar-detail {
  position: absolute;
  max-width: 300px;
  background: rgb(var(--rgb-bg) / 0.82);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 18px 40px rgb(var(--rgb-overlay) / 0.45);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 10;
}

.ar-hud-event-focus {
  position: absolute;
  top: calc(5.6rem + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  min-width: 240px;
  max-width: min(300px, 34vw);
  background:
    linear-gradient(180deg, rgb(var(--rgb-bg) / 0.94), rgb(var(--rgb-surface) / 0.8)),
    radial-gradient(circle at 100% 0%, rgb(var(--rgb-info) / 0.18), transparent 52%);
  border: 1px solid rgb(var(--rgb-info) / 0.26);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  box-shadow:
    0 24px 48px rgb(var(--rgb-overlay) / 0.48),
    inset 0 1px 0 rgb(var(--rgb-text) / 0.05);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 10;
}

.ar-hud-event-focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.ar-hud-event-focus h3 {
  margin: 0.2rem 0 0;
  font-size: 1.02rem;
  color: rgb(var(--rgb-text));
}

.ar-hud-event-focus-band {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(var(--rgb-info) / 0.16), rgb(var(--rgb-accent) / 0.16));
  border: 1px solid rgb(var(--rgb-info) / 0.28);
  color: rgb(var(--rgb-text) / 0.9);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ar-hud-event-focus-score {
  margin-top: 0.7rem;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  color: rgb(var(--rgb-text));
}

.ar-hud-event-domain-stack {
  position: absolute;
  top: calc(12.6rem + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  width: min(336px, 31vw);
  max-height: min(63vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.82rem 0.82rem 0.88rem;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgb(var(--rgb-bg) / 0.94), rgb(var(--rgb-surface) / 0.78)),
    radial-gradient(circle at 100% 0%, rgb(var(--rgb-accent) / 0.14), transparent 55%);
  border: 1px solid rgb(var(--rgb-accent) / 0.24);
  box-shadow:
    0 24px 48px rgb(var(--rgb-overlay) / 0.42),
    inset 0 1px 0 rgb(var(--rgb-text) / 0.05);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  z-index: 10;
}

.ar-hud-event-domain-head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ar-hud-event-domain-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: rgb(var(--rgb-text-2) / 0.86);
}

.ar-hud-event-domain-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--rgb-info) / 0.2);
  background: linear-gradient(135deg, rgb(var(--rgb-surface) / 0.32), rgb(var(--rgb-bg) / 0.26));
}

.ar-hud-event-domain-list {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.ar-hud-event-domain-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.8rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--rgb-border) / 0.36);
  background: linear-gradient(135deg, rgb(var(--rgb-surface) / 0.2), rgb(var(--rgb-bg) / 0.26));
  color: rgb(var(--rgb-text));
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ar-hud-event-domain-item:hover {
  border-color: rgb(var(--rgb-info) / 0.45);
  box-shadow: 0 12px 24px rgb(var(--rgb-overlay) / 0.22);
  transform: translateX(2px);
}

.ar-hud-event-domain-item.active {
  border-color: rgb(var(--rgb-info) / 0.78);
  background: linear-gradient(135deg, rgb(var(--rgb-info) / 0.16), rgb(var(--rgb-accent) / 0.12));
  box-shadow:
    0 0 0 1px rgb(var(--rgb-info) / 0.24),
    0 16px 30px rgb(var(--rgb-overlay) / 0.26);
}

.ar-hud-event-domain-item-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgb(var(--rgb-text));
}

.ar-hud-event-domain-item-band {
  font-size: 0.65rem;
  color: rgb(var(--rgb-text-2) / 0.88);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ar-hud-event-domain-item-score {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgb(var(--rgb-text));
}

.ar-hud-event-focus[data-band-tone="none"] {
  border-color: rgb(var(--rgb-success) / 0.28);
}

.ar-hud-event-focus[data-band-tone="mild"] {
  border-color: rgb(var(--rgb-success-2) / 0.34);
}

.ar-hud-event-focus[data-band-tone="moderate"] {
  border-color: rgb(var(--rgb-accent) / 0.36);
}

.ar-hud-event-focus[data-band-tone="severe"] {
  border-color: rgb(var(--rgb-warning) / 0.42);
}

.ar-hud-event-focus[data-band-tone="very-significant"] {
  border-color: rgb(var(--rgb-danger) / 0.42);
}

.ar-hud-event-domain-item[data-band-tone="none"] {
  border-color: rgb(var(--rgb-success) / 0.24);
}

.ar-hud-event-domain-item[data-band-tone="mild"] {
  border-color: rgb(var(--rgb-success-2) / 0.3);
}

.ar-hud-event-domain-item[data-band-tone="moderate"] {
  border-color: rgb(var(--rgb-accent) / 0.32);
}

.ar-hud-event-domain-item[data-band-tone="severe"] {
  border-color: rgb(var(--rgb-warning) / 0.34);
}

.ar-hud-event-domain-item[data-band-tone="very-significant"] {
  border-color: rgb(var(--rgb-danger) / 0.36);
}

.ar-hud-ar-detail-body {
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgb(var(--rgb-text-2) / 0.92);
}

.ar-hud-ar-detail-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ar-hud-ar-recommend.pos-tr {
  top: calc(12px + env(safe-area-inset-top));
  right: calc(5.8rem + env(safe-area-inset-right));
}

.ar-hud-ar-recommend.pos-tl {
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
}

.ar-hud-ar-recommend.pos-br {
  bottom: calc(12px + env(safe-area-inset-bottom));
  right: calc(5.8rem + env(safe-area-inset-right));
}

.ar-hud-ar-recommend.pos-bl {
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
}

.ar-hud-ar-detail.pos-tr {
  top: calc(12px + env(safe-area-inset-top));
  right: calc(5.8rem + env(safe-area-inset-right));
}

.ar-hud-ar-detail.pos-tl {
  top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
}

.ar-hud-ar-detail.pos-br {
  bottom: calc(12px + env(safe-area-inset-bottom));
  right: calc(5.8rem + env(safe-area-inset-right));
}

.ar-hud-ar-detail.pos-bl {
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
}

.ar-hud-ar-recommend h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.95rem;
}

.ar-hud-ar-reason {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  color: rgb(var(--rgb-text-2) / 0.85);
}

.ar-hud-ar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ar-hud-ar-rail {
  position: absolute;
  top: 50%;
  right: calc(12px + env(safe-area-inset-right));
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2rem;
  pointer-events: auto;
  z-index: 10;
}

body.ar-hud-panels-open .ar-hud-ar-rail {
  pointer-events: none;
  opacity: 0.28;
}

body.ar-hud-modal-open .ar-hud-ar-rail {
  pointer-events: none;
  opacity: 0.28;
}

.ar-hud-ar-rail.left {
  right: auto;
  left: calc(12px + env(safe-area-inset-left));
}

.ar-hud-rail-btn {
  border-radius: 999px;
  width: max-content;
  padding: 0.75rem 1.45rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.7);
  color: rgb(var(--rgb-text-2));
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ar-hud-ar-drawer {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  width: min(320px, 92vw);
  max-height: calc(100% - (24px + env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  background: rgb(var(--rgb-surface) / 0.85);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1rem;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: auto;
  transition:
    transform 220ms ease,
    opacity 180ms ease;
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 22;
}

.ar-hud-ar-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ar-hud-ar-booking {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  width: min(440px, 92vw);
  max-height: calc(100% - (24px + env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  background: rgb(var(--rgb-surface) / 0.9);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1rem;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: auto;
  transition:
    transform 240ms ease,
    opacity 180ms ease;
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 22;
}

.ar-hud-ar-booking.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ar-hud-booking-content {
  font-size: 0.86rem;
  color: rgb(var(--rgb-text-2) / 0.92);
}

.ar-hud-booking-mode {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.ar-hud-booking-mode .ar-hud-btn {
  flex: 1;
  min-width: 140px;
}

.ar-hud-booking-slot {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  background: rgb(var(--rgb-bg) / 0.55);
}

.ar-hud-booking-slot strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.ar-hud-booking-times {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.8rem;
}

.ar-hud-booking-day h4 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgb(var(--rgb-text-2) / 0.9);
}

.ar-hud-booking-time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ar-hud-booking-time {
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.6);
  color: rgb(var(--rgb-text-2) / 0.95);
  font-size: 0.78rem;
  cursor: pointer;
}

.ar-hud-booking-time.active {
  border-color: rgb(var(--rgb-success-2) / 0.8);
  box-shadow: 0 0 0 2px rgb(var(--rgb-success-2) / 0.22);
}

.ar-hud-booking-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.ar-hud-booking-actions .ar-hud-btn {
  flex: 1;
  min-width: 160px;
}

.ar-hud-ar-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ar-hud-ar-chips {
  position: absolute;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: min(50vw, 520px);
  padding: 0.35rem 0.5rem;
  border-radius: 0.9rem;
  background: rgb(var(--rgb-bg) / 0.55);
  border: 1px solid rgb(var(--rgb-border) / 0.5);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.ar-hud-ar-chips.right {
  left: auto;
  right: calc(12px + env(safe-area-inset-right));
}

.ar-hud-ar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.75);
  color: rgb(var(--rgb-text-2) / 0.9);
  font-size: 0.7rem;
  cursor: pointer;
}

.ar-hud-ar-chip.active {
  border-color: rgb(var(--rgb-success-2) / 0.75);
  color: rgb(var(--rgb-success) / 0.95);
}

.ar-hud-ar-chip.selected {
  border-color: rgb(var(--rgb-info) / 0.9);
  box-shadow: 0 0 0 1px rgb(var(--rgb-info) / 0.3);
}

.ar-hud-ar-chip-score {
  font-weight: 700;
  color: rgb(var(--rgb-text));
}

.ar-hud-ar-timeline {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: min(280px, 34vw);
  display: none;
  background: rgb(var(--rgb-bg) / 0.65);
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  border-radius: 0.9rem;
  padding: 0.7rem 0.85rem;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: auto;
}

.ar-hud-ar-timeline-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgb(var(--rgb-text-muted) / 0.9);
}

.ar-hud-ar-timeline-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}

.ar-hud-ar-timeline-thumbs img {
  width: 44px;
  height: 44px;
  border-radius: 0.6rem;
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  object-fit: cover;
  cursor: pointer;
}

.ar-hud-ar-timeline-thumbs img.active {
  border-color: rgb(var(--rgb-success-2) / 0.9);
}

.ar-hud-ar-gate {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  bottom: auto;
  width: min(240px, 70vw);
  background: rgb(var(--rgb-surface) / 0.7);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 0.9rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: 0 16px 32px rgb(var(--rgb-overlay) / 0.35);
  pointer-events: none;
}

body.ar-hud-event-mode .ar-hud-ar-gate {
  background: rgb(var(--event-ui-panel) / 0.9);
  border: 1px solid rgb(var(--event-ui-border) / 0.5);
  color: rgb(var(--event-ui-ink));
  box-shadow: 0 12px 28px rgb(31 37 43 / 0.18);
}

body.ar-hud-event-mode .ar-hud-ar-gate span {
  color: rgb(var(--event-ui-text-muted));
}

.ar-hud-ar-onboard {
  position: absolute;
  top: auto;
  bottom: 3.6rem;
  left: 1rem;
  transform: translate(0, 0);
  max-width: min(320px, 42vw);
  background: rgb(var(--rgb-bg) / 0.85);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1rem;
  padding: 0.9rem 1.2rem;
  text-align: left;
  font-size: 0.78rem;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: auto;
}

.ar-hud-gesture-toast {
  position: absolute;
  left: 1rem;
  bottom: 3.6rem;
  max-width: min(320px, 46vw);
  padding: 0.55rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--rgb-info) / 0.5);
  background: rgb(var(--rgb-bg) / 0.8);
  color: rgb(var(--rgb-text-2) / 0.95);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 28px rgb(var(--rgb-surface) / 0.45);
  backdrop-filter: blur(10px);
  pointer-events: none;
  white-space: pre-line;
}

.ar-hud-event-analysis-toast {
  position: absolute;
  left: 1.2rem;
  bottom: 1.6rem;
  width: min(320px, 56vw);
  padding: 0.72rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--rgb-info) / 0.65);
  background:
    radial-gradient(circle at 12% 20%, rgb(var(--event-ui-glow) / 0.18), transparent 42%),
    linear-gradient(135deg, rgb(var(--rgb-bg) / 0.78), rgb(var(--rgb-bg) / 0.46));
  color: rgb(var(--rgb-text-2) / 0.92);
  box-shadow:
    0 20px 44px rgb(var(--rgb-overlay) / 0.45),
    inset 0 0 0 1px rgb(var(--rgb-info) / 0.18);
  pointer-events: none;
  overflow: hidden;
  backdrop-filter: blur(12px) saturate(130%);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 260ms ease, transform 260ms ease;
  display: none;
  z-index: 26;
}

/* Event kiosk enhancements */
body.ar-hud-event-mode {
  --event-ui-accent: 79 109 138; /* #4F6D8A */
  --event-ui-accent-strong: 46 74 98; /* #2E4A62 */
  --event-ui-glow: 76 167 163; /* #4CA7A3 */
  --event-ui-border: 79 109 138; /* #4F6D8A */
  --event-ui-ink: 31 37 43; /* #1F252B */
  --event-ui-panel: 246 246 244; /* #F6F6F4 */
  --event-ui-text-muted: 110 106 101; /* #6E6A65 */
  --event-ui-cta: 242 167 102; /* #F2A766 */
  --event-ui-cta-strong: 226 133 72; /* #E28548 */
  --event-ui-cta-ink: 31 37 43; /* #1F252B */
  --event-ui-accent-gold: 198 168 90; /* #C6A85A */
  --rgb-danger: 198 168 90;
  --rgb-info: 46 74 98;
  background-color: #F6F6F4;
  color: #1F252B;
}

body.ar-hud-event-mode[data-event-theme="holo"] {
  --event-ui-accent: 76 167 163; /* #4CA7A3 */
  --event-ui-accent-strong: 46 74 98; /* #2E4A62 */
  --event-ui-glow: 76 167 163; /* #4CA7A3 */
  --event-ui-border: 79 109 138; /* #4F6D8A */
  --event-ui-ink: 31 37 43; /* #1F252B */
  --event-ui-panel: 246 246 244; /* #F6F6F4 */
  --event-ui-text-muted: 110 106 101; /* #6E6A65 */
  --event-ui-cta: 242 167 102; /* #F2A766 */
  --event-ui-cta-strong: 226 133 72; /* #E28548 */
  --event-ui-cta-ink: 31 37 43; /* #1F252B */
  --event-ui-accent-gold: 198 168 90; /* #C6A85A */
}

body.ar-hud-event-mode .ar-hud-footer {
  display: block !important;
  pointer-events: none;
}

body.ar-hud-event-mode .ar-hud-mobile-sheet {
  display: none !important;
}

body.ar-hud-event-mode .ar-hud-video-wrap {
  border-color: rgb(var(--event-ui-border) / 0.55);
  box-shadow: 0 26px 64px rgb(31 37 43 / 0.2);
}

body.ar-hud-event-mode .ar-hud-video-wrap::before {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border-radius: 1.35rem;
  border: 1px solid rgb(var(--event-ui-border) / 0.5);
  box-shadow: 0 0 35px rgb(var(--event-ui-glow) / 0.22), inset 0 0 0 1px rgb(255 255 255 / 0.4);
  pointer-events: none;
  z-index: 2;
}

body.ar-hud-event-mode .ar-hud-video-wrap::after {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 20% 20%, rgb(var(--event-ui-glow) / 0.2), transparent 55%),
    linear-gradient(120deg, transparent 0%, rgb(var(--event-ui-glow) / 0.2) 45%, transparent 65%);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: event-holo-scan 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

body.ar-hud-event-mode .drsknn-theme-toggle {
  display: none !important;
}

body.ar-hud-event-mode .ar-hud-ar-ribbon {
  background: rgb(var(--event-ui-panel) / 0.72);
  border: 1px solid rgb(var(--event-ui-border) / 0.45);
  box-shadow: 0 14px 32px rgb(6 18 36 / 0.18);
  backdrop-filter: blur(12px) saturate(140%);
}

body.ar-hud-event-mode .ar-hud-chip {
  background: rgb(255 255 255 / 0.78);
  border: 1px solid rgb(var(--event-ui-border) / 0.4);
  color: rgb(var(--event-ui-ink) / 0.85);
}

body.ar-hud-event-mode .ar-hud-chip.accent {
  border-color: rgb(var(--event-ui-accent) / 0.6);
  color: rgb(var(--event-ui-accent));
  background: rgb(var(--event-ui-panel) / 0.9);
}

body.ar-hud-event-mode .ar-hud-label {
  color: rgb(var(--event-ui-text-muted) / 0.95);
}

body.ar-hud-event-mode .ar-hud-metric-label {
  color: rgb(var(--event-ui-text-muted) / 0.95);
}

body.ar-hud-event-mode .ar-hud-metric-value {
  color: rgb(var(--event-ui-ink));
}

body.ar-hud-event-mode .ar-hud-summary,
body.ar-hud-event-mode .ar-hud-ar-detail-body,
body.ar-hud-event-mode .ar-hud-ar-reason,
body.ar-hud-event-mode .ar-hud-detail,
body.ar-hud-event-mode .ar-hud-detail-actions {
  color: rgb(var(--event-ui-text-muted));
}

body.ar-hud-event-mode .ar-hud-ar-detail h3,
body.ar-hud-event-mode .ar-hud-ar-recommend h3 {
  color: rgb(var(--event-ui-ink));
}

body.ar-hud-event-mode .ar-hud-disclaimer {
  color: rgb(var(--event-ui-text-muted));
  background: rgb(var(--event-ui-panel) / 0.85);
  border-color: rgb(var(--event-ui-border) / 0.45);
}

body.ar-hud-event-mode .ar-hud-ar-recommend,
body.ar-hud-event-mode .ar-hud-ar-detail {
  background: rgb(var(--event-ui-panel) / 0.82);
  border: 1px solid rgb(var(--event-ui-border) / 0.45);
  box-shadow: 0 18px 44px rgb(6 18 36 / 0.22);
  backdrop-filter: blur(14px);
}

body.ar-hud-event-mode .ar-hud-event-focus {
  background: rgb(var(--event-ui-panel) / 0.82);
  border: 1px solid rgb(var(--event-ui-border) / 0.45);
  box-shadow: 0 18px 44px rgb(6 18 36 / 0.22);
  backdrop-filter: blur(14px);
}

body.ar-hud-event-mode .ar-hud-event-domain-stack {
  background: rgb(var(--event-ui-panel) / 0.82);
  border: 1px solid rgb(var(--event-ui-border) / 0.45);
  box-shadow: 0 18px 44px rgb(6 18 36 / 0.22);
  backdrop-filter: blur(14px);
}

body.ar-hud-event-mode .ar-hud-event-focus h3,
body.ar-hud-event-mode .ar-hud-event-focus-band,
body.ar-hud-event-mode .ar-hud-event-focus-score {
  color: rgb(var(--event-ui-ink));
}

body.ar-hud-event-mode .ar-hud-event-domain-summary,
body.ar-hud-event-mode .ar-hud-event-domain-item-band {
  color: rgb(var(--event-ui-text-muted));
}

body.ar-hud-event-mode .ar-hud-event-domain-summary span,
body.ar-hud-event-mode .ar-hud-event-domain-item {
  border-color: rgb(var(--event-ui-border) / 0.45);
  background: rgb(var(--event-ui-panel) / 0.28);
}

body.ar-hud-event-mode .ar-hud-event-domain-item-name,
body.ar-hud-event-mode .ar-hud-event-domain-item-score {
  color: rgb(var(--event-ui-ink));
}

body.ar-hud-event-stage-only .ar-hud-topbar,
body.ar-hud-event-stage-only .ar-hud-gutter-left,
body.ar-hud-event-stage-only .ar-hud-gutter-right,
body.ar-hud-event-stage-only .ar-hud-mobile-sheet,
body.ar-hud-event-stage-only [data-hud-event-results],
body.ar-hud-event-stage-only [data-hud-event-panel-toggle],
body.ar-hud-event-stage-only .ar-hud-ar-chips {
  display: none !important;
}

body.ar-hud-event-stage-only .ar-hud-root {
  padding: 0;
  gap: 0;
}

body.ar-hud-event-stage-only .ar-hud-shell {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body.ar-hud-event-stage-only .ar-hud-stage {
  height: 100%;
  align-items: stretch;
  justify-content: stretch;
  min-height: 0;
}

body.ar-hud-event-stage-only .ar-hud-video-wrap {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  border: 0;
  aspect-ratio: auto;
}

body.ar-hud-event-stage-only .ar-hud-ar-recommend {
  max-width: min(320px, 26vw);
}

body.ar-hud-event-stage-only .ar-hud-ar-detail {
  max-width: min(320px, 26vw);
}

body.ar-hud-event-stage-only .ar-hud-event-focus {
  background: linear-gradient(180deg, rgb(20 31 49 / 0.92), rgb(24 40 61 / 0.86));
  border-color: rgb(179 205 236 / 0.18);
  box-shadow: 0 18px 44px rgb(2 10 24 / 0.45);
}

body.ar-hud-event-stage-only .ar-hud-ar-gate {
  display: none !important;
}

body.ar-hud-event-stage-only .ar-hud-event-focus .ar-hud-label,
body.ar-hud-event-stage-only .ar-hud-event-focus h3,
body.ar-hud-event-stage-only .ar-hud-event-focus-score {
  color: rgb(244 248 252 / 0.96);
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.28);
}

body.ar-hud-event-stage-only .ar-hud-event-focus-band {
  background: rgb(244 248 252 / 0.08);
  border-color: rgb(244 248 252 / 0.16);
  color: rgb(244 248 252 / 0.82);
  text-shadow: 0 1px 6px rgb(0 0 0 / 0.2);
}

body.ar-hud-event-stage-only .ar-hud-event-domain-stack {
  background: linear-gradient(180deg, rgb(20 31 49 / 0.92), rgb(24 40 61 / 0.86));
  border-color: rgb(179 205 236 / 0.18);
  box-shadow: 0 18px 44px rgb(2 10 24 / 0.45);
}

body.ar-hud-event-stage-only .ar-hud-event-domain-summary,
body.ar-hud-event-stage-only .ar-hud-event-domain-item-band {
  color: rgb(244 248 252 / 0.78);
}

body.ar-hud-event-stage-only .ar-hud-event-domain-summary span,
body.ar-hud-event-stage-only .ar-hud-event-domain-item {
  background: rgb(244 248 252 / 0.06);
  border-color: rgb(244 248 252 / 0.12);
}

body.ar-hud-event-stage-only .ar-hud-event-domain-item-name,
body.ar-hud-event-stage-only .ar-hud-event-domain-item-score {
  color: rgb(244 248 252 / 0.96);
}

body.ar-hud-event-stage-only .ar-hud-event-capture-strip {
  left: auto;
  right: calc(21.5rem + env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(210px, 24vw);
  padding: 0.65rem;
}

body.ar-hud-event-stage-only .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

body.ar-hud-event-stage-only .ar-hud-event-capture-strip .ar-hud-capture-previews > div:last-child {
  grid-column: 1 / -1;
}

body.ar-hud-event-stage-only .ar-hud-event-capture-strip .ar-hud-capture-previews img {
  height: 64px;
}

body.ar-hud-event-results-stage .ar-hud-help-chip,
body.ar-hud-event-results-stage .ar-hud-ui-pill,
body.ar-hud-event-results-stage .ar-hud-guidance,
body.ar-hud-event-results-stage .ar-hud-gesture-toast,
body.ar-hud-event-results-stage .ar-hud-event-analysis-toast,
body.ar-hud-event-results-stage .ar-hud-live-toggle,
body.ar-hud-event-results-stage [data-hud-gesture-status] {
  display: none !important;
}

body.ar-hud-event-results-stage #ar-hud-video,
body.ar-hud-event-results-stage #ar-hud-overlay,
body.ar-hud-event-results-stage #ar-hud-hit {
  opacity: 0;
  pointer-events: none;
}

body.ar-hud-event-results-stage .ar-hud-event-stage-still {
  display: block;
}

body.ar-hud-event-results-stage .ar-hud-video-wrap::after {
  opacity: 0.2;
}

body.ar-hud-event-results-stage .ar-hud-rail-btn[data-hud-rail-action="fullscreen"],
body.ar-hud-event-results-stage .ar-hud-rail-btn[data-hud-rail-action="snapshot"],
body.ar-hud-event-results-stage .ar-hud-rail-btn[data-hud-rail-action="exit"] {
  display: none !important;
}

body.ar-hud-event-results-stage .ar-hud-ar-rail,
body.ar-hud-event-results-stage .ar-hud-ar-rail.left {
  left: auto;
  right: calc(12px + env(safe-area-inset-right));
  align-items: flex-end;
}

body.ar-hud-event-results-stage .ar-hud-event-focus,
body.ar-hud-event-results-stage .ar-hud-event-domain-stack,
body.ar-hud-event-results-stage .ar-hud-ar-detail,
body.ar-hud-event-results-stage .ar-hud-event-capture-strip {
  background: linear-gradient(180deg, rgb(18 28 44 / 0.9), rgb(22 35 54 / 0.84));
  border-color: rgb(179 205 236 / 0.16);
  box-shadow: 0 22px 48px rgb(2 10 24 / 0.42);
}

body.ar-hud-event-results-stage .ar-hud-event-capture-strip {
  width: min(320px, 34vw);
  padding: 0.9rem;
}

body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child {
  grid-column: 1 / -1;
}

body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews img {
  height: 92px;
}

body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child img {
  height: 180px;
}

body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews > div {
  color: rgb(244 248 252 / 0.9);
}

body.ar-hud-event-mode .ar-hud-event-toolbar,
body.ar-hud-event-mode .ar-hud-controls,
body.ar-hud-event-mode .ar-hud-snapshot-panel,
body.ar-hud-event-mode .ar-hud-help-chip,
body.ar-hud-event-mode .ar-hud-toolbar,
body.ar-hud-event-mode .ar-hud-capture-panel,
body.ar-hud-event-mode [data-event-hide-control="1"] {
  display: none !important;
}

body.ar-hud-event-mode [data-hud-gesture-status],
body.ar-hud-event-mode [data-hud-hand-toggle],
body.ar-hud-event-mode .ar-hud-hand-toggle,
body.ar-hud-event-mode .ar-hud-live-toggle,
body.ar-hud-event-mode [data-hud-live-toggle],
body.ar-hud-event-mode .ar-hud-gesture-toast,
body.ar-hud-event-mode .ar-hud-live-chip {
  display: none !important;
}

.ar-hud-event-scan-cta {
  position: fixed;
  display: block;
  left: 50%;
  bottom: max(3.2rem, env(safe-area-inset-bottom) + 1.2rem);
  transform: translateX(-50%);
  z-index: 70;
  min-width: 320px;
  min-height: 76px;
  width: min(86vw, 420px);
  border: none;
  outline: none;
  border-radius: 999px;
  padding: 1rem 1.75rem;
  background:
    linear-gradient(135deg, rgb(var(--event-ui-cta)) 0%, rgb(var(--event-ui-cta-strong)) 100%);
  border: 1px solid rgb(var(--event-ui-cta-strong) / 0.7);
  color: rgb(var(--event-ui-cta-ink));
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow:
    0 18px 35px rgb(var(--event-ui-cta) / 0.35),
    inset 0 -3px 0 rgb(var(--event-ui-cta-strong) / 0.3),
    inset 0 0 0 1px rgb(255 255 255 / 0.25);
  text-shadow: 0 0 12px rgb(255 255 255 / 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
}

body.ar-hud-event-mode .ar-hud-event-intake:not([hidden]) ~ .ar-hud-event-scan-cta {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px) scale(0.98);
}

body.ar-hud-event-mode .ar-hud-event-intake:not([hidden]) ~ .ar-hud-ar-overlay,
body.ar-hud-event-mode .ar-hud-event-intake:not([hidden]) ~ .ar-hud-guidance,
body.ar-hud-event-mode .ar-hud-event-intake:not([hidden]) ~ .ar-hud-help-chip,
body.ar-hud-event-mode .ar-hud-event-intake:not([hidden]) ~ .ar-hud-ui-pill,
body.ar-hud-event-mode .ar-hud-event-intake:not([hidden]) ~ .ar-hud-event-analysis-toast {
  display: none !important;
}

.ar-hud-event-scan-cta::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1px solid rgb(var(--event-ui-cta) / 0.55);
  opacity: 0.6;
  animation: scan-cta-pulse 2.8s ease-in-out infinite;
}

.ar-hud-event-scan-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, transparent 15%, rgb(255 255 255 / 0.45), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: scan-cta-sweep 3.2s linear infinite;
}

.ar-hud-event-scan-cta > * {
  position: relative;
  z-index: 2;
}

.ar-hud-event-scan-cta:hover,
.ar-hud-event-scan-cta:focus-visible {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 22px 42px rgb(var(--event-ui-cta) / 0.45), inset 0 -4px 0 rgb(var(--event-ui-cta-strong) / 0.25);
}

.ar-hud-event-scan-cta:active {
  transform: translateX(-50%) scale(0.99);
}

.ar-hud-event-scan-cta[disabled] {
  opacity: 0.65;
  pointer-events: none;
}

.ar-hud-event-scan-cta .ar-hud-scan-caption {
  display: block;
  font-size: 0.66rem;
  margin-top: 0.2rem;
  opacity: 0.85;
  color: rgb(var(--event-ui-cta-ink));
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}

@keyframes scan-cta-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

@keyframes scan-cta-sweep {
  0% { transform: translateX(-60%); }
  100% { transform: translateX(60%); }
}

.ar-hud-event-settings-fab {
  position: fixed !important;
  left: 0.9rem !important;
  top: calc(12px + env(safe-area-inset-top)) !important;
  z-index: 75 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border-color: rgb(var(--event-ui-accent) / 0.5) !important;
  box-shadow: 0 12px 22px rgb(var(--event-ui-accent) / 0.25);
  pointer-events: auto !important;
}

.ar-hud-event-settings-fab-button {
  background: rgb(255 255 255 / 0.82);
  color: rgb(var(--event-ui-ink));
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid rgb(var(--event-ui-border) / 0.6);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.6);
}

.ar-hud-event-settings-fab-button:active {
  transform: scale(0.96);
}

body.ar-hud-event-mode .ar-hud-ar-drawer {
  z-index: 90;
}

body.ar-hud-event-mode .ar-hud-event-analysis-toast {
  width: min(86vw, 560px);
  min-height: 140px;
  padding: 1.2rem 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid rgb(var(--event-ui-border) / 0.5);
  box-shadow: 0 22px 55px rgb(31 37 43 / 0.18);
  background:
    radial-gradient(circle at 50% -40%, rgb(var(--event-ui-glow) / 0.2), rgb(var(--event-ui-panel) / 0.9) 70%),
    linear-gradient(160deg, rgb(var(--event-ui-panel) / 0.95), rgb(var(--event-ui-panel) / 0.86));
  backdrop-filter: blur(8px);
  color: rgb(var(--event-ui-ink));
}

body.ar-hud-event-mode .ar-hud-event-analysis-toast.ar-hud-event-analysis-toast--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  display: none;
}

body.ar-hud-event-mode .ar-hud-event-analysis-toast.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

body.ar-hud-event-mode .ar-hud-event-analysis-toast .ar-hud-toast-orbit,
body.ar-hud-event-mode .ar-hud-event-analysis-toast .ar-hud-toast-sweep,
body.ar-hud-event-mode .ar-hud-event-analysis-toast .ar-hud-toast-grid {
  animation-duration: 1.6s !important;
}

.ar-hud-event-domain-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.ar-hud-event-domain-pills button {
  border: 1px solid rgb(var(--event-border) / 0.6);
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  font-size: 0.78rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.95), rgb(232 246 255 / 0.9));
  color: rgb(var(--event-ink-soft));
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px rgb(12 41 86 / 0.12);
  cursor: pointer;
}

.ar-event-email-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.ar-event-email-shortcuts button {
  border: 1px solid rgb(var(--event-border) / 0.6);
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  font-size: 0.78rem;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.95), rgb(232 246 255 / 0.9));
  color: rgb(var(--event-ink-soft));
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px rgb(12 41 86 / 0.12);
  cursor: pointer;
}

.ar-hud-event-analysis-toast[data-phase="done"] {
  opacity: 0.9;
}

.ar-hud-event-metric-learn {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(32, 94, 178, 0.2);
  padding-top: 0.7rem;
}

.ar-hud-event-metric-learn h4 {
  margin: 0;
  font-size: 0.85rem;
  color: #e8f4ff;
}

.ar-hud-event-metric-learn p {
  margin: 0.35rem 0 0;
  color: #d6e5ff;
  line-height: 1.45;
}

.ar-hud-event-metric-learn a {
  color: #7fd3ff;
}

.ar-event-metric-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 12, 28, 0.58);
  z-index: 1450;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.ar-event-metric-modal--hidden {
  display: none;
}

.ar-event-metric-modal__card {
  width: min(92vw, 420px);
  border-radius: 16px;
  border: 1px solid rgb(var(--event-ui-border) / 0.5);
  background: linear-gradient(158deg, rgb(var(--event-ui-panel) / 0.98), rgb(var(--event-ui-panel) / 0.92));
  color: rgb(var(--event-ui-ink));
  padding: 1rem 1rem 1.05rem;
  box-shadow: 0 20px 56px rgb(31 37 43 / 0.2);
}

.ar-event-metric-modal__close {
  float: right;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgb(var(--event-ui-border) / 0.55);
  background: rgb(var(--event-ui-panel) / 0.92);
  color: rgb(var(--event-ui-ink));
  font-size: 1.2rem;
}

.ar-event-metric-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.06rem;
}

.ar-event-metric-modal__score {
  margin: 0 0 0.45rem;
  color: rgb(var(--event-ui-accent));
}

.ar-event-metric-modal__description {
  margin: 0;
  color: rgb(var(--event-ui-text-muted));
  line-height: 1.4;
}

.ar-hud-event-analysis-toast.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ar-hud-event-analysis-toast .analysis-orbital-ring {
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  top: 0.45rem;
  right: 0.55rem;
  border: 1px solid rgb(var(--rgb-info) / 0.65);
  border-top-color: rgb(var(--event-ui-glow) / 0.95);
  box-shadow: 0 0 16px rgb(var(--event-ui-glow) / 0.36);
  animation: analysis-orbit 1.8s linear infinite;
}

.ar-hud-event-analysis-toast .analysis-scanline {
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  top: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgb(var(--event-ui-glow) / 0.95), transparent);
  filter: drop-shadow(0 0 10px rgb(var(--event-ui-glow) / 0.65));
  animation: analysis-scanline 2s linear infinite;
}

.ar-hud-event-analysis-toast .analysis-grid {
  position: absolute;
  inset: 0.35rem;
  border: 1px dashed rgb(var(--rgb-info) / 0.4);
  border-radius: 0.7rem;
  opacity: 0.55;
  transform: perspective(160px) rotateX(19deg);
  background-image:
    linear-gradient(90deg, rgb(var(--event-ui-glow) / 0.12) 1px, transparent 1px),
    linear-gradient(rgb(var(--event-ui-glow) / 0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  mix-blend-mode: screen;
  animation: analysis-grid-flicker 1.4s steps(6) infinite;
}

.ar-hud-event-analysis-toast .analysis-bands {
  position: absolute;
  inset: 0.45rem 0.62rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ar-hud-event-analysis-toast .analysis-bands i {
  display: block;
  height: 2px;
  border-radius: 999px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgb(var(--event-ui-glow) / 0.75), transparent);
  opacity: 0.25;
  animation: analysis-band 1.25s ease-in-out infinite;
}

.ar-hud-event-analysis-toast .analysis-bands i:nth-child(2) { animation-delay: 0.2s; width: 72%; }
.ar-hud-event-analysis-toast .analysis-bands i:nth-child(3) { animation-delay: 0.5s; width: 86%; }

.ar-hud-event-analysis-toast .analysis-fallback-label {
  position: relative;
  margin: 0;
  color: rgb(var(--event-ui-accent));
  font-size: 0.72rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.26em;
  text-shadow: 0 0 12px rgb(var(--event-ui-glow) / 0.6);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1rem;
}

.ar-hud-event-toast-subtext {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: rgb(var(--event-ui-text-muted));
}

@keyframes analysis-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes analysis-scanline {
  0%, 100% { top: 12%; opacity: 0; }
  10% { opacity: 1; }
  50% { opacity: 0.9; }
  65% { opacity: 0.05; }
}

@keyframes analysis-grid-flicker {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.14; }
  75% { opacity: 0.5; }
}

@keyframes analysis-band {
  0%, 100% { transform: translateX(0); opacity: 0.16; }
  50% { transform: translateX(8px); opacity: 0.42; }
}

.ar-hud-ui-pill {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.8);
  color: rgb(var(--rgb-text-2));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  pointer-events: auto;
}

.ar-hud-help-chip {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.7);
  color: rgb(var(--rgb-text-2));
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
}

.ar-hud-guard {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.6rem;
  background: rgb(var(--rgb-bg) / 0.78);
  backdrop-filter: blur(8px);
  text-align: center;
}

.ar-hud-guard[hidden] {
  display: none;
}

.ar-hud-guard-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgb(var(--rgb-text));
}

.ar-hud-guard-body {
  margin: 0;
  font-size: 0.9rem;
  color: rgb(var(--rgb-text-muted) / 0.95);
}

.ar-hud-guard .ar-hud-btn {
  align-self: center;
}

.ar-hud-guard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

#ar-hud-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1);
}

.ar-hud-event-stage-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 1;
  pointer-events: none;
}

#ar-hud-overlay,
#ar-hud-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#ar-hud-overlay {
  pointer-events: none;
}

#ar-hud-hit {
  pointer-events: auto;
  background: transparent;
}

.ar-hud-guidance {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  max-width: 60%;
  padding: 0.45rem 0.7rem;
  background: rgb(var(--rgb-bg) / 0.65);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 0.9rem;
  font-size: 0.74rem;
  color: rgb(var(--rgb-text-2));
}

body.ar-hud-event-mode .ar-hud-guidance {
  left: 50%;
  bottom: auto;
  top: calc(12px + env(safe-area-inset-top));
  transform: translateX(-50%);
  max-width: min(80%, 560px);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgb(var(--event-ui-panel) / 0.8);
  border: 1px solid rgb(var(--event-ui-border) / 0.5);
  color: rgb(var(--event-ui-ink) / 0.85);
  box-shadow: 0 12px 28px rgb(6 18 36 / 0.18);
  z-index: 45;
  text-align: center;
}

.ar-hud-panel-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgb(var(--rgb-border) / 0.35);
}

.ar-hud-panel-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ar-hud-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.ar-hud-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.ar-hud-status {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.6);
}

.ar-hud-quality-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgb(var(--rgb-border) / 0.6);
  overflow: hidden;
}

.ar-hud-quality-fill {
  display: block;
  height: 100%;
  width: 10%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(var(--rgb-success-2) / 0.9), rgb(var(--rgb-success) / 0.9));
}

.ar-hud-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.ar-hud-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 0.8rem;
  font-size: 0.75rem;
}

.ar-hud-toggle-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgb(var(--rgb-text-2) / 0.85);
}

.ar-hud-toggle-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.ar-hud-select,
.ar-hud-search input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.7);
  color: rgb(var(--rgb-text-2));
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
}

.ar-hud-input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-bg) / 0.72);
  color: rgb(var(--rgb-text-2));
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
}

.ar-hud-input:focus {
  outline: none;
  border-color: rgb(var(--rgb-success-2) / 0.8);
  box-shadow: 0 0 0 2px rgb(var(--rgb-success-2) / 0.18);
}

.ar-hud-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.ar-hud-field span {
  font-size: 0.72rem;
  color: rgb(var(--rgb-text-muted) / 0.9);
}

.ar-hud-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.ar-hud-auth-actions .ar-hud-btn {
  flex: 1;
  min-width: 160px;
}

.ar-hud-form-error {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.9rem;
  border: 1px solid rgb(var(--rgb-danger) / 0.6);
  background: rgb(var(--rgb-danger) / 0.18);
  color: rgb(var(--rgb-danger) / 0.95);
  font-size: 0.82rem;
}

.ar-hud-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.ar-hud-auth-consents {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.ar-hud-auth-kb-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
}

.ar-hud-kb {
  margin-top: 0.65rem;
  padding: 0.7rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  background: rgb(var(--rgb-bg) / 0.55);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ar-hud-kb-row {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
}

.ar-hud-kb-key {
  flex: 1;
  min-width: 28px;
  border-radius: 0.75rem;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-surface) / 0.75);
  color: rgb(var(--rgb-text-2) / 0.95);
  padding: 0.46rem 0.25rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.ar-hud-kb-key.wide {
  flex: 1.6;
}

.ar-hud-kb-key.space {
  flex: 3;
}

.ar-hud-kb-key.active {
  border-color: rgb(var(--rgb-success-2) / 0.8);
  background: rgb(var(--rgb-success-2) / 0.14);
}

.ar-hud-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgb(var(--rgb-text-2) / 0.85);
}

.ar-hud-consent input {
  margin-top: 0.18rem;
}

.ar-hud-search {
  display: flex;
  gap: 0.6rem;
}

.ar-hud-search input {
  flex: 1;
}

.ar-hud-summary {
  font-size: 0.8rem;
  color: rgb(var(--rgb-text-2) / 0.85);
  line-height: 1.5;
}

.ar-hud-metric-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ar-hud-metric-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  background: rgb(var(--rgb-bg) / 0.55);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  appearance: none;
  text-align: left;
}

.ar-hud-metric-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.ar-hud-metric-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ar-hud-metric-item.active {
  border-color: rgb(var(--rgb-info) / 0.8);
  box-shadow: 0 0 0 1px rgb(var(--rgb-info) / 0.2);
}

.ar-hud-metric-item:hover {
  border-color: rgb(var(--rgb-text-muted) / 0.9);
}

.ar-hud-metric-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgb(var(--rgb-text-2));
}

.ar-hud-metric-band {
  font-size: 0.65rem;
  color: rgb(var(--rgb-text-muted) / 0.9);
}

.ar-hud-metric-score {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgb(var(--rgb-text));
}

.ar-hud-treatments {
  display: grid;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: rgb(var(--rgb-text-2) / 0.9);
}

.ar-hud-treatment-card {
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 0.9rem;
  padding: 0.7rem 0.8rem;
  background: rgb(var(--rgb-bg) / 0.55);
}

.ar-hud-treatment-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.ar-hud-treatment-meta {
  font-size: 0.7rem;
  color: rgb(var(--rgb-text-muted) / 0.8);
}

.ar-hud-treatment-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ar-hud-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ar-hud-capture-controls {
  display: grid;
  gap: 0.5rem;
}

.ar-hud-capture-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  font-size: 0.7rem;
  color: rgb(var(--rgb-text-muted) / 0.8);
}

.ar-hud-capture-slot {
  display: grid;
  gap: 0.38rem;
  align-content: start;
}

.ar-hud-capture-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 0.82rem;
  border: 1px solid rgb(var(--rgb-border) / 0.6);
  background:
    linear-gradient(180deg, rgb(var(--rgb-bg) / 0.74), rgb(var(--rgb-surface) / 0.54));
}

.ar-hud-capture-previews img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgb(var(--rgb-bg) / 0.6);
  display: block;
}

.ar-hud-capture-previews img[hidden] {
  display: none;
}

.ar-hud-capture-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgb(var(--rgb-text-muted) / 0.86);
  text-align: center;
}

.ar-hud-event-capture-strip {
  position: absolute;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2.4vw, 30px);
  z-index: 6;
  width: min(360px, calc(100% - 28px));
  padding: 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--rgb-border) / 0.45);
  background: linear-gradient(180deg, rgb(var(--rgb-surface) / 0.82), rgb(var(--rgb-bg) / 0.72));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.22);
}

.ar-hud-event-capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.ar-hud-event-capture-copy {
  margin: 0.22rem 0 0;
  font-size: 0.74rem;
  line-height: 1.42;
  color: rgb(var(--rgb-text-muted) / 0.86);
}

body:not(.ar-hud-event-results-stage) .ar-hud-event-capture-head {
  display: none;
}

.ar-hud-event-capture-strip .ar-hud-capture-previews {
  font-size: 0.68rem;
}

.ar-hud-event-capture-strip .ar-hud-capture-previews img {
  height: 100%;
}

.ar-hud-detail {
  font-size: 0.82rem;
  color: rgb(var(--rgb-text-2) / 0.9);
  line-height: 1.5;
}

.ar-hud-detail-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ar-hud-detail-actions a,
.ar-hud-detail-actions button {
  width: 100%;
  justify-content: center;
}

.ar-hud-mobile-sheet {
  display: none;
}

@media (max-width: 1100px) {
  .ar-hud-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .ar-hud-gutter-left {
    order: 0;
  }

  .ar-hud-stage {
    order: 1;
  }

  .ar-hud-event-capture-strip {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }

  .ar-hud-gutter-right {
    order: 2;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  body.ar-hud-event-mode .ar-hud-shell {
    grid-template-columns: minmax(210px, 0.9fr) minmax(0, 2.2fr) minmax(250px, 0.95fr);
    grid-template-rows: none;
  }

  body.ar-hud-event-mode .ar-hud-gutter-left,
  body.ar-hud-event-mode .ar-hud-stage,
  body.ar-hud-event-mode .ar-hud-gutter-right {
    order: initial;
  }
}

@media (max-width: 720px) {
  .ar-hud-root {
    padding: 0;
    gap: 0;
  }

  .ar-hud-topbar {
    display: none;
  }

  .ar-hud-gutter-left,
  .ar-hud-gutter-right {
    display: none;
  }

  .ar-hud-shell {
    grid-template-rows: minmax(0, 1fr);
    padding-bottom: 0;
  }

  .ar-hud-stage {
    height: var(--ar-hud-vh, 100dvh);
  }

  .ar-hud-video-wrap {
    height: var(--ar-hud-vh, 100dvh);
    border-radius: 0;
    border: none;
  }

  .ar-hud-ar-ribbon {
    top: calc(10px + env(safe-area-inset-top));
    left: calc(10px + env(safe-area-inset-left));
    max-width: min(78vw, 360px);
  }

  .ar-hud-actions {
    width: 100%;
  }

  .ar-hud-actions .ar-hud-btn,
  .ar-hud-actions a {
    flex: 1;
    justify-content: center;
  }

  .ar-hud-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ar-hud-event-intake-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .ar-hud-auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ar-hud-mobile-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(var(--rgb-bg) / 0.9);
    border-top: 1px solid rgb(var(--rgb-border) / 0.7);
    padding: 0.5rem 0.8rem calc(0.85rem + env(safe-area-inset-bottom));
    gap: 0.5rem;
    z-index: 20;
  }

  body:not(.ar-hud-immersive) .ar-hud-ar-recommend,
  body:not(.ar-hud-immersive) .ar-hud-ar-detail,
  body:not(.ar-hud-immersive) .ar-hud-ar-timeline,
  body:not(.ar-hud-immersive) .ar-hud-ar-chips,
  body:not(.ar-hud-immersive) .ar-hud-ar-rail {
    display: none;
  }

  body.ar-hud-immersive .ar-hud-ar-rail {
    gap: 0.7rem;
  }

  body.ar-hud-immersive .ar-hud-rail-btn {
    padding: 0.6rem 1.05rem;
    font-size: 0.78rem;
  }

  body.ar-hud-immersive .ar-hud-ar-recommend,
  body.ar-hud-immersive .ar-hud-ar-detail {
    max-width: min(92vw, 340px);
  }

  body.ar-hud-event-stage-only .ar-hud-event-focus {
    max-width: min(92vw, 300px);
  }

  body.ar-hud-event-stage-only .ar-hud-event-capture-strip {
    right: calc(12px + env(safe-area-inset-right));
    left: calc(12px + env(safe-area-inset-left));
    width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip {
    width: auto;
  }

  body.ar-hud-event-stage-only .ar-hud-ar-detail {
    left: calc(12px + env(safe-area-inset-left));
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: min(92vw, 320px);
  }

  body.ar-hud-event-stage-only .ar-hud-ar-recommend {
    max-width: min(92vw, 320px);
  }

  .ar-hud-mobile-tabs {
    display: flex;
    gap: 0.45rem;
  }

  .ar-hud-mobile-tab {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgb(var(--rgb-border) / 0.7);
    background: rgb(var(--rgb-bg) / 0.7);
    color: rgb(var(--rgb-text-2) / 0.9);
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
  }

  .ar-hud-mobile-tab.active {
    border-color: rgb(var(--rgb-success-2) / 0.8);
    color: rgb(var(--rgb-success) / 0.95);
  }

  .ar-hud-mobile-panel {
    display: none;
  }

  .ar-hud-mobile-panel.active {
    display: block;
  }

  .ar-hud-ui-pill {
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    font-size: 0.68rem;
  }

  .ar-hud-help-chip {
    left: calc(10px + env(safe-area-inset-left));
    bottom: calc(10px + env(safe-area-inset-bottom));
    font-size: 0.68rem;
  }
}

@media (max-width: 1024px) {
  body.ar-hud-event-mode .ar-hud-footer {
    display: none !important;
  }

  body.ar-hud-event-mode .ar-hud-event-intake {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-card {
    width: 100%;
    max-height: none;
    min-height: var(--ar-hud-vh, 100dvh);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1rem, env(safe-area-inset-right))
      max(1.1rem, env(safe-area-inset-bottom))
      max(1rem, env(safe-area-inset-left));
  }

  body.ar-hud-event-mode .ar-hud-event-intake-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-aside {
    order: 2;
  }

  body.ar-hud-event-mode .ar-hud-ar-recommend {
    display: none !important;
  }

  body.ar-hud-event-mode .ar-hud-ar-overlay {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "ribbon ribbon"
      "focus focus"
      "capture detail"
      "domain rail";
    align-content: stretch;
    align-items: start;
    gap: clamp(0.65rem, 1.8vw, 1rem);
    padding:
      calc(10px + env(safe-area-inset-top))
      calc(10px + env(safe-area-inset-right))
      calc(12px + env(safe-area-inset-bottom))
      calc(10px + env(safe-area-inset-left));
  }

  body.ar-hud-event-mode .ar-hud-ar-ribbon,
  body.ar-hud-event-mode .ar-hud-event-focus,
  body.ar-hud-event-mode .ar-hud-event-domain-stack,
  body.ar-hud-event-mode .ar-hud-event-capture-strip,
  body.ar-hud-event-mode .ar-hud-ar-detail,
  body.ar-hud-event-mode .ar-hud-ar-rail {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    max-width: none;
    min-width: 0;
    transform: none;
    margin: 0;
  }

  body.ar-hud-event-mode .ar-hud-ar-ribbon {
    grid-area: ribbon;
    max-width: none;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 1rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  body.ar-hud-event-mode .ar-hud-ar-ribbon::-webkit-scrollbar {
    display: none;
  }

  body.ar-hud-event-mode .ar-hud-ar-ribbon [data-hud-ribbon-quality],
  body.ar-hud-event-mode .ar-hud-ar-ribbon [data-hud-ribbon-freshness],
  body.ar-hud-event-mode .ar-hud-ar-ribbon [data-hud-ribbon-age],
  body.ar-hud-event-mode .ar-hud-ar-ribbon [data-hud-gesture-status] {
    display: none !important;
  }

  body.ar-hud-event-mode .ar-hud-event-focus {
    grid-area: focus;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0.85rem 0.95rem;
  }

  body.ar-hud-event-mode .ar-hud-event-focus-score {
    font-size: clamp(1.3rem, 3.4vw, 1.85rem);
  }

  body.ar-hud-event-mode .ar-hud-ar-detail {
    grid-area: detail;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
    align-self: stretch;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-stack {
    grid-area: domain;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: none;
    max-height: min(38vh, 360px);
    padding: 0.85rem;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    overflow: auto;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-item {
    align-items: start;
    min-height: 100%;
  }

  body.ar-hud-event-mode .ar-hud-event-capture-strip {
    grid-area: capture;
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 0.75rem;
    align-self: stretch;
  }

  body.ar-hud-event-mode .ar-hud-event-capture-strip .ar-hud-capture-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  body.ar-hud-event-mode .ar-hud-event-capture-strip .ar-hud-capture-thumb {
    aspect-ratio: 4 / 5;
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child {
    grid-column: auto;
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews > div:last-child {
    grid-column: auto;
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews img,
  body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child img {
    height: 100%;
  }

  body.ar-hud-event-mode .ar-hud-ar-rail {
    grid-area: rail;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    align-items: stretch;
    align-self: end;
  }

  body.ar-hud-event-mode .ar-hud-rail-btn {
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 0.95rem;
    border-radius: 1rem;
    justify-self: stretch;
    text-align: center;
  }

  body.ar-hud-event-mode .ar-hud-ar-drawer,
  body.ar-hud-event-mode .ar-hud-ar-booking {
    top: auto;
    right: calc(8px + env(safe-area-inset-right));
    left: calc(8px + env(safe-area-inset-left));
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(62vh, 540px);
    border-radius: 1.15rem;
    transform: translateY(calc(100% + 16px));
  }

  body.ar-hud-event-mode .ar-hud-ar-drawer.is-open,
  body.ar-hud-event-mode .ar-hud-ar-booking.is-open {
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  body.ar-hud-event-mode .ar-hud-ar-overlay {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "ribbon"
      "focus"
      "capture"
      "detail"
      "domain"
      "rail";
    gap: 0.72rem;
    padding:
      calc(8px + env(safe-area-inset-top))
      calc(8px + env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom))
      calc(8px + env(safe-area-inset-left));
  }

  body.ar-hud-event-mode .ar-hud-ar-ribbon {
    padding: 0.45rem 0.55rem;
    gap: 0.35rem;
  }

  body.ar-hud-event-mode .ar-hud-ar-ribbon [data-hud-ribbon-top] {
    display: none !important;
  }

  body.ar-hud-event-mode .ar-hud-event-focus,
  body.ar-hud-event-mode .ar-hud-ar-detail,
  body.ar-hud-event-mode .ar-hud-event-domain-stack,
  body.ar-hud-event-mode .ar-hud-event-capture-strip {
    border-radius: 1rem;
  }

  body.ar-hud-event-mode .ar-hud-event-focus {
    padding: 0.8rem 0.85rem;
  }

  body.ar-hud-event-mode .ar-hud-event-focus-head {
    gap: 0.55rem;
  }

  body.ar-hud-event-mode .ar-hud-event-focus-band {
    min-height: 1.75rem;
    padding: 0.22rem 0.55rem;
    font-size: 0.64rem;
  }

  body.ar-hud-event-mode .ar-hud-ar-detail {
    max-height: none;
    padding: 0.8rem 0.85rem;
  }

  body.ar-hud-event-mode .ar-hud-event-capture-strip {
    padding: 0.68rem;
  }

  body.ar-hud-event-mode .ar-hud-event-capture-strip .ar-hud-capture-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    font-size: 0.62rem;
  }

  body.ar-hud-event-mode .ar-hud-event-capture-strip .ar-hud-capture-thumb {
    aspect-ratio: 4 / 5;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-stack {
    max-height: min(34vh, 320px);
    padding: 0.72rem;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-head {
    gap: 0.45rem;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-summary {
    gap: 0.35rem;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-summary span {
    min-height: 1.55rem;
    padding: 0.18rem 0.48rem;
    font-size: 0.66rem;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-list {
    grid-template-columns: 1fr;
  }

  body.ar-hud-event-mode .ar-hud-event-domain-item {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.5rem 0.6rem;
  }

  body.ar-hud-event-mode .ar-hud-ar-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  body.ar-hud-event-mode .ar-hud-rail-btn {
    min-height: 50px;
    padding: 0.7rem 0.7rem;
    font-size: 0.74rem;
  }
}

@media (max-height: 620px) {
  body.ar-hud-immersive .ar-hud-ar-rail {
    gap: 0.55rem;
  }

  body.ar-hud-immersive .ar-hud-rail-btn {
    padding: 0.5rem 0.95rem;
    font-size: 0.76rem;
  }

  body.ar-hud-immersive .ar-hud-ar-recommend,
  body.ar-hud-immersive .ar-hud-ar-detail {
    max-width: min(78vw, 300px);
  }

  body.ar-hud-event-stage-only .ar-hud-event-focus {
    max-width: min(78vw, 280px);
  }
}

/* Footer hand gesture toggle */
.ar-hud-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  justify-content: center;
  padding: 0 12px;
  z-index: 9998;
  pointer-events: none;
}

.ar-hud-footer-btn {
  pointer-events: auto;
  backdrop-filter: blur(16px);
}

.ar-hud-footer-meta {
  pointer-events: auto;
  max-width: min(92vw, 820px);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgb(var(--rgb-bg) / 0.72);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  color: rgb(var(--rgb-text-muted) / 0.96);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgb(var(--rgb-overlay) / 0.28);
}

.ar-hud-footer-meta a {
  color: rgb(var(--rgb-text-2) / 0.98);
  font-weight: 600;
}

.ar-hud-footer-meta a:hover,
.ar-hud-footer-meta a:focus-visible {
  text-decoration: underline;
}

.ar-hud-footer-meta span {
  display: inline-block;
  margin-left: 0.35rem;
}

body.ar-hud-modal-open .ar-hud-footer {
  opacity: 0;
  pointer-events: none;
}

/* Modal */
.ar-hud-modal {
  position: fixed;
  inset: 0;
  background: rgb(var(--rgb-bg) / 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 28px);
  z-index: 10000;
}

.ar-hud-modal[hidden] {
  display: none;
}

.ar-hud-modal-card {
  width: min(760px, 100%);
  max-height: min(82vh, 780px);
  overflow: auto;
  background: rgb(var(--rgb-surface) / 0.92);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1.25rem;
  box-shadow: 0 24px 80px rgb(var(--rgb-overlay) / 0.6);
  backdrop-filter: blur(18px);
  padding: 1.05rem 1.1rem 1rem;
}

.ar-hud-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  position: sticky;
  top: 0;
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
  background: rgb(var(--rgb-surface) / 0.96);
  z-index: 1;
}

.ar-hud-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgb(var(--rgb-text));
}

.ar-hud-modal-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgb(var(--rgb-text-2) / 0.95);
}

.ar-hud-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.ar-hud-modal-note {
  margin: 0 0 0.75rem;
  color: rgb(var(--rgb-text-muted) / 0.98);
}

.ar-hud-modal-subhead {
  margin: 0.9rem 0 0.55rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--rgb-text-muted) / 0.9);
}

.ar-hud-modal-list {
  margin: 0.35rem 0 0.9rem 1.15rem;
}

.ar-hud-kv {
  display: grid;
  gap: 0.35rem;
}

.ar-hud-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.45rem 0.55rem;
  background: rgb(var(--rgb-bg) / 0.45);
  border: 1px solid rgb(var(--rgb-border) / 0.55);
  border-radius: 0.75rem;
  font-size: 0.84rem;
}

.ar-hud-kv-row span:first-child {
  color: rgb(var(--rgb-text-muted) / 0.95);
}

.ar-hud-kv-empty {
  font-size: 0.86rem;
  color: rgb(var(--rgb-text-muted) / 0.95);
  padding: 0.5rem 0;
}

.ar-hud-modal-accordion {
  margin-top: 0.9rem;
}

.ar-hud-modal-accordion summary {
  cursor: pointer;
  user-select: none;
  color: rgb(var(--rgb-text-muted) / 0.95);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.ar-hud-modal-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.ar-hud-modal-panel {
  background: rgb(var(--rgb-bg) / 0.34);
  border: 1px solid rgb(var(--rgb-border) / 0.55);
  border-radius: 1rem;
  padding: 0.85rem 0.85rem 0.75rem;
}

.ar-hud-modal-footnote {
  margin-top: 0.6rem;
}

.ar-hud-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ar-hud-review-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--rgb-border) / 0.58);
  background: rgb(var(--rgb-bg) / 0.46);
}

.ar-hud-review-card.is-empty {
  border-style: dashed;
}

.ar-hud-review-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgb(var(--rgb-bg) / 0.82), rgb(var(--rgb-surface) / 0.6));
  border: 1px solid rgb(var(--rgb-border) / 0.5);
}

.ar-hud-review-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ar-hud-review-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0.85rem;
  text-align: center;
  color: rgb(var(--rgb-text-muted) / 0.9);
  font-size: 0.82rem;
}

.ar-hud-review-copy {
  display: grid;
  gap: 0.18rem;
}

.ar-hud-review-copy strong {
  color: rgb(var(--rgb-text));
  font-size: 0.88rem;
}

.ar-hud-review-copy span {
  color: rgb(var(--rgb-text-muted) / 0.92);
  font-size: 0.76rem;
  line-height: 1.4;
}

@media (max-width: 820px) {
  .ar-hud-review-grid {
    grid-template-columns: 1fr;
  }
}

.ar-hud-raw-details summary {
  cursor: pointer;
  user-select: none;
  margin-top: 0.8rem;
  color: rgb(var(--rgb-text-muted) / 0.95);
}

.ar-hud-raw-pre {
  margin-top: 0.6rem;
  white-space: pre-wrap;
  font-size: 0.74rem;
  line-height: 1.5;
  background: rgb(var(--rgb-bg) / 0.65);
  border: 1px solid rgb(var(--rgb-border) / 0.55);
  border-radius: 0.9rem;
  padding: 0.75rem;
  max-height: 38vh;
  overflow: auto;
}

.ar-hud-booking-status {
  margin: 0.6rem 0 0.1rem;
  font-size: 0.84rem;
  color: rgb(var(--rgb-text-muted) / 0.98);
}

.ar-hud-booking-details {
  margin-top: 0.85rem;
}

.ar-hud-booking-details summary {
  cursor: pointer;
  user-select: none;
  color: rgb(var(--rgb-text-2) / 0.92);
}

.ar-hud-booking-iframe {
  width: 100%;
  height: 56vh;
  border: 1px solid rgb(var(--rgb-border) / 0.65);
  border-radius: 1rem;
  background: rgb(var(--rgb-bg) / 0.6);
  margin-top: 0.6rem;
}

/* Booking popover (hover on Book rail button) */
.ar-hud-booking-popover {
  position: fixed;
  width: 280px;
  max-width: calc(100vw - 24px);
  background: rgb(var(--rgb-surface) / 0.92);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1rem;
  padding: 0.85rem;
  box-shadow: 0 22px 60px rgb(var(--rgb-overlay) / 0.55);
  backdrop-filter: blur(18px);
  z-index: 9999;
}

.ar-hud-booking-popover-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: rgb(var(--rgb-text));
}

.ar-hud-booking-popover-sub {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: rgb(var(--rgb-text-muted) / 0.95);
}

.ar-hud-booking-popover-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

/* Guided scan overlay */
.ar-hud-scan-guide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(14px + env(safe-area-inset-top)) 1rem 0;
  pointer-events: none;
  z-index: 40;
}

body.ar-hud-event-mode .ar-hud-scan-guide {
  align-items: flex-start;
  padding:
    calc(14px + env(safe-area-inset-top))
    calc(12px + env(safe-area-inset-right))
    0
    calc(12px + env(safe-area-inset-left));
}

body.ar-hud-event-mode .ar-hud-scan-guide-card {
  background: rgb(var(--event-ui-panel) / 0.86);
  border: 1px solid rgb(var(--event-ui-border) / 0.5);
  box-shadow: 0 20px 50px rgb(6 18 36 / 0.25);
  color: rgb(var(--event-ui-ink));
}

body.ar-hud-event-mode .ar-hud-scan-instruction {
  color: rgb(var(--event-ui-text-muted));
}

.ar-hud-scan-guide[hidden] {
  display: none;
}

.ar-hud-scan-guide-card {
  pointer-events: auto;
  width: min(520px, calc(100% - 24px));
  background: rgb(var(--rgb-bg) / 0.72);
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  border-radius: 1.2rem;
  padding: 0.82rem 0.9rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgb(var(--rgb-overlay) / 0.55);
  text-align: center;
}

.ar-hud-scan-instruction {
  font-size: 0.92rem;
  color: rgb(var(--rgb-text-2) / 0.95);
  line-height: 1.4;
}

.ar-hud-scan-source {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: rgb(var(--rgb-text-muted) / 0.95);
}

body.ar-hud-event-mode .ar-hud-scan-source {
  color: rgb(var(--event-ui-text-muted));
}

.ar-hud-scan-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.ar-hud-scan-arrow {
  width: 38px;
  height: 38px;
  margin: 0.55rem auto 0.1rem;
  border-radius: 999px;
  border: 1px solid rgb(var(--rgb-border) / 0.7);
  background: rgb(var(--rgb-surface) / 0.55);
  position: relative;
}

.ar-hud-scan-arrow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid rgb(var(--rgb-text-2) / 0.92);
  border-bottom: 3px solid rgb(var(--rgb-text-2) / 0.92);
  transform: translate(-50%, -50%) rotate(45deg);
}

.ar-hud-scan-arrow.left::before {
  transform: translate(-50%, -50%) rotate(135deg);
}

.ar-hud-scan-arrow.right::before {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ar-hud-scan-arrow.center::before {
  opacity: 0.35;
}

.ar-hud-scan-arrow.ok {
  border-color: rgb(var(--rgb-success-2) / 0.75);
  box-shadow: 0 0 0 2px rgb(var(--rgb-success-2) / 0.18);
}

.ar-hud-scan-arrow.ok::before {
  border-color: rgb(var(--rgb-success-2) / 0.95);
}

@media (max-width: 1024px) {
  body.ar-hud-event-mode .ar-hud-event-intake-card,
  body.ar-hud-event-results-stage .ar-hud-ar-overlay {
    overscroll-behavior: contain;
  }

  body.ar-hud-event-results-stage .ar-hud-ar-overlay {
    overflow-y: auto;
    scroll-padding-top: calc(0.75rem + env(safe-area-inset-top));
  }

  body.ar-hud-event-results-stage .ar-hud-ar-ribbon {
    position: sticky;
    top: 0;
    z-index: 4;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  body.ar-hud-event-mode .ar-hud-event-intake-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-bottom: 0.85rem;
    background: linear-gradient(180deg, rgb(var(--event-panel) / 0.98), rgb(var(--event-panel-soft) / 0.92));
    backdrop-filter: blur(12px);
  }

  body.ar-hud-event-results-stage .ar-hud-ar-overlay {
    padding:
      max(12rem, 26vh)
      calc(12px + env(safe-area-inset-right))
      calc(12px + env(safe-area-inset-bottom))
      calc(12px + env(safe-area-inset-left));
    background:
      linear-gradient(
        180deg,
        rgb(246 246 244 / 0) 0%,
        rgb(246 246 244 / 0.08) 26%,
        rgb(246 246 244 / 0.52) 42%,
        rgb(246 246 244 / 0.84) 100%
      );
  }
}

@media (max-width: 720px) {
  body.ar-hud-event-mode .ar-hud-event-intake {
    padding: 0;
    background:
      linear-gradient(180deg, rgb(var(--event-panel) / 0.98), rgb(var(--event-panel-soft) / 0.95));
  }

  body.ar-hud-event-mode .ar-hud-event-intake-card {
    display: grid;
    gap: 0.95rem;
    padding:
      max(0.85rem, env(safe-area-inset-top))
      max(0.85rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
    box-shadow: none;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-card::before,
  body.ar-hud-event-mode .ar-hud-event-intake-card::after {
    opacity: 0.28;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-header {
    position: sticky;
    top: 0;
    z-index: 4;
    margin-bottom: 0;
    padding-bottom: 0.8rem;
    background: linear-gradient(180deg, rgb(var(--event-panel) / 0.99), rgb(var(--event-panel-soft) / 0.96));
    backdrop-filter: blur(14px);
  }

  body.ar-hud-event-mode .ar-hud-event-intake-headline {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
    line-height: 1.05;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-subtitle {
    max-width: none;
    font-size: 0.92rem;
    line-height: 1.48;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-layout {
    gap: 0.9rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-aside {
    order: -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 1rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-step {
    grid-template-columns: 1fr;
    gap: 0.32rem;
    padding: 0.72rem;
    border-radius: 0.95rem;
    border: 1px solid rgb(var(--event-border) / 0.24);
    background: rgb(var(--event-panel) / 0.7);
  }

  body.ar-hud-event-mode .ar-hud-event-intake-step:nth-of-type(3),
  body.ar-hud-event-mode .ar-hud-event-intake-footnote,
  body.ar-hud-event-mode .ar-hud-event-camera-panel {
    grid-column: 1 / -1;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-index {
    font-size: 0.7rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-step-title {
    font-size: 0.88rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-step-copy,
  body.ar-hud-event-mode .ar-hud-event-intake-footnote {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  body.ar-hud-event-mode .ar-hud-event-camera-panel {
    gap: 0.5rem;
    padding-top: 0.7rem;
  }

  body.ar-hud-event-mode .ar-hud-event-camera-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ar-hud-event-mode .ar-hud-event-intake-grid {
    gap: 0.72rem;
  }

  body.ar-hud-event-mode .ar-hud-event-dob-inputs {
    gap: 0.5rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-form input[type='text'],
  body.ar-hud-event-mode .ar-hud-event-intake-form input[type='date'],
  body.ar-hud-event-mode .ar-hud-event-intake-form input[type='email'],
  body.ar-hud-event-mode .ar-hud-event-intake-form input[type='tel'] {
    min-height: 50px;
    padding: 0.7rem 0.8rem;
    font-size: 1rem;
  }

  body.ar-hud-event-mode .ar-hud-event-consent-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-checkbox {
    min-height: 44px;
    padding: 0.62rem 0.72rem;
    font-size: 0.84rem;
  }

  body.ar-hud-event-mode .ar-hud-event-legal,
  body.ar-hud-event-mode .ar-hud-event-domain-help,
  body.ar-hud-event-mode .ar-hud-event-intake-message {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    padding-top: 0.75rem;
    background: linear-gradient(180deg, rgb(var(--event-panel) / 0), rgb(var(--event-panel) / 0.96) 42%);
  }

  body.ar-hud-event-mode .ar-hud-event-intake-actions .ar-hud-btn {
    min-height: 52px;
    font-size: 0.92rem;
  }

  body.ar-hud-event-mode .ar-hud-scan-guide {
    padding:
      calc(8px + env(safe-area-inset-top))
      calc(8px + env(safe-area-inset-right))
      0
      calc(8px + env(safe-area-inset-left));
  }

  body.ar-hud-event-mode .ar-hud-scan-guide-card {
    width: 100%;
    max-width: none;
    padding: 0.72rem 0.78rem;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.22rem 0.7rem;
  }

  body.ar-hud-event-mode .ar-hud-scan-instruction {
    font-size: 0.98rem;
    line-height: 1.35;
  }

  body.ar-hud-event-mode .ar-hud-scan-source {
    margin-top: 0.1rem;
  }

  body.ar-hud-event-mode .ar-hud-scan-arrow {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    margin: 0;
    justify-self: end;
    align-self: center;
  }

  body.ar-hud-event-mode .ar-hud-scan-actions {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
    justify-content: flex-end;
  }

  .ar-hud-modal {
    padding: 0;
    align-items: flex-end;
  }

  .ar-hud-modal-card {
    width: 100%;
    max-height: min(92vh, 960px);
    border-radius: 1.25rem 1.25rem 0 0;
    padding:
      0.95rem
      0.95rem
      calc(0.95rem + env(safe-area-inset-bottom))
      0.95rem;
  }

  .ar-hud-modal-actions {
    position: sticky;
    bottom: 0;
    padding-top: 0.8rem;
    background: linear-gradient(180deg, rgb(var(--rgb-surface) / 0), rgb(var(--rgb-surface) / 0.96) 44%);
  }

  body.ar-hud-event-results-stage .ar-hud-ar-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    align-content: end;
    gap: 0.58rem;
    padding:
      clamp(6rem, 14vh, 7.5rem)
      calc(8px + env(safe-area-inset-right))
      calc(10px + env(safe-area-inset-bottom))
      calc(8px + env(safe-area-inset-left));
    background:
      linear-gradient(
        180deg,
        rgb(246 246 244 / 0) 0%,
        rgb(246 246 244 / 0.08) 24%,
        rgb(246 246 244 / 0.72) 48%,
        rgb(246 246 244 / 0.94) 100%
      );
  }

  body.ar-hud-event-results-stage .ar-hud-event-focus,
  body.ar-hud-event-results-stage .ar-hud-ar-detail,
  body.ar-hud-event-results-stage .ar-hud-event-domain-stack,
  body.ar-hud-event-results-stage .ar-hud-event-capture-strip {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: none;
    background: rgb(var(--event-ui-panel) / 0.92);
    border: 1px solid rgb(var(--event-ui-border) / 0.36);
    box-shadow: 0 18px 34px rgb(6 18 36 / 0.16);
    backdrop-filter: blur(18px);
  }

  body.ar-hud-event-results-stage .ar-hud-ar-ribbon {
    order: 1;
    padding: 0.48rem 0.55rem;
    border-radius: 0.95rem;
  }

  body.ar-hud-event-results-stage .ar-hud-event-focus {
    order: 2;
    padding: 0.72rem 0.78rem;
  }

  body.ar-hud-event-results-stage .ar-hud-event-focus-score {
    font-size: clamp(1.7rem, 7vw, 2.35rem);
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip {
    order: 4;
    padding: 0.6rem;
  }

  body.ar-hud-event-results-stage .ar-hud-event-capture-strip .ar-hud-capture-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
  }

  body.ar-hud-event-results-stage .ar-hud-capture-label {
    font-size: 0.68rem;
  }

  body.ar-hud-event-results-stage .ar-hud-ar-detail {
    order: 3;
    padding: 0.72rem 0.78rem;
  }

  body.ar-hud-event-results-stage .ar-hud-event-domain-stack {
    order: 5;
    max-height: min(22vh, 220px);
    padding: 0.68rem;
  }

  body.ar-hud-event-results-stage .ar-hud-event-domain-list {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  body.ar-hud-event-results-stage .ar-hud-ar-rail {
    order: 6;
    position: sticky;
    bottom: 0;
    gap: 0.42rem;
    padding-top: 0.15rem;
    background: linear-gradient(180deg, rgb(var(--event-ui-panel) / 0), rgb(var(--event-ui-panel) / 0.96) 42%);
  }

  body.ar-hud-event-results-stage .ar-hud-rail-btn {
    min-height: 46px;
    font-size: 0.72rem;
    font-weight: 700;
  }
}

@media (max-width: 420px) {
  body.ar-hud-event-mode .ar-hud-event-intake-aside {
    grid-template-columns: 1fr;
  }

  body.ar-hud-event-mode .ar-hud-event-intake-step:nth-of-type(3) {
    grid-column: auto;
  }
}

/* Explicit event-kiosk responsive layout modes */
body.ar-hud-event-mode[data-ar-hud-layout] {
  --event-kiosk-card-surface:
    linear-gradient(180deg, rgb(34 47 69 / 0.96), rgb(23 34 53 / 0.92));
  --event-kiosk-card-border: rgb(171 198 227 / 0.24);
  --event-kiosk-card-shadow: 0 18px 34px rgb(6 18 36 / 0.18);
  --event-kiosk-card-ink: rgb(244 248 252 / 0.94);
  --event-kiosk-card-muted: rgb(190 208 228 / 0.78);
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-slot {
  min-width: 0;
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-thumb {
  overflow: hidden;
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-previews img,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-stage-still {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-slot[data-slot-state="empty"] .ar-hud-capture-thumb {
  background:
    radial-gradient(circle at 50% 28%, rgb(255 255 255 / 0.08), transparent 34%),
    linear-gradient(180deg, rgb(26 36 54 / 0.88), rgb(17 24 39 / 0.94));
  border-color: rgb(var(--event-ui-border) / 0.22);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.04);
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-slot[data-slot-state="empty"] .ar-hud-capture-thumb::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  border: 1px dashed rgb(255 255 255 / 0.16);
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-slot[data-slot-state="filled"] .ar-hud-capture-thumb {
  background: rgb(var(--event-ui-panel) / 0.18);
  border-color: rgb(var(--event-ui-border) / 0.34);
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-slot[data-slot-state="filled"] .ar-hud-capture-label {
  color: rgb(var(--event-ui-ink) / 0.88);
}

body.ar-hud-event-mode[data-ar-hud-layout="tablet"] .ar-hud-video-wrap::after,
body.ar-hud-event-mode[data-ar-hud-layout="mobile"] .ar-hud-video-wrap::after {
  inset: -2%;
  opacity: 0.12;
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-focus,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-ar-detail,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-domain-stack,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-capture-strip {
  color: var(--event-kiosk-card-ink);
}

body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-focus .ar-hud-label,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-ar-detail .ar-hud-label,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-domain-stack .ar-hud-label,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-capture-label,
body.ar-hud-event-mode[data-ar-hud-layout] .ar-hud-event-domain-item-band {
  color: var(--event-kiosk-card-muted);
}

body.ar-hud-event-mode[data-ar-hud-layout="tablet"] .ar-hud-ar-recommend,
body.ar-hud-event-mode[data-ar-hud-layout="mobile"] .ar-hud-ar-recommend {
  display: none !important;
}

body.ar-hud-event-mode[data-ar-hud-layout="tablet"] .ar-hud-rail-btn[data-hud-rail-action="fullscreen"],
body.ar-hud-event-mode[data-ar-hud-layout="tablet"] .ar-hud-rail-btn[data-hud-rail-action="snapshot"],
body.ar-hud-event-mode[data-ar-hud-layout="tablet"] .ar-hud-rail-btn[data-hud-rail-action="exit"],
body.ar-hud-event-mode[data-ar-hud-layout="mobile"] .ar-hud-rail-btn[data-hud-rail-action="fullscreen"],
body.ar-hud-event-mode[data-ar-hud-layout="mobile"] .ar-hud-rail-btn[data-hud-rail-action="snapshot"],
body.ar-hud-event-mode[data-ar-hud-layout="mobile"] .ar-hud-rail-btn[data-hud-rail-action="exit"] {
  display: none !important;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-video-wrap::after,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-video-wrap::after {
  opacity: 0.03;
}

body.ar-hud-event-mode[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip {
  top: calc(6rem + env(safe-area-inset-top));
  right: calc(5.9rem + env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: auto;
  width: clamp(172px, 15vw, 214px);
  padding: 0.72rem;
  background: linear-gradient(180deg, rgb(var(--event-ui-panel) / 0.92), rgb(var(--event-ui-panel) / 0.84));
  border: 1px solid rgb(var(--event-ui-border) / 0.36);
  box-shadow: 0 22px 46px rgb(6 18 36 / 0.16);
}

body.ar-hud-event-mode[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: 1fr;
  gap: 0.62rem;
}

body.ar-hud-event-mode[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip .ar-hud-capture-thumb {
  aspect-ratio: 3 / 4;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child,
body.ar-hud-event-results-stage[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:last-child {
  grid-column: auto;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip .ar-hud-capture-previews img,
body.ar-hud-event-results-stage[data-ar-hud-layout="desktop"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child img {
  height: 100%;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-overlay {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "ribbon"
    "."
    "capture"
    "rail";
  gap: 0.85rem;
  justify-items: stretch;
  align-items: end;
  pointer-events: auto;
  padding:
    calc(12px + env(safe-area-inset-top))
    calc(12px + env(safe-area-inset-right))
    calc(14px + env(safe-area-inset-bottom))
    calc(12px + env(safe-area-inset-left));
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-focus,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-domain-stack,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-detail,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-chips {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon {
  grid-area: ribbon;
  position: relative;
  inset: auto;
  max-width: none;
  width: 100%;
  margin: 0;
  gap: 0.4rem 0.45rem;
  padding: 0.46rem 0.58rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-quality],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-freshness],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-age],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-top],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-gesture-status] {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip {
  grid-area: capture;
  position: relative;
  inset: auto;
  width: 100%;
  max-width: min(620px, 100%);
  justify-self: stretch;
  margin: 0;
  padding: 0.72rem;
  background: rgb(var(--event-ui-panel) / 0.8);
  border: 1px solid rgb(var(--event-ui-border) / 0.34);
  box-shadow: var(--event-kiosk-card-shadow);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:last-child {
  grid-column: auto;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-thumb {
  aspect-ratio: 4 / 5;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-rail {
  grid-area: rail;
  position: relative;
  inset: auto;
  display: grid;
  width: 100%;
  max-width: min(620px, 100%);
  justify-self: stretch;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
  padding: 0.55rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--event-ui-border) / 0.3);
  background: rgb(var(--event-ui-panel) / 0.78);
  box-shadow: var(--event-kiosk-card-shadow);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-rail-btn {
  min-height: 48px;
  padding: 0.7rem 0.75rem;
  border-radius: 0.95rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-detail {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-ar-recommend {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-scan-guide {
  padding:
    calc(12px + env(safe-area-inset-top))
    calc(14px + env(safe-area-inset-right))
    0
    calc(14px + env(safe-area-inset-left));
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="tablet"] .ar-hud-scan-guide-card {
  width: min(520px, calc(100% - 28px));
  padding: 0.7rem 0.85rem;
  background: rgb(var(--event-ui-panel) / 0.84);
  border: 1px solid rgb(var(--event-ui-border) / 0.36);
  box-shadow: 0 18px 30px rgb(6 18 36 / 0.14);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-overlay {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  grid-template-areas:
    "ribbon ribbon"
    ". ."
    "focus detail"
    "capture capture"
    "rail rail"
    "domain domain";
  align-content: start;
  align-items: start;
  gap: 0.85rem;
  overflow-y: auto;
  pointer-events: auto;
  padding:
    clamp(calc(7rem + env(safe-area-inset-top)), calc(20svh + env(safe-area-inset-top)), calc(12rem + env(safe-area-inset-top)))
    calc(12px + env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    calc(12px + env(safe-area-inset-left));
  background:
    linear-gradient(
      180deg,
      rgb(246 246 244 / 0) 0%,
      rgb(246 246 244 / 0.04) 26%,
      rgb(246 246 244 / 0.12) 42%,
      rgb(246 246 244 / 0.54) 66%,
      rgb(246 246 244 / 0.88) 100%
    );
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-focus,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-detail,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-domain-stack,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-rail {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon {
  grid-area: ribbon;
  position: sticky;
  top: 0;
  z-index: 4;
  gap: 0.4rem 0.45rem;
  padding: 0.48rem 0.6rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-quality],
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-freshness],
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-age],
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-ribbon-top],
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-ribbon [data-hud-gesture-status],
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-rail-btn[data-hud-rail-action="camera"] {
  display: none !important;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-focus,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-detail,
body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-domain-stack {
  background: var(--event-kiosk-card-surface);
  border: 1px solid var(--event-kiosk-card-border);
  box-shadow: var(--event-kiosk-card-shadow);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-focus {
  grid-area: focus;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-detail {
  grid-area: detail;
  max-height: none;
  padding: 0.78rem 0.84rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip {
  grid-area: capture;
  width: 100%;
  max-width: 620px;
  justify-self: center;
  padding: 0.8rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child {
  grid-column: 1 / -1;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child .ar-hud-capture-thumb {
  aspect-ratio: 16 / 8.8;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:not(:first-child) .ar-hud-capture-thumb {
  aspect-ratio: 4 / 3.9;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-domain-stack {
  grid-area: domain;
  max-height: min(18svh, 180px);
  padding: 0.78rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-event-domain-list {
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-ar-rail {
  grid-area: rail;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
  padding-top: 0;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="tablet"] .ar-hud-rail-btn {
  min-height: 48px;
  padding: 0.72rem 0.75rem;
  border-radius: 0.95rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-overlay {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "ribbon"
    "."
    "capture"
    "rail";
  gap: 0.68rem;
  justify-items: stretch;
  align-items: end;
  pointer-events: auto;
  padding:
    calc(10px + env(safe-area-inset-top))
    calc(10px + env(safe-area-inset-right))
    calc(10px + env(safe-area-inset-bottom))
    calc(10px + env(safe-area-inset-left));
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-focus,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-domain-stack,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-detail,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-chips {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-rail {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon {
  grid-area: ribbon;
  gap: 0.35rem 0.4rem;
  padding: 0.42rem 0.5rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-quality],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-freshness],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-age],
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-top] {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip {
  grid-area: capture;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 0.68rem;
  background: rgb(var(--event-ui-panel) / 0.82);
  border: 1px solid rgb(var(--event-ui-border) / 0.34);
  box-shadow: var(--event-kiosk-card-shadow);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:last-child {
  grid-column: auto;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-thumb {
  aspect-ratio: 4 / 5;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-rail {
  grid-area: rail;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 1rem;
  border: 1px solid rgb(var(--event-ui-border) / 0.3);
  background: rgb(var(--event-ui-panel) / 0.8);
  box-shadow: var(--event-kiosk-card-shadow);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-rail-btn {
  min-height: 44px;
  padding: 0.58rem 0.32rem;
  border-radius: 0.9rem;
  font-size: 0.68rem;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-detail,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-ar-recommend,
body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-guidance {
  display: none !important;
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-scan-guide {
  padding:
    calc(8px + env(safe-area-inset-top))
    calc(10px + env(safe-area-inset-right))
    0
    calc(10px + env(safe-area-inset-left));
}

body.ar-hud-event-stage-only:not(.ar-hud-event-results-stage)[data-ar-hud-layout="mobile"] .ar-hud-scan-guide-card {
  width: 100%;
  max-width: none;
  padding: 0.66rem 0.72rem;
  background: rgb(var(--event-ui-panel) / 0.86);
  border: 1px solid rgb(var(--event-ui-border) / 0.34);
  box-shadow: 0 16px 28px rgb(6 18 36 / 0.12);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-overlay {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto auto;
  grid-template-areas:
    "ribbon"
    "."
    "focus"
    "detail"
    "capture"
    "rail"
    "domain";
  align-content: start;
  align-items: start;
  justify-items: stretch;
  gap: 0.68rem;
  overflow-y: auto;
  pointer-events: auto;
  padding:
    clamp(calc(6.5rem + env(safe-area-inset-top)), calc(13.5svh + env(safe-area-inset-top)), calc(8rem + env(safe-area-inset-top)))
    calc(8px + env(safe-area-inset-right))
    calc(16px + env(safe-area-inset-bottom))
    calc(8px + env(safe-area-inset-left));
  background:
    linear-gradient(
      180deg,
      rgb(246 246 244 / 0) 0%,
      rgb(246 246 244 / 0.03) 22%,
      rgb(246 246 244 / 0.12) 38%,
      rgb(246 246 244 / 0.48) 62%,
      rgb(246 246 244 / 0.86) 100%
    );
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-detail,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-stack,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-rail {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon {
  grid-area: ribbon;
  position: sticky;
  top: 0;
  z-index: 4;
  gap: 0.35rem;
  padding: 0.42rem 0.5rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-quality],
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-freshness],
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-age],
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-ribbon-top] {
  display: none !important;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon [data-hud-gesture-status],
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-rail-btn[data-hud-rail-action="camera"] {
  display: none !important;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-detail,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-stack {
  background: var(--event-kiosk-card-surface);
  border: 1px solid var(--event-kiosk-card-border);
  box-shadow: var(--event-kiosk-card-shadow);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus {
  grid-area: focus;
  padding: 0.76rem 0.82rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus-score {
  font-size: clamp(1.55rem, 6.8vw, 2.15rem);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip {
  grid-area: capture;
  width: 100%;
  max-width: 348px;
  justify-self: center;
  padding: 0.62rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child {
  grid-column: 1 / -1;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child .ar-hud-capture-thumb {
  aspect-ratio: 16 / 8.8;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:not(:first-child) .ar-hud-capture-thumb {
  aspect-ratio: 4 / 3.9;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-detail {
  grid-area: detail;
  padding: 0.74rem 0.8rem;
  max-height: none;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-stack {
  grid-area: domain;
  max-height: min(17svh, 150px);
  padding: 0.68rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-list {
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-rail {
  grid-area: rail;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding-top: 0;
  background: transparent;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-rail-btn {
  min-height: 44px;
  padding: 0.64rem 0.5rem;
  border-radius: 0.9rem;
  font-size: 0.71rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-video-wrap::after {
  opacity: 0.16;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-overlay {
  grid-template-areas:
    "ribbon"
    "."
    "focus"
    "detail"
    "capture"
    "rail"
    "domain";
  gap: 0.76rem;
  padding:
    clamp(calc(5.9rem + env(safe-area-inset-top)), calc(12svh + env(safe-area-inset-top)), calc(7rem + env(safe-area-inset-top)))
    calc(10px + env(safe-area-inset-right))
    calc(20px + env(safe-area-inset-bottom))
    calc(10px + env(safe-area-inset-left));
  scroll-padding-top: calc(0.65rem + env(safe-area-inset-top));
  scroll-padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  background:
    linear-gradient(
      180deg,
      rgb(246 246 244 / 0) 0%,
      rgb(246 246 244 / 0.08) 18%,
      rgb(246 246 244 / 0.48) 34%,
      rgb(246 246 244 / 0.84) 52%,
      rgb(246 246 244 / 0.96) 68%,
      rgb(246 246 244 / 0.99) 100%
    );
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-ribbon {
  top: 0;
  padding: 0.5rem 0.56rem;
  border-radius: 1rem;
  border: 1px solid var(--event-kiosk-card-border);
  background: rgb(var(--event-ui-panel) / 0.94);
  box-shadow: 0 14px 28px rgb(6 18 36 / 0.12);
  backdrop-filter: blur(16px);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-logo {
  display: none;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus {
  padding: 0.84rem 0.9rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus-head {
  align-items: center;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus h3 {
  font-size: 1.05rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-focus-band {
  min-height: 1.85rem;
  padding-inline: 0.62rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-detail {
  padding: 0.8rem 0.9rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-detail-body {
  font-size: 0.84rem;
  line-height: 1.5;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-stack {
  max-height: none;
  padding: 0.8rem;
  gap: 0.58rem;
  margin-top: 0.08rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-head {
  gap: 0.46rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-summary {
  gap: 0.38rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-list {
  overflow: visible;
  max-height: none;
  gap: 0.5rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-item {
  padding: 0.62rem 0.72rem;
  gap: 0.25rem 0.72rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-item-name,
body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-item-score {
  font-size: 0.86rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-domain-item-band {
  font-size: 0.63rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 0.72rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-head {
  margin-bottom: 0.42rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-copy {
  font-size: 0.74rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews {
  gap: 0.42rem;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:first-child .ar-hud-capture-thumb {
  aspect-ratio: 16 / 6.9;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:not(:first-child) .ar-hud-capture-thumb {
  aspect-ratio: 4 / 2.7;
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-ar-rail {
  position: sticky;
  bottom: 0;
  z-index: 6;
  align-self: stretch;
  padding: 0.62rem;
  border-radius: 1.1rem;
  border: 1px solid var(--event-kiosk-card-border);
  background: rgb(var(--event-ui-panel) / 0.96);
  box-shadow: 0 16px 32px rgb(6 18 36 / 0.14);
  backdrop-filter: blur(18px);
}

body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-rail-btn {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
}

@media (max-width: 400px) {
  body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-copy {
    display: none;
  }

  body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-head {
    margin-bottom: 0.28rem;
  }

  body.ar-hud-event-results-stage[data-ar-hud-layout="mobile"] .ar-hud-event-capture-strip .ar-hud-capture-previews > div:not(:first-child) .ar-hud-capture-thumb {
    aspect-ratio: 4 / 2.45;
  }
}
