/* Рентген — светлый «медицинский» интерфейс: мягкий серый фон, белые стеклянные панели,
   крупные скругления, гротеск Onest. Акцент режима: «Рентген» — синий, «Анатомия» — красный. */

:root {
  --bg: #EEF0F3;
  --surface: #FFFFFF;
  --ink: #0E1116;
  --muted: #6B7280;
  --line: rgba(14, 17, 22, .08);
  --blue: #2254F4;
  --blue-soft: #9DB4FF;
  --red: #E5484D;
  --red-soft: #FFB4B4;
  --glass: rgba(255, 255, 255, .78);
  --glass-strong: rgba(255, 255, 255, .9);
  --shadow: 0 18px 40px -22px rgba(16, 24, 40, .45);
  --shadow-sm: 0 6px 18px -8px rgba(16, 24, 40, .35);

  --font: "Onest", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.3, .5, 1);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.063, 0.215, 0.405 7.2%, 0.759 12.3%, 0.893 15.3%, 0.991 18.6%, 1.047 22.3%,
      1.066 25.5%, 1.068 28.9%, 1.054 33.2%, 1.009 45.6%, 0.995 54.6%, 1.001 76.4%, 1);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible { outline: 2px solid var(--accent, var(--blue)); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ═════════════ Стартовый экран ═════════════ */

.intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  overflow-y: auto;
  padding: calc(16px + var(--safe-t)) 18px calc(20px + var(--safe-b));
  background: var(--bg);
}

.intro-inner {
  margin: auto;
  width: min(100%, 440px);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  animation: rise .7s var(--out) both;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
}

.brand-mark svg { width: 20px; height: 20px; fill: currentColor; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }

.brand-tag {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 12px;
  color: var(--blue);
}

.hero {
  position: relative;
  margin: 0;
  height: clamp(300px, 50vh, 470px);
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(120% 80% at 80% 110%, rgba(255, 255, 255, .22), transparent 60%),
    radial-gradient(90% 70% at 10% -10%, #4F7BFF, transparent 70%),
    var(--blue);
  box-shadow: 0 30px 60px -30px rgba(34, 84, 244, .7);
  color: #fff;
  animation: hero-in .9s var(--spring) .1s both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
}

.preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-title {
  position: relative;
  z-index: 1;
  max-width: 7.5em;
  margin: 0;
  padding: 26px 24px 0;
  font-weight: 700;
  font-size: clamp(34px, 10.5vw, 46px);
  line-height: 1;
  letter-spacing: -.035em;
}

.hero-title span {
  display: inline-block;
  animation: rise .9s var(--spring) both;
  animation-delay: calc(var(--k) * 90ms + 300ms);
}

.spot {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .25);
  animation: spot 2.4s ease-in-out infinite, rise .6s var(--out) 1s both;
}

.spot:nth-of-type(2) { animation-delay: .8s, 1.15s; }
.spot:nth-of-type(3) { animation-delay: 1.6s, 1.3s; }

@keyframes spot {
  50% { box-shadow: 0 0 0 11px rgba(255, 255, 255, .12); }
}

.hero-caption {
  position: absolute;
  z-index: 1;
  left: 24px;
  bottom: 22px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 500;
}

.lede {
  margin: 20px 4px 0;
  font-size: 15.5px;
  line-height: 1.45;
  color: #2B313B;
  text-wrap: pretty;
  animation: rise .8s var(--out) .6s both;
}

.layers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  animation: rise .8s var(--out) .7s both;
}

.layers li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px 7px 8px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 500;
}

.layers i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  height: 62px;
  padding: 0 7px 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  box-shadow: var(--shadow);
  transition: transform .3s var(--spring), opacity .2s;
  animation: rise .8s var(--out) .8s both;
}

.start i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
}

.start svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .4s var(--spring);
}

.start:hover svg { transform: translate(2px, -2px); }
.start:active { transform: scale(.97); }
.start:disabled { opacity: .7; cursor: progress; }

.intro-error {
  margin: 12px 4px 0;
  color: #C2272D;
  font-size: 13.5px;
  line-height: 1.45;
}

.fineprint {
  margin: 16px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-wrap: pretty;
  animation: rise .8s var(--out) .9s both;
}

