/* ==========================================================
   Зубы в ХэйХэ: лендинг с 3D-конструктором улыбки
   Цвета и шрифт с xeixe.ru: тёмно-синий, голубой, Onest
   ========================================================== */

:root {
  color-scheme: light;

  --ink: #101937;
  --ink-deep: #0A1029;
  --ocean: #134C83;
  --cyan: #37D4FF;
  --ice: #E9FAFF;
  --paper: #FBFFFF;
  --line: #D3EAF3;
  --muted: rgba(16, 25, 55, .62);
  --amber: #FFC56B;
  --wa: #189D4F;
  --tg: #1C8AC4;

  --on-dark-muted: rgba(233, 250, 255, .62);
  --glass: rgba(255, 255, 255, .06);
  --glass-line: rgba(255, 255, 255, .14);

  --gutter: 16px;
  --header-h: 64px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (min-width: 720px) { :root { --gutter: 32px; --header-h: 72px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--ocean); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
svg use { pointer-events: none; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 28px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn--primary { background: var(--cyan); color: var(--ink); box-shadow: 0 12px 30px -12px rgba(55, 212, 255, .8); }
.btn--primary:hover { background: #6BE0FF; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #12843F; }
.btn--tg { background: var(--tg); color: #fff; }
.btn--tg:hover { background: #1677AA; }
.link { font-weight: 600; text-underline-offset: 4px; }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: rgba(10, 16, 41, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #fff;
}
.header-row { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 17px; font-weight: 800; }
.brand-text span { font-size: 12.5px; color: var(--on-dark-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-contacts { display: flex; align-items: center; gap: 8px; flex: none; }
.header-phone { display: none; margin-right: 10px; color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; transition: transform .15s; }
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn--wa { background: var(--wa); }
.icon-btn--tg { background: var(--tg); }
.icon-btn--call { background: rgba(255, 255, 255, .14); }
@media (min-width: 900px) {
  .header-phone { display: block; }
  .icon-btn--call { display: none; }
  .brand img { width: 46px; height: 46px; }
}
@media (max-width: 440px) { .brand-text span { display: none; } }
@media (max-width: 999px) { .site-header { background: rgba(10, 16, 41, .94); } }

/* ==========================================================
   Первый экран
   ========================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding-top: var(--header-h);
  color: #fff;
  background:
    radial-gradient(42% 46% at 52% 50%, rgba(55, 212, 255, .2) 0%, rgba(55, 212, 255, 0) 70%),
    radial-gradient(90% 80% at 50% 40%, #1C2A60 0%, var(--ink) 52%, var(--ink-deep) 100%);
  overflow: hidden;
}
.hero::after { /* лёгкое зерно, чтобы фон не был плоским */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-word {
  position: absolute; z-index: 0;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) translate(calc(var(--px, 0) * -24px), calc(var(--py, 0) * -16px + var(--sy, 0) * 140px));
  font-size: clamp(110px, 25vw, 440px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(55, 212, 255, .2);
  background: linear-gradient(180deg, rgba(55, 212, 255, .1), rgba(55, 212, 255, 0) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "scanner" "hud" "panel";
  padding-top: 14px;
  padding-bottom: 150px; /* место под ленты */
}
.quiz-intro { grid-area: intro; position: relative; z-index: 3; }
.scanner { grid-area: scanner; }
.hud { grid-area: hud; position: relative; z-index: 3; }
.panel { grid-area: panel; position: relative; z-index: 3; }

.quiz-intro h1 {
  font-size: clamp(34px, 9vw, 76px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .92;
  max-width: 7.5ch;
}

/* ---------- Сцена с моделью ---------- */
.scanner {
  position: relative;
  z-index: 1;
  height: clamp(380px, 60svh, 640px);
  margin-inline: calc(var(--gutter) * -1);
  --model-shift: 0;
}
.scanner-frame { position: absolute; inset: 0; }
.jaw-box {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  aspect-ratio: 440 / 580;
  max-width: 100%;
  transform: translateX(calc(-50% + var(--model-shift) * 100vw));
}
.jaw {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.jaw3d {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.scanner.is-brushing .jaw3d { touch-action: none; }
.scanner.is-2d .jaw3d { display: none; }
.scanner.is-3d .jaw,
.scanner.is-loading .jaw { opacity: 0; pointer-events: none; }
.scanner.is-3d .jaw-box,
.scanner.is-loading .jaw-box { pointer-events: none; }

.scanline {
  position: absolute; left: 0; right: 0; top: 0;
  height: 120px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(55, 212, 255, 0) 0%, rgba(55, 212, 255, .12) 85%, rgba(55, 212, 255, .85) 99%, rgba(255, 255, 255, .95) 100%);
  transform: translateY(-100%);
}
.scanner.is-scanning .scanline { animation: scan 1.6s cubic-bezier(.45, .05, .4, 1) both; }
@keyframes scan { 0% { opacity: 1; transform: translateY(-100%); } 92% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--scan-h, 700px)); } }

/* центр модели: в 3D только загрузка, в 2D ещё счётчик и анимация импланта */
.stage {
  position: absolute; left: 19%; width: 62%; top: 41.8%; height: 18%;
  display: grid; place-items: center; text-align: center; pointer-events: none; z-index: 2;
}
.stage > * { grid-area: 1 / 1; transition: opacity .25s; }
.stage-count { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.stage-count strong { font-size: clamp(30px, 7vw, 44px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.03em; text-shadow: 0 2px 14px rgba(5, 9, 30, .8); }
.stage-count span { font-size: 13px; font-weight: 500; color: var(--on-dark-muted); }
.stage-count.is-word strong { font-size: 24px; margin-bottom: 4px; }
.stage-count.bump strong { animation: bump .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.22); color: var(--cyan); } }
.scanner.is-3d .stage-count,
.scanner.is-loading .stage-count { display: none; }
.stage-loading { display: none; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--on-dark-muted); white-space: nowrap; }
.stage-loading i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(55, 212, 255, .25); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scanner.is-loading .stage-loading { display: flex; }

.stage-implant { opacity: 0; display: flex; align-items: center; gap: 10px; height: 100%; }
.implant-side { height: 100%; width: auto; overflow: visible; }
.stage-implant-text { font-size: 13px; font-weight: 600; color: var(--cyan); text-align: left; max-width: 9em; line-height: 1.25; }
.stage.is-implanting .stage-count { opacity: 0; }
.stage.is-implanting .stage-implant { opacity: 1; }
.implant-side .is-screw, .implant-side .is-abut, .implant-side .is-crown, .implant-side .is-spark { transform-box: fill-box; transform-origin: center; }
.stage.is-implanting .is-screw { animation: sideScrew 1s cubic-bezier(.3, .7, .3, 1) both; }
.stage.is-implanting .is-threads { animation: threads .2s linear 5; }
.stage.is-implanting .is-abut { animation: fadeIn .2s .95s both; }
.stage.is-implanting .is-crown { animation: sideCrown .5s 1.1s cubic-bezier(.3, 1.6, .5, 1) both; }
.stage.is-implanting .is-spark { animation: spark .7s 1.45s ease-out both; }
.implant-side .is-spark { opacity: 0; }
@keyframes sideScrew { 0% { transform: translateY(-46px); opacity: 0; } 12% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes threads { to { transform: translateY(6px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sideCrown { from { transform: translateY(-26px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spark { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

.rotate-hint {
  display: none;
  position: absolute; z-index: 2; left: 50%; bottom: 6px; transform: translateX(-50%);
  align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: #fff;
  padding: 7px 14px; border-radius: 999px; background: rgba(10, 16, 41, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  pointer-events: none; white-space: nowrap; transition: opacity .4s;
}
.rotate-hint svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.rotate-hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(55, 212, 255, .6); animation: ping 1.6s ease-out infinite; }
@keyframes hintOut { to { opacity: 0; } }
@keyframes ping { to { box-shadow: 0 0 0 10px rgba(55, 212, 255, 0); } }
.scanner.is-3d .rotate-hint { display: flex; }
@media (min-width: 1000px) { .scanner.is-3d .rotate-hint { display: none; } }
.quiz.is-form .rotate-hint, .rotate-hint.is-empty { opacity: 0; }

/* подсказка с номером зуба */
.tip {
  position: absolute; z-index: 4; left: 0; top: 0;
  padding: 6px 10px; border-radius: 10px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  pointer-events: none; opacity: 0;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity .15s;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.tip.is-on { opacity: 1; }

/* инструмент вместо курсора */
.tool-cursor {
  position: absolute; z-index: 5; left: 0; top: 0;
  width: 64px; height: 64px;
  pointer-events: none; opacity: 0;
  transform: translate(var(--cx, -100px), var(--cy, -100px));
  transition: opacity .15s;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
}
.tool-cursor svg { width: 100%; height: 100%; display: block; transform-origin: 15% 15%; }
.tool-cursor.is-on { opacity: 1; }
.tool-cursor.is-on.is-muted { opacity: .45; }
.tool-cursor.is-act svg { animation: toolAct .32s cubic-bezier(.3, 1.4, .5, 1); }
.tool-cursor[data-tool="brush"].is-scrub svg { animation: scrub .14s linear infinite alternate; }
@keyframes toolAct { 40% { transform: translate(-4px, -10px) rotate(-14deg) scale(.92); } }
@keyframes scrub { from { transform: translate(-3px, 2px) rotate(-6deg); } to { transform: translate(3px, -2px) rotate(6deg); } }

/* ---------- Счёт, как в игре ---------- */
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex: 1 1 auto; }
.stat {
  flex: 1 1 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  min-width: 0;
}
.stat b { font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.stat span { font-size: 12.5px; color: var(--on-dark-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.stat--missing span::before { background: #B4475C; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5); }
.stat--implant span::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.stat--crown span::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.stat.bump b { animation: bump .35s cubic-bezier(.3, 1.6, .5, 1); }

.teaser { display: none; }
.teaser-label { font-size: 13px; color: var(--on-dark-muted); }
.teaser-value { display: flex; align-items: center; gap: 8px; }
.teaser-value svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.teaser-value b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; transition: filter .3s; }
.teaser.is-locked .teaser-value b { filter: blur(7px); user-select: none; }
.teaser:not(.is-locked) .teaser-value b { font-size: 15px; font-weight: 600; color: var(--on-dark-muted); }
.teaser:not(.is-locked) .teaser-value svg { display: none; }

.brush-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px 8px 12px;
  border: 1px solid var(--glass-line); border-radius: 999px;
  background: var(--glass); color: #fff;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background-color .2s, border-color .2s;
}
.brush-btn svg { width: 22px; height: 22px; color: var(--cyan); }
.brush-btn:hover { border-color: rgba(55, 212, 255, .6); }
.brush-btn[aria-pressed="true"] { background: rgba(55, 212, 255, .2); border-color: var(--cyan); }
.scanner.is-2d ~ .hud .brush-btn { display: none; }

/* ---------- Панель шагов (стекло на тёмном) ---------- */
.panel {
  margin-top: 12px;
  padding: 20px 18px 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.quiz-head { scroll-margin-top: calc(var(--header-h) + 12px); }
.progress { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.progress-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 16.6%; border-radius: inherit; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.progress-label { font-size: 13px; font-weight: 600; color: var(--on-dark-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.step-title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; outline: none; letter-spacing: -.03em; }
.step-hint { margin-top: 6px; color: var(--on-dark-muted); font-size: 16px; }

.plan-mini {
  margin-top: 12px; display: none; width: 100%;
  align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--glass-line); border-radius: 14px;
  background: var(--glass); color: #fff; text-align: left; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.plan-mini-edit { color: var(--cyan); flex: none; }

.quiz-panel { margin-top: 16px; }
.step.is-entering { animation: stepIn .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.step:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 9px 16px;
  border: 1px solid var(--glass-line); border-radius: 999px;
  background: var(--glass); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: rgba(55, 212, 255, .55); }
.chip:active { transform: scale(.97); }
.chip svg { width: 18px; height: 18px; flex: none; }
.chip.is-on { background: rgba(55, 212, 255, .18); border-color: var(--cyan); }
.chip--ghost { background: transparent; color: var(--on-dark-muted); }

.note, .promo { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(55, 212, 255, .1); border: 1px solid rgba(55, 212, 255, .22); font-size: 14.5px; }

.options { display: grid; gap: 8px; }
.option {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--glass-line);
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.option:hover { border-color: rgba(55, 212, 255, .55); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option::before { content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); transition: box-shadow .15s; }
.option.is-checked, .option:has(input:checked) { background: rgba(55, 212, 255, .14); border-color: var(--cyan); }
.option.is-checked::before, .option:has(input:checked)::before { box-shadow: inset 0 0 0 6px var(--cyan); }
.option:has(input:focus-visible) { outline: 3px solid var(--cyan); outline-offset: 2px; }
.option-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.option-title { font-weight: 700; font-size: 16.5px; }
.option-text { font-size: 14px; color: var(--on-dark-muted); line-height: 1.35; }
.option-price { font-weight: 800; white-space: nowrap; font-size: 15.5px; color: var(--cyan); }

.q { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.q legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 16px; }
.q--inline { margin: 4px 0 14px; }
.q--inline legend { font-size: 14.5px; font-weight: 600; color: var(--on-dark-muted); }

.estimate {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 18px;
  background: rgba(55, 212, 255, .1); border: 1px solid rgba(55, 212, 255, .25);
  margin-bottom: 16px;
}
.estimate-plan { font-size: 14.5px; line-height: 1.4; color: var(--on-dark-muted); }
.estimate-plan strong { color: #fff; display: block; font-size: 15px; margin-bottom: 2px; }
.estimate-price { display: flex; align-items: center; gap: 8px; flex: none; }
.estimate-price svg { width: 18px; height: 18px; color: var(--cyan); }
.estimate-blur { font-size: 21px; font-weight: 800; filter: blur(7px); user-select: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 14.5px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--on-dark-muted); margin-left: 4px; }
.field input, .callback-row input {
  height: 54px; width: 100%; padding: 0 16px;
  border: 1px solid var(--glass-line); border-radius: 14px;
  background: rgba(255, 255, 255, .08); color: #fff;
  font: 500 18px/1 var(--font);
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .callback-row input::placeholder { color: rgba(255, 255, 255, .35); }
.field input:focus, .callback-row input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(55, 212, 255, .25); }
.field input.is-invalid, .callback-row input.is-invalid { border-color: #FF6B80; }
.field-error { font-size: 14px; color: #FF8A9A; font-weight: 500; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--on-dark-muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--cyan); flex: none; }
.consent a { color: var(--cyan); }

.done-price { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 20px; background: rgba(55, 212, 255, .12); border: 1px solid rgba(55, 212, 255, .3); }
.done-price-label { font-size: 13.5px; color: var(--on-dark-muted); }
.done-price strong { font-size: clamp(34px, 4vw, 46px); font-weight: 900; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--cyan); text-shadow: 0 0 30px rgba(55, 212, 255, .45); }
.done-price-note { font-size: 14px; color: var(--on-dark-muted); margin-top: 4px; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.done-actions .btn--ghost { box-shadow: inset 0 0 0 1.5px var(--glass-line); }

.quiz-nav { display: flex; gap: 10px; margin-top: 18px; }
.quiz-nav .btn--primary { flex: 1; }
.btn--back { width: 56px; padding: 0; flex: none; box-shadow: inset 0 0 0 1.5px var(--glass-line); }
.quiz-footnote { margin-top: 10px; font-size: 13px; color: var(--on-dark-muted); }
.quiz[data-step="7"] .quiz-nav { display: none; }

/* ---------- Телефон: как приложение. Модель на весь экран, шторка с шагом снизу ---------- */
.ticker { display: none; }
.sheet-grabber { display: none; }
@media (max-width: 999px) {
  .hero { padding-bottom: 150px; }
  .ticker {
    display: block; position: relative; z-index: 4;
    height: 32px; overflow: hidden;
    background: var(--cyan); color: var(--ink);
    box-shadow: 0 10px 30px -12px rgba(55, 212, 255, .8);
  }
  .ticker-track {
    display: flex; align-items: center; gap: 16px; width: max-content;
    font-weight: 900; font-size: 15px; line-height: 32px; letter-spacing: -.01em; white-space: nowrap;
    animation: marquee 22s linear infinite;
  }
  .ticker-track i { font-style: normal; font-size: 12px; }

  .hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(300px, 1fr) auto;
    grid-template-areas: "intro" "stage" "panel";
    min-height: calc(100svh - var(--header-h) - 32px);
    padding: 0;
  }
  .hero-word { top: 38%; font-size: 40vw; -webkit-text-stroke-width: 1.2px; }

  .quiz-intro { grid-area: intro; align-self: center; margin: 14px var(--gutter) 0; }
  .quiz-intro h1 { font-size: clamp(27px, 7.6vw, 36px); max-width: 7.2ch; line-height: .95; }

  .scanner { grid-area: stage; height: auto; min-height: 0; margin: 0; --model-shift: -.035; }
  .quiz.is-form .scanner { --model-shift: 0; }

  /* счёт и щётка становятся прямыми ячейками сетки */
  .hud { display: contents; }
  .brush-btn { grid-area: intro; justify-self: end; align-self: center; margin: 14px var(--gutter) 0; position: relative; z-index: 3; }
  .stats { grid-area: stage; justify-self: end; align-self: end; margin: 0 var(--gutter) 12px; position: relative; z-index: 3; flex: none; flex-direction: column; gap: 6px; }
  .stat { flex: none; }
  .stat { flex-direction: row; align-items: center; gap: 7px; padding: 5px 9px 5px 8px; border-radius: 12px; }
  .stat b { font-size: 17px; order: 2; min-width: 1ch; text-align: right; }
  .stat span { font-size: 11px; gap: 5px; }
  .brush-btn { min-height: 38px; padding: 6px 12px 6px 9px; font-size: 13px; }
  .brush-btn svg { width: 20px; height: 20px; }

  .rotate-hint { left: var(--gutter); bottom: 12px; transform: none; font-size: 12.5px; padding: 6px 12px 6px 9px; }
  .scanner.was-dragged .rotate-hint { opacity: 0; }
  .scanner.is-ready .rotate-hint { animation: hintOut .5s 7s both; }

  /* шторка */
  .panel {
    grid-area: panel;
    margin: 0;
    padding: 8px 16px calc(14px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
    border-width: 1px 0 0;
    background: linear-gradient(180deg, rgba(28, 40, 86, .82), rgba(14, 21, 50, .94));
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  .sheet-grabber { display: block; width: 38px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); margin: 0 auto 10px; }
  .progress { margin-bottom: 8px; }
  .step-title { font-size: 22px; }
  .step-hint { font-size: 14.5px; margin-top: 2px; }
  .quiz-panel { margin-top: 12px; }
  .quiz-nav { margin-top: 12px; }
  .step[data-step="1"] .chips, .step[data-step="2"] .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: -16px; padding-inline: 16px;
  }
  .step[data-step="1"] .chips::-webkit-scrollbar, .step[data-step="2"] .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  /* шаги-анкеты: модель уменьшается и остаётся сверху как «ваш план» */
  .quiz.is-form .hero-inner { min-height: 0; grid-template-rows: 0 minmax(210px, 32svh) auto; }
  .quiz.is-form .quiz-intro, .quiz.is-form .brush-btn, .quiz.is-form .stats { display: none; }
  .quiz.is-form .stat { padding: 4px 9px 4px 8px; }
  .quiz.is-form .stat b { font-size: 16px; }
}
@media (max-width: 999px) and (max-height: 760px) {
  .hero-inner { grid-template-rows: auto minmax(210px, 1fr) auto; }
  .quiz-intro { margin-top: 8px; }
  .quiz-intro h1 { font-size: 23px; }
  .brush-btn { margin-top: 8px; min-height: 34px; }
  .stat { padding: 4px 9px 4px 8px; }
  .stat b { font-size: 15px; }
  .panel { padding-top: 6px; }
  .sheet-grabber { margin-bottom: 6px; }
  .progress { margin-bottom: 6px; }
  .step-title { font-size: 20px; }
  .step-hint { font-size: 14px; }
  .quiz-panel { margin-top: 10px; }
  .chip { min-height: 40px; padding-block: 7px; font-size: 14px; }
  .quiz-nav { margin-top: 10px; }
  .quiz-nav .btn { min-height: 50px; }
  .btn--back { width: 50px; }
}

/* ---------- Компьютер: модель на весь экран, панели по бокам ---------- */
@media (min-width: 1000px) {
  .hero { min-height: max(100svh, 760px); }
  .hero-inner {
    min-height: calc(max(100svh, 760px) - var(--header-h));
    grid-template-columns: minmax(330px, 390px) minmax(0, 1fr) minmax(200px, 240px);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "intro . hud"
      "panel . hud";
    column-gap: 24px;
    padding-top: 36px;
    padding-bottom: 160px;
    align-items: start;
  }
  .scanner {
    position: absolute;
    left: 0; right: 0;
    top: var(--header-h);
    height: calc(max(100svh, 760px) - var(--header-h) - 118px);
    top: calc(var(--header-h) + 8px);
    margin: 0;
    --model-shift: .04;
  }
  .panel { margin-top: 24px; }
  .hud { flex-direction: column; align-items: stretch; align-self: center; gap: 12px; margin: 0; }
  .stats { flex-direction: column; }
  .stat { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 18px; }
  .stat b { font-size: 34px; order: 2; }
  .stat span { font-size: 14px; }
  .teaser { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .brush-btn { justify-content: center; }
  .quiz.is-form .quiz-intro { display: none; }
  .quiz.is-form .panel { margin-top: 0; }
  .quiz.is-form .hero-inner { grid-template-areas: "panel . hud" "panel . hud"; }
}
@media (min-width: 1000px) and (max-width: 1240px) {
  .scanner { --model-shift: .07; }
  .hero-inner { grid-template-columns: minmax(310px, 350px) minmax(0, 1fr) 200px; }
}

/* ---------- Ленты ---------- */
.tapes { position: absolute; left: 0; right: 0; bottom: 34px; height: 96px; z-index: 4; pointer-events: none; }
.tape { position: absolute; left: -40px; right: -40px; top: 26px; overflow: hidden; padding: 11px 0; }
.tape--back { top: 4px; }
.tape--front { background: var(--cyan); transform: rotate(-3deg); box-shadow: 0 16px 40px -14px rgba(55, 212, 255, .7); }
.tape--back { background: #fff; transform: rotate(2.5deg); opacity: .96; }
.tape-track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  font-weight: 900; font-size: clamp(22px, 3.4vw, 42px); letter-spacing: -.02em; white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.tape--front .tape-track { color: #fff; text-shadow: 0 1px 0 rgba(19, 76, 131, .15); }
.tape--back .tape-track { color: var(--ink); animation-direction: reverse; animation-duration: 40s; font-size: clamp(16px, 2vw, 24px); }
.tape-track i { font-style: normal; font-size: .8em; }
.tape--back .tape-track i { color: var(--cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================
   Поездка: маршрут рисуется при прокрутке
   ========================================================== */
.trip { position: relative; background: var(--paper); }
.trip-track { position: relative; }
.trip-sticky { padding: 72px 0 48px; }
.trip-grid { display: grid; gap: 28px; }
.trip-copy h2 { font-size: clamp(36px, 5.4vw, 72px); font-weight: 900; letter-spacing: -.045em; }
.trip-lead { margin-top: 10px; color: var(--muted); font-size: 18px; }
.trip-steps { list-style: none; counter-reset: s; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; }
.trip-steps li {
  counter-increment: s; position: relative;
  padding: 12px 0 12px 56px;
  transition: opacity .35s, transform .35s;
}
.trip-steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 10px;
  font-weight: 800; font-size: 14px; color: var(--ocean); font-variant-numeric: tabular-nums;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ice); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.trip-steps h3 { font-size: 20px; font-weight: 800; }
.trip-steps p { margin-top: 2px; color: var(--muted); font-size: 15.5px; }
.trip-map { position: relative; }
.map { display: block; width: 100%; height: auto; overflow: visible; }
.map text { font-family: var(--font); font-size: 22px; font-weight: 800; fill: var(--ink); text-anchor: middle; }
.map .map-country { font-size: 18px; font-weight: 600; fill: rgba(16, 25, 55, .4); text-anchor: start; }
.map .map-country[text-anchor="end"] { text-anchor: end; }
.map .map-river-label { font-size: 22px; font-weight: 700; font-style: italic; fill: #13A6D2; }
.map-route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.map-route--ghost { stroke: rgba(19, 76, 131, .25); stroke-width: 3; stroke-dasharray: 2 10; }
.map-route--live { stroke: var(--ocean); stroke-width: 5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.map-route--home { stroke: var(--cyan); stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; }
.map-city circle:not(.map-pulse) { fill: #fff; stroke: var(--ocean); stroke-width: 4; transition: fill .3s, stroke .3s; }
.map-city--clinic circle:not(.map-pulse) { fill: var(--cyan); stroke: #fff; }
.map-pulse { opacity: 0; transform-box: fill-box; transform-origin: center; }
.map-city.is-on .map-pulse { opacity: 1; animation: pulse 1.8s ease-out infinite; }
.map-city.is-on circle:not(.map-pulse) { fill: var(--cyan); stroke: var(--ocean); }
@keyframes pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.map-dot { fill: var(--ocean); stroke: #fff; stroke-width: 4; filter: drop-shadow(0 4px 8px rgba(19, 76, 131, .45)); opacity: 0; }
.trip-bar { display: none; }

/* режим «прокрутка рисует маршрут» включает js */
.trip.is-live .trip-track { height: 340vh; }
.trip.is-live .trip-sticky { position: sticky; top: 0; height: 100svh; padding: calc(var(--header-h) + 20px) 0 28px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.trip.is-live .trip-steps li { opacity: .3; }
.trip.is-live .trip-steps li.is-on { opacity: 1; }
.trip.is-live .trip-steps li.is-on::before { background: var(--cyan); color: var(--ink); box-shadow: 0 0 0 6px rgba(55, 212, 255, .18); }
.trip.is-live .trip-steps li.is-done::before { background: var(--ocean); color: #fff; box-shadow: none; }
.trip.is-live .map-dot { opacity: 1; }
.trip.is-live .trip-bar { display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 18px; height: 3px; border-radius: 3px; background: var(--line); }
.trip.is-live .trip-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ocean); }
.trip:not(.is-live) .map-route--live, .trip:not(.is-live) .map-route--home { stroke-dashoffset: 0; }

@media (max-width: 999px) {
  .trip.is-live .trip-grid { gap: 6px; }
  .trip.is-live .trip-map { order: -1; max-width: 400px; width: 100%; margin: 0 auto; }
  .trip.is-live .trip-copy h2 { font-size: 34px; }
  .trip.is-live .trip-lead { display: none; }
  .trip.is-live .trip-steps { position: relative; margin-top: 14px; min-height: 96px; }
  .trip.is-live .trip-steps li { position: absolute; inset: 0 auto auto 0; opacity: 0; transform: translateY(12px); pointer-events: none; }
  .trip.is-live .trip-steps li.is-on { opacity: 1; transform: none; }
}
@media (min-width: 1000px) {
  .trip-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
}

/* ==========================================================
   Уже в цене
   ========================================================== */
.bento { padding-top: 72px; padding-bottom: 40px; }
.bento h2 { font-size: clamp(36px, 5.4vw, 72px); font-weight: 900; letter-spacing: -.045em; }
.bento-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  position: relative; overflow: hidden;
  padding: 18px; border-radius: 24px;
  background: var(--ice);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  min-height: 150px;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.tile:hover { transform: translateY(-3px); }
.tile svg { width: 34px; height: 34px; color: var(--ocean); margin-bottom: auto; }
.tile h3 { font-size: 17px; font-weight: 800; }
.tile p { font-size: 14px; color: var(--muted); }
.tile strong { font-size: clamp(44px, 6vw, 84px); font-weight: 900; letter-spacing: -.05em; line-height: .95; }
.tile span { font-size: 15px; font-weight: 600; }
.tile--hero { grid-column: span 2; min-height: 220px; background: radial-gradient(80% 90% at 85% 15%, rgba(55, 212, 255, .35), transparent 60%), var(--ink); color: #fff; }
.tile--hero strong { font-size: clamp(80px, 12vw, 170px); color: var(--cyan); }
.tile--hero span { max-width: 22em; color: rgba(233, 250, 255, .8); }
.tile--cyan { background: var(--cyan); }
.tile--cyan span { color: var(--ink); }
.tile--ink { background: var(--ocean); color: #fff; }
.tile--ink span { color: rgba(233, 250, 255, .85); }
@media (min-width: 900px) {
  .bento-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(170px, auto); gap: 14px; }
  .tile--hero { grid-column: 1 / span 2; grid-row: 1 / span 2; }
  .tile { padding: 24px; }
}

/* ==========================================================
   Цены
   ========================================================== */
.prices { padding-top: 56px; padding-bottom: 56px; display: grid; gap: 24px; }
.prices-intro h2 { font-size: clamp(36px, 5.4vw, 72px); font-weight: 900; letter-spacing: -.045em; }
.prices-intro p { margin: 10px 0 22px; color: var(--muted); font-size: 18px; }
.price-list { margin: 0; display: grid; }
.price-list div { display: flex; align-items: baseline; gap: 12px; padding: 18px 4px; border-bottom: 1px solid var(--line); transition: background-color .2s, padding .2s; border-radius: 4px; }
.price-list div:first-child { border-top: 1px solid var(--line); }
.price-list div:hover { background: var(--ice); padding-inline: 14px; }
.price-list dt { font-size: 17px; font-weight: 500; flex: 1; }
.price-list dd { margin: 0; font-weight: 800; font-size: 19px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 1000px) {
  .prices { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; padding-top: 88px; }
  .price-list dt { font-size: 19px; }
  .price-list dd { font-size: 22px; }
}

/* ==========================================================
   Пациенты: бегущая лента фото
   ========================================================== */
.people { padding: 48px 0 40px; overflow: hidden; }
.people-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.people-head h2 { font-size: clamp(36px, 5.4vw, 72px); font-weight: 900; letter-spacing: -.045em; }
.people-marquee { margin-top: 26px; padding-bottom: 30px; }
.people-track { display: flex; gap: 14px; width: max-content; animation: marquee 46s linear infinite; }
.people-marquee:hover .people-track { animation-play-state: paused; }
.people-track img { width: clamp(190px, 21vw, 280px); aspect-ratio: 1; object-fit: cover; border-radius: 28px; }
.people-track img:nth-child(even) { transform: translateY(26px) rotate(1.5deg); }
.people-track img:nth-child(3n) { transform: rotate(-2deg); }

/* ==========================================================
   Финал
   ========================================================== */
.final { padding-top: 56px; padding-bottom: 72px; }
.final-box {
  border-radius: 34px; color: #fff; padding: 34px 20px; display: grid; gap: 26px;
  background: radial-gradient(70% 120% at 100% 0%, rgba(55, 212, 255, .3), transparent 55%), var(--ink);
}
.final-copy h2 { font-size: clamp(32px, 4.6vw, 60px); font-weight: 900; letter-spacing: -.04em; }
.final-copy p { margin-top: 10px; color: var(--on-dark-muted); font-size: 18px; }
.final-messengers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.callback-form { display: flex; flex-direction: column; gap: 10px; align-self: center; }
.callback-form > label { font-weight: 600; font-size: 14.5px; color: var(--on-dark-muted); }
.callback-row { display: flex; flex-direction: column; gap: 10px; }
.callback-done { padding: 14px 16px; border-radius: 14px; background: rgba(55, 212, 255, .16); font-weight: 500; }
@media (min-width: 720px) {
  .final-box { padding: 56px; }
  .callback-row { flex-direction: row; }
  .callback-row .btn { flex: none; }
}
@media (min-width: 1000px) { .final-box { grid-template-columns: 1fr 1fr; gap: 56px; } }

/* ==========================================================
   Подвал
   ========================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: 15px; }
.footer-grid { display: grid; gap: 22px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { border-radius: 50%; }
.footer-brand strong { display: block; font-size: 18px; font-weight: 800; }
.footer-brand span { color: var(--muted); font-size: 14px; }
.footer-label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.site-footer a { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-bottom a { color: var(--muted); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 32px; } }

.fab-wa {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); color: #fff;
  box-shadow: 0 12px 28px -8px rgba(24, 157, 79, .6);
  transform: translateY(120px); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.fab-wa svg { width: 30px; height: 30px; }
.fab-wa.is-visible { transform: none; }

/* ==========================================================
   2D-модель (запасной вариант, если нет WebGL2)
   ========================================================== */
.tooth { cursor: pointer; outline: none; }
.tooth.is-locked { pointer-events: none; cursor: default; }
.tooth .t-hit { fill: transparent; }
.tooth .t-body, .tooth .t-socket, .tooth .t-implant, .tooth .t-screw, .tooth .t-crown, .tooth .t-burst, .tooth .t-poof, .tooth .t-crownring, .tooth .t-spark { transform-box: fill-box; transform-origin: center; }
.tooth .t-body { transition: transform .4s cubic-bezier(.2, .8, .2, 1), opacity .32s ease; }
.tooth.is-missing .t-body, .tooth.is-implant .t-body { opacity: 0; transform: translateY(-18px) scale(1.16); }
.tooth .t-socket { opacity: 0; transition: opacity .3s .12s; }
.tooth.is-missing .t-socket, .tooth.is-implant .t-socket { opacity: 1; }
.tooth .t-ghost { opacity: 0; transition: opacity .25s; }
.scanner[data-mode="implant"] .tooth.is-missing .t-ghost { opacity: 1; animation: ghost 1.4s ease-in-out infinite, march 1.2s linear infinite; }
@keyframes ghost { 50% { stroke-opacity: .45; } }
@keyframes march { to { stroke-dashoffset: -12; } }
.tooth .t-poof { opacity: 0; }
.tooth.is-missing .t-poof { animation: poof .55s ease-out both; }
@keyframes poof { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.9); } }
.tooth .t-implant { opacity: 0; pointer-events: none; }
.tooth.is-implant .t-implant { opacity: 1; }
.tooth.is-implant .t-screw { animation: screwIn .5s cubic-bezier(.2, .8, .2, 1) both; }
.tooth.is-implant .t-crown { animation: crownOn .5s .38s cubic-bezier(.3, 1.5, .5, 1) both; }
.tooth.is-implant .t-burst { animation: burst .7s .55s ease-out both; }
.tooth .t-burst { opacity: 0; }
@keyframes screwIn { 0% { opacity: 0; transform: scale(1.9) rotate(-540deg); } 100% { opacity: 1; transform: none; } }
@keyframes crownOn { 0% { opacity: 0; transform: scale(.55); } 100% { opacity: 1; transform: none; } }
@keyframes burst { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.8); } }
.tooth .t-crownring { opacity: 0; transform: scale(.75); transition: opacity .25s, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.tooth.is-crown .t-crownring { opacity: 1; transform: none; }
.tooth .t-spark { opacity: 0; }
.tooth.is-crown .t-spark { animation: twinkle .8s .1s ease-out both; }
@keyframes twinkle { 0% { opacity: 0; transform: scale(0); } 40% { opacity: 1; transform: scale(1.2) rotate(45deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg); } }
.tooth.is-crown .t-enamel { fill: url(#gCrownNat); }
.tooth .t-ring { opacity: 0; transition: opacity .18s; }
.tooth:focus-visible .t-ring { opacity: 1; }
@media (hover: hover) {
  .tooth:hover .t-ring { opacity: .9; }
  .tooth:not(.is-missing):not(.is-implant):hover .t-body { transform: translateY(-2.5px); }
}
.scanner[data-mode="implant"] .tooth.is-locked .t-body { opacity: .5; }
.jaw .teeth-in .tooth { opacity: 0; }
.scanner.is-scanning .jaw .teeth-in .tooth { animation: fadeIn .45s ease-out both; animation-delay: var(--d, 0s); }
.scanner.is-ready .jaw .teeth-in .tooth { opacity: 1; }
.jaw .soft { opacity: 0; transition: opacity .8s ease .1s; }
.scanner.is-scanning .jaw .soft, .scanner.is-ready .jaw .soft { opacity: 1; }

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .tape-track, .people-track { animation: none; }
}
