/* Общая система: эмалированная табличка днём, зелёное сукно ночью, латунь на деньгах. */

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ol, ul, figure { margin: 0; }

/* Без этого display: flex у .wrap, .section и .pay-way перебивает атрибут
   hidden, и спрятанные блоки — форма входа, блок перевода — остаются видны. */
[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; }

:root {
  --ground:      #DDE3DC;
  --surface:     #EAEEE8;
  --surface-2:   #E1E7DF;
  --ink:         #16241E;
  --muted:       #5C6B62;
  --faint:       #8B9990;
  --line:        rgba(22, 36, 30, 0.16);
  --line-strong: rgba(22, 36, 30, 0.34);
  --brass:       #8A6D14;
  --brass-soft:  rgba(138, 109, 20, 0.12);
  --boy:         #2F5F84;
  --boy-soft:    rgba(47, 95, 132, 0.13);
  --girl:        #9A4460;
  --girl-soft:   rgba(154, 68, 96, 0.13);
  --shadow:      0 1px 2px rgba(22, 36, 30, 0.07), 0 8px 24px -12px rgba(22, 36, 30, 0.22);

  --display: "Bodoni MT", Didot, "Didot LT STD", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #0E1D17;
    --surface:     #14281F;
    --surface-2:   #1A3227;
    --ink:         #E8EFE7;
    --muted:       #93A79A;
    --faint:       #6E8377;
    --line:        rgba(232, 239, 231, 0.13);
    --line-strong: rgba(232, 239, 231, 0.28);
    --brass:       #D8B450;
    --brass-soft:  rgba(216, 180, 80, 0.14);
    --boy:         #77ACD4;
    --boy-soft:    rgba(119, 172, 212, 0.15);
    --girl:        #DE8AA1;
    --girl-soft:   rgba(222, 138, 161, 0.15);
    --shadow:      0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.8);
  }
}

:root[data-theme="dark"] {
  --ground:      #0E1D17;
  --surface:     #14281F;
  --surface-2:   #1A3227;
  --ink:         #E8EFE7;
  --muted:       #93A79A;
  --faint:       #6E8377;
  --line:        rgba(232, 239, 231, 0.13);
  --line-strong: rgba(232, 239, 231, 0.28);
  --brass:       #D8B450;
  --brass-soft:  rgba(216, 180, 80, 0.14);
  --boy:         #77ACD4;
  --boy-soft:    rgba(119, 172, 212, 0.15);
  --girl:        #DE8AA1;
  --girl-soft:   rgba(222, 138, 161, 0.15);
  --shadow:      0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.8);
}

:root[data-theme="light"] {
  --ground:      #DDE3DC;
  --surface:     #EAEEE8;
  --surface-2:   #E1E7DF;
  --ink:         #16241E;
  --muted:       #5C6B62;
  --faint:       #8B9990;
  --line:        rgba(22, 36, 30, 0.16);
  --line-strong: rgba(22, 36, 30, 0.34);
  --brass:       #8A6D14;
  --brass-soft:  rgba(138, 109, 20, 0.12);
  --boy:         #2F5F84;
  --boy-soft:    rgba(47, 95, 132, 0.13);
  --girl:        #9A4460;
  --girl-soft:   rgba(154, 68, 96, 0.13);
  --shadow:      0 1px 2px rgba(22, 36, 30, 0.07), 0 8px 24px -12px rgba(22, 36, 30, 0.22);
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  /* Отступы обходят чёлку, островок и полосу жестов на телефонах */
  padding-top: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-top, 0px));
  padding-right: calc(clamp(1rem, 4vw, 2.5rem) + env(safe-area-inset-right, 0px));
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  padding-left: calc(clamp(1rem, 4vw, 2.5rem) + env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
}

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --- шапка ------------------------------------------------------------ */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line-strong);
}

.masthead-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5.5vw, 3rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.masthead-sub { margin-top: 0.3rem; color: var(--muted); font-size: 0.9375rem; }

