@import url('/static/fonts.css');
/* ============================================================
   PlayMe — neutral light UI
   System font stack only (no external CDNs), 360px → desktop.
   ============================================================ */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel2: #f3f4f6;
  --ink: #171923;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #3056d3;
  --accent-strong: #1f3fad;
  --accent-soft: #eef2fe;
  --accent-ring: rgba(48, 86, 211, .17);
  --good: #067647;
  --good-soft: #e8f6ef;
  --warn: #b54708;
  --warn-soft: #fdf1e5;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px rgba(16, 24, 40, .05);
  --shadow-pop: 0 16px 44px rgba(16, 24, 40, .16);
  --cta-edge: #22399a;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 0; background: var(--bg); }

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a.btn { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection { background: #dfe7fc; }

/* ---------------- Header ---------------- */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px max(20px, calc((100vw - 1240px) / 2));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--ink);
  white-space: nowrap;
}
.brand i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-style: normal;
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0;
}
.brand span { color: var(--accent); }

nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.navlink {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.navlink:hover { background: var(--panel2); color: var(--ink); }
.navlink.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

.account { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.account a {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
}
.account a:hover { color: var(--accent); }
.account a.navlink {
  max-width: none;
  overflow: visible;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 600;
  white-space: nowrap;
}
.account button {
  background: none;
  border: 0;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}
.account button:hover { background: var(--panel2); color: var(--ink); }

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px calc(56px + env(safe-area-inset-bottom, 0px));
  min-height: calc(100vh - 200px);
}

/* ---------------- Typography ---------------- */

h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.6px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 19px; letter-spacing: -.3px; font-weight: 650; }
h3 { font-size: 16px; line-height: 1.4; font-weight: 600; }
p { line-height: 1.6; }
strong { font-weight: 650; }

.muted, .help { color: var(--muted); }
.help { font-size: 13px; line-height: 1.55; margin-top: 10px; }

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.topline p { color: var(--muted); margin-top: 6px; font-size: 14px; }

.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--accent); }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------------- Buttons ---------------- */

.btn, button.primary {
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #3d63de 0%, var(--accent) 60%, #2c4fc4 100%);
  color: #fff;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(16, 24, 40, .16);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease, background .15s;
}
.btn:hover {
  filter: brightness(1.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 14px rgba(24, 42, 110, .26);
}
.btn:active { transform: translateY(1px); filter: brightness(.97); }

.btn.secondary {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.btn.secondary:hover { background: var(--panel2); box-shadow: none; filter: none; }

.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--panel2); color: var(--ink); box-shadow: none; filter: none; }

.btn.danger {
  background: var(--bad-soft);
  color: var(--bad);
  border-color: #f4c7c3;
  box-shadow: none;
}
.btn.danger:hover { background: #fbddd9; box-shadow: none; filter: none; }

.btn.small { padding: 7px 12px; min-height: 34px; font-size: 13px; border-radius: 9px; }
.btn.full, .full { width: 100%; }

/* Объёмная главная кнопка (гостевой флоу) */
.btn.cta,
#request-form > button[type="submit"],
[data-action="mock-confirm"] {
  min-height: 54px;
  padding: 15px 42px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .1px;
  border-radius: 16px;
  border-color: #24409f;
  background: linear-gradient(180deg, #4b6fe5 0%, #3056d3 52%, #2b4cc1 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    inset 0 -2px 0 rgba(10, 18, 50, .22),
    0 6px 0 var(--cta-edge),
    0 16px 26px rgba(24, 42, 110, .30);
  transition: transform .13s ease, box-shadow .13s ease, filter .13s ease;
}
.btn.cta:hover,
#request-form > button[type="submit"]:hover,
[data-action="mock-confirm"]:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    inset 0 -2px 0 rgba(10, 18, 50, .22),
    0 7px 0 var(--cta-edge),
    0 18px 30px rgba(24, 42, 110, .34);
}
.btn.cta:active,
#request-form > button[type="submit"]:active,
[data-action="mock-confirm"]:active {
  transform: translateY(4px);
  filter: brightness(.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .25),
    inset 0 -1px 0 rgba(10, 18, 50, .18),
    0 2px 0 var(--cta-edge),
    0 6px 12px rgba(24, 42, 110, .22);
}

/* Зона с главной кнопкой — по центру, авто-ширина */
.form-actions { display: flex; justify-content: center; margin-top: 22px; }
.form-actions .btn { margin-top: 0; }

/* Busy (in-flight) buttons keep their label and gain a spinner. */
button.busy { pointer-events: none; }
button.busy::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  opacity: .9;
  animation: spin .7s linear infinite;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: grid; gap: 16px; }

