/* Manrope лежит рядом, а не на Google Fonts: два внешних рукопожатия до первой
   отрисовки стоили дороже самого шрифта, да и в России эти домены нестабильны.
   Файл вариативный — одно начертание закрывает всю линейку от 400 до 800. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/manrope-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Ради знака ₽ (U+20BD) — грузится только там, где он встретился. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/manrope-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --felt: #081b17;
  --felt-light: #0d2922;
  --felt-card: #12352c;
  --paper: #f6f1e7;
  --paper-strong: #fffdf8;
  --ink: #15211d;
  --muted: #6e7772;
  --line: #ded8cc;
  --gold: #e6b95d;
  --gold-strong: #c58c2f;
  --green: #16785b;
  --green-soft: #deeee7;
  --red: #bd493e;
  --red-soft: #f6e2df;
  --white-muted: rgba(255, 255, 255, .66);
  --shadow: 0 22px 54px rgba(0, 0, 0, .24);
  --radius: 24px;
  color-scheme: dark;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--felt);
  /* Ничто не должно уезжать вбок: на телефоне горизонтальная прокрутка
     ощущается как сломанная страница. */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 10% -10%, rgba(56, 139, 111, .34), transparent 33rem),
    radial-gradient(circle at 105% 26%, rgba(230, 185, 93, .12), transparent 24rem),
    var(--felt);
  color: #fff;
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(230, 185, 93, .7);
  outline-offset: 2px;
}

