:root {
  color-scheme: dark;
  --bg: #080d15;
  --surface: #0d141e;
  --surface-raised: #101722;
  --surface-soft: #141e2b;
  --surface-blue: #18243a;
  --line: #222d3c;
  --line-strong: #2b3a4f;
  --text: #edf2f8;
  --soft: #c5cfdd;
  --muted: #77859a;
  --blue: #5f8cff;
  --blue-bright: #8eabff;
  --green: #62d49e;
  --red: #ff7c78;
  --card-gold: #e2b75e;
  --ease-out: cubic-bezier(0.2, 0.75, 0.28, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% -8%, rgba(71, 112, 211, 0.14), transparent 31rem),
    radial-gradient(circle at 5% 100%, rgba(37, 87, 160, 0.08), transparent 28rem),
    var(--bg);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.12;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -1.5px;
}

h2 {
  margin-bottom: 7px;
  font-size: 18px;
  letter-spacing: -0.35px;
}

p {
  color: var(--muted);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.draft-ambient {
  display: none;
}

.online-screen-topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 54px);
  background: rgba(8, 13, 21, 0.88);
  backdrop-filter: blur(18px);
}

.online-screen-back {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  color: #96a4b8;
  background: transparent;
  font: 800 8px "Manrope", sans-serif;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: transform 140ms var(--ease-out), color 150ms ease, background-color 150ms ease;
}

.online-screen-back span { color: #7fa2ff; font-size: 13px; }
.online-screen-back:active { transform: scale(0.97); }

.online-screen-brand {
  display: inline-flex;
  align-items: center;
  color: #e8edf5;
  text-decoration: none;
}

.online-screen-brand > span {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  color: transparent;
  background: url("/assets/256-teams-icon.svg") center / cover no-repeat;
}

.online-screen-brand strong { display: none; }

.online-screen-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
}

.online-screen-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #28364a;
  border-radius: 8px;
  color: #91adff;
  background: #111a28;
  font: 800 16px/1 Inter, sans-serif;
  text-decoration: none;
}

.online-screen-action:hover { color: #fff; background: #1a2639; }

.discord-icon {
  width: 17px;
  height: 13px;
  background: currentColor;
  clip-path: polygon(14% 15%, 31% 5%, 38% 14%, 62% 14%, 69% 5%, 86% 15%, 100% 78%, 77% 94%, 67% 79%, 33% 79%, 23% 94%, 0 78%);
}

.draft-session-bar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(43, 58, 79, 0.72);
  background: #0a101a;
}

.draft-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: grid;
  min-height: 64px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(43, 58, 79, 0.72);
  background: rgba(8, 13, 21, 0.9);
  backdrop-filter: blur(16px);
}

.draft-brand {
  display: inline-flex;
  width: max-content;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.draft-brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: transparent;
  background: url("/assets/256-teams-icon.svg") center / cover no-repeat;
}

.draft-brand-mark > * {
  display: none;
}

.draft-brand-copy {
  display: grid;
  gap: 1px;
}

.draft-brand-copy strong {
  color: #e9eef6;
  font-size: 10px;
  letter-spacing: 0.8px;
}

.draft-brand-copy small {
  color: #69778c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.9px;
}

.draft-header-status {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #8d9bae;
  background: #111a26;
  font: 700 8px "DM Mono", monospace;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f7d91;
}

.draft-header-status[data-state="online"] {
  color: #9fd9bd;
}

.draft-header-status[data-state="online"] .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(98, 212, 158, 0.1);
}

.draft-header-status[data-state="queue"],
.draft-header-status[data-state="reconnecting"] {
  color: #aac0ff;
}

.draft-header-status[data-state="queue"] .status-dot,
.draft-header-status[data-state="reconnecting"] .status-dot {
  background: var(--blue);
}

.draft-header-status[data-state="offline"] {
  color: #ffaaa7;
}

.draft-header-status[data-state="offline"] .status-dot {
  background: var(--red);
}

.draft-header-actions {
  display: flex;
  min-width: 0;
  justify-self: end;
  align-items: center;
  gap: 7px;
}

.header-action,
.account-chip,
.google-button,
.copy-code-button,
.back-button,
.text-button,
.dialog-close {
  border: 0;
}

.header-action,
.account-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #263348;
  border-radius: 8px;
  color: #8f9db1;
  background: #101824;
  font-size: 8px;
  font-weight: 800;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}

.header-action > span:first-child {
  color: var(--blue-bright);
  font-size: 13px;
}

.account-chip {
  padding: 3px 9px 3px 3px;
}

.account-chip-avatar,
.large-avatar,
.lobby-player-avatar,
.player-panel-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.account-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #b7c9ff;
  background: var(--surface-blue);
  font-size: 14px;
}

.draft-main {
  width: min(100%, 1320px);
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 124px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(14px, 4vw, 48px) max(44px, env(safe-area-inset-bottom));
}

.app-screen {
  width: 100%;
}

.app-screen.is-entering {
  animation: screen-enter 180ms var(--ease-out) both;
}

@keyframes screen-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.state-card,
.mode-choice,
.squad-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.section-kicker {
  color: var(--blue-bright);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.tertiary-button,
.match-button,
.fold-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 180ms ease, transform 140ms var(--ease-out);
}

.counter-fold-button {
  grid-column: 1 / -1;
  min-height: 38px;
}

.primary-button {
  border: 1px solid #668fff;
  color: #fff;
  background: #426de7;
  box-shadow: 0 8px 20px rgba(26, 57, 137, 0.16);
}

.secondary-button {
  border: 1px solid #31476d;
  color: #b6c9ff;
  background: #17233a;
}

.tertiary-button {
  border: 1px solid var(--line);
  color: #a9b4c4;
  background: #111a26;
}

.link-button {
  text-decoration: none;
}

.text-button,
.back-button,
.copy-code-button {
  min-height: 32px;
  padding: 0 4px;
  color: #8fa2c2;
  background: transparent;
  font-size: 8px;
  font-weight: 800;
  transition: color 150ms ease, transform 140ms var(--ease-out);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}

.back-button span {
  color: var(--blue-bright);
  font-size: 13px;
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.tertiary-button:active:not(:disabled),
.match-button:active:not(:disabled),
.fold-button:active:not(:disabled),
.header-action:active:not(:disabled),
.account-chip:active:not(:disabled),
.google-button:active:not(:disabled),
.copy-code-button:active:not(:disabled),
.back-button:active:not(:disabled),
.text-button:active:not(:disabled),
.dialog-close:active:not(:disabled),
.touch-keypad button:active:not(:disabled) {
  transform: scale(0.98);
}

.form-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: #8ea8ef;
  font-size: 9px;
}

