:root {
  --navy: #003a70; --navy-2: #002a52; --navy-ink: #0b2545;
  --yellow: #FBCE07; --blue: #0098C9; --sky: #89CFDC;
  --green: #008443; --orange: #EB8705; --purple: #641964;
  --ink: #16202e; --mute: #5b6577; --line: #e2e7ee; --paper: #f4f6f9; --card: #ffffff;
  --taken: #d3d9e2; --ok: #0f8a4b; --warn: #b45309; --bad: #c0362c;
  --r: 18px; --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 12px 40px -12px rgba(11, 37, 69, .18);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 500 15px/1.5 var(--font); color: var(--ink); background: var(--paper); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy); }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- верх ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 16px 20px 0; }
.top .logo-nx { height: 30px; width: auto; display: block; }
.lang { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .04em; cursor: pointer; color: var(--mute); }
.lang button[aria-pressed=true] { background: var(--navy); color: #fff; }

/* ---------- обложка ---------- */
.hero { position: relative; max-width: 1120px; margin: 0 auto; padding: 26px 20px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.wordmark { display: block; width: min(440px, 78vw); height: auto; }
.lead { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.4; font-weight: 600; color: var(--navy-ink); margin: 18px 0 16px; max-width: 34ch; text-wrap: balance; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--mute); font-size: 14px; }
.facts li { display: flex; gap: 8px; align-items: center; }
.facts svg { flex: 0 0 auto; color: var(--navy); }
.hero-sign { width: clamp(150px, 22vw, 250px); height: auto; filter: drop-shadow(0 18px 30px rgba(0, 58, 112, .18)); }
.live { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 18px; padding: 8px 14px 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--mute); }
.live b { font-size: 18px; color: var(--navy); font-variant-numeric: tabular-nums; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(0, 132, 67, .5); animation: ping 2s infinite; align-self: center; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(0, 132, 67, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 132, 67, 0); } }

/* ---------- карточка шагов ---------- */
.flow { max-width: 1120px; margin: 18px auto 0; padding: 0 20px 40px; }
.card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.steps { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 16px 20px; font-weight: 700; font-size: 14px; color: #9aa4b4; position: relative; }
.steps li i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-size: 13px; }
.steps li[aria-current=step] { color: var(--navy); }
.steps li[aria-current=step] i { background: var(--yellow); color: var(--navy); }
.steps li.done { color: var(--navy); }
.steps li.done i { background: var(--navy); color: #fff; }
.steps li[aria-current=step]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--yellow); }
.pane { padding: 28px; }
.pane[hidden] { display: none; }
.pane h2 { margin: 0 0 4px; font-size: 22px; color: var(--navy); letter-spacing: -.01em; }
.pane .sub { margin: 0 0 22px; color: var(--mute); }

