:root {
  color-scheme: dark;
  --surface: #10192b;
  --panel: #192b45;
  --cyan: #85dfff;
  --muted: #b7c8df;
  --line: #3b526f;
  --orange: #ffd094;
  --green: #a3eecf;
  font: 16px/1.5 "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: #f6f9ff; background: #0a1426; }
.layout {
  width: min(1020px, calc(100% - 48px));
  margin-inline: auto;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 412px);
  gap: clamp(32px, 8vw, 112px);
  align-items: start;
  padding: 44px 0;
}
.intro { position: sticky; top: 40px; padding-block: 18px; }
.intro .back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 36px; }
a { color: var(--cyan); text-underline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.07; letter-spacing: -.04em; }
h1 { font-size: clamp(40px, 6vw, 72px); margin: 12px 0 16px; }
h2 { font-size: clamp(30px, 8vw, 39px); }
h3 { font-size: 22px; }
.intro > p:last-child { color: var(--muted); max-width: 33ch; }
.phone { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: clip; }
.hud { padding: 18px 22px 12px; display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 26px; line-height: 1; font-weight: 850; letter-spacing: -.075em; }
.brand span { color: var(--cyan); }
.clock { color: var(--cyan); background: #173c60; padding: 3px 10px; border-radius: 100px; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.clock.warn { color: var(--orange); background: #573921; }
.track { display: flex; gap: 4px; padding: 0 22px; }
.track i { width: 33.333%; height: 3px; background: #263b58; border-radius: 10px; }
.track i.active { background: var(--cyan); }
.screen { padding: 24px 22px; min-height: 610px; display: grid; align-content: start; gap: 14px; }
.screen > p, .muted { color: var(--muted); }
.screen > h2:focus { outline: none; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .025em; color: var(--cyan) !important; }
.eyebrow.alert { color: var(--orange) !important; }
.steps, .zone-list, .answers { display: grid; gap: 8px; margin: 0; padding: 0; }
.steps { margin-block: 4px; }
.steps li, .zone-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 11px 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px;
}
.steps li { list-style: none; }
.steps li b { flex: 0 0 34px; color: var(--cyan); }
.steps li span { flex: 1; }
button {
  width: 100%; min-height: 48px; padding: 9px 12px; text-align: center; cursor: pointer;
  border: 1px solid transparent; border-radius: 9px; line-height: 1.22;
  font-family: inherit; font-weight: 750; font-size: 15px; color: #0a233e; background: #8edfFF;
}
button:hover { background: #bdeeff; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
button.secondary { background: #213854; color: #f0f7ff; border-color: #496a91; }
button.secondary:hover { background: #2b486b; }
button:disabled { cursor: default; background: #14283f; color: #acbdd2; border-color: #39516e; }
.zone-list li { font-size: 14px; padding-block: 8px; }
.zone-list li span { color: var(--muted); font-size: 12px; }
.zone-list li .ready { color: var(--green); }
.search-grid {
  display: grid; gap: 2px; overflow: hidden; position: relative; background: #142741;
  padding: 12px 7px; border-radius: 10px; box-shadow: inset 0 0 0 1px #5483ae;
}
.search-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.search-word {
  font: 800 clamp(9px, 2.7vw, 12px)/1.1 ui-monospace, monospace; letter-spacing: .02em;
  min-height: 44px; padding: 3px; color: #ecf8ff; background: transparent;
}
.search-word:hover { color: #0a233e; }
.search-word:disabled { color: var(--green); background: #1b3d45; }
.viewfinder {
  min-height: 182px; display: grid; place-items: center; position: relative; overflow: hidden;
  border-radius: 10px; background: radial-gradient(ellipse at center, #174565, #0b1d34 72%);
}
.viewfinder-corners { position: absolute; inset: 17px; }
.viewfinder-corners i { position: absolute; width: 23px; height: 23px; border: 2px solid var(--cyan); border-radius: 2px; }
.viewfinder-corners i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.viewfinder-corners i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.viewfinder-corners i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.viewfinder-corners i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.viewfinder-pattern { display: grid; text-align: center; color: #bde8fa; font: 800 13px/1.35 ui-monospace, monospace; letter-spacing: .07em; }
.task-card { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.task-card span { color: var(--cyan); font-weight: 750; display: block; margin-bottom: 4px; }
.feedback:empty {
  position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; clip-path: inset(50%);
}
.feedback { background: #412f1e; color: #ffe1b8 !important; border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.order-list { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0; }
.order-list li { text-align: center; background: #263958; padding: 11px 1px; border-radius: 7px; font-size: 13px; }
.order-list li.urgent { background: #583b25; color: var(--orange); }
.orders-info { font-size: 14px; }
.answers button { text-align: left; padding-inline: 13px; }
.score {
  padding: 15px 16px; background: #083b68; border: 1px solid #4d96c9; border-radius: 12px; display: flex;
  align-items: baseline; gap: 8px;
}
.score strong { font-size: 38px; line-height: 1; color: var(--cyan); }
.result-stats { margin: 0; display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; }
.result-stats > div { display: flex; justify-content: space-between; gap: 10px; background: var(--panel); padding: 10px 11px; }
.result-stats dt { color: var(--muted); font-size: 14px; }
.result-stats dd { margin: 0; text-align: right; font-weight: 700; font-size: 14px; }
@media (max-width: 740px) {
  .layout { width: min(440px, 100%); display: block; padding: 0 0 12px; }
  .intro { position: static; padding: 0 16px; }
  .intro .back { font-size: 13px; margin-bottom: 0; min-height: 40px; }
  .intro > :not(.back, h1) { display: none; }
  .intro h1 {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .phone { border-radius: 13px; }
  .screen { min-height: 600px; }
}

[hidden] { display: none !important; }
.camera-stage {
  position: relative; height: clamp(255px, 72vw, 340px); margin: 14px 0 0;
  overflow: hidden; isolation: isolate; background: #0b1627;
}
.camera-stage video, .ar-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.camera-stage video { object-fit: cover; }
.camera-stage:not([hidden])::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  left: 7%; top: 17%; width: 86%; height: 70%; border: 2px solid #a6efff;
  border-radius: 18px; box-shadow: 0 0 0 999px #06111a38, 0 0 18px #36c8ff99;
}
.camera-stage[data-tracking="found"]::before { border-color: #8af0be; box-shadow: 0 0 0 999px #06111a38, 0 0 22px #64e8aeaa; }
.camera-stage:not([hidden]) + .screen { min-height: 0; }
.ar-overlay { pointer-events: none; }
.ar-status {
  position: absolute; left: 10px; top: 10px; z-index: 2; color: #f1faff;
  font-size: 13px; font-weight: 750; padding: 7px 10px; border: 1px solid #537595;
  border-radius: 7px; background: #10253de8; pointer-events: none;
}
.ar-node {
  position: absolute; z-index: 1; width: max-content; max-width: 116px; min-height: 42px;
  transform: translate(-50%, -50%); padding: 6px 9px; border: 2px solid #8adfff;
  border-radius: 9px; background: #0b3152ed; color: #f2fbff;
  box-shadow: 0 0 2px 2px #102133, 0 0 14px #00a0ff99;
  font-size: 13px; line-height: 1.16; font-weight: 800; text-align: center;
}
span.ar-node { display: grid; align-items: center; }
button.ar-node { min-height: 44px; pointer-events: auto; }
.ar-node[data-offscreen] { visibility: hidden; }
button.ar-node:hover { color: #062334; background: #b5eaff; }
.ar-node[data-tone="orange"] { border-color: #ffd094; background: #563920f2; box-shadow: 0 0 12px #fdb76688; }
.ar-node[data-tone="green"] { border-color: #a3eecf; background: #125343ed; box-shadow: 0 0 12px #67e4b599; }
.ar-node:disabled { border-color: #a4b5c8; background: #23334bee; color: #e2ebf7; box-shadow: none; }
.ar-line {
  position: absolute; left: 0; top: 0; height: 6px; border-radius: 10px;
  transform-origin: left center; background: repeating-linear-gradient(90deg, #75dfff 0 11px, #147ba8 11px 21px);
  color: #9cecff; box-shadow: 0 0 9px currentColor; animation: transfer 700ms linear infinite;
}
.ar-line::before, .ar-line::after {
  position: absolute; top: 50%; width: 10px; height: 10px; border: 2px solid currentColor;
  border-radius: 50%; background: #122a43; content: ""; transform: translateY(-50%);
}
.ar-line::before { left: -3px; }
.ar-line::after { right: -3px; }
.ar-line[data-tone="green"] { background: #86ffca; color: #86ffca; box-shadow: 0 0 13px currentColor; }
.ar-line[data-tone="orange"] { background: #ffc47a; color: #ffc47a; box-shadow: 0 0 13px currentColor; }
.ar-packet {
  position: absolute; top: 50%; left: var(--from, 0%); z-index: 1;
  width: 9px; height: 9px; border-radius: 50%;
  background: #bdeeff; color: #bdeeff; box-shadow: 0 0 8px currentColor;
  animation: cascade-travel 2.1s linear infinite;
}
.ar-packet[data-tone="orange"] { background: #ffc47a; color: #ffc47a; }
.ar-packet[data-tone="green"] { background: #86ffca; color: #86ffca; }
.ar-line[data-tone="stopped"] {
  background: #33506e; color: #63809e; box-shadow: none; animation: none; opacity: .75;
}
@keyframes transfer { to { background-position: 21px; } }
@keyframes cascade-travel { from { left: var(--from, 0%); } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .ar-line { animation: none; }
  .ar-packet { animation: none; }
}

.target-page main { width: min(760px, calc(100% - 28px)); margin: 20px auto; text-align: center; }
.target-page h1 { font-size: clamp(28px, 6vw, 43px); }
.target-page img { display: block; width: min(100%, 72svh); height: auto; margin: 14px auto 0; }

.camera-help { margin: 0 22px 20px; border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); }
.camera-help:not([open]) > a { display: none; }
.camera-help summary { cursor: pointer; padding-block: 8px; font-size: 14px; }
.camera-help textarea {
  display: block; width: 100%; margin-top: 8px; padding: 8px; resize: vertical;
  background: #0e1729; color: #f2f7ff; border: 1px solid var(--line); border-radius: 8px;
}
.camera-help [role="status"] { font-size: 13px; margin-top: 5px; }
.camera-continue {
  position: absolute; z-index: 3; inset: auto 16px 14px; width: auto; min-height: 44px;
}