.credits {
  margin: 6px 4px 0;
  color: #9AA1AD;
  font-size: 11px;
  animation: rise .8s var(--out) .95s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

.intro.off {
  animation: intro-out .55s var(--out) forwards;
  pointer-events: none;
}

@keyframes intro-out {
  to { opacity: 0; visibility: hidden; }
}

/* ═════════════ Сканер ═════════════ */

.scanner {
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0B1A24;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.scanner[data-mode="anatomy"] {
  --accent: var(--red);
  --accent-soft: var(--red-soft);
}

.view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.scanner[data-mirror] .view { transform: scaleX(-1); }

.video-src {
  position: absolute;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}

.hud { opacity: 0; }

.scanner.enter .hud {
  animation: hud-in .8s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 80ms + 150ms);
}

@keyframes hud-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

/* ── верх ── */

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: calc(12px + var(--safe-t)) 12px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.top > * { pointer-events: auto; }

.target-wrap {
  position: relative;
  min-width: 0;
  max-width: calc(100% - 58px);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 50px;
  padding: 7px 12px 7px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .35s var(--spring);
}

.status-pill:active { transform: scale(.97); }

.led {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #B8BEC8;
  transition: background .3s, box-shadow .4s;
}

[data-state="expose"] .led,
[data-state="active"] .led {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.pill-text {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.pill-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.pill-main b { font-weight: 700; color: var(--ink); letter-spacing: -.01em; }

.status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.chev {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: rotate .35s var(--spring);
}

.status-pill[aria-expanded="true"] .chev { rotate: 180deg; }

.target-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  width: min(300px, calc(100vw - 24px));
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 24px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: var(--shadow);
  transform-origin: 20% 0;
  animation: menu-in .35s var(--spring);
}

@keyframes menu-in {
  from { opacity: 0; transform: scale(.92) translateY(-6px); }
}

.target-menu button {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border: 0;
  border-radius: 18px;
  background: none;
  text-align: left;
}

.target-menu b { font-size: 15px; font-weight: 600; }
.target-menu span { font-size: 12.5px; color: var(--muted); }
.target-menu button[aria-checked="true"] { background: color-mix(in srgb, var(--accent) 10%, #fff); }
.target-menu button[aria-checked="true"] b { color: var(--accent); }

.side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.round {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: background .25s, color .25s, transform .35s var(--spring);
}

.round:active { transform: scale(.9); }

.round svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.round[aria-pressed="true"]:not(#sound) { background: var(--accent); color: #fff; }

#sound[aria-pressed="true"] .i-off,
#sound[aria-pressed="false"] .i-on { display: none; }

#lock .shackle { transition: transform .45s var(--spring); transform-origin: 15.5px 10.5px; }
#lock[aria-pressed="false"] .shackle { transform: translateY(-1.5px) rotate(-24deg); }

.loader {
  position: absolute;
  top: calc(66px + var(--safe-t));
  left: 12px;
  display: grid;
  gap: 7px;
  min-width: 200px;
  margin: 0;
  padding: 10px 14px 11px;
  border-radius: 16px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 500;
  animation: hud-in .6s var(--spring) both;
}

.loader i {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}

.loader b {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  transition: transform .25s var(--out);
}

/* ── прицел ── */

.reticle {
  --p: 0;
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(58vw, 300px);
  aspect-ratio: 1;
  translate: -50% -50%;
  scale: calc(1 - var(--p) * .22);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
  transition: opacity .3s, scale .12s linear;
  pointer-events: none;
}

.reticle i {
  position: absolute;
  width: 20%;
  height: 20%;
  border: 3px solid color-mix(in srgb, var(--accent) calc(var(--p) * 100%), #FFFFFF);
  transition: translate .5s var(--out);
}

.reticle i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 18px; }
.reticle i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 18px; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 18px; }
.reticle i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 18px; }

[data-state="expose"] .reticle,
[data-state="active"] .reticle { opacity: 0; }
[data-state="expose"] .reticle i:nth-child(1) { translate: -40px -40px; }
[data-state="expose"] .reticle i:nth-child(2) { translate: 40px -40px; }
[data-state="expose"] .reticle i:nth-child(3) { translate: -40px 40px; }
[data-state="expose"] .reticle i:nth-child(4) { translate: 40px 40px; }

/* ── низ: тонкая строка глубины + режим и кнопка съёмки ── */

.dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-b));
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.depth {
  --f: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px 0 18px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-sm);
  touch-action: none;
  cursor: ew-resize;
}