.app {
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.page-footer {
  margin-top: 14px;
  padding: 0 18px;
  text-align: center;
}

.author-link {
  color: rgba(255, 255, 255, .38);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  padding-bottom: 1px;
}

.author-link:hover,
.author-link:focus-visible {
  color: rgba(255, 255, 255, .72);
  border-bottom-color: rgba(255, 255, 255, .4);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: linear-gradient(180deg, rgba(8, 27, 23, .98) 50%, rgba(8, 27, 23, .88));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(230, 185, 93, .44);
  border-radius: 50%;
  background: rgba(230, 185, 93, .1);
  color: var(--gold);
  font-size: 17px;
}

.history-button,
.active-game-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-button,
.active-game-button {
  padding: 0 14px;
}

.history-button.current,
.active-game-button.current {
  border-color: rgba(230, 185, 93, .45);
  background: rgba(230, 185, 93, .12);
  color: var(--gold);
}

.active-dot {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #66d3a7;
  box-shadow: 0 0 0 4px rgba(102, 211, 167, .1);
}

.main {
  padding: 4px 14px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 10vw, 48px);
  line-height: 1.03;
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 5px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.lead {
  max-width: 440px;
  margin-bottom: 24px;
  color: var(--white-muted);
  font-size: 15px;
  line-height: 1.55;
}

.hero {
  padding: 34px 6px 20px;
}

.deal-card,
.paper-card {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.deal-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.deal-card::after {
  content: "♠";
  position: absolute;
  top: -42px;
  right: -12px;
  color: rgba(21, 33, 29, .045);
  font-size: 150px;
  line-height: 1;
  transform: rotate(11deg);
  pointer-events: none;
}

.deal-label,
.field-label,
.section-kicker {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.deal-rate {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.deal-arrow {
  color: var(--gold-strong);
  font-size: 20px;
}

.deal-field {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

/* Размер строки курса задаёт скрипт по числу введённых цифр — так
   «50 000 ₽ → 100 000 фишек» остаётся в одну строку даже на узком экране. */
.deal-rate[data-size="m"] { font-size: 24px; }
.deal-rate[data-size="s"] { font-size: 21px; }
.deal-rate[data-size="xs"] { font-size: 18px; }

.deal-rate[data-size="s"] .deal-unit,
.deal-rate[data-size="xs"] .deal-unit {
  font-size: 14px;
}

.deal-input {
  width: 3.6ch;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 2px dashed var(--gold-strong);
  border-radius: 0;
  background: transparent;
  color: inherit;
  outline: none;
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.deal-input.wide {
  width: 5ch;
}

.deal-input:focus {
  border-bottom-style: solid;
}

.deal-unit {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.deal-note {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.setup-section {
  margin-top: 14px;
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stepper,
.rebuy-stepper {
  display: flex;
  align-items: center;
}

.stepper {
  gap: 12px;
}

.step-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
}

.step-value {
  min-width: 27px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.names-list {
  display: grid;
  gap: 10px;
}

.name-field,
.add-player-input,
.chips-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-strong);
  color: var(--ink);
  outline: none;
}

.name-field,
.add-player-input {
  height: 52px;
  padding: 0 15px;
  font-size: 16px;
  font-weight: 600;
}

.name-field::placeholder,
.add-player-input::placeholder {
  color: #a49f96;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border-radius: 17px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #251b08;
  box-shadow: 0 10px 24px rgba(197, 140, 47, .2);
}

.primary-button.dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}

.secondary-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.danger-button {
  min-height: 48px;
  border: 1px solid rgba(189, 73, 62, .25);
  background: var(--red-soft);
  color: var(--red);
}

button:disabled {
  cursor: default;
  opacity: .45;
}

.setup-submit {
  margin-top: 14px;
}

/* Первый экран должен целиком помещаться в телефон, чтобы «Начать игру» было
   видно сразу, без прокрутки. Всё лишнее по высоте здесь ужато, а имена идут
   в две колонки — четыре игрока занимают два ряда вместо четырёх. */
/* Текст, который стоит в index.html до загрузки скрипта: его читают роботы и
   человек на медленной связи. Приложение затирает его при первой отрисовке. */
.static-steps {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.setup-main .hero {
  padding: 6px 6px 10px;
}

/* Ни одна карточка не имеет права распирать страницу по ширине. */
.main > * {
  min-width: 0;
  max-width: 100%;
}

.setup-main h1 {
  margin-bottom: 9px;
  font-size: clamp(26px, 7.2vw, 34px);
  line-height: 1.07;
  letter-spacing: -.04em;
}

.setup-main .lead {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.45;
}

.setup-main .deal-card {
  padding: 14px 16px;
}

.setup-main .deal-label {
  font-size: 11px;
  letter-spacing: .07em;
}

.setup-main .deal-note {
  margin-top: 6px;
  font-size: 13px;
}

.setup-main .setup-section {
  margin-top: 8px;
  padding: 14px 16px;
}

.setup-main .section-heading {
  margin-bottom: 12px;
}

.setup-main .names-list {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.setup-main .name-field {
  height: 48px;
  padding: 0 13px;
  font-size: 16px;
}

/* Если игроков много и экран всё же кончился, кнопка не уезжает под обрез, а
   прилипает к нижней кромке. */
.setup-main .setup-submit {
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10;
}

.game-hero {
  padding: 28px 6px 18px;
}

.game-hero h1 {
  margin-bottom: 8px;
}

.date-line {
  margin: 0;
  color: var(--white-muted);
  font-size: 14px;
}

.bank-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
  background: rgba(255, 255, 255, .1);
}

.bank-stat {
  padding: 18px;
  background: var(--felt-card);
}

.bank-stat span {
  display: block;
  margin-bottom: 5px;
  color: var(--white-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.bank-stat strong {
  font-size: 23px;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.player-list {
  display: grid;
  gap: 10px;
}

.player-card {
  padding: 18px;
  border-radius: 21px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

.player-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.player-name {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.12;
}

.player-paid {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.remove-player {
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #aaa49b;
  cursor: pointer;
  font-size: 20px;
}

.rebuy-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.rebuy-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.rebuy-stepper {
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #e9e4d9;
}

.rebuy-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--paper-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 21px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .06);
}

.rebuy-count {
  min-width: 38px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.add-player-card {
  margin-top: 10px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, .22);
  border-radius: 21px;
  background: rgba(255, 255, 255, .045);
}

.add-player-trigger {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.add-player-form {
  display: grid;
  gap: 10px;
}

.add-player-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.add-player-hint {
  min-width: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.add-player-entry .rebuy-count {
  color: var(--ink);
}

.add-player-submit {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  background: var(--gold);
  color: #251b08;
  cursor: pointer;
  font-weight: 800;
}

.game-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quiet-action {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--white-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.cashout-hero,
.result-hero,
.history-hero {
  padding: 28px 6px 18px;
}

.cashout-summary {
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 21px;
  background: var(--felt-card);
  border: 1px solid rgba(255, 255, 255, .1);
}

.balance-track {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.balance-track span {
  display: block;
  color: var(--white-muted);
  font-size: 12px;
}

.balance-track strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.balance-message {
  margin: 13px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: var(--white-muted);
  font-size: 13px;
}

.balance-message.good {
  color: #8de0bd;
}

.balance-message.bad {
  color: #ffaaa1;
}

.cashout-list {
  display: grid;
  gap: 9px;
}

.cashout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
}

.cashout-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.cashout-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chips-input-wrap {
  position: relative;
}

.chips-input {
  height: 50px;
  padding: 0 38px 0 11px;
  text-align: right;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chips-suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
  pointer-events: none;
}

.mismatch-confirm {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid rgba(255, 170, 161, .28);
  border-radius: 20px;
  background: rgba(189, 73, 62, .14);
}

.mismatch-confirm strong {
  display: block;
  margin-bottom: 6px;
}

.mismatch-confirm p {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  line-height: 1.5;
}

.button-stack {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.result-summary {
  overflow: hidden;
  margin-bottom: 12px;
  padding: 22px;
  border-radius: 24px;
  background: var(--paper);
  color: var(--ink);
}

.result-summary.good {
  background: linear-gradient(145deg, #f9f4e8, #e4f0e9);
}

.result-summary.bad {
  background: linear-gradient(145deg, #f9f4e8, #f6dfdc);
}

.result-symbol {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-size: 22px;
}

.result-summary h2 {
  font-size: 28px;
}

.result-summary p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.transfer-section,
.outcome-section {
  margin-top: 12px;
}

.section-title-light {
  margin: 0 4px 10px;
  color: var(--white-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.transfer-list,
.outcome-list,
.history-list {
  display: grid;
  gap: 8px;
}

.transfer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 17px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
}

.transfer-person {
  min-width: 0;
}

.transfer-person.right {
  text-align: right;
}

.transfer-person span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.transfer-person strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.transfer-amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--green);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.transfer-arrow {
  color: var(--muted);
  font-size: 13px;
}

.outcome-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
}

.outcome-card > div:first-child {
  min-width: 0;
}

.outcome-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.outcome-card span {
  display: block;
  margin-top: 3px;
  color: var(--white-muted);
  font-size: 11px;
}

.outcome-value {
  flex: none;
  text-align: right;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.outcome-value.positive {
  color: #89dfba;
}

.outcome-value.negative {
  color: #ff9e95;
}

.empty-transfer {
  padding: 20px;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.history-card {
  display: block;
  width: 100%;
  padding: 17px;
  border: 0;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.history-card-top,
.history-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-card strong {
  font-size: 17px;
}

.history-card-bottom {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.status-pill.active {
  background: #f3e7c8;
  color: #8b611f;
}

.empty-history {
  padding: 36px 22px;
  border: 1px dashed rgba(255, 255, 255, .2);
  border-radius: 22px;
  color: var(--white-muted);
  text-align: center;
  line-height: 1.55;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 14px;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 14px;
  max-width: 592px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: #301c19;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
}

.loading-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--white-muted);
  font-size: 14px;
}

.chip-loader {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px dashed rgba(230, 185, 93, .75);
  border-radius: 50%;
  color: var(--gold);
  animation: spin 1.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 380px) {
  .topbar {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .history-button,
  .active-game-button {
    min-height: 38px;
    padding: 0 10px;
  }

  .active-dot {
    margin-right: 5px;
  }
}

@media (min-width: 560px) {
  .main { padding-right: 20px; padding-left: 20px; }
  .names-list { grid-template-columns: 1fr 1fr; }
  .player-list { grid-template-columns: 1fr 1fr; }
  .player-card { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
