/* Связанные экраны используют токены и общие элементы home.css. */
[hidden] { display: none !important; }
body[data-page] { min-height: 100vh; }
body[data-page] .brand { padding-left: 0; align-self: center; }
body[data-page] h1 span { color: var(--primary); }
body[data-page] h1 { font-size: clamp(42px, 5vw, 72px); line-height: 1.04; letter-spacing: -.055em; }
body[data-page] h1 br { display: block; }
.flow-header { min-height: 90px; max-width: 1512px; margin: auto; padding: 20px 44px; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--border); }
.flow-header__location { margin-left: auto; font-size: 12px; color: var(--muted); }
.flow-header__location span { margin: 0 9px; color: #a0a7a3; }
.flow-header__location strong { color: var(--text); font-weight: 600; }
.flow-header__exit { margin-left: 28px; min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; font-weight: 600; }
.flow-header__exit:hover { border-color: var(--primary); color: var(--primary); }
.flow-header__exit:disabled { opacity: .55; cursor: wait; }
.flow-header__exit span { margin-left: 14px; font-size: 16px; }
.flow-header__step { min-width: 75px; margin-left: 28px; font-size: 11px; text-align: right; color: var(--muted); letter-spacing: .12em; }
.flow-main { max-width: 1512px; margin: auto; padding: 40px 44px 96px; }
.flow-main--narrow { max-width: 1000px; padding-top: 62px; }
.page-error { margin-bottom: 18px; padding: 14px 18px; border: 1px solid #e6b4aa; border-radius: 12px; color: #913f31; background: #fff0ed; font-size: 13px; }
.flow-footer { max-width: 1512px; margin: auto; padding: 22px 44px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.flow-intro { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 40px; margin-bottom: 34px; }
.flow-intro .eyebrow { flex-basis: 100%; }
.flow-intro p:last-child { max-width: 300px; margin: 0 0 4px auto; color: var(--muted); font-size: 13px; line-height: 1.6; }
.session-progress { margin-bottom: 20px; }
.session-progress__labels { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; font-size: 12px; }
.session-progress__labels span:first-child { font-weight: 600; }
.session-progress__labels span:last-child { color: var(--muted); }
.session-progress progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface-muted); accent-color: var(--primary); }
.session-progress progress::-webkit-progress-bar { background: var(--surface-muted); }
.session-progress progress::-webkit-progress-value { background: var(--primary); }
.session-progress progress::-moz-progress-bar { background: var(--primary); }
.session-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: stretch; }
.stage-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stage-card__content { min-height: 560px; padding: 28px; display: flex; flex-direction: column; }
.stage-card__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.stage-card__fraction { color: var(--primary); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.stage-card__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .85fr); gap: 24px; flex: 1; align-items: center; }
.stage-card__copy { position: relative; z-index: 1; padding: 30px 0; }
.stage-card__timer-label { font-size: 12px; color: var(--muted); }
.stage-card__timer { margin: 5px 0 30px; font-size: clamp(72px, 8vw, 124px); line-height: 1; font-weight: 500; letter-spacing: -.09em; font-variant-numeric: tabular-nums; }
.stage-card h2 { max-width: 470px; font-size: clamp(30px, 3vw, 48px); line-height: 1.12; letter-spacing: -.045em; font-weight: 600; }
.stage-card__description { max-width: 400px; margin-top: 15px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.stage-card__visual { position: relative; align-self: stretch; min-height: 350px; display: grid; place-items: center; overflow: hidden; background: var(--primary-container); border-radius: 18px; }
.stage-card__visual-ring { position: absolute; width: 380px; aspect-ratio: 1; border: 1px solid #b7ddd2; border-radius: 50%; box-shadow: 0 0 0 62px #e6f5ee, 0 0 0 63px #cce8df; }
.stage-card__visual img { position: relative; z-index: 1; width: 96%; height: 100%; max-height: 450px; object-fit: contain; }
.stage-card__visual-number { position: absolute; z-index: 2; right: 18px; bottom: 10px; color: #0a4f4530; font-size: 130px; line-height: 1; letter-spacing: -.1em; }
.stage-card__actions { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 10px; padding-top: 24px; border-top: 1px solid var(--border); }
.camera-view { position: absolute; inset: 0; z-index: 3; overflow: hidden; background: #17201f; }
.camera-view__video, .camera-view__overlay { position: absolute; width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); }
.camera-view__overlay { pointer-events: none; }
.camera-controls { padding-top: 14px; }
.camera-controls .button { min-height: 44px; justify-content: center; font-size: 12px; }
.camera-controls__hint, .camera-controls__status { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.camera-controls__status { color: var(--on-primary-container); }
.button--secondary { background: var(--background); border: 1px solid var(--border); }
.button--secondary:hover { border-color: var(--primary); color: var(--primary); }
.stage-card--transition { background: var(--primary-container); border-color: var(--primary-container); }
.stage-card--transition .stage-card__visual { background: #c2e7dc; }
.stage-card--transition .stage-card__visual img { opacity: .24; }
.stage-card--transition .stage-card__visual-number { color: var(--on-primary-container); }
.stage-card--transition .stage-card__timer-label, .stage-card--transition .stage-card__description { color: var(--on-primary-container); }
.stage-card--transition .stage-card__actions { border-color: #b7ddd2; }
.session-side { display: flex; flex-direction: column; min-width: 0; padding: 26px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.session-side__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 19px; border-bottom: 1px solid var(--border); }
.session-side__heading > span:last-child { color: var(--muted); font-size: 11px; }
.session-side__list { list-style: none; margin: 16px 0 auto; padding: 0; }
.session-side__list li { display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 8px 4px; border-radius: 10px; color: var(--muted); font-size: 12px; }
.session-side__list li.is-current { color: var(--on-primary-container); background: var(--primary-container); font-weight: 600; }
.session-side__list li.is-done { color: var(--text); }
.session-side__number { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; font-size: 11px; font-weight: 600; }
.session-side__list .is-current .session-side__number { border-color: #a7d6c8; }
.session-side__list .is-done .session-side__number { border-color: var(--primary-container); background: var(--primary-container); color: var(--primary); }
.session-side__bottom { margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.session-side__bottom button { display: block; min-height: 44px; padding: 0; color: var(--primary); font-size: 12px; font-weight: 600; text-align: left; }
.session-side__bottom button:hover:not(:disabled) { text-decoration: underline; }
.session-side__bottom button:disabled { color: #9da9a5; cursor: default; }
.session-side__bottom > span { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pause-dialog { width: min(440px, calc(100% - 32px)); padding: 38px; border: 0; border-radius: 24px; text-align: center; color: var(--text); background: var(--surface); box-shadow: 0 30px 90px #17201f24; }
.pause-dialog::backdrop { background: #17201fa8; }
.pause-dialog__mark { width: 64px; height: 64px; margin: 0 auto 25px; display: grid; place-items: center; border-radius: 50%; color: var(--on-primary-container); background: var(--primary-container); font-size: 28px; }
.pause-dialog h2 { margin-top: 10px; font-size: 30px; line-height: 1.15; letter-spacing: -.04em; }
.pause-dialog p:not(.eyebrow) { margin: 14px 0 26px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.pause-dialog__finish { min-height: 44px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.pause-dialog__finish:hover { color: var(--primary); }
.result-hero { position: relative; overflow: hidden; min-height: 400px; padding: 48px; border-radius: var(--radius); background: #143e37; color: white; }
.result-hero__mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 36px; border-radius: 50%; background: #d9f0ea; color: var(--on-primary-container); }
.result-hero__mark .icon { width: 29px; height: 29px; }
.result-hero .eyebrow { color: #a8dacf; }
.result-hero h1 { position: relative; z-index: 1; margin-top: 12px; }
.result-hero h1 span { color: #81d7c0; }
.result-hero > p:last-of-type { position: relative; z-index: 1; max-width: 360px; margin-top: 19px; color: #d2e7df; font-size: 14px; line-height: 1.6; }
.result-hero__ornament { position: absolute; right: -32px; top: -80px; width: 390px; height: 390px; border: 1px solid #ffffff30; border-radius: 50%; }
.result-hero__ornament span { position: absolute; inset: 38px; border: 1px solid #ffffff30; border-radius: 50%; }
.result-hero__ornament span:nth-child(2) { inset: 76px; }
.result-hero__ornament span:nth-child(3) { inset: 114px; background: #d9f0ea1b; }
.result-summary { margin-top: 20px; padding: 28px 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.result-summary__heading { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.result-summary__heading h2 { font-size: 16px; }
.result-summary__heading span { color: var(--muted); font-size: 12px; }
.result-summary__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 25px; }
.result-summary__stats > div { display: flex; flex-direction: column; gap: 7px; }
.result-summary__stats strong { font-size: 52px; font-weight: 500; line-height: 1; letter-spacing: -.06em; }
.result-summary__stats small { font-size: 16px; font-weight: 400; letter-spacing: 0; }
.result-summary__stats span { color: var(--muted); font-size: 12px; }
.result-summary__note { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; line-height: 1.6; }
.result-actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.result-actions .button { max-width: 360px; }
.result-actions__home { display: grid; place-items: center; min-height: 54px; padding: 0 16px; color: var(--muted); font-size: 12px; }
.result-actions__home:hover { color: var(--primary); }
.feedback-intro { margin-bottom: 30px; }
.feedback-intro h1 { margin-top: 14px; }
.feedback-intro > p:last-child { margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.feedback-form { padding: 30px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.feedback-form__options legend { margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.feedback-form__options label { position: relative; display: flex; align-items: center; gap: 16px; min-height: 82px; margin-bottom: 10px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.feedback-form__options label:hover { border-color: var(--primary); }
.feedback-form__options label:has(input:checked) { border-color: var(--primary); background: var(--primary-container); }
.feedback-form__options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.feedback-form__options label:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
.feedback-form__icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--on-primary-container); background: var(--primary-container); font-size: 25px; font-weight: 300; }
.feedback-form__options strong { display: block; font-size: 14px; font-weight: 600; }
.feedback-form__options small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.feedback-form__radio { width: 20px; height: 20px; margin-left: auto; border: 1.5px solid #acb7b1; border-radius: 50%; }
.feedback-form__options label:has(input:checked) .feedback-form__radio { border: 6px solid var(--primary); }
.feedback-form__comment { display: block; margin: 26px 0 20px; font-size: 13px; font-weight: 600; }
.feedback-form__comment small { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.feedback-form__comment textarea { display: block; width: 100%; min-height: 105px; margin-top: 12px; padding: 16px; resize: vertical; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--background); font: inherit; font-size: 13px; line-height: 1.5; }
.feedback-form__comment textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.feedback-form__comment textarea::placeholder { color: var(--muted); }
.feedback-form__skip { display: grid; place-items: center; min-height: 44px; margin-top: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.feedback-form__skip:hover { color: var(--primary); }
.feedback-done { padding: 46px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: center; }
.feedback-done__mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 28px; border-radius: 50%; color: var(--on-primary-container); background: var(--primary-container); }
.feedback-done h2 { max-width: 500px; margin: 12px auto; font-size: 36px; line-height: 1.15; letter-spacing: -.04em; }
.feedback-done > p:last-of-type { color: var(--muted); font-size: 13px; }
.feedback-done .button { max-width: 300px; margin: 28px auto 0; }

@media (max-width: 1000px) {
  .flow-header { padding-right: 28px; padding-left: 28px; }
  .flow-main { padding-right: 28px; padding-left: 28px; }
  .flow-footer { padding-right: 28px; padding-left: 28px; }
  .session-layout { grid-template-columns: minmax(0, 1fr); }
  .stage-card__content { min-height: 500px; }
  .session-side__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
}
@media (max-width: 720px) {
  .flow-header { min-height: 70px; padding: 14px 20px; gap: 12px; }
  .flow-header .brand { font-size: 30px; }
  .flow-header__location { display: none; }
  .flow-header__exit, .flow-header__step { margin-left: auto; }
  .flow-main { padding: 28px 20px calc(40px + env(safe-area-inset-bottom)); }
  .flow-main--narrow { padding-top: 34px; }
  .flow-footer { padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); }
  body[data-page] h1 { font-size: clamp(39px, 10vw, 50px); }
  .flow-intro { margin-bottom: 26px; }
  .flow-intro p:last-child { margin: 7px 0 0; max-width: 350px; font-size: 12px; }
  .session-layout { gap: 14px; }
  .stage-card__content { min-height: 0; padding: 20px; }
  .stage-card__main { grid-template-columns: 1fr; gap: 0; }
  .stage-card__copy { padding: 24px 0 20px; }
  .stage-card__timer { margin-bottom: 20px; font-size: clamp(70px, 19vw, 110px); }
  .stage-card h2 { font-size: 32px; }
  .stage-card__description { margin-top: 10px; font-size: 12px; }
  .stage-card__visual { grid-row: 1; min-height: 200px; max-height: 230px; }
  .stage-card__visual-ring { width: 240px; box-shadow: 0 0 0 36px #e6f5ee, 0 0 0 37px #cce8df; }
  .stage-card__visual img { width: 70%; height: 220px; }
  .stage-card__visual-number { font-size: 90px; }
  .stage-card__actions { grid-template-columns: minmax(0, 1fr) 100px; padding-top: 18px; }
  .stage-card__actions .button { padding: 12px; font-size: 12px; }
  .stage-card__actions .button .icon { width: 18px; }
  .session-side { padding: 20px; }
  .session-side__list { grid-template-columns: 1fr; }
  .session-side__list li { min-height: 48px; }
  .result-hero { min-height: 350px; padding: 32px 28px; }
  .result-hero__mark { margin-bottom: 34px; }
  .result-hero__ornament { right: -190px; }
  .result-hero > p:last-of-type { font-size: 12px; }
  .result-summary { padding: 24px 22px; }
  .result-summary__stats strong { font-size: 42px; }
  .result-actions { display: block; }
  .result-actions .button { max-width: none; }
  .feedback-intro > p:last-child { font-size: 12px; }
  .feedback-form { padding: 20px; }
  .feedback-form__options label { min-height: 74px; gap: 11px; padding: 12px; }
  .feedback-form__icon { flex-basis: 38px; height: 38px; }
  .feedback-done { padding: 36px 24px; }
  .feedback-done h2 { font-size: 30px; }
}
@media (max-width: 380px) {
  .stage-card__actions { grid-template-columns: 1fr; }
  .result-summary__stats { gap: 10px; }
  .result-summary__stats strong { font-size: 36px; }
  .feedback-form__options small { font-size: 10px; }
}