.depth-name {
  flex: none;
  width: 62px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.depth-rail {
  position: relative;
  flex: 1;
  height: 100%;
}

.depth-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 6px;
  background: rgba(14, 17, 22, .1);
}

.depth-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(var(--f));
}

.depth.loading .depth-track::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent) 0 0 / 40% 100% no-repeat;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from { background-position: -40% 0; }
  to { background-position: 140% 0; }
}

.depth-track i {
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: rgba(14, 17, 22, .25);
}

.depth-track i:nth-of-type(1) { left: 3px; }
.depth-track i:nth-of-type(2) { left: 33.333%; }
.depth-track i:nth-of-type(3) { left: 66.666%; }
.depth-track i:nth-of-type(4) { left: calc(100% - 3px); }

.depth-thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--f) * (100% - 26px) + 13px);
  width: 26px;
  height: 26px;
  translate: -50% -50%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(14, 17, 22, .06), 0 5px 14px -4px rgba(16, 24, 40, .5);
  transition: scale .45s var(--spring), box-shadow .3s;
}

.depth-thumb::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.depth.dragging .depth-thumb {
  scale: 1.2;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 16%, transparent), 0 8px 20px -4px rgba(16, 24, 40, .5);
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modes {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-sm);
}

.modes-pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px -4px rgba(16, 24, 40, .3);
  transition: translate .6s var(--spring);
}

[data-mode="anatomy"] .modes-pill { translate: 100% 0; }

.modes button {
  position: relative;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--muted);
  transition: color .35s;
}

.modes button[aria-checked="true"] { color: var(--ink); }

.shutter {
  --rec: 0;
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--spring);
}

.shutter span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .3s var(--spring), background .4s, border-radius .3s;
}

.shutter:active span { transform: scale(.88); }

.shutter::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(var(--red) calc(var(--rec) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  opacity: 0;
  transition: opacity .2s;
}

.recording .shutter::before { opacity: 1; }
.recording .shutter span { background: var(--red); transform: scale(.5); border-radius: 12px; box-shadow: none; }
.recording .status { color: var(--red); }

/* ── подписи на теле ── */

.labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.label {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.label .dot {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .3), 0 2px 6px rgba(0, 0, 0, .3);
  scale: 0;
  transition: scale .5s var(--spring);
}

.label .stem {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 1.5px;
  background: rgba(255, 255, 255, .9);
  transform-origin: 0 50%;
  rotate: -38deg;
  scale: 0 1;
  transition: scale .35s var(--out) .08s;
}

.label .tag {
  position: absolute;
  left: 24px;
  top: -38px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--ink);
  opacity: 0;
  translate: 0 6px;
  transition: opacity .25s .12s, translate .5s var(--spring) .12s;
}

.label[data-side="l"] .stem { rotate: -142deg; }
.label[data-side="l"] .tag { left: auto; right: 24px; }

.label.on .dot { scale: 1; animation: spot 2.4s ease-in-out infinite; }
.label.on .stem { scale: 1 1; }
.label.on .tag { opacity: 1; translate: 0 0; }

/* ── прочее ── */

.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.flash.on { animation: flash .5s var(--out); }

@keyframes flash {
  from { opacity: .85; }
  to { opacity: 0; }
}

.toast {
  position: absolute;
  left: 50%;
  top: calc(66px + var(--safe-t));
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  translate: -50% -8px;
  opacity: 0;
  box-shadow: var(--shadow);
  transition: opacity .25s, translate .5s var(--spring);
  pointer-events: none;
}

.toast.on { opacity: 1; translate: -50% 0; }

.debug {
  position: absolute;
  left: 12px;
  top: calc(120px + var(--safe-t));
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font: 10px/1.4 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre;
  pointer-events: none;
}

/* запись тестового ролика (?rec) */
.rec-btn {
  position: absolute;
  top: calc(66px + var(--safe-t));
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 600;
}

.rec-btn i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.rec-btn.on i { animation: rec-blink 1s steps(2, start) infinite; }

@keyframes rec-blink { 50% { opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  .brand, .hero, .hero-title span, .spot, .lede, .layers, .start, .fineprint, .credits { animation: none; }
  .intro.off { animation: intro-out .2s ease forwards; }
  .scanner.enter .hud { animation: fade-in .3s ease both; animation-delay: 0s; }
  .label.on .dot { animation: none; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