.masthead-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-align: right;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.is-open   { color: var(--brass); border-color: var(--brass); background: var(--brass-soft); }
.status.is-closed { color: var(--muted); }
.status.is-done   { color: var(--ink); background: var(--surface-2); }

.countdown {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- табло ------------------------------------------------------------- */

.board {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.board::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.board-seam { background: var(--line-strong); }

.lane {
  padding: clamp(1.15rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  text-align: center;
}

.lane-name { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1; }
.lane[data-side="boy"]  .lane-name { color: var(--boy); }
.lane[data-side="girl"] .lane-name { color: var(--girl); }

.flap {
  position: relative;
  min-width: 4.5ch;
  padding: 0.45rem 0.9rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: clamp(2.4rem, 7.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.flap::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--line-strong);
  opacity: 0.55;
}

.flap.is-flipping { animation: flip 0.42s cubic-bezier(0.34, 0.9, 0.3, 1); }

@keyframes flip {
  0%   { transform: perspective(400px) rotateX(0deg);   filter: brightness(1); }
  45%  { transform: perspective(400px) rotateX(-38deg); filter: brightness(0.82); }
  100% { transform: perspective(400px) rotateX(0deg);   filter: brightness(1); }
}

.lane-stats { display: flex; gap: 1.5rem; font-size: 0.8125rem; color: var(--muted); }

.lane-stats b {
  display: block;
  font-family: var(--mono);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.lane-hint { font-size: 0.8125rem; color: var(--faint); max-width: 32ch; text-wrap: balance; }

.market { display: flex; height: 10px; border: 1px solid var(--line-strong); border-top: none; background: var(--surface); }
.market span { transition: flex-grow 0.5s ease; }
.market .m-boy  { background: var(--boy); }
.market .m-girl { background: var(--girl); }

.market-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.4rem;
  font-variant-numeric: tabular-nums;
}

/* --- метрики ----------------------------------------------------------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.metric { background: var(--surface); padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.25rem; }

.metric-value {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.metric.is-fund { background: var(--brass-soft); }
.metric.is-fund .metric-value { color: var(--brass); }
.metric-note { font-size: 0.75rem; color: var(--faint); }

/* --- секции ------------------------------------------------------------ */

.section { display: flex; flex-direction: column; gap: 0.9rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.section-title { font-family: var(--display); font-size: clamp(1.2rem, 2.6vw, 1.55rem); font-weight: 400; }
.section-note { font-size: 0.8125rem; color: var(--muted); }

/* --- раскрывающийся раздел ---------------------------------------------- */

.disclosure { gap: 0.75rem; }

.disclosure > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.disclosure > summary:hover .disclosure-count { color: var(--brass); }

.disclosure-title {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
}

.disclosure-count {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.disclosure-count::after {
  content: " ▸";
  color: var(--faint);
}

.disclosure[open] .disclosure-count::after { content: " ▾"; }

/* --- таблицы ----------------------------------------------------------- */

.table-scroll { overflow-x: auto; }
table { width: 100%; font-size: 0.9375rem; }

th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.pill { display: inline-block; padding: 0.12rem 0.5rem; border-radius: 2px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pill-boy  { color: var(--boy);  background: var(--boy-soft); }
.pill-girl { color: var(--girl); background: var(--girl-soft); }

/* Отменённая ставка: видно, что билет был, но в игре не участвует */
tr.is-refunded { opacity: 0.55; }
tr.is-refunded td[data-label="Билет"] { text-decoration: line-through; }

/* Служебная пометка кассира — видна только в кассе */
.bet-note {
  display: block;
  font-size: 0.75rem;
  color: var(--faint);
  font-style: italic;
  margin-top: 0.1rem;
}
.win  { color: var(--brass); font-weight: 600; }
.dim  { color: var(--faint); }
.empty { padding: 2rem 0.7rem; text-align: center; color: var(--faint); font-size: 0.9375rem; }

/* --- кнопки и поля ------------------------------------------------------ */

button {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

button:hover { border-color: var(--brass); color: var(--brass); }
button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--line-strong); color: var(--ink); }

.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--ground); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn-ghost { background: transparent; }
.btn-danger:hover { border-color: var(--girl); color: var(--girl); }

.icon-btn { padding: 0.2rem 0.45rem; font-size: 0.75rem; font-weight: 500; color: var(--faint); background: transparent; border-color: transparent; }
.icon-btn:hover { color: var(--girl); border-color: var(--girl); }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

/* Поле на две колонки — для длинных значений вроде ссылки или заголовка */
.field-wide { grid-column: span 2; min-width: 200px; }

.field label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

input[type="text"], input[type="number"], input[type="date"],
input[type="datetime-local"], input[type="password"], select {
  font-family: var(--sans);
  font-size: 0.9375rem;
  padding: 0.5rem 0.6rem;
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  width: 100%;
}

input[type="number"], input[type="password"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }

.seg { display: flex; }
.seg button { flex: 1; border-radius: 0; }
.seg button:first-child { border-radius: 2px 0 0 2px; }
.seg button:last-child { border-radius: 0 2px 2px 0; margin-left: -1px; }
.seg button[aria-pressed="true"][data-side="boy"]  { background: var(--boy-soft);  border-color: var(--boy);  color: var(--boy); }
.seg button[aria-pressed="true"][data-side="girl"] { background: var(--girl-soft); border-color: var(--girl); color: var(--girl); }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.form-hint { font-size: 0.8125rem; color: var(--muted); }
.form-hint b { color: var(--brass); font-family: var(--mono); }

details.settings > summary { cursor: pointer; font-size: 0.8125rem; color: var(--muted); padding: 0.35rem 0; list-style: none; }
details.settings > summary::before { content: "▸ "; color: var(--faint); }
details.settings[open] > summary::before { content: "▾ "; }
details.settings > summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
details.settings > div, details.settings > .panel { margin-top: 0.6rem; }

/* --- перевод ------------------------------------------------------------ */

.pay-panel { gap: 1.4rem; }

.pay-steps {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9375rem;
  padding-left: 1.2rem;
}

.pay-steps li::marker { color: var(--brass); font-weight: 600; }

.pay-way { display: flex; flex-direction: column; gap: 0.5rem; }
.pay-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.pay-button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--brass);
  border: 1px solid var(--brass);
  border-radius: 2px;
  color: var(--ground);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.pay-button:hover { background: var(--ink); border-color: var(--ink); }
.pay-button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.pay-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.pay-phone-number {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}

/* --- вердикт ------------------------------------------------------------ */

.verdict {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--brass);
  background: var(--brass-soft);
  text-align: center;
}

.verdict-word { font-family: var(--display); font-size: clamp(2.5rem, 9vw, 4.5rem); line-height: 1; }
.verdict[data-side="boy"]  .verdict-word { color: var(--boy); }
.verdict[data-side="girl"] .verdict-word { color: var(--girl); }

/* --- связь с сервером ---------------------------------------------------- */

.link-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--faint);
}