/* ---------------- Status pills ---------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1px;
  border-radius: 999px;
  background: var(--panel2);
  color: var(--muted);
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
}
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* ---------------- Cards, grids, stats ---------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card h2, .card h3 { margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--muted); }
.card .actions { margin-top: 18px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-card);
}
.stat span { color: var(--muted); font-size: 12px; display: block; margin-bottom: 12px; }
.stat strong { font-size: 28px; letter-spacing: -.8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat:first-child { background: var(--accent-soft); border-color: #ccd9f8; }
.stat:first-child span { color: var(--accent-strong); }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 16px;
}
.section-heading h2 { display: flex; align-items: center; gap: 10px; }

.big-number { font-size: 28px; color: var(--accent); font-weight: 700; }
.center { text-align: center; }

/* ---------------- Empty / loading / notices ---------------- */

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.empty svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #98a2b3;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loading, .page-loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 72px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--accent-ring);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

.notice {
  background: var(--accent-soft);
  border: 1px solid #ccd9f8;
  border-radius: 14px;
  padding: 13px 16px;
  color: #243c7e;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 20px;
}
.notice.warning { background: var(--warn-soft); border-color: #f5dcc0; color: var(--warn); }

/* ---------------- Tabs ---------------- */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 12px 14px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: -1px;
  transition: color .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--accent-strong); border-color: var(--accent); font-weight: 600; }

/* ---------------- Tables ---------------- */

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  scrollbar-width: thin;
}
.table-wrap::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }

table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fafb;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .6px;
}
td, th { padding: 12px 14px; border-bottom: 1px solid #f2f4f7; }
tr:last-child td { border: 0; }
tbody tr:hover td { background: #fafbfc; }
td { max-width: 300px; overflow-wrap: anywhere; vertical-align: top; }
td .muted { display: block; font-size: 12px; margin-top: 4px; }
td strong { font-weight: 600; }

/* ---------------- Forms ---------------- */

label { display: block; color: var(--ink); font-size: 13.5px; font-weight: 600; margin-bottom: 9px; letter-spacing: .1px; }

input, select {
  width: 100%;
  background: #fcfcfe;
  color: var(--ink);
  border: 1.5px solid #d5dae4;
  border-radius: 14px;
  padding: 11px 14px;
  min-height: 48px;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, .03);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input::placeholder { color: #9aa3b2; }
input:not(:focus) { text-overflow: ellipsis; }
input:hover:not([readonly]), select:hover { border-color: #bfc7d6; }
input:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
input[readonly] { background: var(--panel2); color: var(--muted); }
select[multiple] { min-height: 104px; }

.field { margin: 16px 0; }
.field:first-child { margin-top: 0; }
.field label { line-height: 18px; }

.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.check input { width: 18px; height: 18px; min-height: auto; accent-color: var(--accent); }
.check label { margin: 0; color: var(--ink); font-size: 14px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin: 16px 0; }
.form-row > .field, .form-row > .field:first-child { margin: 0; }
.form-row label { line-height: 18px; min-height: 18px; }
.form-row input, .form-row select { height: 48px; }

/* Ключевое поле экрана — крупнее и с воздухом (экран кассира: «Код оплаты»).
   .field.field-lg — чтобы перебить .field:first-child { margin-top: 0 } */
.field.field-lg { margin: 20px 0 18px; }
.field-lg label { font-size: 15px; font-weight: 650; margin-bottom: 8px; }

/* Разделитель «или …» между альтернативными способами ввода */
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ''; height: 1px; flex: 1; background: var(--line); }

form .btn { margin-top: 8px; }

/* ---------------- Choice groups (staff / payment pickers) ---------------- */

.choice-group { border: 0; padding: 0; margin: 20px 0; min-width: 0; }
.choice-group legend { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; padding: 0; letter-spacing: .1px; }
.choice-group .help { margin: 10px 0 0; }

.staff-choice, .payment-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin: 8px 0;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.staff-choice:hover, .payment-choice:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 24, 40, .06);
}
.staff-choice:has(input:checked), .payment-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 14px rgba(48, 86, 211, .10);
}
.staff-choice:focus-within, .payment-choice:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.staff-choice input { width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--accent); }
.staff-choice strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.staff-choice small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.staff-choice > span:not(.assignment-state):not(.payment-icon), .payment-choice > span:not(.payment-icon):not(.choice-dot) { min-width: 0; overflow-wrap: anywhere; }