.form-message.is-error {
  color: #ff9995;
}

/* Loading and sign in */
.loading-screen {
  display: grid;
  min-height: min(560px, calc(100vh - 132px));
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.loading-crest {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 11px;
  color: #b8caff;
  background: var(--surface-blue);
  font: 700 13px "DM Mono", monospace;
}

.loading-spinner,
.queue-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(142, 171, 255, 0.2);
  border-top-color: var(--blue-bright);
  border-radius: 50%;
  animation: spinner 800ms linear infinite;
}

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

.loading-screen h1 {
  margin: 4px 0 0;
  font-size: 19px;
  letter-spacing: -0.4px;
}

.loading-screen p {
  margin: 0;
  font-size: 10px;
}

.auth-screen {
  display: grid;
  width: min(100%, 470px);
  margin: 0 auto;
  gap: 18px;
}

.auth-story {
  padding-top: clamp(8px, 4vh, 36px);
  text-align: center;
}

.auth-story h1 {
  margin: 8px 0 7px;
  font-size: clamp(28px, 6vw, 36px);
}

.auth-story h1 em {
  color: inherit;
  font-style: normal;
}

.auth-story > p {
  max-width: 420px;
  margin: 0 auto;
  font-size: 10px;
}

.auth-feature-row,
.auth-card-fan {
  display: none;
}

.auth-panel {
  width: 100%;
  padding: clamp(22px, 5vw, 30px);
}

.auth-panel h2 {
  margin: 6px 0;
  font-size: 21px;
}

.auth-intro {
  margin-bottom: 20px;
  font-size: 10px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: #8592a5;
  font-size: 8px;
  font-weight: 800;
}

.field input,
.room-code-input,
.money-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #293548;
  border-radius: 9px;
  outline: 0;
  color: var(--text);
  background: #0b111a;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input,
.room-code-input {
  padding: 0 13px;
}

.field input:focus,
.room-code-input:focus,
.money-input:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(95, 140, 255, 0.12);
}

.field input::placeholder,
.room-code-input::placeholder {
  color: #536075;
}

.auth-submit {
  width: 100%;
  margin-top: 3px;
}

.auth-divider,
.join-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #647287;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider {
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after,
.join-divider::before,
.join-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.google-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: #d9e0ea;
  background: #111a26;
  font-size: 9px;
  transition: border-color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}

.google-button svg {
  width: 17px;
  height: 17px;
}

.auth-switch {
  display: block;
  margin: 12px auto 0;
}

/* Entry hub */
.hub-screen {
  width: min(100%, 760px);
  margin: 0 auto;
}

.hub-hero {
  padding: 4px 0 23px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.hub-copy h1 {
  margin: 7px 0;
  font-size: clamp(29px, 6vw, 40px);
}

.hub-copy > p {
  max-width: 500px;
  margin: 0 auto;
  font-size: 10px;
}

.hero-card-stage {
  display: none;
}

.hub-rules {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.hub-rules > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 7px;
  color: #8d9aae;
  background: #0f1722;
}

.hub-rules b {
  color: #c8d6fb;
  font: 600 11px "DM Mono", monospace;
}

.hub-rules small {
  font-size: 7px;
  font-weight: 700;
}

.hub-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.mode-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.mode-choice-featured {
  border-color: rgba(113, 148, 255, 0.48);
  background:
    radial-gradient(circle at 92% -45%, rgba(255, 255, 255, 0.16), transparent 48%),
    linear-gradient(135deg, #3f69dd 0%, #3057c9 58%, #284bad 100%);
  box-shadow: 0 16px 36px rgba(18, 43, 105, 0.2);
}

.mode-choice h2 {
  margin: 3px 0 4px;
  font-size: 18px;
}

.mode-choice p {
  margin: 0;
  font-size: 9px;
}

.mode-choice-featured .section-kicker,
.mode-choice-featured h2 {
  color: #fff;
}

.mode-choice-featured p {
  color: rgba(255, 255, 255, 0.72);
}

.mode-choice-featured > .primary-button {
  border-color: #fff;
  color: #2b50b4;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 41, 94, 0.18);
}

.choice-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 9px;
  color: #a9c0ff;
  background: var(--surface-blue);
  font-size: 17px;
}

.mode-choice-featured .choice-icon {
  color: #fff;
  background: rgba(15, 36, 91, 0.2);
}

.choice-action {
  min-width: 118px;
}

.queue-card,
.queue-fallback {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.queue-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.queue-card .queue-spinner {
  border-color: rgba(255, 255, 255, 0.24);
  border-top-color: #fff;
}

.queue-card strong {
  color: #fff;
  font-size: 10px;
}

.queue-card p,
.queue-fallback p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
}

.queue-card .text-button {
  color: #fff;
}

.queue-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-fallback .secondary-button {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  background: rgba(15, 36, 91, 0.2);
}

.join-divider {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.join-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px;
}

.room-code-input {
  font: 600 12px "DM Mono", monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
}

.account-summary-head,
.wallet-row,
.boost-heading,
.boost-actions,
.lobby-waiting,
.waiting-decision {
  display: flex;
  align-items: center;
}

.account-summary-head {
  min-width: 0;
  gap: 10px;
}

.large-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #b5c8ff;
  background: var(--surface-blue);
  font-size: 21px;
}

.account-summary h2 {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-row {
  gap: 8px;
}

.wallet-row > span:last-child {
  display: grid;
}

.wallet-row strong {
  font: 600 13px "DM Mono", monospace;
}

.wallet-row small {
  color: var(--muted);
  font-size: 7px;
}

.coin-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(226, 183, 94, 0.4);
  border-radius: 50%;
  color: #f0cb7c;
  background: rgba(226, 183, 94, 0.08);
  font: 700 8px "DM Mono", monospace;
}

/* Lobby */
.lobby-screen {
  width: min(100%, 900px);
  margin: 0 auto;
}

.room-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.room-heading h1 {
  margin: 5px 0;
  font-size: 30px;
}

.room-heading p {
  margin: 0;
  font-size: 10px;
}

.room-code-card {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 210px;
  padding: 13px 16px;
  border-radius: 11px;
  background: rgba(95, 140, 255, 0.08);
}

.room-code-card > span {
  color: #7e8da4;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
}

.room-code-card strong {
  color: #f1f5fb;
  font: 500 25px "DM Mono", monospace;
  letter-spacing: 4px;
}

.copy-code-button {
  min-height: 24px;
  color: var(--blue-bright);
}

.lobby-player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.lobby-player {
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}