.link-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.link-state.is-live::before { background: var(--brass); }
.link-state.is-lost::before { background: var(--girl); }

/* --- уведомления --------------------------------------------------------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: var(--ground);
  padding: 0.6rem 1rem;
  border-radius: 2px;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  animation: rise 0.25s ease;
}

.toast.is-error { background: var(--girl); color: #fff; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .flap.is-flipping { animation: none; }
  .toast { animation: none; }
  .market span { transition: none; }
}

/* ======================================================================
   Адаптация под экраны: от 320 px (iPhone SE, старые Android) до телевизора.
   Брейкпоинты привязаны к ширине, а не к моделям — новые устройства
   попадают в подходящий диапазон сами.
   ====================================================================== */

/* --- планшеты и узкие окна: табло в одну колонку --------------------- */

@media (max-width: 720px) {
  .board { grid-template-columns: 1fr; }
  .board-seam { height: 1px; }
  .lane { padding: 1.25rem 1rem; }
}

/* --- таблицы превращаются в карточки --------------------------------- */
/* Шесть колонок на телефоне читать невозможно: строка становится карточкой,
   где подпись берётся из data-label ячейки. */

@media (max-width: 620px) {
  .cards thead { display: none; }

  .cards, .cards tbody, .cards tr, .cards td { display: block; width: 100%; }

  .cards tbody tr {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .cards tbody tr:last-child { border-bottom: none; }

  .cards td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.2rem 0;
    border: none;
    text-align: right;
  }

  .cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: left;
  }

  /* Имя гостя — заголовок карточки, подпись ему не нужна */
  .cards td[data-label="Гость"], .cards td[data-label="Билет"] {
    font-family: var(--display);
    font-size: 1.25rem;
    padding-bottom: 0.35rem;
  }

  .cards td[data-label="Гость"]::before, .cards td[data-label="Билет"]::before { content: none; }
  .cards td.num { justify-content: space-between; }
  .cards td.is-empty::before { content: none; }
  .cards td.empty::before { content: none; }
  .cards .icon-btn { padding: 0.4rem 0.6rem; }
}