.assignment-state { margin-left: auto; white-space: nowrap; font-size: 11px; color: var(--muted); flex-shrink: 0; }
.assigned-label { display: none; color: var(--accent-strong); font-weight: 600; }
.staff-choice input:checked ~ .assignment-state .assigned-label { display: inline; }
.staff-choice input:checked ~ .assignment-state .unassigned-label { display: none; }

.payment-choice { position: relative; min-height: 60px; }
.payment-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }

.payment-icon { width: 26px; height: 26px; flex-shrink: 0; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.payment-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.choice-dot { margin-left: auto; width: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: 50%; flex-shrink: 0; background: var(--panel); transition: border-color .15s, background .15s; }
.payment-choice:hover .choice-dot { border-color: var(--accent); }
.payment-choice input:checked ~ .choice-dot { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px #fff; }

.payment-summary { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); margin: 8px 0; }
.payment-summary .payment-icon { width: 20px; height: 20px; }
.payment-summary svg { width: 19px; height: 19px; }

/* Способ оплаты — компактная строка в карточках заведения */

.event-payments { margin: 14px 0; display: grid; gap: 4px; }
.event-team { border-top: 1px solid #f2f4f7; border-bottom: 1px solid #f2f4f7; padding: 10px 0; margin-top: 12px; }
.event-team p { font-size: 12.5px; }
.event-team strong { color: var(--ink); font-weight: 500; }
.event-guide { margin: -4px 0 18px; }

/* ---------------- Dialog ---------------- */

dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 16px;
  padding: 24px;
  width: 520px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  box-shadow: var(--shadow-pop);
}
dialog::backdrop { background: rgba(16, 24, 40, .5); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 17px; }
.close {
  background: var(--panel2);
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  height: 32px;
  width: 32px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.close:hover { background: var(--line); color: var(--ink); }

/* ---------------- Guest screens ---------------- */

.guest { max-width: 560px; margin: 8px auto; }
.guest .card { padding: 28px; }
.guest .card > h2:first-child { font-size: 23px; letter-spacing: -.5px; margin-bottom: 6px; }
.guest h1 { font-size: clamp(26px, 6vw, 32px); }
.guest .hero-sub { margin: 10px 0 24px; color: var(--muted); font-size: 15px; }
.guest .eyebrow { margin-bottom: 8px; }
.guest .btn { min-height: 48px; }
.guest .btn.cta,
#request-form > button[type="submit"],
[data-action="mock-confirm"] { min-height: 54px; }
.guest .actions { margin-top: 16px; display: grid; gap: 8px; }
.guest .card:focus-within { border-color: #c9d4f0; }

/* Заголовок экрана оплаты — спокойный, средней величины */
.guest .step-note { font-size: clamp(19px, 4.5vw, 22px); font-weight: 650; letter-spacing: -.3px; margin: 12px 0 18px; }

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f6f7fb;
  border: 1px solid #eceef4;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 20px;
}
.price-row strong { font-size: 26px; letter-spacing: -.6px; font-weight: 750; font-variant-numeric: tabular-nums; }
.price-row span { color: #3f4756; font-size: 13.5px; font-weight: 550; }

.guest-note { font-size: 13px; color: #4a5261; text-align: center; margin-top: 16px; line-height: 1.6; }

.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--panel2);
  border-radius: 14px;
  margin: 16px 0;
}
.track strong { font-size: 15px; }
.track small { display: block; color: var(--muted); margin-top: 3px; font-size: 13px; }
.track-icon {
  background: var(--accent-soft);
  color: var(--accent);
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.track-art-img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .14);
  animation: art-in .45s ease;
}
@keyframes art-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  padding: 15px 22px 15px 28px;
  margin: 16px auto;
  width: fit-content;
  background: linear-gradient(180deg, #1b2340, #101828);
  color: #fff;
  border: 1px solid #232d4d;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 20px rgba(16, 24, 40, .18);
  overflow-wrap: anywhere;
}

.qr {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  width: 256px;
  height: 256px;
  max-width: 100%;
  margin: 18px auto;
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(16, 24, 40, .10);
}

.status-visual {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--panel2);
  color: var(--muted);
  font-size: 32px;
  margin: 6px auto 20px;
}
.status-visual.accent { background: var(--accent-soft); color: var(--accent); }
.status-visual.good { background: var(--good-soft); color: var(--good); }
.status-visual.warn { background: var(--warn-soft); color: var(--warn); }

