:root {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #a6a6a6;
  --soft: #262626;
  --line: #2a2a2a;
  --paper: #080808;
  --surface: #111111;
  --night: #050505;
  --white: #ffffff;
  --white-dim: #d0d0d0;
  --red: #e10600;
  --red-bright: #ff3b30;
  --mono: 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: 'Avenir Next', 'Segoe UI', sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input { font: inherit; }
button { color: inherit; }
input, select, textarea { accent-color: var(--red); }
::selection { background: var(--red); color: #fff; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }
.app-shell { min-height: 100vh; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
body[data-mode="admin"] .app-shell { padding-bottom: 24px; }
.topbar { height: 76px; padding: 0 max(22px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, #050505 0%, #0b0b0b 62%, #1a0504 100%); color: #f7f7f7; border-bottom: 1px solid var(--red); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; background: var(--red); color: var(--white); font-size: 21px; font-weight: 800; font-style: italic; clip-path: polygon(0 0, 100% 0, 82% 100%, 0 100%); }
.brand-mark.big { width: 56px; height: 56px; font-size: 32px; margin: 0 auto 24px; }
.brand-copy { display: grid; line-height: 1.08; letter-spacing: .075em; }
.brand-copy strong { font-size: 13px; font-weight: 800; }
.brand-copy small { margin-top: 4px; color: #8a8a8a; font: 9px var(--mono); letter-spacing: .16em; }
.topbar-right { display: flex; gap: 17px; align-items: center; }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; color: #b0b0b0; font: 9px var(--mono); letter-spacing: .13em; }
.demo-pill i, .live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 3px #ffffff22; }
.profile-button { width: 36px; height: 36px; border: 1px solid #3a3a3a; border-radius: 50%; background: transparent; color: var(--white); font-size: 10px; font-weight: 800; cursor: pointer; }
.main-content { width: min(1120px, 100%); min-height: calc(100vh - 158px); margin: 0 auto; padding: 40px 24px 64px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; margin: 0 0 26px; }
.eyebrow { margin: 0 0 9px; color: #9a9a9a; font: 10px var(--mono); letter-spacing: .12em; }
.page-heading h1 { margin: 0; font-size: clamp(27px, 4vw, 38px); line-height: 1.08; letter-spacing: -.055em; font-weight: 700; }
.page-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.quest-banner { overflow: hidden; padding: 23px 26px 19px; color: #f7f7f7; background: linear-gradient(135deg, #080808 0%, #120606 68%, #1d0907 100%); border-left: 4px solid var(--red); position: relative; }
.quest-banner::after { content: ''; position: absolute; right: 15%; top: 13%; width: 1px; height: 190px; background: #ffffff14; transform: rotate(37deg); box-shadow: 28px 0 #ffffff14, 56px 0 #ffffff14, 84px 0 #ffffff14, 112px 0 #ffffff14, 140px 0 #ffffff14; pointer-events: none; }
.banner-top, .banner-bottom { display: flex; align-items: center; gap: 9px; color: #b0b0b0; font: 9px var(--mono); letter-spacing: .1em; position: relative; z-index: 1; }
.banner-date { margin-left: auto; color: #a0a0a0; letter-spacing: 0; }
.banner-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0 22px; position: relative; z-index: 1; }
.banner-main .eyebrow { margin-bottom: 9px; color: #b0b0b0; }
.banner-main h2 { margin: 0; font-size: clamp(23px, 4vw, 32px); line-height: 1.12; letter-spacing: -.04em; }
.banner-main p:last-child { margin: 9px 0 0; color: #bdbdbd; font-size: 12px; }
.route-stamp { width: 77px; height: 77px; flex: 0 0 77px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid #3a3a3a; border-radius: 50%; position: relative; z-index: 1; }
.route-stamp strong { color: var(--white); font: 27px var(--mono); line-height: 1; }
.route-stamp span { margin-top: 5px; color: #bdbdbd; font: 8px var(--mono); text-transform: uppercase; }
.progress-track { height: 3px; background: #333333; position: relative; z-index: 1; }
.progress-track span { display: block; height: 100%; background: var(--white); transition: width .3s ease; }
.banner-bottom { justify-content: space-between; margin-top: 10px; font-size: 9px; letter-spacing: .02em; }
.home-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 14px; margin-top: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); }
.next-stop-panel, .team-panel, .route-preview, .results-preview { padding: 22px; }
.section-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.section-top .eyebrow { margin-bottom: 5px; }
.section-top h2, .form-panel h2, .members-panel h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.step-index { display: grid; place-items: center; min-width: 35px; height: 32px; padding: 0 7px; color: var(--night); background: var(--white); font: 11px var(--mono); }
.destination { display: flex; flex-direction: column; margin: 24px 0 19px; padding-left: 15px; border-left: 2px solid var(--red); }
.destination-label { color: #a6a6a6; font: 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.destination strong { margin-top: 5px; font-size: 17px; letter-spacing: -.03em; }
.destination-meta { margin-top: 6px; color: #9e9e9e; font-size: 11px; }
.button { min-height: 47px; display: inline-flex; justify-content: center; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid transparent; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s, border .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.button-primary { background: var(--red); color: #fff; }
.button-primary:hover { background: var(--white); color: var(--night); }
.button-secondary { background: #151515; color: var(--white); border-color: #3a3a3a; }
.button-secondary:hover { background: var(--red); color: #fff; }
.button-danger-outline { min-height: 42px; padding: 0 14px; border: 1px solid #5a1f19; background: transparent; color: var(--red-bright); font-size: 11px; font-weight: 700; cursor: pointer; }
.button-quiet { background: transparent; color: var(--muted); }
.button-wide { width: 100%; }
.fine-print { margin: 12px 0 0; color: #9a9a9a; font-size: 10px; line-height: 1.55; }
.fine-print code { padding: 2px 5px; background: #1b1b1b; color: #ffffff; font: 10px var(--mono); }
.team-car { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 0 15px; border-bottom: 1px solid var(--line); }
.car-symbol { color: #a6a6a6; font-size: 24px; line-height: 1; }
.team-car strong, .team-car small { display: block; }
.team-car strong { font-size: 12px; }
.team-car small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.member-row { display: flex; align-items: center; padding-top: 14px; }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 2px solid #ffffff; border-radius: 50%; background: var(--white); color: #0b0b0b; font-size: 9px; font-weight: 800; }
.avatar + .avatar { margin-left: -7px; }
.avatar-alt { background: #2a2a2a; color: #a0a0a0; }
.member-caption { margin-left: 10px; color: var(--muted); font-size: 10px; }
.team-status { display: flex; gap: 7px; align-items: center; margin-top: 14px; color: #a8a8a8; font: 10px var(--mono); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #ffffff; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: #d0d0d0; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.text-button span { padding-left: 3px; }
.panel-copy { margin: 18px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.mini-route { margin-top: 16px; }
.mini-stop { min-height: 39px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 9px; border-top: 1px solid #262626; color: #a6a6a6; font-size: 11px; }
.mini-stop-mark { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #333333; border-radius: 50%; color: #a0a0a0; font: 9px var(--mono); }
.mini-stop.is-done .mini-stop-mark { border-color: #4a4a4a; background: #1f1f1f; color: #ffffff; }
.mini-stop.is-next { color: var(--ink); font-weight: 700; }
.mini-stop.is-next .mini-stop-mark { border-color: var(--white-dim); color: #ffffff; }
.mini-stop-state { color: #d0d0d0; font: 8px var(--mono); text-transform: uppercase; }
.leader-row { min-height: 37px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 7px; border-top: 1px solid #262626; font-size: 10px; }
.leader-place { color: #a6a6a6; font: 10px var(--mono); }
.leader-time { color: #a6a6a6; font: 9px var(--mono); }
.results-preview .fine-print { margin-top: 10px; }
.bottom-nav { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; min-height: 68px; padding: 7px max(10px, calc((100vw - 700px) / 2)) calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #111111; }
.nav-item { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: #9e9e9e; font-size: 9px; cursor: pointer; }
.nav-glyph { font: 22px/1 var(--sans); }
.nav-item.is-active { color: var(--ink); font-weight: 800; }
.nav-item.is-active .nav-glyph { color: #ffffff; }
.route-summary { display: flex; justify-content: space-between; align-items: center; padding: 19px 22px; margin-bottom: 12px; }
.route-summary .eyebrow { margin-bottom: 6px; }
.route-summary strong { font-size: 13px; }
.route-summary-progress { color: #f5f5f5; font: 24px var(--mono); }
.route-summary-progress small { color: #9a9a9a; font-size: 12px; }
.route-list { padding: 4px 22px; }
.route-row { min-height: 72px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid #262626; }
.route-row:last-child { border: 0; }
.route-marker { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #333333; border-radius: 50%; color: #9a9a9a; font: 10px var(--mono); }
.route-row.is-done .route-marker { border-color: #4a4a4a; background: #1f1f1f; color: #ffffff; }
.route-row.is-next .route-marker { border: 2px solid var(--white-dim); color: #ffffff; }
.route-row.is-locked .route-info { opacity: .62; }
.route-info { display: flex; flex-direction: column; gap: 3px; }
.route-info strong { font-size: 12px; }
.route-info small { color: #d0d0d0; font-size: 9px; }
.route-state { color: #9a9a9a; font: 8px var(--mono); letter-spacing: .04em; }
.route-row.is-done .route-state { color: #ffffff; }
.route-row.is-next .route-state { color: #ffffff; font-weight: 500; }
.route-action { margin-top: 18px; }
.route-action .fine-print { max-width: 500px; }
.inline-success { color: #ffffff; font-size: 12px; }
.team-forms, .team-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-panel, .team-detail, .members-panel { padding: 23px; }
.form-panel h2 { margin-bottom: 19px; font-size: 20px; }
.form-panel form { display: grid; gap: 13px; }
.form-panel label, .dialog label { display: grid; gap: 6px; color: #c9c9c9; font-size: 10px; font-weight: 700; }
.form-panel input, .dialog input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #333333; border-radius: 0; background: #151515; color: var(--ink); font-size: 12px; }
.form-panel input::placeholder, .dialog input::placeholder { color: #8a8a8a; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.join-panel { background: #151515; }
.join-panel .panel-copy { margin: 0 0 15px; }
.vehicle-card { display: flex; align-items: center; gap: 13px; margin: 20px 0; padding: 18px; background: #181818; }
.car-symbol.large { font-size: 34px; }
.vehicle-card h2 { margin: 0; font-size: 16px; }
.vehicle-card span:not(.car-symbol) { display: block; margin-top: 5px; color: var(--muted); font: 10px var(--mono); }
.invite-box { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 13px; border: 1px solid var(--line); }
.invite-box span { color: #a6a6a6; font: 8px var(--mono); letter-spacing: .08em; }
.invite-box strong { color: #ffffff; font: 14px var(--mono); }
.invite-box .text-button { margin-left: auto; }
.team-detail > .fine-print { margin-top: 14px; }
.members-panel h2 { display: flex; align-items: center; gap: 8px; }
.count-badge { display: inline-grid; min-width: 19px; height: 19px; place-items: center; border-radius: 50%; background: var(--soft); color: #b0b0b0; font: 9px var(--mono); }
.member-detail { display: flex; align-items: center; gap: 10px; min-height: 60px; border-bottom: 1px solid #262626; }
.member-detail:first-of-type { margin-top: 13px; }
.member-detail > div { display: grid; gap: 3px; }
.member-detail strong { font-size: 11px; }
.member-detail small { color: var(--muted); font-size: 9px; }
.you-label { margin-left: auto; color: #9e9e9e; font: 8px var(--mono); }
.members-panel > .fine-print { margin-top: 15px; }
.results-table { padding: 0 21px; }
.table-header, .table-row { display: grid; grid-template-columns: 75px minmax(130px, 1fr) 100px 100px; align-items: center; gap: 12px; }
.table-header { min-height: 44px; color: #9e9e9e; font: 8px var(--mono); letter-spacing: .08em; }
.table-row { min-height: 67px; border-top: 1px solid #262626; font-size: 11px; }
.table-row.is-yours { margin: 0 -21px; padding: 0 21px; background: #1b1b1b; }
.table-place { color: #b0b0b0; font: 14px var(--mono); }
.table-row strong { display: grid; gap: 3px; }
.table-row strong small { color: #ffffff; font: 8px var(--mono); }
.table-time { color: #b0b0b0; font: 10px var(--mono); }
.table-status { color: #9e9e9e; font-size: 9px; }
.table-status.finished { color: #ffffff; }
.results-note { display: flex; gap: 12px; align-items: flex-start; max-width: 700px; margin-top: 14px; color: #a6a6a6; }
.results-note p { margin: 0; font-size: 10px; line-height: 1.6; }
.note-mark { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #6a6a6a; border-radius: 50%; font: 10px var(--mono); }
.login-card { width: min(390px, 100%); margin: 60px auto; padding: 37px 28px; background: #111111; border: 1px solid var(--line); text-align: center; }
.login-card .eyebrow { margin-bottom: 8px; }
.login-card h1 { margin: 0; font-size: 30px; letter-spacing: -.05em; }
.login-card > p:not(.eyebrow):not(.fine-print) { margin: 12px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dialog-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; background: #000000d9; }
.dialog { width: min(430px, 100%); max-height: min(88vh, 720px); overflow: auto; position: relative; padding: 27px; background: #111111; box-shadow: 0 18px 70px #0008; }
.dialog h2 { margin: 0 30px 10px 0; font-size: 23px; letter-spacing: -.045em; }
.dialog-close { position: absolute; top: 17px; right: 17px; width: 34px; height: 34px; border: 1px solid var(--line); background: #111111; font-size: 22px; cursor: pointer; }
.dialog-copy { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.dialog form { display: grid; gap: 12px; }
.scan-target { display: grid; gap: 4px; margin-bottom: 17px; padding: 13px; background: #181818; }
.scan-target span { color: #a6a6a6; font: 8px var(--mono); letter-spacing: .1em; }
.scan-target strong { font-size: 13px; }
.scan-target small { color: #a6a6a6; font-size: 10px; }
.profile-summary { display: flex; align-items: center; gap: 11px; margin: 20px 0 13px; }
.profile-summary div { display: grid; gap: 4px; }
.profile-summary strong { font-size: 12px; }
.profile-summary small { color: var(--muted); font-size: 10px; }
.dialog .button + .button { margin-top: 7px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(83px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); padding: 12px 15px; background: var(--night); color: white; font-size: 11px; line-height: 1.4; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="error"] { background: #8f0f08; }
.toast[data-kind="info"] { background: #1b1b1b; }
@media (min-width: 900px) {
  .bottom-nav { position: sticky; top: 0; bottom: auto; width: min(1120px, 100%); min-height: 0; margin: -52px auto 0; padding: 0 24px; display: flex; justify-content: flex-end; gap: 17px; border: 0; background: transparent; pointer-events: none; }
  .nav-item { min-width: 70px; min-height: 36px; flex-direction: row; gap: 6px; color: #a0a0a0; pointer-events: auto; }
  .nav-glyph { display: none; }
  .nav-item.is-active { color: var(--white); }
  .main-content { padding-top: 34px; }
  .toast { bottom: 25px; }
}
@media (max-width: 680px) {
  .topbar { height: 66px; padding: 0 18px; }
  .main-content { padding: 30px 16px 34px; }
  .home-grid, .team-forms, .team-detail-grid { grid-template-columns: 1fr; }
  .quest-banner { padding: 19px 18px 16px; }
  .banner-main { padding: 24px 0 19px; }
  .banner-main h2 { max-width: 220px; }
  .route-stamp { width: 65px; height: 65px; flex-basis: 65px; }
  .next-stop-panel, .team-panel, .route-preview, .results-preview { padding: 18px; }
  .route-list { padding: 4px 15px; }
  .route-row { grid-template-columns: 34px 1fr auto; gap: 9px; }
  .route-state { max-width: 70px; text-align: right; line-height: 1.4; }
  .table-header, .table-row { grid-template-columns: 42px minmax(90px, 1fr) 70px; gap: 8px; }
  .table-header span:last-child, .table-row .table-status { display: none; }
  .table-row { font-size: 10px; }
  .table-time { font-size: 9px; }
  .invite-box { flex-wrap: wrap; }
  .invite-box span { width: 100%; }
  .page-heading { margin-bottom: 20px; }
}
@media (max-width: 370px) {
  .demo-pill { font-size: 8px; }
  .topbar-right { gap: 9px; }
  .banner-main h2 { font-size: 22px; }
  .route-stamp { width: 57px; height: 57px; flex-basis: 57px; }
  .form-two { grid-template-columns: 1fr; }
}
/* ---------- Admin console ---------- */
.mono { font-family: var(--mono); }
.tiny { font-size: 9px; }
.admin-nav { position: sticky; top: 0; z-index: 4; display: flex; gap: 4px; overflow-x: auto; padding: 0 max(16px, calc((100vw - 1280px) / 2)); background: #111111; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.admin-tab { flex: 0 0 auto; min-height: 46px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #b0b0b0; font-size: 11px; font-weight: 600; cursor: pointer; }
.admin-tab span { font: 14px var(--sans); color: #b0b0b0; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.is-active { color: var(--ink); border-bottom-color: var(--white-dim); font-weight: 800; }
.admin-tab.is-active span { color: #ffffff; }
.admin-nav-role { margin-left: auto; align-self: center; padding-left: 10px; color: #a0a0a0; font: 9px var(--mono); white-space: nowrap; }
.main-content.admin-content { width: min(1280px, 100%); padding-top: 30px; }
.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 22px; }
.admin-heading h1 { margin: 0; font-size: clamp(24px, 3.2vw, 33px); letter-spacing: -.05em; line-height: 1.1; }
.admin-heading .page-note { max-width: 760px; }
.admin-heading-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.role-badge { display: inline-block; padding: 2px 6px; border: 1px solid #3a3a3a; color: #ffffff; font: 9px var(--mono); letter-spacing: .05em; vertical-align: 2px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.admin-stat { padding: 16px 17px; background: var(--surface); border: 1px solid var(--line); }
.admin-stat p { margin: 0 0 6px; color: #a6a6a6; font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.admin-stat strong { display: block; color: #f5f5f5; font: 30px/1 var(--mono); letter-spacing: -.04em; }
.admin-stat span { display: block; margin-top: 7px; color: #9e9e9e; font-size: 10px; line-height: 1.4; }
.admin-alerts { display: grid; gap: 8px; margin-bottom: 14px; }
.admin-alert { display: flex; gap: 12px; align-items: baseline; padding: 11px 14px; border: 1px solid #3a3a3a; background: #1b1b1b; font-size: 11px; }
.admin-alert.error { border-color: #5a1f19; background: #2a0d0a; }
.admin-alert strong { flex: 0 0 auto; color: #ffffff; font: 9px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.admin-alert.error strong { color: #ff5a4a; }
.admin-two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.admin-panel { padding: 20px; }
.admin-panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.admin-panel-head h2, .admin-panel-head h3 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.admin-panel-head h3 { font-size: 14px; }
.admin-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 18px 0; padding: 0; }
.admin-facts div { min-width: 0; }
.admin-facts dt { color: #8f8f8f; font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.admin-facts dd { margin: 4px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.admin-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button-compact { min-height: 34px; padding: 0 11px; font-size: 10px; gap: 6px; }
.admin-table-panel { padding: 0 18px 6px; overflow-x: auto; }
.admin-table-head { display: grid; align-items: center; min-height: 38px; padding: 0 4px; color: #8f8f8f; font: 8px var(--mono); letter-spacing: .08em; white-space: nowrap; }
.admin-table-row { display: grid; align-items: center; min-height: 62px; padding: 8px 4px; border-top: 1px solid #262626; font-size: 11px; }
.admin-table-row > div { min-width: 0; }
.quests-grid { grid-template-columns: minmax(180px, 2fr) 110px 64px 72px 80px minmax(190px, 1fr); gap: 10px; }
.locations-grid { grid-template-columns: minmax(170px, 1.3fr) minmax(150px, 1.2fr) 130px 76px 92px 150px; gap: 10px; }
.qr-grid { grid-template-columns: 118px 100px minmax(150px, 1.2fr) minmax(140px, 1.2fr) 100px 120px; gap: 10px; }
.teams-grid { grid-template-columns: minmax(180px, 1.4fr) 105px 82px 104px 170px; gap: 10px; }
.results-grid { grid-template-columns: 58px minmax(170px, 1.4fr) 110px 116px 84px; gap: 10px; }
.admin-table-panel .admin-table-head, .admin-table-panel .admin-table-row { min-width: 660px; }
.admin-cell-main { display: grid; gap: 4px; }
.admin-cell-main strong { font-size: 12px; letter-spacing: -.015em; }
.admin-cell-main small { color: #9e9e9e; font-size: 9px; line-height: 1.4; }
.muted-cell { color: #b0b0b0; font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 3px 10px; }
.admin-row-actions .text-button { font-size: 9px; }
.danger-text { color: #ff4a3d; }
.admin-place { color: #ffffff; font-size: 15px; }
.admin-chip { display: inline-flex; align-items: center; min-height: 19px; padding: 0 6px; border: 1px solid #303030; background: #181818; color: #c0c0c0; font: 8px var(--mono); letter-spacing: .03em; white-space: nowrap; }
.admin-chip.status-running, .admin-chip.status-active { border-color: #e10600; background: #2a0d0a; color: #ff5a4a; }
.admin-chip.status-ready { border-color: #4a4a4a; background: #1f1f1f; color: #ffffff; }
.admin-chip.status-draft, .admin-chip.status-waiting, .admin-chip.status-registered { border-color: #303030; background: #181818; color: #a6a6a6; }
.admin-chip.status-finish, .admin-chip.status-finished, .admin-chip.status-completed { border-color: #3a3a3a; background: #1b1b1b; color: #ffffff; }
.admin-chip.status-paused { border-color: #3a3a3a; background: #1f1f1f; color: #ffffff; }
.admin-chip.status-cancelled, .admin-chip.status-disqualified { border-color: #5a1f19; background: #2a0d0a; color: #ff5a4a; }
.admin-chip.status-audit { border-color: #303030; background: #181818; color: #b0b0b0; text-transform: lowercase; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin: 0 0 12px; }
.admin-inline-field { display: inline-flex; align-items: center; gap: 8px; color: #b8b8b8; font-size: 10px; }
.admin-inline-field select, .admin-inline-field input { min-height: 34px; padding: 0 9px; border: 1px solid #333333; background: #111111; color: var(--ink); font-size: 11px; }
.admin-inline-field input[type="search"] { min-width: 210px; }
.admin-note { padding: 14px 16px; border: 1px dashed #3a3a3a; background: #151515; color: #a6a6a6; font-size: 11px; line-height: 1.55; }
.admin-empty { display: grid; justify-items: center; gap: 6px; padding: 42px 20px; color: #9a9a9a; text-align: center; }
.admin-empty span { font-size: 22px; color: #6a6a6a; }
.admin-empty p { margin: 0; font-size: 11px; }
.admin-loading, .admin-error { display: grid; justify-items: center; gap: 10px; padding: 60px 20px; color: #a6a6a6; text-align: center; font-size: 12px; }
.admin-loading span { width: 26px; height: 26px; border: 2px solid #303030; border-top-color: var(--white-dim); border-radius: 50%; animation: admin-spin 1s linear infinite; }
@keyframes admin-spin { to { transform: rotate(360deg); } }
.admin-refreshing { position: fixed; right: 14px; bottom: 14px; z-index: 6; padding: 7px 10px; background: var(--night); color: var(--white); font: 9px var(--mono); }
.audit-mini { margin-top: 14px; }
.audit-mini-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 34px; border-top: 1px solid #262626; font-size: 10px; }
.audit-mini-row .mono { color: #a0a0a0; font-size: 9px; }
.audit-mini-row strong { font-size: 10px; font-weight: 600; overflow-wrap: anywhere; }
.audit-mini-row span:last-child { color: #a0a0a0; font-size: 9px; white-space: nowrap; }
.audit-list { padding: 4px 18px; }
.audit-row { padding: 13px 0; border-bottom: 1px solid #262626; }
.audit-row:last-child { border-bottom: 0; }
.audit-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.audit-row-head strong { font: 11px var(--mono); }
.audit-row-head .tiny { margin-left: auto; color: #a0a0a0; }
.audit-row p { margin: 7px 0 0; color: #a6a6a6; font-size: 10px; line-height: 1.5; }
.audit-row code { padding: 1px 4px; background: #1b1b1b; font: 9px var(--mono); }
.audit-reason { color: #ffffff !important; }
.audit-values { margin: 8px 0 0; padding: 9px 11px; background: #181818; border: 1px solid #262626; color: #b0b0b0; font: 9px/1.5 var(--mono); overflow-x: auto; }
.route-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.route-preview-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.route-preview-stops { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.route-preview-stops li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 28px; border-top: 1px solid #262626; font-size: 10px; }
.route-preview-stops li .mono { color: #a0a0a0; font-size: 9px; }
.route-preview-stops li small { color: #a0a0a0; font-size: 8px; text-align: right; }
.route-preview-card .text-button { margin-top: auto; text-align: left; }
.dialog-route { margin-top: 12px; }
.monitoring-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.monitor-card { padding: 16px; }
.monitor-track { height: 5px; margin: 14px 0 8px; background: #262626; overflow: hidden; }
.monitor-track span { display: block; height: 100%; background: var(--white-dim); }
.monitor-meta { display: flex; justify-content: space-between; gap: 8px; color: #8f8f8f; font: 8px var(--mono); }
.admin-login form { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.admin-login select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid #333333; background: #151515; font-size: 11px; }
.token-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; padding: 12px; border: 1px solid #3a3a3a; background: #1b1b1b; }
.token-box code { font: 12px var(--mono); color: #ffffff; overflow-wrap: anywhere; }
.token-box .text-button { margin-left: auto; }
.dialog-actions { margin-top: 14px; }
.dialog-location-list { display: grid; gap: 0; margin: 8px 0 0; padding: 0 0 0 18px; font-size: 11px; }
.dialog-location-list li { padding: 7px 0; border-top: 1px solid #262626; }
.dialog-location-list small { display: block; margin-top: 2px; color: #9a9a9a; font-size: 9px; }
.check-row { display: flex !important; flex-direction: row; align-items: center; gap: 8px; color: #b8b8b8; font-size: 10px; }
.check-row input { width: auto; min-height: 0; }
.form-panel select, .form-panel textarea, .dialog select, .dialog textarea { width: 100%; padding: 10px 12px; border: 1px solid #333333; border-radius: 0; background: #151515; color: var(--ink); font-size: 12px; }
.form-panel textarea, .dialog textarea { resize: vertical; }
.live-badge { display: inline-flex; align-items: center; gap: 5px; color: #ffffff; font: 9px var(--mono); white-space: nowrap; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #ffffff; }
.finish-panel { margin-top: 14px; padding: 24px; }
.finish-hero { display: flex; gap: 16px; align-items: center; }
.finish-hero h2 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.finish-hero p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.finish-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.finish-facts dt { color: #8f8f8f; font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.finish-facts dd { margin: 4px 0 0; font: 14px var(--mono); }
.waiting-panel { display: grid; justify-items: start; gap: 8px; margin-top: 14px; padding: 30px 24px; }
.waiting-panel h2 { margin: 0; font-size: 25px; letter-spacing: -.045em; }
.waiting-panel > p { max-width: 540px; margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.waiting-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #3a3a3a; background: #1b1b1b; color: #ffffff; font-size: 22px; }
.waiting-team { display: flex; align-items: center; gap: 10px; margin: 3px 0 12px; }
.waiting-team div { display: grid; gap: 3px; }
.waiting-team small { color: var(--muted); font-size: 9px; }
.scan-camera { display: grid; gap: 8px; margin: 0 0 15px; padding: 10px; border: 1px solid var(--line); background: #151515; }
.scan-video { width: 100%; min-height: 150px; max-height: 230px; object-fit: cover; background: #050505; }
.scan-status { margin: 0; color: #a6a6a6; font: 9px/1.5 var(--mono); }
.scan-status[data-kind="error"] { color: #ff5a4a; }
.scan-status[data-kind="success"] { color: #ffffff; }
.gps-block { display: grid; gap: 8px; margin: 12px 0; padding: 11px; border: 1px solid #3a3a3a; background: #1f1f1f; }
.gps-block strong { font-size: 10px; }
.gps-block p { margin: 4px 0 0; color: #d0d0d0; font-size: 9px; line-height: 1.5; }
.gps-block .button { justify-self: start; }
.profile-actions { display: grid; gap: 4px; margin-top: 8px; }
@media (max-width: 1000px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-heading-actions { width: 100%; }
  .admin-heading-actions .button { width: 100%; }
  .admin-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-stat { padding: 13px; }
  .admin-stat strong { font-size: 25px; }
  .admin-facts { grid-template-columns: 1fr 1fr; }
  .admin-table-panel { padding: 0 12px 6px; }
  .admin-table-panel .admin-table-head, .admin-table-panel .admin-table-row { min-width: 620px; }
  .finish-facts { grid-template-columns: 1fr; gap: 10px; }
  .finish-hero { align-items: start; }
  .admin-tab { min-height: 42px; padding: 0 9px; font-size: 10px; }
  .admin-nav-role { display: none; }
  .admin-inline-field { width: 100%; justify-content: space-between; }
  .admin-inline-field select, .admin-inline-field input { flex: 1; min-width: 0; }
  .admin-inline-field input[type="search"] { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