/* --- телефоны -------------------------------------------------------- */

@media (max-width: 520px) {
  /* iOS увеличивает страницу, если шрифт поля меньше 16 px */
  input[type="text"], input[type="number"], input[type="date"],
  input[type="datetime-local"], input[type="password"], select {
    font-size: 16px;
    padding: 0.6rem 0.7rem;
  }

  /* Палец — не мышь: минимальная площадь нажатия */
  button {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }

  .icon-btn { min-height: 44px; padding: 0.6rem 0.8rem; }

  /* Одна колонка: поле на две колонки потребовало бы ширины, которой нет */
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; min-width: 0; }

  .masthead {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .masthead-side {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem 0.75rem;
    text-align: left;
  }

  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 0.85rem 0.9rem; }
  .metric-note { display: none; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }

  .lane-hint { max-width: none; }

  .toolbar button { flex: 1 1 auto; }

  .form-foot { flex-direction: column; align-items: stretch; }
  .form-foot button { width: 100%; }
  .form-foot .toolbar { width: 100%; }

  .pay-links { flex-direction: column; }
  .pay-button { width: 100%; text-align: center; padding: 0.85rem 1rem; }
  .pay-phone { flex-direction: column; align-items: stretch; }
  .pay-phone button { width: 100%; }
  .pay-phone-number { font-size: 1.5rem; }

  .verdict { padding: 1.25rem 0.9rem; }
  .toast-host { left: 1rem; right: 1rem; transform: none; }
  .toast { text-align: center; }
}

/* --- очень узкие экраны: 320–360 px ---------------------------------- */

@media (max-width: 360px) {
  .wrap { padding-left: 0.85rem; padding-right: 0.85rem; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric-value { font-size: 1.15rem; }
  .lane-stats { gap: 1rem; font-size: 0.75rem; }
  .flap { font-size: 2.75rem; padding: 0.4rem 0.7rem; }
  .pay-phone-number { font-size: 1.3rem; }
  .cards td[data-label="Гость"], .cards td[data-label="Билет"] { font-size: 1.1rem; }
}

/* --- телефон лёжа: экономим высоту ----------------------------------- */

@media (max-height: 520px) and (orientation: landscape) {
  .wrap { gap: 1.15rem; padding-top: 1rem; }
  .masthead { padding-bottom: 0.75rem; }
  .flap { font-size: 2.5rem; }
  .lane { gap: 0.5rem; }
}

/* --- большой экран: табло на телевизоре ------------------------------ */

@media (min-width: 1600px) {
  .wrap { max-width: 1440px; }
  .flap { font-size: 5rem; }
  .lane-name { font-size: 2.75rem; }
  .metric-value { font-size: 2rem; }
}

@media print {
  .no-print, .toast-host { display: none; }
}