.status-title { text-align: center; }
.status-title h2 { font-size: 20px; }
.status-title p { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---------------- DJ queue ---------------- */

.queue-select { max-width: 420px; margin: 4px 0 18px; }
.queue-select label { margin-bottom: 6px; }

.queue-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.queue-section h2 { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; font-size: 16px; }

.request-card { margin-bottom: 12px; }
.request-card .card-head { align-items: center; }
.request-card .time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.request-card h3 { margin: 10px 0 2px; overflow-wrap: anywhere; font-size: 17px; }
.request-card .artist { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.request-card .actions { margin-top: 16px; }

.queue-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--good);
}
.live::before { content: ""; height: 7px; width: 7px; background: #12b76a; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }

/* ---------------- Cashier ---------------- */

.scanner {
  width: 100%;
  background: #101114;
  border-radius: 12px;
  margin: 14px 0;
  max-height: 300px;
  object-fit: cover;
}

/* ---------------- Toast ---------------- */

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 13px 18px;
  background: #101828;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .3);
  font-size: 14px;
  z-index: 100;
  animation: toast-in .26s cubic-bezier(.2, .75, .3, 1);
}
#toast.error { background: #a92c21; }
.toast-icon { display: inline-flex; flex-shrink: 0; }
.toast-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- Landing ---------------- */

.landing { padding: 8px 0; }
.landing-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  padding: 56px 0 60px;
  align-items: center;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 700; letter-spacing: -2px; line-height: 1.05; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { max-width: 440px; font-size: 16px; color: var(--muted); margin: 22px 0 26px; }
.hero .btn { padding: 14px 24px; min-height: 50px; }

.record-stage { position: relative; min-height: 360px; display: grid; place-items: center; }
.record {
  height: 330px;
  width: 330px;
  max-width: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #2b303a 0, #2b303a 2px, #3a4150 3px, #242932 4px, #242932 6px);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .25), inset 0 0 0 2px #4a5263;
  display: grid;
  place-items: center;
  transform: rotate(-18deg);
}
.record-center {
  height: 140px;
  width: 140px;
  border-radius: 50%;
  background: #f7f8fa;
  border: 8px solid #e6e8ee;
  color: #475467;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -2px;
  position: relative;
  transform: rotate(18deg);
}
.record-center::after { content: ""; position: absolute; width: 12px; height: 12px; background: #2b303a; border-radius: 50%; top: 18px; }

.music-tag {
  position: absolute;
  bottom: 6px;
  left: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  padding: 13px 18px;
  border-radius: 13px;
  transform: rotate(-3deg);
}
.music-tag strong { display: block; font-size: 14px; }
.music-tag small { font-size: 11.5px; color: var(--muted); }
.tag-note { font-size: 30px; color: var(--accent); }
.spark { position: absolute; top: 12px; right: 8px; font-size: 44px; color: #c3cad6; }

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.hero-features small { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; }
.hero-features h3 { font-weight: 600; margin: 10px 0 6px; }
.hero-features p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ---------------- Animations ---------------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Появление карточки (не применяется к экранам с автообновлением) */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.rise { animation: rise .38s cubic-bezier(.2, .75, .3, 1) both; }

/* Диалог и тост */
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: none; }
}
dialog[open] { animation: pop .24s cubic-bezier(.2, .75, .3, 1); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-layout { grid-template-columns: 1fr; }
  .hero { gap: 24px; }
}