.lobby-player.is-you {
  border-color: rgba(95, 140, 255, 0.5);
  background: #121d2d;
}

.lobby-player.is-empty {
  border-style: dashed;
  color: #627087;
  background: #0c121b;
}

.lobby-player-avatar {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  color: #b7c9ff;
  background: var(--surface-blue);
  font-size: 20px;
}

.lobby-player-copy {
  min-width: 0;
}

.lobby-player-copy small,
.lobby-player-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-player-copy small {
  color: #718097;
  font-size: 7px;
  font-weight: 800;
}

.lobby-player-copy strong {
  margin-top: 2px;
  font-size: 11px;
}

.player-budget-preview {
  display: block;
  margin-top: 2px;
  color: #9db4f5;
  font: 500 8px "DM Mono", monospace;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7b889a;
  font-size: 7px;
  font-weight: 800;
}

.connection-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #657286;
}

.connection-pill.is-online {
  color: #8ecdad;
}

.connection-pill.is-online i {
  background: var(--green);
}

.pre-draft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 10px;
  margin-top: 10px;
}

.boost-card,
.lobby-ready-card {
  padding: 17px;
}

.boost-heading {
  gap: 10px;
}

.boost-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  color: #b9caff;
  background: var(--surface-blue);
  font: 600 11px "DM Mono", monospace;
}

.boost-card h2,
.lobby-ready-card h2 {
  margin: 3px 0 0;
  font-size: 16px;
}

.boost-card > p,
.lobby-ready-card p {
  margin: 10px 0;
  font-size: 9px;
}

.boost-actions {
  flex-wrap: wrap;
  gap: 7px;
}

.boost-button {
  min-height: 38px;
  padding-inline: 11px;
}

.boost-note {
  margin-bottom: 0 !important;
  color: #8999b2;
}

.lobby-ready-card {
  display: grid;
  align-content: center;
}

.lobby-start-button {
  width: 100%;
}

.lobby-waiting,
.waiting-decision {
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  color: #8795a9;
  font-size: 9px;
}

.loading-dots {
  display: flex;
  gap: 3px;
}

.loading-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue-bright);
  animation: dot-pulse 700ms ease-in-out infinite alternate;
}

.loading-dots i:nth-child(2) { animation-delay: 100ms; }
.loading-dots i:nth-child(3) { animation-delay: 200ms; }

@keyframes dot-pulse {
  to { opacity: 0.3; transform: translateY(-2px); }
}

/* Live draft */
.draft-screen {
  width: 100%;
}

.round-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-raised);
}

.round-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.round-copy h1 {
  margin: 0;
  font: 500 16px "DM Mono", monospace;
  letter-spacing: -0.4px;
}

.round-copy h1 span {
  color: #66758a;
  font-size: 10px;
}

.round-status {
  padding: 6px 9px;
  border-radius: 999px;
  color: #aac0ff;
  background: rgba(95, 140, 255, 0.1);
  font-size: 8px;
  font-weight: 800;
}

.round-timer {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
}

.round-timer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.round-timer circle {
  fill: none;
  stroke-width: 3;
}

.timer-track {
  stroke: rgba(148, 163, 184, 0.16);
}

.timer-progress {
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-dasharray: 138.23;
  stroke-dashoffset: 0;
  transition: stroke 150ms ease;
}

.round-timer strong {
  font: 500 10px "DM Mono", monospace;
}

.round-timer.is-urgent .timer-progress {
  stroke: var(--red);
}

.round-timer.is-urgent strong {
  color: var(--red);
}

.draft-arena {
  display: grid;
  grid-template-columns: minmax(205px, 0.72fr) minmax(300px, 1fr) minmax(205px, 0.72fr);
  align-items: stretch;
  gap: 10px;
}

.squad-panel {
  min-width: 0;
  padding: 12px;
}

.squad-panel.is-winner-flash {
  animation: panel-win 240ms var(--ease-out);
}

@keyframes panel-win {
  50% { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(95, 140, 255, 0.12); }
}

.player-panel-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.player-panel-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #b6c9ff;
  background: var(--surface-blue);
  font-size: 17px;
}

.player-panel-copy {
  min-width: 0;
}

.player-panel-copy small,
.player-panel-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-panel-copy small {
  color: #6f7d91;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.player-panel-copy strong {
  margin-top: 2px;
  font-size: 11px;
}