/* ---------- форма ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 700; font-size: 13px; color: var(--navy-ink); }
.field label small, .field .label small { font-weight: 500; color: #8a93a3; }
.input { width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcfd; font-size: 16px; font-weight: 600; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:hover { border-color: #cbd3de; }
.input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(0, 152, 201, .14); }
.field.err .input { border-color: var(--bad); background: #fffafa; }
.help { font-size: 12.5px; color: #8a93a3; min-height: 0; }
.field.err .help { color: var(--bad); font-weight: 600; }
.hint { display: none; font-size: 13px; background: #fff8db; border: 1px solid #f4dd7a; color: #6b5300; padding: 8px 10px; border-radius: 10px; }
.hint.on { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint button { border: 0; background: var(--navy); color: #fff; border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--navy-ink); transition: all .15s; }
.chip:hover { border-color: #b9c4d3; }
.chip[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.consent { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--mute); cursor: pointer; margin-top: 6px; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: 0 0 auto; }
.consent.err { color: var(--bad); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; border: 0; font-weight: 800; font-size: 15.5px; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--yellow); color: var(--navy); box-shadow: 0 8px 20px -8px rgba(212, 170, 0, .8); }
.btn.primary:hover { background: #ffd92e; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.navy:hover { background: #004a8c; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: #b9c4d3; background: #fff; }
.btn.link { background: none; height: auto; padding: 8px 4px; color: var(--mute); font-weight: 700; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.formmsg { font-weight: 600; font-size: 14px; color: var(--bad); }

/* ---------- схема ---------- */
.maphead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--navy-ink); }
.tab i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.tab small { font-weight: 600; color: #8a93a3; font-size: 12px; font-variant-numeric: tabular-nums; }
.tab[aria-selected=true] { border-color: var(--navy); background: var(--navy); color: #fff; }
.tab[aria-selected=true] small { color: #b9d3ea; }
.mapwrap { position: relative; border-radius: 18px; background: radial-gradient(120% 90% at 50% 100%, #eaf2f8 0%, #f7f9fb 60%); border: 1px solid var(--line); overflow: hidden; }
.map { height: min(62vh, 620px); min-height: 340px; touch-action: none; user-select: none; -webkit-user-select: none; }
.hall-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.hall-svg.dragging { cursor: grabbing; }
.hall-svg .stage rect { fill: var(--navy); }
.hall-svg .stage text { fill: #fff; font: 800 15px var(--font); letter-spacing: .3em; text-anchor: middle; dominant-baseline: central; }
.hall-svg .rowlbl text { font: 700 7.5px var(--font); fill: #8a93a3; text-anchor: middle; dominant-baseline: central; }
.hall-svg .seat { fill: var(--c); stroke: rgba(0, 0, 0, .12); stroke-width: .5; transition: fill .2s; }
.hall-svg .seat.rv.st-free { fill-opacity: .5; stroke: var(--c); stroke-dasharray: 1.6 1.2; stroke-width: .8; }
.hall-svg .seat.st-taken { fill: var(--taken); stroke: none; }
.hall-svg .seat.st-blocked { fill: url(#hatch); stroke: #c3cbd6; stroke-width: .5; }
.hall-svg .seat.sel { fill: var(--yellow); stroke: var(--navy); stroke-width: 1.6; fill-opacity: 1; stroke-dasharray: none; }
.hall-svg .nums text { font: 700 5.6px var(--font); fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; opacity: 0; transition: opacity .2s; }
.hall-svg.show-nums .nums text { opacity: 1; }
.hall-svg .nums text.n-taken, .hall-svg .nums text.n-blocked { fill: #8a93a3; }
.hall-svg .nums text.sel { fill: var(--navy); }
.hall-svg .sel-ring { fill: none; stroke: var(--yellow); stroke-width: 2.4; pointer-events: none; animation: ring 1.4s ease-in-out infinite; }
@keyframes ring { 50% { stroke-width: 6; stroke-opacity: .35; } }
@media (hover: hover) { .hall-svg .seat.st-free:hover { stroke: var(--navy); stroke-width: 1.4; } }
.zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .94); cursor: pointer; display: grid; place-items: center; color: var(--navy); box-shadow: 0 2px 8px rgba(11, 37, 69, .08); }
.zoom button:hover { background: #fff; }
.maptip { position: absolute; left: 12px; top: 12px; right: 64px; font-size: 12.5px; color: var(--mute); pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 2px 0; font-size: 13px; color: var(--mute); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-free { background: linear-gradient(90deg, var(--green) 25%, var(--blue) 25% 50%, var(--orange) 50% 75%, var(--purple) 75%); }
.lg-taken { background: var(--taken); }
.lg-blocked { background: repeating-linear-gradient(45deg, #e8ecf2 0 2px, #b8c1ce 2px 3.5px); }
.lg-sel { background: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--navy); }
.lg-rest { background: rgba(100, 25, 100, .45); outline: 1px dashed var(--purple); }
.pick { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 -8px 30px -16px rgba(11, 37, 69, .35); }
.pick .what { min-width: 0; }
.pick .what b { display: block; font-size: 18px; color: var(--navy); }
.pick .what span { display: block; font-size: 13px; color: var(--mute); }
.pick .what .warn { color: var(--warn); font-weight: 700; }
.pick .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy-ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- сводка и билет ---------- */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary .box { background: var(--paper); border-radius: 14px; padding: 14px 16px; }
.summary .box small { display: block; color: var(--mute); font-weight: 600; font-size: 12.5px; }
.summary .box b { font-size: 16px; color: var(--navy-ink); word-break: break-word; }
.summary .box.email { grid-column: 1 / -1; background: #fff8db; border: 1px solid #f4dd7a; }
.summary .box.email b { font-size: 19px; }

.ticket { --w: 420px; width: min(var(--w), 100%); margin: 0 auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.ticket .bar { height: 7px; background: var(--yellow); }
.ticket .head { padding: 22px 24px 4px; }
.ticket .head img { width: 168px; height: auto; display: block; }
.ticket .head small { display: block; margin-top: 8px; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.ticket .who { padding: 14px 24px 16px; }
.ticket .who small { color: var(--mute); font-weight: 600; font-size: 13px; }
.ticket .who b { display: block; font-size: 24px; line-height: 1.2; color: var(--navy); margin-top: 2px; }
.seatgrid { margin: 0 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; background: var(--navy); border-radius: 16px; color: #fff; text-align: center; }
.seatgrid div { padding: 14px 6px; border-right: 1px solid rgba(255, 255, 255, .16); }
.seatgrid div:last-child { border: 0; }
.seatgrid b { display: block; font-size: 28px; line-height: 1.1; }
.seatgrid div:first-child b { font-size: 19px; line-height: 1.5; }
.seatgrid div:last-child b { color: var(--yellow); }
.seatgrid small { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #a9cbe9; font-weight: 700; }
.ticket .wherel { margin: 10px 24px 0; font-size: 13px; color: var(--mute); }
.ticket .wherel .warn { color: var(--warn); font-weight: 700; }
.perf { position: relative; height: 26px; margin: 18px 0 4px; }
.perf::before { content: ''; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed var(--line); }
.perf::after, .perf i { content: ''; position: absolute; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); }
.perf::after { right: -13px; } .perf i { left: -13px; }
.ticket .qr { text-align: center; padding: 6px 24px 8px; }
.ticket .qr img { width: 216px; height: 216px; display: block; margin: 0 auto; image-rendering: pixelated; }
.ticket .qr code { display: block; margin-top: 6px; font: 800 17px/1.4 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing: .14em; color: var(--navy); }
.ticket .qr small { color: var(--mute); font-size: 12.5px; }
.ticket .when { margin: 14px 24px 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); display: grid; gap: 6px; }
.ticket .when span { display: flex; gap: 10px; align-items: flex-start; }
.ticket .when svg { flex: 0 0 auto; color: var(--navy); margin-top: 2px; }
.ticket .stamp { position: absolute; right: 18px; top: 22px; transform: rotate(8deg); border: 3px solid var(--ok); color: var(--ok); border-radius: 10px; padding: 4px 10px; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .9); }
.ticket .stamp.bad { border-color: var(--bad); color: var(--bad); }
.ticket .stamp.wait { border-color: var(--warn); color: var(--warn); }
.success { text-align: center; }
.success .ok-ic { width: 60px; height: 60px; border-radius: 50%; background: #e6f6ee; color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; }
.success h2 { margin-bottom: 6px; }
.success .mailline { color: var(--mute); margin: 0 0 4px; }
.success .mailline b { color: var(--navy-ink); }
.success .spam { color: #8a93a3; font-size: 13px; margin: 0 0 22px; }
.success .ticket { text-align: left; }
.success .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- диалог ---------- */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(520px, calc(100vw - 24px)); box-shadow: 0 30px 80px -20px rgba(11, 37, 69, .5); color: var(--ink); }
dialog::backdrop { background: rgba(11, 37, 69, .55); backdrop-filter: blur(3px); }
.dlg { padding: 26px; }
.dlg h3 { margin: 0 0 6px; font-size: 21px; color: var(--navy); }
.dlg p { margin: 0 0 16px; color: var(--mute); }
.cand { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cand b { display: block; color: var(--navy-ink); font-size: 16px; }
.cand span { display: block; font-size: 13.5px; color: var(--mute); }
.cand .btn { height: 44px; padding: 0 18px; font-size: 14px; }
.dlg .foot { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dlg .result { background: #e6f6ee; color: #0b5c33; border-radius: 14px; padding: 14px 16px; font-weight: 600; margin-bottom: 14px; }

footer.foot { max-width: 1120px; margin: 0 auto; padding: 10px 20px 40px; color: #8a93a3; font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
footer.foot img { height: 26px; width: auto; opacity: .9; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 18px; }
  .hero-sign { position: absolute; right: 12px; top: 14px; width: 84px; }
  .hero .eyebrow { padding-right: 96px; line-height: 1.6; }
  .wordmark { width: min(260px, 62vw); }
  .flow { padding: 0 10px 30px; }
  .pane { padding: 20px 16px; }
  .steps li { padding: 13px 10px; font-size: 13px; gap: 7px; justify-content: center; }
  .steps li span { display: none; }
  .steps li[aria-current=step] span { display: inline; }
  .grid2, .summary { grid-template-columns: 1fr; }
  .map { height: 56vh; min-height: 300px; }
  .actions .btn.primary, .pick .btn.primary { flex: 1; }
  .pick { flex-direction: column; align-items: stretch; }
  .pick .btns .btn { flex: 1; }
  .tab { padding: 7px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