@media (max-width: 860px) {
  .grid.two { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  header { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  nav {
    order: 3;
    flex-basis: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  nav::-webkit-scrollbar { display: none; }
  .navlink { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
  /* Подсказка, что ряд прокручивается: мягкое затухание у правого края */
  nav, .tabs {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
  }
  .account { margin-left: auto; gap: 6px; }
  .account > a:not(.navlink) { max-width: 120px; }

  main { padding: 20px 16px 48px; }
  h1 { font-size: 25px; }
  .topline { margin-bottom: 18px; }
  .topline .actions { width: 100%; }
  .topline .actions .btn { flex: 1; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 24px; }
  .stat span { margin-bottom: 10px; font-size: 11px; }

  .grid, .grid.two { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .guest { margin: 0 auto; }
  .guest .card { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }

  .hero { grid-template-columns: 1fr; padding: 36px 0 40px; }
  .hero p { font-size: 14.5px; }
  .record-stage { min-height: 300px; margin: 0 8px; }
  .record { height: 250px; width: 250px; }
  .record-center { height: 106px; width: 106px; font-size: 22px; }
  .record-center::after { top: 8px; width: 9px; height: 9px; }
  .music-tag { bottom: 0; padding: 10px 14px; }
  .spark { display: none; }
  .hero-features { gap: 18px; grid-template-columns: 1fr; padding-top: 22px; }
  .hero-features > div { display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; align-items: baseline; }
  .hero-features h3 { margin: 0; }
  .hero-features p { grid-column: 2; }

  .landing-top span:last-child { display: none; }
  .tabs button { padding: 11px 12px; font-size: 13px; }
  dialog { padding: 20px 16px; border-radius: 16px; }
  .queue-select { max-width: 100%; }
  .request-card .actions { display: flex; }
  .request-card .actions .btn { flex: 1 1 0; min-height: 40px; }
  .staff-choice { padding: 11px 12px; gap: 10px; }
  .assignment-state { font-size: 10px; }
  input, select { font-size: 16px; } /* prevent iOS zoom-on-focus */
  .guest .card { padding: 22px 18px; }
  .guest .card > h2:first-child { font-size: 21px; }
}

@media (max-width: 480px) {
  /* Кнопка-CTA на весь экран только на узких — удобно для большого пальца */
  .form-actions .btn { width: 100%; }
  .btn.cta,
#request-form > button[type="submit"],
[data-action="mock-confirm"] { padding: 15px 24px; }

}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .price-row strong { font-size: 22px; }
  .price-row { padding: 12px 14px; }
  .code { font-size: 21px; letter-spacing: 4px; }
  .actions .btn { flex: 1 1 auto; }

}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .spinner { border-top-color: var(--accent); animation: none; }
  button.busy::after { animation: none; }
}

/* Adapt the reference visual system to the existing PlayMe markup. */
:root { --lilac: var(--accent); --coral: var(--warn); --red: var(--bad); }
[hidden] { display: none !important; }
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  padding: 24px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--ink); font-weight: 700; }
#request-form > button[type="submit"], [data-action="mock-confirm"] {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 20px;
}
#lookup-form .field label { font-size: 15px; font-weight: 650; }
#lookup-form { margin-top: 20px; }
.track > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.price-row strong { flex-shrink: 0; white-space: nowrap; }
.guest .price-row + .notice { margin-top: 20px; }
.code { max-width: 100%; }
#app .guest:has(#request-form) .hero-sub { margin-bottom: 24px; }
@media (max-width: 480px) {
  #request-form > button[type="submit"], [data-action="mock-confirm"] { width: 100%; }
}
@media (max-width: 360px) {
  .price-row { flex-wrap: wrap; }
  .assignment-state { white-space: normal; text-align: right; }
}