.turn-marker {
  margin-left: auto;
  padding: 5px 7px;
  border-radius: 999px;
  color: #b4c8ff;
  background: rgba(95, 140, 255, 0.11);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.squad-budget {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin: 11px 0;
  padding: 8px 9px;
  border-radius: 8px;
  background: #0b111a;
}

.squad-budget span {
  color: #6f7d91;
  font-size: 7px;
  font-weight: 800;
}

.squad-budget strong {
  color: #c8d7ff;
  font: 500 17px "DM Mono", monospace;
  letter-spacing: -0.5px;
  transition: color 160ms ease, transform 160ms var(--ease-out);
}

.squad-budget.is-changing strong {
  transform: translateY(-1px);
}

.squad-budget.is-low strong {
  color: var(--red);
}

.squad-slots {
  display: grid;
  gap: 6px;
}

.squad-slot {
  display: grid;
  min-width: 0;
  min-height: 51px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px dashed #263142;
  border-radius: 9px;
  color: #617087;
  background: #0c121b;
}

.squad-slot.is-filled {
  border-style: solid;
  color: #c5cfdd;
  background: #0f1722;
}

.squad-slot-card,
.empty-slot-number {
  display: grid;
  width: 30px;
  height: 39px;
  place-items: center;
}

.squad-slot-card {
  clip-path: polygon(10% 0, 90% 0, 100% 12%, 92% 87%, 50% 100%, 8% 87%, 0 12%);
  color: #30230e;
  background: linear-gradient(145deg, #fae7a6, #b98230);
  font: 800 9px "DM Mono", monospace;
}

.squad-slot-card.card-tots { color: #09271a; background: linear-gradient(145deg, #d9ff73, #28b976); }
.squad-slot-card.card-potm { color: #fff; background: linear-gradient(145deg, #d7a0ff, #6941b0); }
.squad-slot-card.card-toty { color: #161f32; background: linear-gradient(145deg, #fff0a7, #cf952e 56%, #264e99); }
.squad-slot-card.card-gold { color: #30230e; background: linear-gradient(145deg, #f9df83, #aa7529); }

.empty-slot-number {
  border: 1px dashed #2b3749;
  border-radius: 7px;
  font: 500 8px "DM Mono", monospace;
}

.squad-slot-copy {
  min-width: 0;
}

.squad-slot-copy strong,
.squad-slot-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-slot-copy strong { font-size: 8px; }
.squad-slot-copy small { margin-top: 2px; color: #6f7d91; font-size: 6px; }

.squad-slot-price {
  color: #9db4f5;
  font: 500 7px "DM Mono", monospace;
}

.empty-panel-copy {
  display: grid;
  min-height: 90px;
  margin: 0;
  place-items: center;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.auction-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 460px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 42%, rgba(95, 140, 255, 0.08), transparent 15rem),
    var(--surface);
  perspective: 1000px;
}

.turn-banner {
  min-height: 24px;
  margin-bottom: 8px;
  color: #a7b8e5;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.current-card-stage {
  position: relative;
  display: grid;
  width: 218px;
  height: 314px;
  place-items: center;
}

.current-card-wrap,
.card-flipper,
.card-flipper-face {
  width: 100%;
  height: 100%;
}

.current-card-wrap {
  perspective: 1000px;
}

.card-flipper {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 220ms var(--ease-out);
}

.card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.card-flipper-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.card-front-face {
  transform: rotateY(180deg);
}

.card-back {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  clip-path: polygon(10% 0, 90% 0, 100% 12%, 92% 87%, 50% 100%, 8% 87%, 0 12%);
  color: #b9caff;
  background:
    repeating-radial-gradient(circle at 50% 42%, transparent 0 15px, rgba(119, 153, 244, 0.08) 16px 17px),
    linear-gradient(145deg, #1b2942, #0a101b 68%, #15233a);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.3));
}

.card-back::before,
.card-back::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(142, 171, 255, 0.42);
  clip-path: inherit;
  content: "";
}

.card-back::after {
  inset: 16px;
  border-color: rgba(142, 171, 255, 0.14);
}

.card-back-mark {
  z-index: 1;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(142, 171, 255, 0.32);
  border-radius: 20px;
  background: rgba(5, 10, 18, 0.38);
  font: 500 21px "DM Mono", monospace;
}

.card-back-label {
  position: absolute;
  z-index: 1;
  bottom: 43px;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.bid-callout {
  min-width: 190px;
  margin-top: 7px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #b7c9ff;
  background: rgba(95, 140, 255, 0.1);
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.auction-activity {
  display: grid;
  width: min(290px, 94%);
  gap: 3px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.auction-activity:empty {
  display: none;
}

.auction-activity > li {
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 6px;
  color: #8290a4;
  background: rgba(16, 24, 36, 0.82);
  font-size: 7px;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: auction-activity-enter 160ms var(--ease-out) both;
}

.auction-activity > li:nth-last-child(n + 4) {
  display: none;
}

@keyframes auction-activity-enter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.bid-dock {
  display: grid;
  width: min(760px, 100%);
  min-height: 86px;
  grid-template-columns: minmax(190px, 0.65fr) minmax(300px, 1fr);
  align-items: center;
  gap: 18px;
  margin: 10px auto 0;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(16, 23, 34, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.bid-copy h2 {
  margin: 3px 0 2px;
  font-size: 14px;
}

.bid-copy p {
  margin: 0;
  font-size: 8px;
}

.bid-form {
  display: grid;
  grid-template-columns: minmax(115px, 0.75fr) minmax(130px, 1fr);
  gap: 7px;
}

.money-input {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  color: #9db4f5;
  font: 500 16px "DM Mono", monospace;
}

.money-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: 500 16px "DM Mono", monospace;
}

.bid-submit-button {
  min-height: 46px;
}

.decision-actions {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 7px;
}

.match-button {
  border: 1px solid #65d7a1;
  color: #062418;
  background: #69d9a5;
}

.fold-button {
  border: 1px solid rgba(255, 124, 120, 0.34);
  color: #ffaaa7;
  background: rgba(255, 124, 120, 0.07);
}

.touch-keypad {
  display: none;
}

.waiting-decision {
  grid-column: 2;
}

/* Original fallback treatments plus remote historical FUT artwork. */
.fut-card {
  --card-ink: #3b2c13;
  --card-accent: #74511e;
  --card-border: #fff0b2;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 8px;
  overflow: hidden;
  clip-path: polygon(10% 0, 90% 0, 100% 12%, 92% 87%, 50% 100%, 8% 87%, 0 12%);
  color: var(--card-ink);
  background: linear-gradient(145deg, #fff8d9 0%, #e7c36e 55%, #a46b26 100%);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.3));
}

.fut-card::before {
  position: absolute;
  z-index: 0;
  inset: 6px;
  border: 1px solid var(--card-border);
  clip-path: inherit;
  content: "";
  opacity: 0.72;
}

.fut-card::after {
  position: absolute;
  z-index: 3;
  inset: -45% -80%;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%);
  transform: translateX(-38%) rotate(8deg);
}

.fut-card.tier-s::after,
.fut-card.card-toty::after {
  opacity: 0.68;
  animation: card-shimmer 2.8s linear infinite;
}

@keyframes card-shimmer {
  to { transform: translateX(38%) rotate(8deg); }
}

.fut-card.card-tots {
  --card-ink: #072719;
  --card-accent: #0a6943;
  --card-border: #dfff83;
  background: radial-gradient(circle at 74% 18%, rgba(229, 255, 132, 0.72), transparent 24%), linear-gradient(150deg, #ddff77 0%, #38cd87 46%, #0c5a3d 100%);
}

.fut-card.card-potm {
  --card-ink: #fff;
  --card-accent: #f0d9ff;
  --card-border: #e2b9ff;
  background: radial-gradient(circle at 70% 18%, rgba(255, 210, 255, 0.42), transparent 25%), linear-gradient(150deg, #c98bf3 0%, #7641b8 52%, #29164f 100%);
}

.fut-card.card-toty {
  --card-ink: #111b31;
  --card-accent: #4a3510;
  --card-border: #fff0a2;
  background: radial-gradient(circle at 70% 12%, rgba(255, 239, 155, 0.92), transparent 25%), linear-gradient(145deg, #ffe894 0%, #c99029 45%, #234891 72%, #101a42 100%);
}

.fut-card.card-gold {
  --card-ink: #30230e;
  --card-accent: #71501c;
  --card-border: #ffeca1;
  background: radial-gradient(circle at 74% 15%, rgba(255, 246, 191, 0.58), transparent 25%), linear-gradient(145deg, #f9df83 0%, #d5a643 57%, #8d5b22 100%);
}

.fut-card.has-authentic-art {
  padding: 0;
  clip-path: none;
  background: var(--card-design) center / contain no-repeat;
}

.fut-card.has-authentic-art::before,
.fut-card.has-authentic-art::after {
  display: none;
}

.fut-card.has-authentic-art.is-special-card {
  --card-ink: #fff;
  --card-accent: rgba(255, 255, 255, 0.78);
  --card-border: rgba(255, 255, 255, 0.9);
}

.fut-card.has-authentic-art .fut-card-frame {
  display: block;
  padding: 0;
}

.fut-card.has-authentic-art .card-portrait::before {
  display: none;
}

.fut-card.has-authentic-art .card-topline {
  display: none;
}

.fut-card.has-authentic-art .card-main {
  display: block;
  min-height: 0;
}

.fut-card.has-authentic-art .card-rating-block {
  position: absolute;
  z-index: 3;
  top: 16.8%;
  left: 12.5%;
  width: 20%;
  padding: 0;
  color: var(--card-ink);
  text-align: center;
}

.fut-card.has-authentic-art .card-rating-block strong {
  font: 800 25px/0.92 "Arial Narrow", "Roboto Condensed", sans-serif;
  letter-spacing: -1.2px;
}

.fut-card.has-authentic-art .card-rating-block span {
  margin-top: 3px;
  font: 800 9px/1 "Arial Narrow", "Roboto Condensed", sans-serif;
}

.fut-card.has-authentic-art .card-rating-block small {
  display: flex;
  width: 24px;
  height: auto;
  margin: 7px auto 0;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  place-items: center;
  overflow: visible;
  font-size: 14px;
}

.auth-nation-flag {
  display: block;
  width: 22px;
  height: 14px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.auth-club-badge {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.fut-card.has-authentic-art .card-portrait {
  position: absolute;
  z-index: 2;
  top: 22%;
  right: 7%;
  bottom: auto;
  left: 34%;
  display: block;
  height: 40%;
  align-self: auto;
  overflow: hidden;
}

.card-player-art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.2));
}

.fut-card.has-authentic-art .card-identity {
  position: absolute;
  z-index: 3;
  top: 63.8%;
  right: 15%;
  left: 15%;
  padding: 3px 0 4px;
  border-color: color-mix(in srgb, currentColor 28%, transparent);
}

.fut-card.has-authentic-art .card-identity strong {
  font: 800 10.5px/1 "Arial Narrow", "Roboto Condensed", sans-serif;
  letter-spacing: -0.15px;
}

.fut-card.has-authentic-art .card-identity small {
  display: none;
}

.fut-card.has-authentic-art .card-stat-grid {
  position: absolute;
  z-index: 3;
  top: 71.5%;
  right: 18%;
  left: 18%;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 25%;
  padding: 0;
}

.fut-card.has-authentic-art .card-stat-grid span {
  justify-content: flex-start;
  gap: 2px;
  font-family: "Arial Narrow", "Roboto Condensed", sans-serif;
}

.fut-card.has-authentic-art .card-stat-grid b {
  min-width: 14px;
  font-size: 8px;
  line-height: 1.05;
  text-align: right;
}

.fut-card.has-authentic-art .card-stat-grid small {
  font-size: 5px;
  line-height: 1;
}

.fut-card-frame {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr auto auto;
  padding: 16px 14px 24px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 800 6px "DM Mono", monospace;
  letter-spacing: 0.8px;
}

.card-tier {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.card-main {
  display: grid;
  min-height: 119px;
  grid-template-columns: 52px 1fr;
  align-items: center;
}

.card-rating-block {
  align-self: start;
  padding-top: 19px;
  text-align: center;
}

.card-rating-block strong,
.card-rating-block span,
.card-rating-block small {
  display: block;
}

.card-rating-block strong {
  font: 500 29px/0.9 "DM Mono", monospace;
  letter-spacing: -2px;
}

.card-rating-block span { margin-top: 4px; font-size: 9px; font-weight: 800; }
.card-rating-block small { margin-top: 6px; font-size: 16px; }

.card-portrait {
  position: relative;
  display: grid;
  height: 111px;
  align-self: end;
  place-items: end center;
  overflow: hidden;
}

.card-portrait::before {
  position: absolute;
  bottom: 6px;
  width: 80px;
  height: 80px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.14;
}

.portrait-silhouette {
  position: relative;
  width: 70px;
  height: 86px;
  opacity: 0.7;
}

.portrait-silhouette::before {
  position: absolute;
  top: 1px;
  left: 50%;
  width: 34px;
  height: 39px;
  border-radius: 48% 48% 44% 44%;
  content: "";
  background: currentColor;
  transform: translateX(-50%);
}

.portrait-silhouette::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 55px;
  border-radius: 48% 48% 15% 15%;
  content: "";
  background: currentColor;
  clip-path: polygon(18% 8%, 39% 0, 50% 16%, 61% 0, 82% 8%, 100% 100%, 0 100%);
}

.portrait-monogram {
  position: absolute;
  z-index: 1;
  bottom: 20px;
  left: 50%;
  color: var(--card-border);
  font-size: 15px;
  font-weight: 800;
  transform: translateX(-50%);
}

.card-identity {
  padding: 5px 0 6px;
  border-top: 1px solid rgba(48, 35, 14, 0.2);
  border-bottom: 1px solid rgba(48, 35, 14, 0.2);
  text-align: center;
}

.card-identity strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-identity small {
  display: block;
  margin-top: 2px;
  color: var(--card-accent);
  font-size: 5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.card-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 6px;
  padding-top: 7px;
}

.card-stat-grid span {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font: 500 7px "DM Mono", monospace;
}

.card-stat-grid b { font-size: 9px; }
.card-stat-grid small { font-size: 5px; font-weight: 800; }

/* Squad reveal */
.reveal-screen {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.reveal-heading {
  margin-bottom: 18px;
  text-align: center;
}

.reveal-heading h1 {
  margin: 5px 0;
  font-size: 30px;
}

.reveal-heading p {
  margin: 0;
  font-size: 9px;
}

.reveal-versus {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.reveal-squad {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
}

.reveal-squad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.reveal-squad-player {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.reveal-squad-player strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reveal-squad-score {
  flex: 0 0 auto;
  text-align: right;
}

.reveal-squad-score strong,
.reveal-squad-score small {
  display: block;
}

.reveal-squad-score strong {
  color: #c7d6ff;
  font: 500 17px "DM Mono", monospace;
}

.reveal-squad-score small {
  color: #6f7d91;
  font-size: 6px;
  font-weight: 800;
}

.reveal-card-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.reveal-card {
  display: grid;
  min-width: 0;
  aspect-ratio: 0.7;
  place-items: center;
  clip-path: polygon(10% 0, 90% 0, 100% 12%, 92% 87%, 50% 100%, 8% 87%, 0 12%);
  color: #30230e;
  background: linear-gradient(145deg, #fff1ad, #b47a2a);
  opacity: 0;
  transform: rotateY(75deg);
  animation: reveal-card 220ms var(--ease-out) forwards;
}

.reveal-card.card-tots { color: #09271a; background: linear-gradient(145deg, #d9ff73, #28b976); }
.reveal-card.card-potm { color: #fff; background: linear-gradient(145deg, #d7a0ff, #6941b0); }
.reveal-card.card-toty { color: #111a31; background: linear-gradient(145deg, #fff0a7, #cf952e 56%, #264e99); }
.reveal-card.card-gold { color: #30230e; background: linear-gradient(145deg, #f9df83, #aa7529); }
.reveal-card:nth-child(2) { animation-delay: 80ms; }
.reveal-card:nth-child(3) { animation-delay: 160ms; }
.reveal-card:nth-child(4) { animation-delay: 240ms; }
.reveal-card:nth-child(5) { animation-delay: 320ms; }

@keyframes reveal-card {
  to { opacity: 1; transform: rotateY(0); }
}

.reveal-card-copy {
  width: 100%;
  padding: 5px 3px;
  text-align: center;
}

.reveal-card-copy b,
.reveal-card-copy strong,
.reveal-card-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reveal-card-copy b { font: 600 clamp(12px, 1.7vw, 18px) "DM Mono", monospace; }
.reveal-card-copy strong { margin-top: 3px; font-size: clamp(5px, 0.7vw, 7px); text-transform: uppercase; }
.reveal-card-copy small { margin-top: 2px; font-size: 5px; font-weight: 800; }

.reveal-vs-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #b3c7ff;
  background: var(--surface-blue);
  font: 700 8px "DM Mono", monospace;
}

.share-card-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.38fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 14px;
}

.share-card-copy h2 { margin: 3px 0; font-size: 15px; }
.share-card-copy p { margin-bottom: 10px; font-size: 8px; }

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#squadShareCanvas {
  display: block;
  width: 100%;
  max-height: 270px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  object-fit: contain;
}

.tournament-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  color: #748298;
  font-size: 8px;
  font-weight: 700;
}

.tournament-countdown strong {
  color: #b3c7ff;
  font: 500 14px "DM Mono", monospace;
}

/* Tournament */
.tournament-screen {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.tournament-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.tournament-heading h1 {
  margin: 4px 0;
  font-size: 29px;
}

.tournament-heading p {
  margin: 0;
  font-size: 9px;
}

.tournament-progress {
  display: grid;
  min-width: 210px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.tournament-progress > span {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #172131;
}

.tournament-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 220ms var(--ease-out);
}

.tournament-progress strong {
  color: #a9c0ff;
  font: 500 8px "DM Mono", monospace;
}

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

.tournament-grid .live-match-card {
  grid-column: 1 / -1;
  grid-row: 1;
}

.tournament-grid .standings-card { grid-column: 1; grid-row: 2; }
.tournament-grid .commentary-card { grid-column: 2; grid-row: 2; }
.tournament-grid .bracket-card { grid-column: 1 / -1; grid-row: 3; }

.standings-card,
.live-match-card,
.commentary-card,
.bracket-card {
  min-width: 0;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 2px 0 0;
  font-size: 13px;
}

.advance-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #77859a;
  font-size: 7px;
  font-weight: 800;
}

.advance-key i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--green);
}

.standings-scroll {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}

.standings-table th,
.standings-table td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  text-align: center;
}

.standings-table th {
  color: #657287;
  font-size: 6px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
  text-align: left;
}

.standings-table tr:nth-child(-n + 4) td:first-child {
  color: var(--green);
}

.standings-table tr.is-human {
  background: rgba(95, 140, 255, 0.07);
}

.standings-team {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.standings-team span { font-size: 13px; }
.standings-team strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.live-match-card {
  min-height: 310px;
  padding: 18px;
}

.live-match-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #79879b;
  font: 500 6px "DM Mono", monospace;
  letter-spacing: 0.8px;
}

.live-match-label span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 124, 120, 0.09);
}

.match-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(100%, 620px);
  margin: 46px auto 0;
}

.scoreboard-team {
  min-width: 0;
  text-align: center;
}

.scoreboard-team span { display: block; margin-bottom: 8px; font-size: 34px; }
.scoreboard-team strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.scoreboard-score {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 500 42px "DM Mono", monospace;
}

.scoreboard-score i {
  width: 5px;
  height: 1px;
  background: #627087;
}

.scoreboard-clock {
  margin-top: 20px;
  color: #a9c0ff;
  font: 500 8px "DM Mono", monospace;
  text-align: center;
}

.live-match-card .empty-panel-copy {
  min-height: 190px;
}

.commentary-feed {
  max-height: 230px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.commentary-feed li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 7px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #aeb9c8;
  font-size: 8px;
  line-height: 1.4;
}

.commentary-feed time {
  color: #9fb6f7;
  font: 500 7px "DM Mono", monospace;
}

.commentary-empty {
  display: block !important;
  color: #718097 !important;
  text-align: center;
}

.mini-bracket {
  display: grid;
  min-height: 190px;
  grid-template-columns: 1fr 0.88fr;
  align-items: center;
  gap: 10px;
  padding: 13px;
}

.bracket-round {
  display: grid;
  gap: 7px;
}

.bracket-round-label {
  color: #6f7d91;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.bracket-match {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c121b;
}

.bracket-team {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 8px;
  font-size: 7px;
}

.bracket-team + .bracket-team {
  border-top: 1px solid var(--line);
}

.bracket-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bracket-team.is-winner {
  color: #b9caff;
  background: rgba(95, 140, 255, 0.08);
}

/* Result */
.final-screen {
  position: relative;
  display: flex;
  width: min(100%, 620px);
  min-height: min(560px, calc(100vh - 130px));
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.final-glow {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 300px;
  height: 250px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(95, 140, 255, 0.11), transparent 68%);
  transform: translateX(-50%);
}

.trophy-mark {
  position: relative;
  display: grid;
  width: 72px;
  height: 84px;
  margin-bottom: 17px;
  place-items: center;
  clip-path: polygon(13% 0, 87% 0, 100% 14%, 89% 81%, 50% 100%, 11% 81%, 0 14%);
  color: #4e3000;
  background: linear-gradient(145deg, #fff2b7, #d29a33 62%, #8c581d);
  animation: trophy-enter 220ms var(--ease-out) both;
}

.trophy-mark::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 249, 211, 0.72);
  clip-path: inherit;
  content: "";
}

.trophy-mark span { font-size: 24px; }

@keyframes trophy-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.final-screen h1 {
  position: relative;
  margin: 6px 0;
  font-size: clamp(28px, 5vw, 40px);
}

.final-screen > p {
  position: relative;
  max-width: 480px;
  margin-bottom: 0;
  font-size: 10px;
}

.final-rewards {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 20px;
}

.reward-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: #b5c0ce;
  background: var(--surface-raised);
  font-size: 8px;
  font-weight: 800;
}

.final-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

/* Dialogs, profile and records */
dialog {
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

dialog::backdrop {
  background: rgba(3, 7, 12, 0.8);
  backdrop-filter: blur(6px);
}

.records-dialog {
  width: min(700px, calc(100% - 28px));
  max-height: min(760px, calc(100% - 28px));
}

.records-dialog-shell,
.confirm-dialog-shell {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.records-dialog-shell {
  overflow: hidden;
}

.records-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--line);
}

.records-dialog-head h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #8d9aad;
  background: #111a26;
  font-size: 18px;
  transition: color 150ms ease, background-color 150ms ease, transform 140ms var(--ease-out);
}

.records-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px;
  border-bottom: 1px solid var(--line);
  background: #0c121b;
}

.records-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  color: #758398;
  background: transparent;
  font-size: 8px;
  font-weight: 800;
  transition: color 150ms ease, background-color 150ms ease, transform 140ms var(--ease-out);
}

.records-tabs button[aria-selected="true"] {
  color: #b4c8ff;
  background: var(--surface-blue);
}

.records-content {
  min-height: 330px;
  max-height: 540px;
  padding: 16px;
  overflow-y: auto;
}

.records-loading,
.empty-records {
  display: grid;
  min-height: 250px;
  place-items: center;
  color: #77859a;
  font-size: 9px;
  text-align: center;
}

.record-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d141e;
}

.record-profile-card h3 { margin: 0 0 2px; font-size: 13px; }
.record-profile-card p { margin: 0; font-size: 8px; }

.record-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.record-stat {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d141e;
}

.record-stat strong {
  color: #c1d2ff;
  font: 500 17px "DM Mono", monospace;
}

.record-stat span {
  color: #718097;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.trophy-cabinet { margin-top: 16px; }
.trophy-cabinet h3 { font-size: 11px; }
.trophy-list,
.history-list,
.leaderboard-list { display: grid; gap: 6px; }

.trophy-entry,
.history-entry,
.leaderboard-entry {
  display: grid;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d141e;
}

.trophy-entry { grid-template-columns: auto 1fr auto; }
.trophy-entry > span:first-child { color: var(--card-gold); font-size: 16px; }
.history-entry { grid-template-columns: auto 1fr auto; }
.leaderboard-entry { grid-template-columns: 25px auto 1fr auto; }

.trophy-entry strong,
.history-entry strong,
.leaderboard-entry strong { display: block; font-size: 8px; }

.trophy-entry small,
.history-entry small,
.leaderboard-entry small { color: #718097; font-size: 7px; }

.history-result {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  color: #8fddba;
  background: rgba(98, 212, 158, 0.09);
  font-size: 8px;
  font-weight: 800;
}

.history-result.is-loss {
  color: #ffaaa7;
  background: rgba(255, 124, 120, 0.08);
}

.history-coins { color: #d9b56c; font: 500 8px "DM Mono", monospace; }
.leaderboard-rank { color: #748298; font: 500 8px "DM Mono", monospace; text-align: center; }
.leaderboard-entry:nth-child(-n + 3) .leaderboard-rank { color: var(--card-gold); }
.leaderboard-avatar { font-size: 17px; }
.leaderboard-wins { color: #b9caff; font: 500 10px "DM Mono", monospace; }

.confirm-dialog {
  width: min(380px, calc(100% - 28px));
}

.confirm-dialog-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px;
  text-align: center;
}

.confirm-dialog-shell .dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.confirm-dialog-shell h2 { margin: 10px 0 3px; font-size: 17px; }
.confirm-dialog-shell p { font-size: 9px; }
.confirm-dialog-shell .secondary-button,
.confirm-dialog-shell .tertiary-button { width: 100%; margin-top: 7px; }
.danger-text { margin-top: 16px; color: #ff9995; }

.draft-toast {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  max-width: min(340px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  background: #162132;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 180ms var(--ease-out);
  font-size: 9px;
  font-weight: 700;
}

.draft-toast.is-visible { opacity: 1; transform: translateY(0); }
.draft-toast.is-error { border-color: rgba(255, 124, 120, 0.36); }

@media (hover: hover) and (pointer: fine) {
  .header-action:hover,
  .account-chip:hover,
  .google-button:hover,
  .dialog-close:hover {
    border-color: #354762;
    color: #e8eef8;
    background: #182335;
  }

  .primary-button:hover:not(:disabled) {
    border-color: #7b9dff;
    background: #5079eb;
    box-shadow: 0 10px 22px rgba(26, 57, 137, 0.22);
  }

  .mode-choice-featured > .primary-button:hover:not(:disabled) {
    border-color: #fff;
    background: #f3f6ff;
  }

  .secondary-button:hover:not(:disabled),
  .copy-code-button:hover:not(:disabled) {
    border-color: #466294;
    color: #d0dcff;
    background: #1b2a45;
  }

  .tertiary-button:hover:not(:disabled) {
    border-color: #35445a;
    color: #dce3ed;
    background: #172130;
  }

  .text-button:hover:not(:disabled),
  .back-button:hover:not(:disabled) {
    color: #d5ddea;
  }

  .records-tabs button:hover:not([aria-selected="true"]) {
    color: #aab6c8;
    background: #121b28;
  }
}

@media (max-width: 1100px) {
  .draft-arena {
    grid-template-columns: minmax(185px, 0.66fr) minmax(280px, 1fr) minmax(185px, 0.66fr);
  }

  .squad-slot {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .squad-slot-card,
  .empty-slot-number {
    width: 28px;
    height: 37px;
  }

  .squad-slot-price {
    display: none;
  }
}

@media (max-width: 900px) {
  .draft-brand-copy,
  .draft-header-status {
    display: none;
  }

  .draft-header-actions {
    margin-left: auto;
  }

  .draft-arena {
    grid-template-areas:
      "stage stage"
      "player-one player-two";
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-one-panel { grid-area: player-one; }
  .player-two-panel { grid-area: player-two; }
  .auction-stage { grid-area: stage; min-height: 420px; }

  .squad-slots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .squad-slot {
    min-height: 49px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    padding: 4px;
    text-align: center;
  }

  .squad-slot-copy strong {
    max-width: 62px;
    font-size: 6px;
  }

  .squad-slot-copy small,
  .squad-slot-price {
    display: none;
  }

  .bid-dock {
    width: 100%;
  }

  .reveal-versus {
    grid-template-columns: 1fr;
  }

  .reveal-vs-mark {
    justify-self: center;
  }

  .share-card-panel,
  .tournament-grid {
    grid-template-columns: 1fr;
  }

  .tournament-grid :is(.live-match-card, .standings-card, .commentary-card, .bracket-card) {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 700px) {
  .online-screen-topbar {
    min-height: 54px;
    padding-inline: 16px;
  }

  .online-screen-brand > span {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .online-screen-action {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .online-screen-actions { gap: 5px; }

  .online-screen-back { gap: 0; font-size: 0; }

  .draft-session-bar {
    min-height: 48px;
    padding: 6px 12px;
  }

  .draft-header {
    min-height: 54px;
    grid-template-columns: auto 1fr;
    padding: 6px 12px;
  }

  .draft-brand-mark {
    width: 38px;
    height: 38px;
  }

  .draft-header-status {
    display: none;
  }

  .draft-header-actions {
    gap: 5px;
  }

  .header-action {
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .header-action span:last-child,
  .account-chip > span:last-child {
    display: none;
  }

  .account-chip {
    padding: 3px;
  }

  .draft-main {
    min-height: calc(100dvh - 102px);
    padding: 18px 12px max(34px, env(safe-area-inset-bottom));
  }

  .auth-story {
    padding-top: 4px;
  }

  .auth-panel {
    padding: 20px 16px;
  }

  .hub-hero {
    padding-top: 0;
  }

  .hub-rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hub-rules > span {
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 6px 3px;
  }

  .mode-choice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    padding: 15px;
  }

  .choice-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .queue-card,
  .queue-fallback,
  .join-divider,
  .join-form {
    grid-column: 1 / -1;
  }

  .queue-fallback {
    align-items: stretch;
    flex-direction: column;
  }

  .account-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-summary .tertiary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .room-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .room-code-card {
    width: 100%;
  }

  .pre-draft-grid {
    grid-template-columns: 1fr;
  }

  .boost-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .round-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 7px 9px;
  }

  .round-copy {
    display: grid;
    gap: 1px;
  }

  .round-status {
    display: none;
  }

  .round-timer {
    width: 38px;
    height: 38px;
  }

  .auction-stage {
    min-height: 370px;
    padding: 10px 8px;
  }

  .current-card-stage {
    width: 182px;
    height: 262px;
  }

  .fut-card-frame {
    padding: 12px 11px 20px;
  }

  .card-main {
    min-height: 95px;
    grid-template-columns: 43px 1fr;
  }

  .card-rating-block { padding-top: 15px; }
  .card-rating-block strong { font-size: 24px; }
  .card-rating-block span { font-size: 8px; }
  .card-rating-block small { font-size: 13px; }
  .card-portrait { height: 91px; }
  .card-portrait::before { width: 66px; height: 66px; }
  .portrait-silhouette { width: 58px; height: 72px; }
  .portrait-silhouette::before { width: 28px; height: 33px; }
  .portrait-silhouette::after { height: 47px; }
  .portrait-monogram { bottom: 16px; font-size: 12px; }
  .card-identity strong { font-size: 11px; }
  .card-stat-grid { gap: 1px 4px; padding-top: 5px; }
  .card-stat-grid span { font-size: 6px; }
  .card-stat-grid b { font-size: 7px; }
  .card-stat-grid small { font-size: 4px; }

  .draft-arena {
    gap: 7px;
  }

  .squad-panel {
    padding: 8px;
  }

  .player-panel-avatar {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .player-panel-copy strong {
    max-width: 88px;
    font-size: 9px;
  }

  .turn-marker {
    display: none;
  }

  .squad-budget {
    margin: 7px 0;
    padding: 6px;
  }

  .squad-budget span { font-size: 6px; }
  .squad-budget strong { font-size: 14px; }

  .squad-slots {
    gap: 3px;
  }

  .squad-slot {
    min-height: 38px;
    border-radius: 6px;
  }

  .squad-slot-card,
  .empty-slot-number {
    width: 22px;
    height: 29px;
    font-size: 7px;
  }

  .squad-slot-copy {
    display: none;
  }

  .bid-dock {
    position: sticky;
    z-index: 20;
    bottom: max(7px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 11px;
  }

  .bid-copy {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 3px 8px;
  }

  .bid-copy .section-kicker { grid-column: 1 / -1; }
  .bid-copy h2 { margin: 0; }
  .bid-copy p { text-align: right; }

  .bid-form,
  .decision-actions,
  .waiting-decision {
    grid-column: 1;
  }

  .touch-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .touch-keypad button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: #b0bbc9;
    background: #111a26;
    font: 500 11px "DM Mono", monospace;
    transition: background-color 140ms ease, transform 120ms var(--ease-out);
  }

  .reveal-squad { padding: 11px; }
  .reveal-card-row { gap: 3px; }
  .share-card-panel { padding: 11px; }
  .share-actions { display: grid; grid-template-columns: repeat(2, 1fr); }

  .tournament-heading {
    display: grid;
    gap: 10px;
  }

  .tournament-progress {
    width: 100%;
    min-width: 0;
  }

  .record-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 440px) {
  .hub-rules small { font-size: 6px; }

  .lobby-player-grid {
    gap: 6px;
  }

  .lobby-player {
    min-height: 90px;
    grid-template-columns: 32px minmax(0, 1fr);
    align-content: center;
    gap: 8px;
    padding: 9px;
  }

  .lobby-player-avatar {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .lobby-player .connection-pill {
    grid-column: 1 / -1;
  }

  .boost-actions,
  .share-actions {
    grid-template-columns: 1fr;
  }

  .current-card-stage {
    width: 172px;
    height: 248px;
  }

  .auction-stage {
    min-height: 350px;
  }

  .bid-form {
    grid-template-columns: minmax(100px, 0.75fr) minmax(125px, 1fr);
  }

  .reveal-squad-head {
    align-items: start;
  }

  .records-content {
    padding: 11px;
  }

  .final-actions {
    display: grid;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .app-screen,
  .card-flipper,
  .draft-toast,
  .tournament-progress i,
  .squad-budget strong {
    transition-duration: 1ms !important;
  }

  .app-screen.is-entering,
  .loading-spinner,
  .queue-spinner,
  .loading-dots i,
  .fut-card::after,
  .trophy-mark,
  .squad-panel.is-winner-flash {
    animation: none !important;
  }

  .auction-activity > li {
    animation: none !important;
  }

  .reveal-card {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
