:root {
  color-scheme: light;
  --bg: #f3e0c1;
  --club-dark: #08271f;
  --club: #0e3b28;
  --club-mid: #175a32;
  --club-live: #55b957;
  --paper: #fff0d2;
  --paper-deep: #e6c99d;
  --gold: #ffbf27;
  --gold-dark: #d69216;
  --ink: #10251d;
  --text: #10251d;
  --muted: #6f5e45;
  --surface: #fff4dc;
  --surface-alt: #f3dfb9;
  --line: #214635;
  --accent: #175a32;
  --accent-strong: #0e3b28;
  --hot: #ef3e32;
  --sun: #ffbf27;
  --sky: #6fbfdd;
  --violet: #6e5a36;
  --danger: #ef3e32;
  --warning: #d69216;
  --success: #55b957;
  --shadow: 7px 7px 0 rgba(8, 39, 31, 0.92);
  --soft-shadow: 3px 3px 0 rgba(8, 39, 31, 0.92);
  --lift-shadow: 10px 10px 0 rgba(8, 39, 31, 0.92);
  --motion-fast: 140ms;
  --motion-mid: 240ms;
  --motion-slow: 520ms;
  --motion-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 191, 39, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(8, 39, 31, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(8, 39, 31, 0.055) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 32px 32px, 32px 32px;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--gold);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease,
    color var(--motion-fast) ease,
    filter var(--motion-fast) ease;
}

button:hover:not(:disabled) {
  background: #ffd45d;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
  filter: saturate(1.04);
}

button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

button:disabled {
  color: #7a705e;
  background: #cdbb99;
  box-shadow: none;
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
.character-card:focus-visible,
.side-nav-item:focus-visible,
.mobile-nav-item:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.button-secondary {
  color: var(--paper);
  background: var(--club-mid);
}

.button-secondary:hover:not(:disabled) {
  background: #236f42;
}

input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff9ea;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) ease,
    background var(--motion-fast) ease;
}

input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  background: #fffdf5;
  box-shadow: 5px 5px 0 var(--ink);
  transform: translate(-1px, -1px);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-shell {
  width: min(1560px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.login-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.game-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.game-content {
  min-width: 0;
}

.mobile-topbar {
  display: none;
}

.side-menu {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 240, 210, 0.08), transparent 35%),
    var(--club-dark);
  box-shadow: var(--shadow);
  z-index: 5;
  animation: sideMenuEnter var(--motion-slow) var(--motion-ease) both;
}

.side-menu-head {
  display: grid;
  gap: 12px;
}

.drawer-close {
  display: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  min-height: 44px;
  padding: 0;
  font-size: 24px;
}

.side-menu .drawer-close {
  display: none;
}

.player-panel {
  display: grid;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, var(--paper), #f0c889);
  box-shadow: var(--soft-shadow);
  animation: softPop 420ms var(--motion-ease) both;
}

.player-panel strong {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.player-panel p {
  margin: 0;
  font-weight: 800;
}

.player-card-preview {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 11px;
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 252, 239, 0.82);
  box-shadow: 3px 3px 0 rgba(8, 39, 31, 0.18);
}

.player-card-preview-image {
  width: 78px;
  height: 96px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #d8efd1;
  object-fit: cover;
  object-position: center top;
}

.player-card-preview-body {
  display: grid;
  min-width: 0;
  gap: 5px;
  align-content: start;
}

.player-card-preview-body p,
.player-card-preview-body span,
.player-card-preview-body small {
  overflow-wrap: anywhere;
}

.player-card-preview-body p {
  font-size: 16px;
  line-height: 1.08;
}

.player-card-preview-body > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.player-card-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.player-card-preview-meta small {
  border: 2px solid rgba(8, 39, 31, 0.28);
  border-radius: 8px;
  padding: 5px 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.player-kicker {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 8px;
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.points-token,
.rating-chip {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-weight: 900;
}

.rating-chip {
  color: var(--paper);
  background: var(--club-mid);
  font-size: 13px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav-item {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  justify-items: start;
  padding: 9px 12px;
  background: rgba(255, 240, 210, 0.92);
  text-align: left;
  overflow: hidden;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.side-nav-item::after {
  content: "";
  position: absolute;
  inset: 8px auto 8px 8px;
  width: 5px;
  border-radius: 999px;
  background: transparent;
  transition: background var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease);
  transform: scaleY(0.35);
}

.side-nav-item:hover:not(:disabled) {
  transform: translate(-2px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.side-nav-item:disabled {
  color: rgba(255, 240, 210, 0.78);
  background: rgba(255, 240, 210, 0.16);
  border-color: rgba(255, 240, 210, 0.44);
  box-shadow: none;
  opacity: 1;
}

.side-nav-item:disabled small {
  color: rgba(255, 240, 210, 0.72);
}

.side-nav-item:disabled::after {
  background: rgba(255, 240, 210, 0.22);
  transform: scaleY(0.5);
}

.side-nav-item span {
  font-size: 16px;
}

.side-nav-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.side-nav-item.is-active {
  background: var(--gold);
  color: var(--ink);
  transform: translate(-2px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.side-nav-item.is-active small {
  color: var(--ink);
}

.side-nav-item.is-active::after {
  background: var(--club-dark);
  transform: scaleY(1);
}

.score-help {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  color: var(--paper);
  background: rgba(23, 90, 50, 0.72);
  box-shadow: var(--soft-shadow);
}

.score-help strong {
  font-size: 18px;
}

.score-help span {
  font-weight: 800;
}

.logout-button {
  width: 100%;
}

.menu-backdrop {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  color: var(--paper);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 34px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--club-dark);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.user-chip {
  max-width: min(460px, 100%);
  overflow-wrap: anywhere;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-weight: 800;
}

.panel {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panelEnter var(--motion-slow) var(--motion-ease) both;
  transform-origin: 50% 20%;
}

.panel::before {
  content: "";
  display: block;
  height: 10px;
  background: linear-gradient(90deg, var(--club-dark), var(--club-mid), var(--gold), var(--paper-deep));
  background-size: 180% 100%;
  animation: panelStripe 7s ease-in-out infinite;
}

.panel-body {
  padding: 24px;
}

.hero-grid,
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
}

@media (min-width: 861px) {
  .home-character-panel {
    display: none;
  }
}

.login-card {
  max-width: 460px;
}

.login-hero {
  align-items: start;
}

.intro-panel .panel-body {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.rules-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.rule-card {
  display: grid;
  gap: 4px;
  min-height: 112px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  transition:
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) var(--motion-ease),
    filter var(--motion-mid) ease;
}

.rule-card:hover,
.locked-teaser:hover,
.locked-mode-card:hover,
.mega-stat:hover,
.unlock-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
  filter: saturate(1.04);
}

.rule-card span {
  color: rgba(8, 39, 31, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rule-card strong {
  color: var(--club-mid);
  font-size: 34px;
  line-height: 1;
}

.rule-card small {
  color: var(--muted);
  font-weight: 800;
}

.rule-card.win {
  background: #d8efd1;
}

.rule-card.draw {
  background: #ffe2a0;
}

.rule-card.loss {
  background: #f4c1ac;
}

.form-hint,
.login-note {
  margin: 0 0 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px;
  background: #efe0bf;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.login-note {
  margin: 16px 0 0;
  background: #dfe8cb;
}

.dashboard-hero .panel-body {
  display: grid;
  gap: 16px;
}

.balance-card {
  display: grid;
  gap: 4px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, var(--club-mid), var(--gold));
  box-shadow: var(--soft-shadow);
  animation: balanceGlow 4.8s ease-in-out infinite;
}

.balance-card span,
.balance-card small {
  font-weight: 900;
}

.balance-card strong {
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--ink);
  font-size: clamp(46px, 8vw, 84px);
  line-height: 0.95;
}

.home-character-card {
  display: grid;
  grid-template-columns: minmax(128px, 38%) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #fff9ea, #dfe8cb);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition:
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) var(--motion-ease);
}

.home-character-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
}

.home-character-image {
  width: 100%;
  min-height: 188px;
  max-height: 260px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #d8efd1;
  object-fit: cover;
  object-position: center top;
  box-shadow: 4px 4px 0 rgba(8, 39, 31, 0.2);
  transition: transform var(--motion-mid) var(--motion-ease), box-shadow var(--motion-mid) var(--motion-ease);
}

.home-character-card:hover .home-character-image {
  transform: scale(1.025) rotate(-0.8deg);
  box-shadow: 6px 6px 0 rgba(8, 39, 31, 0.28);
}

.home-character-details {
  display: grid;
  min-width: 0;
  gap: 12px;
  align-content: start;
}

.home-character-details .summary-row {
  margin: 0;
}

.home-character-details p {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.home-character-details .muted {
  width: fit-content;
  border: 2px solid rgba(8, 39, 31, 0.28);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}

.home-rules {
  margin-top: 22px;
}

.tutorial-panel .panel-body {
  display: grid;
  gap: 16px;
}

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

.tutorial-steps span {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px;
  background: #fff9ea;
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--muted);
  font-weight: 900;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease;
}

.tutorial-steps .is-active {
  color: var(--ink);
  background: var(--gold);
  animation: tutorialStepPulse 2.6s ease-in-out infinite;
}

.tutorial-steps .is-complete {
  color: var(--paper);
  background: var(--club-mid);
}

.tutorial-character {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #fff9ea, #dfe8cb);
  box-shadow: var(--soft-shadow);
  transition: transform var(--motion-mid) var(--motion-ease), box-shadow var(--motion-mid) var(--motion-ease);
}

.tutorial-character:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
}

.tutorial-character img {
  width: 118px;
  height: 132px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: #d8efd1;
  box-shadow: 4px 4px 0 rgba(8, 39, 31, 0.2);
}

.tutorial-character div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.tutorial-character span,
.tutorial-character small,
.tutorial-note {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.tutorial-character strong {
  overflow-wrap: anywhere;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 0.95;
}

.tutorial-note {
  margin: 0;
}

.tutorial-inline-hint {
  display: grid;
  gap: 7px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #dfe8cb;
  box-shadow: 3px 3px 0 var(--ink);
  animation: hintEnter 420ms var(--motion-ease) both;
}

.tutorial-inline-hint span {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 7px;
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-inline-hint strong {
  font-size: 20px;
}

.tutorial-inline-hint p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.locked-teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 22px;
}

.locked-teaser,
.locked-mode-card {
  display: grid;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 18px;
  background: #fff9ea;
  box-shadow: var(--shadow);
  transition:
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) var(--motion-ease),
    filter var(--motion-mid) ease;
}

.locked-teaser:nth-child(1),
.locked-mode-card:nth-child(1) {
  background: #dfe8cb;
}

.locked-teaser:nth-child(2),
.locked-mode-card:nth-child(2) {
  background: #ffe2a0;
}

.locked-teaser span,
.mode-status {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--club-mid);
  box-shadow: 2px 2px 0 var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-status.is-open {
  background: #1f8f5f;
}

.locked-teaser h2,
.locked-mode-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.locked-teaser p,
.locked-mode-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.locked-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: center;
}

.locked-stamp {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(135deg, var(--club-mid), var(--gold));
  box-shadow: var(--soft-shadow);
  color: #fff;
  text-align: center;
  transform: rotate(2deg);
}

.locked-stamp span {
  font-size: 22px;
  font-weight: 900;
  text-shadow: 2px 2px 0 var(--ink);
  text-transform: uppercase;
}

.locked-stamp strong {
  font-size: 48px;
  line-height: 0.9;
  text-shadow: 3px 3px 0 var(--ink);
  text-transform: uppercase;
}

.unlock-progress {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #efe0bf;
  box-shadow: var(--soft-shadow);
}

.unlock-progress-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
}

.progress-track {
  height: 20px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff9ea;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--club-mid), var(--gold));
}

.locked-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.locked-mode-card {
  min-height: 210px;
  align-content: space-between;
}

.locked-mode-card:nth-child(3) {
  background: #efe0bf;
}

.mode-requirement {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff9ea;
  box-shadow: 2px 2px 0 var(--ink);
}

.mode-requirement span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-requirement strong {
  font-size: 18px;
}

.stats-hero .panel-body {
  display: grid;
  gap: 18px;
}

.mega-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mega-stat {
  display: grid;
  gap: 8px;
  min-height: 150px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  transition:
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) var(--motion-ease),
    filter var(--motion-mid) ease;
}

.mega-stat.hot {
  background: #ffe2a0;
}

.mega-stat.sky {
  background: #dfe8cb;
}

.mega-stat.sun {
  background: #f2c972;
}

.mega-stat.mint {
  background: #d8efd1;
}

.mega-stat span,
.mega-stat small,
.mini-kpi-grid span,
.distribution-row span {
  font-weight: 900;
}

.mega-stat span,
.mini-kpi-grid span,
.distribution-row span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.mega-stat strong {
  overflow-wrap: anywhere;
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 0.95;
}

.mega-stat small {
  color: var(--ink);
}

.stats-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 22px;
  margin-top: 22px;
}

.stats-dashboard-grid.wide-left {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.form-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 54px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  font-weight: 900;
}

.form-strip.is-empty {
  color: var(--muted);
}

.form-dot {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 900;
}

.form-dot.win {
  background: #d8efd1;
}

.form-dot.draw {
  background: #ffe2a0;
}

.form-dot.loss {
  background: #f4c1ac;
}

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

.mini-kpi-grid div {
  display: grid;
  gap: 4px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-alt);
  box-shadow: 2px 2px 0 var(--ink);
  animation: softPop 420ms var(--motion-ease) both;
}

.mini-kpi-grid strong {
  font-size: 24px;
}

.distribution {
  display: grid;
  gap: 12px;
}

.distribution-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}

.distribution-row div:first-child {
  display: grid;
  gap: 3px;
}

.distribution-row strong {
  font-size: 16px;
}

.distribution-track {
  height: 20px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff9ea;
}

.distribution-track span {
  display: block;
  height: 100%;
}

.distribution-track .win {
  background: var(--accent);
}

.distribution-track .draw {
  background: var(--sun);
}

.distribution-track .loss {
  background: var(--hot);
}

.distribution-row b {
  text-align: right;
}

.balance-chart {
  display: grid;
  grid-template-columns: repeat(10, minmax(42px, 1fr));
  gap: 10px;
  min-height: 250px;
  align-items: end;
  overflow-x: auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px 12px;
  background:
    linear-gradient(rgba(8, 39, 31, 0.08) 1px, transparent 1px),
    #fff9ea;
  background-size: 100% 32px;
  box-shadow: var(--soft-shadow);
}

.balance-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  min-height: 210px;
  align-items: end;
  text-align: center;
}

.balance-bar span {
  display: block;
  width: 100%;
  min-height: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--club-mid), var(--gold));
  box-shadow: 2px 2px 0 var(--ink);
}

.balance-bar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.balance-bar strong {
  font-size: 13px;
}

.unlock-stack {
  display: grid;
  gap: 14px;
}

.unlock-card {
  display: grid;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #efe0bf;
  box-shadow: var(--soft-shadow);
}

.unlock-card div:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
}

.unlock-card span {
  color: var(--muted);
}

.history-panel {
  margin-top: 22px;
}

.rating-hero .panel-body {
  display: grid;
  gap: 18px;
}

.rating-season-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rating-season-strip span {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff9ea;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--muted);
  font-weight: 900;
}

.rating-season-strip b {
  color: var(--ink);
}

.rating-table {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.rating-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) 74px 96px 82px 120px 126px 74px;
  gap: 8px;
  align-items: center;
  min-width: 860px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px;
  background: #fff9ea;
  box-shadow: 3px 3px 0 var(--ink);
}

.rating-row.gold {
  background: linear-gradient(90deg, #ffe7a1 0%, #fff9ea 64%);
  box-shadow: 5px 5px 0 var(--ink);
}

.rating-row.silver {
  background: linear-gradient(90deg, #e5edf0 0%, #fff9ea 64%);
}

.rating-row.bronze {
  background: linear-gradient(90deg, #f2cfad 0%, #fff9ea 64%);
}

.rating-head {
  background: #dfe8cb;
  box-shadow: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.15;
}

.rating-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rating-player > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rating-player strong {
  overflow-wrap: anywhere;
}

.rating-player small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rating-rank {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #f2c972;
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--ink);
}

.rating-row b,
.rating-row em {
  font-style: normal;
  font-weight: 900;
}

.rating-row .positive {
  color: #277234;
}

.rating-row .negative {
  color: #a33a23;
}

.rating-row.gold .rating-rank {
  background: #f4bd35;
}

.rating-row.silver .rating-rank {
  background: #c9d4d8;
}

.rating-row.bronze .rating-rank {
  background: #d7925f;
}

.match-history-table {
  display: grid;
  gap: 10px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 130px;
  gap: 12px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: #fff9ea;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}

.history-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.history-row.win {
  background: #d8efd1;
}

.history-row.draw {
  background: #ffe2a0;
}

.history-row.loss {
  background: #f4c1ac;
}

.history-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.history-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-row b {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px;
  background: #fff9ea;
  text-align: center;
  box-shadow: 2px 2px 0 var(--ink);
}

.history-row em {
  justify-self: end;
  font-style: normal;
  font-weight: 900;
}

.empty-stats {
  display: grid;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 18px;
  background: #dfe8cb;
  box-shadow: var(--soft-shadow);
}

.empty-stats strong {
  font-size: 24px;
}

.empty-stats p {
  margin: 0;
  font-weight: 800;
  line-height: 1.4;
}

.title {
  margin: 0 0 10px;
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

.section-title {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 9px;
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-text {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

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

.form-grid {
  display: grid;
  gap: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.actions > * {
  animation: actionEnter 360ms var(--motion-ease) both;
}

.actions > *:nth-child(2) {
  animation-delay: 70ms;
}

.actions > *:nth-child(3) {
  animation-delay: 140ms;
}

.error-box {
  margin-top: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #f4c1ac;
  box-shadow: var(--soft-shadow);
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.stat {
  min-height: 84px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  animation: statEnter 460ms var(--motion-ease) both;
  transition:
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) var(--motion-ease);
}

.stat:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--ink);
}

.stat:nth-child(1) {
  background: var(--sun);
}

.stat:nth-child(2) {
  background: #dfe8cb;
  animation-delay: 70ms;
}

.stat:nth-child(3) {
  background: #d8efd1;
  animation-delay: 140ms;
}

.stat:nth-child(4) {
  background: #f4c1ac;
  animation-delay: 210ms;
}

.stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stat strong {
  font-size: 28px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 16px;
}

.cards-grid > * {
  animation: cardDeal 520ms var(--motion-ease) both;
}

.cards-grid > *:nth-child(4n + 2) {
  animation-delay: 60ms;
}

.cards-grid > *:nth-child(4n + 3) {
  animation-delay: 120ms;
}

.cards-grid > *:nth-child(4n + 4) {
  animation-delay: 180ms;
}

.cards-grid.is-static > * {
  animation: none;
}

.game-content.is-static-update,
.game-content.is-static-update *,
.game-content.is-static-update *::before,
.game-content.is-static-update *::after {
  animation: none !important;
  transition: none !important;
}

.settings-panel .panel-body {
  display: grid;
  gap: 18px;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-toggle {
  display: grid;
  grid-template-columns: auto 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.settings-toggle input {
  width: 1px;
  height: 1px;
  opacity: 0;
}

.settings-toggle > span {
  position: relative;
  width: 56px;
  height: 32px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #f4c1ac;
  box-shadow: inset 2px 2px 0 rgba(8, 39, 31, 0.14);
  transition: background var(--motion-fast) ease;
}

.settings-toggle > span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform var(--motion-fast) var(--motion-ease);
}

.settings-toggle input:checked + span {
  background: var(--gold);
}

.settings-toggle input:checked + span::after {
  transform: translateX(24px);
}

.settings-toggle input:focus-visible + span {
  outline: 3px solid var(--club-mid);
  outline-offset: 3px;
}

.settings-toggle div {
  display: grid;
  gap: 4px;
}

.settings-toggle strong {
  color: var(--ink);
  font-size: 18px;
}

.settings-toggle small {
  color: var(--muted);
  font-weight: 900;
}

.settings-field {
  display: grid;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
}

.settings-field-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.settings-field-head strong {
  color: var(--ink);
  font-size: 18px;
}

.settings-field-head small {
  color: var(--muted);
  font-weight: 900;
}

.settings-range {
  width: 100%;
  accent-color: var(--club-mid);
  cursor: pointer;
}

.settings-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-segment {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease;
}

.settings-segment:hover,
.settings-segment:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.settings-segment.is-active {
  background: var(--gold);
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.character-card {
  position: relative;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px;
  width: 100%;
  min-height: 318px;
  align-content: start;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transform-origin: 50% 65%;
  transition:
    transform var(--motion-mid) var(--motion-ease),
    box-shadow var(--motion-mid) var(--motion-ease),
    background var(--motion-mid) ease,
    opacity var(--motion-mid) ease;
}

.character-card::before {
  content: "";
  position: absolute;
  inset: -45% -70%;
  z-index: -1;
  background:
    radial-gradient(circle, rgba(255, 191, 39, 0.38), transparent 34%),
    linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.52) 48%, transparent 55%);
  opacity: 0;
  transform: translateX(-18%) rotate(8deg);
  transition: opacity 220ms ease, transform 420ms ease;
}

.character-card::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px dashed rgba(16, 37, 29, 0.22);
  border-radius: 6px;
  pointer-events: none;
}

.character-card:nth-child(4n + 1) {
  background: #ffe8b4;
}

.character-card:nth-child(4n + 2) {
  background: #dfe8cb;
}

.character-card:nth-child(4n + 3) {
  background: #f4c1ac;
}

.character-card:nth-child(4n + 4) {
  background: #efe0bf;
}

.character-card:hover,
.character-card.is-selected {
  background: #d8efd1;
  transform: translate(-5px, -5px) rotate(-0.35deg);
  box-shadow: 10px 10px 0 var(--ink);
}

.character-card:hover::before,
.character-card.is-selected::before {
  opacity: 1;
  transform: translateX(18%) rotate(8deg);
}

.character-card.is-selected {
  outline: 4px solid var(--gold);
  outline-offset: 2px;
  animation: selectedPulse 2.4s ease-in-out infinite;
}

.character-card.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.character-card.is-disabled::before {
  display: none;
}

.avatar {
  display: block;
  width: 116px;
  height: 144px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #d8efd1;
  object-fit: cover;
  object-position: center top;
  box-shadow: 4px 4px 0 rgba(8, 39, 31, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.character-card:hover .avatar,
.character-card.is-selected .avatar {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-2px, -3px) rotate(-1.5deg) scale(1.03);
}

.card-main {
  min-width: 0;
  align-self: start;
}

.card-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
}

.card-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--paper);
  background: var(--club-mid);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 13px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.character-card:hover .rating-pill,
.character-card.is-selected .rating-pill {
  color: var(--ink);
  background: var(--gold);
  transform: translateY(-1px);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
  margin-top: 10px;
}

.mini-stat {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: 8px 9px 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -3px 0 rgba(8, 39, 31, 0.08);
  transition: transform 160ms ease, background 160ms ease;
}

.mini-stat::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--club-mid), var(--gold));
  transform: scaleX(calc(var(--stat-value) / 100));
  transform-origin: left center;
  transition: height 180ms ease, transform 260ms ease;
}

.mini-stat span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  padding-right: 34px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.mini-stat strong {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 1;
  font-size: 15px;
  line-height: 1;
}

.mini-stat strong::after {
  content: "";
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 5px;
  background: var(--ink);
  opacity: 0.2;
}

.character-card:hover .mini-stat,
.character-card.is-selected .mini-stat {
  background: rgba(255, 249, 234, 0.9);
  transform: translateY(-1px);
}

.character-card:hover .mini-stat::before,
.character-card.is-selected .mini-stat::before {
  height: 100%;
  opacity: 0.18;
}

.ability {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 6px 0 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: rgba(255, 249, 234, 0.82);
  box-shadow: 2px 2px 0 var(--ink);
  line-height: 1.35;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.ability span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ability strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.character-card:hover .ability,
.character-card.is-selected .ability {
  color: var(--paper);
  background: var(--club-mid);
  transform: translateY(-1px);
}

.character-card:hover .ability span,
.character-card.is-selected .ability span {
  color: var(--gold);
}

@media (hover: none) and (pointer: coarse), (max-width: 860px) {
  .character-card:not(.is-disabled) {
    animation: cardIdleGlow 4.8s ease-in-out infinite;
  }

  .character-card:not(.is-disabled)::before {
    animation: cardIdleSheen 5.4s ease-in-out infinite;
  }

  .character-card:not(.is-disabled) .avatar {
    animation: avatarIdleFloat 3.8s ease-in-out infinite;
  }

  .character-card:not(.is-disabled) .ability {
    animation: abilityPulse 4.6s ease-in-out infinite;
  }

  .character-card:nth-child(3n + 2),
  .character-card:nth-child(3n + 2)::before,
  .character-card:nth-child(3n + 2) .avatar,
  .character-card:nth-child(3n + 2) .ability {
    animation-delay: 420ms;
  }

  .character-card:nth-child(3n + 3),
  .character-card:nth-child(3n + 3)::before,
  .character-card:nth-child(3n + 3) .avatar,
  .character-card:nth-child(3n + 3) .ability {
    animation-delay: 840ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .character-card,
  .character-card::before,
  .avatar,
  .ability {
    animation: none;
    transition: none;
  }
}

.summary-list {
  display: grid;
  gap: 8px;
}

.team-summary-panel .panel-body {
  padding: 18px;
}

.team-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.team-summary-head .section-title {
  margin: 0;
}

.team-rating {
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--ink);
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--ink);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--ink);
  background: #fff9ea;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.summary-row:last-child {
  border-bottom: 2px solid var(--ink);
}

.team-pitch-panel .panel-body {
  display: grid;
  gap: 14px;
}

.team-pitch-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.team-pitch-head .section-title {
  margin-bottom: 4px;
}

.team-pitch-head p {
  margin: 0;
  font-weight: 900;
}

.team-pitch-head > span {
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-pitch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-height: 470px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 58px 22px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 50%, transparent 50%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 28px, transparent 28px 56px),
    linear-gradient(135deg, #175a32, #0e3b28);
  background-size: 18px 18px, auto, auto;
  box-shadow: inset 0 0 0 5px rgba(255, 240, 210, 0.2), var(--soft-shadow);
}

.pitch-formation {
  position: static;
  z-index: 2;
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.pitch-formation.row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pitch-formation.row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(82%, 360px);
  margin: 0 auto;
}

.pitch-lines,
.pitch-lines::before,
.pitch-lines::after {
  position: absolute;
  pointer-events: none;
}

.pitch-lines {
  inset: 20px;
  border: 2px solid rgba(255, 240, 210, 0.72);
  border-radius: 8px;
}

.pitch-lines::before {
  content: "";
  top: 50%;
  right: 0;
  left: 0;
  border-top: 2px solid rgba(255, 240, 210, 0.72);
}

.pitch-lines::after {
  content: "";
  top: 50%;
  left: 50%;
  width: 104px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 240, 210, 0.72);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.pitch-player {
  position: static;
  z-index: 2;
  display: grid;
  justify-self: center;
  justify-items: center;
  gap: 7px;
  align-self: center;
  min-width: 0;
  width: 76px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 249, 234, 0.96);
  box-shadow: 4px 4px 0 rgba(8, 39, 31, 0.72);
  animation: pitchPlayerIn 420ms var(--motion-ease) both;
  animation-delay: calc(var(--slot-index) * 60ms);
  transition:
    box-shadow var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease;
}

.pitch-player-marker {
  display: grid;
  justify-items: center;
  gap: 7px;
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}

.pitch-player:hover,
.pitch-player:focus-visible,
.pitch-player:focus-within {
  background: #fff9ea;
  box-shadow: 7px 7px 0 rgba(8, 39, 31, 0.82);
}

.pitch-player:hover .pitch-player-marker,
.pitch-player:focus-visible .pitch-player-marker,
.pitch-player:focus-within .pitch-player-marker {
  transform: translate(-3px, -3px);
}

.team-pitch:has(.pitch-player:hover) .pitch-player:not(:hover),
.team-pitch:has(.pitch-player:focus-within) .pitch-player:not(:focus-within) {
  opacity: 0;
  pointer-events: none;
}

.pitch-player:focus-within {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.pitch-player:focus-within .pitch-player-marker {
  opacity: 0;
}

.pitch-player:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.pitch-role {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 2px 6px;
  background: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.pitch-avatar {
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: #d8efd1;
}

.pitch-popover-scrim {
  position: absolute;
  inset: 20px;
  z-index: 4;
  border: 2px solid rgba(255, 240, 210, 0.58);
  border-radius: 8px;
  background: rgba(8, 39, 31, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-fast) ease;
}

.pitch-player-popover {
  position: absolute;
  inset: 12px;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(130px, 0.62fr) minmax(0, 1fr);
  gap: 18px;
  place-self: stretch;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 18px;
  background: #fff9ea;
  box-shadow: 8px 8px 0 rgba(8, 39, 31, 0.75);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transform-origin: 50% 50%;
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--motion-ease);
}

.pitch-player-popover::after {
  content: none;
}

.pitch-player:hover .pitch-player-popover,
.pitch-player:focus-visible .pitch-player-popover,
.pitch-player:focus-within .pitch-player-popover {
  opacity: 1;
  transform: scale(1);
}

.pitch-player:hover .pitch-popover-scrim,
.pitch-player:focus-visible .pitch-popover-scrim,
.pitch-player:focus-within .pitch-popover-scrim {
  opacity: 1;
}

.pitch-popover-photo {
  width: 100%;
  height: 100%;
  min-height: 190px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: #d8efd1;
}

.pitch-popover-body {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 8px;
}

.pitch-popover-body > span {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 2px 6px;
  background: var(--gold);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.pitch-popover-body strong,
.pitch-popover-body p,
.pitch-popover-body small {
  overflow-wrap: anywhere;
}

.pitch-popover-body strong {
  color: var(--ink);
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1;
}

.pitch-popover-body p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 900;
}

.pitch-popover-body div {
  display: grid;
  gap: 3px;
  border-top: 2px solid rgba(8, 39, 31, 0.12);
  padding-top: 6px;
}

.pitch-popover-body b {
  color: var(--club-mid);
  font-size: clamp(14px, 1.8vw, 18px);
}

.pitch-popover-body small {
  color: var(--muted);
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 900;
}

.pitch-player.is-empty {
  grid-template-columns: 1fr;
  place-items: center;
  width: 96px;
  min-height: 76px;
  border-style: dashed;
  color: rgba(255, 240, 210, 0.92);
  background: rgba(8, 39, 31, 0.3);
  box-shadow: inset 0 0 0 2px rgba(255, 240, 210, 0.15);
  text-align: center;
}

.pitch-player.is-empty .pitch-role,
.pitch-player.is-empty span {
  color: rgba(255, 240, 210, 0.84);
}

.pitch-player.is-empty strong {
  color: var(--paper);
  font-size: 13px;
}

.roster-panel,
.preview-grid {
  margin-top: 22px;
}

.preview-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.match-prediction {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
}

.match-prediction-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.match-prediction-head span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.match-prediction-head strong {
  color: var(--ink);
  font-size: 20px;
}

.match-prediction-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(0, 1.22fr);
  gap: 12px;
  align-items: stretch;
}

.prediction-summary {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(145deg, #fff7db, #f7dfad);
  box-shadow: var(--soft-shadow);
}

.prediction-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.prediction-summary strong {
  color: var(--club-dark);
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 0.95;
}

.prediction-summary p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.prediction-summary.win {
  background: linear-gradient(145deg, #e8f7cf, #cdeaa0);
}

.prediction-summary.draw {
  background: linear-gradient(145deg, #fff0c0, #f4d888);
}

.prediction-summary.loss {
  background: linear-gradient(145deg, #f8d2c5, #efb39b);
}

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

.prediction-item {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.prediction-item div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  font-weight: 900;
}

.prediction-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.prediction-item strong {
  color: var(--ink);
}

.prediction-meter {
  position: relative;
  height: 14px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(16, 37, 29, 0.08);
}

.prediction-item i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--club-mid), var(--gold));
  animation: predictionGrow 520ms var(--motion-ease) both;
  transform-origin: left center;
}

.prediction-item.win i {
  background: linear-gradient(90deg, #55b957, #b8ff65);
}

.prediction-item.draw i {
  background: linear-gradient(90deg, #ffbf27, #ffe08f);
}

.prediction-item.loss i {
  background: linear-gradient(90deg, #ef3e32, #ff987c);
}

.minigames-hero .panel-body {
  display: grid;
  gap: 16px;
}

.minigames-balance {
  display: flex;
  gap: 12px;
  align-items: center;
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
}

.minigames-balance span {
  color: var(--muted);
  text-transform: uppercase;
}

.minigames-offline {
  width: fit-content;
  max-width: 640px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff3b0;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font-weight: 800;
}

.minigames-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.minigame-card {
  display: grid;
  gap: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  animation: softPop 420ms var(--motion-ease) both;
}

.minigame-card:nth-child(2n) {
  background: #dfe8cb;
}

.minigame-card-head {
  display: grid;
  gap: 5px;
}

.minigame-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.minigame-card-head strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.minigame-card p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
}

.minigame-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.minigame-rewards span {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 900;
}

.minigame-rewards .reward-win {
  background: var(--gold);
}

.minigame-rewards .reward-loss {
  background: #f4c1ac;
}

.minigame-rules-panel .rules-grid {
  margin-top: 18px;
}

.minigame-play-panel .panel-body,
.minigame-result-panel .panel-body {
  display: grid;
  gap: 18px;
}

.minigame-steps {
  display: grid;
  gap: 14px;
}

.minigame-step {
  display: grid;
  gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
}

.minigame-step-head {
  display: grid;
  gap: 4px;
}

.minigame-step-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.minigame-step-head strong {
  color: var(--ink);
  font-size: 18px;
}

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

.minigame-option {
  min-height: 48px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) ease;
}

.minigame-option:hover,
.minigame-option:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.minigame-option.is-selected {
  background: var(--gold);
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}

.result-score {
  display: grid;
  gap: 6px;
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--gold);
  box-shadow: var(--soft-shadow);
}

.result-score span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.result-score strong {
  color: var(--ink);
  font-size: 44px;
  line-height: 0.95;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  text-align: center;
}

.scoreboard > div,
.scoreboard > strong {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
  animation: softPop 420ms var(--motion-ease) both;
}

.scoreboard > strong {
  background: var(--sun);
  animation-delay: 80ms;
}

.match-panel,
.match-panel::before,
.match-panel .scoreboard > div,
.match-panel .scoreboard > strong,
.match-panel .match-progress-card {
  animation: none;
}

.score {
  color: var(--club-mid);
  font-size: clamp(52px, 9vw, 92px);
  font-weight: 900;
  line-height: 1;
}

.match-progress-card {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(8, 39, 31, 0.08) 1px, transparent 1px),
    #efe0bf;
  background-size: 28px 100%;
  box-shadow: var(--soft-shadow);
  animation: softPop 460ms var(--motion-ease) both;
}

.match-progress-head,
.match-progress-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.match-progress-head span,
.match-progress-scale {
  color: var(--muted);
}

.match-progress-track {
  position: relative;
  height: 48px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff9ea;
  box-shadow: inset 0 0 0 4px rgba(8, 39, 31, 0.05);
}

.match-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--club-mid), var(--gold));
}

.match-progress-fill.is-running {
  animation: matchFill 30s linear forwards;
}

.match-progress-runner {
  --match-runner-size: 54px;
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: var(--match-runner-size);
  height: var(--match-runner-size);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
  transform: translateY(-50%);
}

.match-progress-runner.is-running {
  animation: matchRunner 30s linear forwards;
}

.match-progress-runner::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(255, 191, 39, 0.65);
  border-radius: inherit;
  animation: runnerPulse 1.3s ease-out infinite;
}

.match-event-marker {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff9ea;
  box-shadow: 2px 2px 0 var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.match-event-marker.is-past {
  background: var(--paper);
  animation: markerReveal 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.match-event-marker.goal {
  background: #d8efd1;
}

.match-event-marker.yellow {
  background: #ffe2a0;
}

.match-event-marker.penalty {
  background: #f2c972;
}

.match-event-marker.moment {
  background: #dfe8cb;
}

.match-event-marker.bot {
  border-color: var(--hot);
}

.match-event-marker.is-live {
  z-index: 5;
  transform: translate(-50%, -50%) scale(1.28);
  animation: markerPop 700ms ease both;
}

.timeline {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  scroll-behavior: smooth;
}

.event {
  display: grid;
  grid-template-columns: 54px 38px 1fr;
  gap: 10px;
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px;
  background: #fff9ea;
  box-shadow: 3px 3px 0 var(--ink);
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}

.event:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.event.is-new {
  animation: eventReveal 720ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.event-time {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 0;
  color: var(--ink);
  background: var(--gold);
  text-align: center;
  font-weight: 900;
}

.event-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 900;
}

.event.goal .event-badge {
  background: #d8efd1;
}

.event.yellow .event-badge {
  background: #ffe2a0;
}

.event.penalty .event-badge {
  background: #f2c972;
}

.event.decision .event-badge {
  color: var(--paper);
  background: var(--club-mid);
}

.event.bot {
  border-left-width: 8px;
  border-left-color: var(--hot);
}

.tutorial-match-hints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.tutorial-match-hints article {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 14px;
  background: #dfe8cb;
  box-shadow: 3px 3px 0 var(--ink);
  animation: hintEnter 420ms var(--motion-ease) both;
}

.tutorial-match-hints article:nth-child(2) {
  animation-delay: 90ms;
}

.tutorial-match-hints span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 3px 7px;
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-match-hints strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.tutorial-match-hints p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.decision-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(23, 90, 50, 0.92), rgba(8, 39, 31, 0.96)),
    var(--club-dark);
  box-shadow: 8px 8px 0 var(--gold);
  color: var(--paper);
  animation: decisionReveal 360ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.decision-panel.formation {
  background:
    linear-gradient(135deg, rgba(11, 71, 77, 0.94), rgba(8, 39, 31, 0.96)),
    var(--club-dark);
  box-shadow: 8px 8px 0 #6fd6ff;
}

.decision-panel.halftime {
  background:
    linear-gradient(135deg, rgba(105, 44, 22, 0.94), rgba(36, 26, 18, 0.97)),
    var(--club-dark);
  box-shadow: 8px 8px 0 #ffb24d;
}

.decision-panel.risk {
  background:
    linear-gradient(135deg, rgba(92, 20, 32, 0.94), rgba(34, 18, 28, 0.97)),
    var(--club-dark);
  box-shadow: 8px 8px 0 #ff5d6c;
}

.decision-panel.clutch {
  background:
    linear-gradient(135deg, rgba(32, 31, 87, 0.94), rgba(8, 39, 31, 0.96)),
    var(--club-dark);
  box-shadow: 8px 8px 0 #b8ff65;
}

.decision-tracker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.decision-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 9px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 3px 3px 0 rgba(13, 26, 24, 0.24);
}

.decision-step > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.decision-step strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

.decision-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.decision-step.done {
  background: #d7f9a6;
}

.decision-step.active {
  color: var(--paper);
  background: var(--club-mid);
  box-shadow: 3px 3px 0 var(--gold);
}

.decision-step.active p {
  color: rgba(255, 240, 210, 0.78);
}

.decision-step.pending {
  opacity: 0.72;
}

.decision-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.decision-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1;
}

.decision-panel p {
  max-width: 720px;
  margin: 0;
  color: #f7e7c6;
  font-weight: 800;
  line-height: 1.45;
}

.decision-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.decision-actions.halftime {
  grid-template-columns: 1.15fr 1fr 1.15fr;
}

.decision-actions.clutch .decision-choice:first-child {
  background: #ffe15c;
}

.decision-actions.clutch .decision-choice:first-child:hover {
  background: #ffb24d;
}

.decision-choice {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 112px;
  align-content: start;
  padding: 14px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
}

.decision-choice em {
  position: relative;
  z-index: 1;
  width: fit-content;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 1000;
  line-height: 1;
}

.decision-choice::before {
  content: "";
  position: absolute;
  inset: -80% -30%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.62) 50%, transparent 58%);
  opacity: 0;
  transform: translateX(-20%);
  transition: opacity 180ms ease, transform 360ms ease;
}

.decision-choice:hover::before {
  opacity: 1;
  transform: translateX(28%);
}

.decision-choice strong,
.decision-choice span,
.decision-choice em {
  position: relative;
  z-index: 1;
}

.decision-choice strong {
  font-size: 17px;
  line-height: 1.12;
}

.decision-choice span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.28;
}

.decision-effects {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.decision-effect {
  border: 2px solid rgba(13, 26, 24, 0.22);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.1;
}

.decision-effect.risk {
  color: #5f1422;
  background: #ffd7dc;
}

.decision-effect.momentum {
  background: #d7f9a6;
}

.decision-choice:hover {
  background: var(--gold);
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sideMenuEnter {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bottomNavEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelStripe {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes softPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes actionEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes statEnter {
  from {
    opacity: 0;
    transform: translateY(10px) rotate(-0.4deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes cardDeal {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(-1.2deg) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes pitchPlayerIn {
  from {
    opacity: 0;
    filter: saturate(0.85);
  }

  to {
    opacity: 1;
    filter: saturate(1);
  }
}

@keyframes hintEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes balanceGlow {
  0%,
  100% {
    filter: saturate(1);
  }

  50% {
    filter: saturate(1.12) brightness(1.03);
  }
}

@keyframes tutorialStepPulse {
  0%,
  100% {
    box-shadow: 2px 2px 0 var(--ink);
    transform: translateY(0);
  }

  50% {
    box-shadow: 4px 4px 0 var(--ink);
    transform: translateY(-2px);
  }
}

@keyframes selectedPulse {
  0%,
  100% {
    outline-color: var(--gold);
  }

  50% {
    outline-color: #ffd966;
  }
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes runnerPulse {
  from {
    opacity: 0.8;
    transform: scale(0.82);
  }

  to {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes matchFill {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes matchRunner {
  from {
    left: 0;
  }

  to {
    left: calc(100% - var(--match-runner-size));
  }
}

@keyframes markerReveal {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }

  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.16);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes markerPop {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 191, 39, 0.8), 2px 2px 0 var(--ink);
  }

  100% {
    box-shadow: 0 0 0 12px rgba(255, 191, 39, 0), 2px 2px 0 var(--ink);
  }
}

@keyframes predictionGrow {
  from {
    transform: scaleX(0.2);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes eventReveal {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }

  55% {
    opacity: 1;
    transform: translateY(2px) scale(1.01);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes decisionReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardIdleGlow {
  0%,
  100% {
    box-shadow: var(--soft-shadow);
    transform: translateY(0);
  }

  50% {
    box-shadow: 5px 5px 0 rgba(8, 39, 31, 0.92);
    transform: translateY(-2px);
  }
}

@keyframes cardIdleSheen {
  0% {
    opacity: 0;
    transform: translateX(-28%) rotate(8deg);
  }

  42% {
    opacity: 0.75;
  }

  72%,
  100% {
    opacity: 0;
    transform: translateX(28%) rotate(8deg);
  }
}

@keyframes avatarIdleFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes abilityPulse {
  0%,
  100% {
    background: rgba(255, 249, 234, 0.82);
  }

  50% {
    background: rgba(255, 226, 160, 0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .match-progress-fill,
  .match-progress-runner,
  .match-event-marker,
  .event.is-new,
  .character-card,
  .character-card::before,
  .character-card::after,
  .avatar,
  .ability,
  .panel,
  .panel::before,
  .side-menu,
  .player-panel,
  .balance-card,
  .home-character-card,
  .tutorial-steps .is-active,
  .tutorial-inline-hint,
  .tutorial-match-hints article,
  .tutorial-complete-card,
  .result-banner,
  .stat,
  .cards-grid > *,
  .actions > *,
  .scoreboard > div,
  .scoreboard > strong,
  .match-progress-card,
  .pitch-player,
  .mobile-topbar,
  .mobile-bottom-nav,
  .mobile-nav-item {
    animation: none !important;
    transition: none !important;
  }
}

.result-banner {
  border: 2px solid var(--ink);
  border-left-width: 10px;
  border-radius: 8px;
  padding: 20px;
  background: #d8efd1;
  box-shadow: var(--soft-shadow);
  animation: resultReveal 560ms var(--motion-ease) both;
}

.result-banner.loss {
  border-color: var(--ink);
  background: #f4c1ac;
}

.result-banner.draw {
  border-color: var(--ink);
  background: #ffe2a0;
}

.tutorial-complete-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, var(--gold), #dfe8cb);
  box-shadow: var(--soft-shadow);
  animation: softPop 500ms var(--motion-ease) 120ms both;
}

.tutorial-complete-card span {
  width: fit-content;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-complete-card strong {
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1;
}

.tutorial-complete-card p {
  margin: 0;
  max-width: 660px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.4;
}

.loading {
  padding: 24px;
  color: var(--ink);
  font-weight: 900;
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 12px;
  }

  .game-layout {
    display: block;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    animation: softPop 380ms var(--motion-ease) both;
  }

  .mobile-topbar div {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .mobile-topbar strong,
  .mobile-topbar span {
    overflow-wrap: anywhere;
  }

  .mobile-topbar span {
    color: var(--muted);
    font-weight: 800;
  }

  .side-menu {
    position: fixed;
    inset: 10px auto 10px 10px;
    width: min(340px, calc(100vw - 24px));
    overflow: auto;
    transform: translateX(calc(-100% - 22px));
    visibility: hidden;
    pointer-events: none;
    transition:
      transform var(--motion-mid) var(--motion-ease),
      visibility var(--motion-mid) step-end;
    z-index: 30;
  }

  .side-menu.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition:
      transform var(--motion-mid) var(--motion-ease),
      visibility 0s;
  }

  .side-menu .side-nav-item {
    padding-left: 28px;
  }

  .side-menu-head {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .side-menu .drawer-close {
    display: inline-grid;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(22, 20, 38, 0.45);
    opacity: 0;
    z-index: 20;
    transition: opacity var(--motion-mid) ease;
  }

  .menu-backdrop.is-open {
    display: block;
    opacity: 1;
  }

  .hero-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rules-grid.compact {
    grid-template-columns: 1fr;
  }

  .tutorial-steps,
  .tutorial-match-hints,
  .tutorial-character {
    grid-template-columns: 1fr;
  }

  .team-pitch {
    min-height: 340px;
    padding: 30px 10px 22px;
  }

  .team-pitch-head {
    display: grid;
  }

  .tutorial-character img {
    width: min(180px, 100%);
    justify-self: center;
  }

  .locked-teaser-grid,
  .locked-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .locked-mode-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    align-items: start;
    min-height: 0;
    padding: 12px;
  }

  .locked-mode-card > div:first-child {
    display: contents;
  }

  .locked-mode-card h2 {
    grid-column: 1 / -1;
    font-size: clamp(18px, 5.4vw, 22px);
    line-height: 1.05;
  }

  .locked-mode-card p {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 1.25;
  }

  .locked-mode-card .mode-status {
    align-self: start;
    grid-row: 1;
    grid-column: 1;
    padding: 4px 7px;
    font-size: 10px;
  }

  .mode-requirement {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    padding: 6px 8px;
    text-align: right;
  }

  .mode-requirement span {
    font-size: 10px;
  }

  .mode-requirement strong {
    font-size: 14px;
  }

  .locked-hero-grid {
    grid-template-columns: 1fr;
  }

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

  .stats-dashboard-grid,
  .stats-dashboard-grid.wide-left {
    grid-template-columns: 1fr;
  }

  .locked-stamp {
    min-height: 132px;
    transform: none;
  }

  .match-progress-head {
    display: grid;
  }

  .match-progress-track {
    height: 42px;
  }

  .match-progress-runner {
    --match-runner-size: 48px;
    width: 48px;
    height: 48px;
  }

  .decision-actions {
    grid-template-columns: 1fr;
  }

  .decision-actions.binary,
  .decision-actions.halftime {
    grid-template-columns: 1fr;
  }

  .decision-tracker {
    grid-template-columns: 1fr;
  }

  .decision-choice {
    min-height: 92px;
  }

  .intro-panel .panel-body {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 10px;
  }

  .panel-body {
    padding: 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .character-card {
    grid-template-columns: 96px 1fr;
    min-height: 0;
    padding: 12px;
  }

  .avatar {
    width: 96px;
    height: 124px;
  }

  .stats-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .scoreboard {
    grid-template-columns: 1fr;
  }

  .event {
    grid-template-columns: 48px 34px 1fr;
    gap: 8px;
  }

  .match-event-marker {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .title {
    font-size: clamp(32px, 12vw, 52px);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }

  .unlock-progress-head {
    display: grid;
  }

  .mega-stats-grid,
  .mini-kpi-grid {
    grid-template-columns: 1fr;
  }

  .distribution-row {
    grid-template-columns: 1fr;
  }

  .distribution-row b {
    text-align: left;
  }

  .balance-chart {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
    overflow-x: hidden;
  }

  .history-row {
    grid-template-columns: 1fr;
  }

  .history-row b,
  .history-row em {
    justify-self: start;
  }

  .locked-stamp strong {
    font-size: 40px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    min-width: 44px;
  }
}

/* Mobile-first visual layer based on frontend/design-references/STYLE-GUIDE.md */

.dashboard-hero .panel-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(420px, 1.22fr);
  gap: 20px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 191, 39, 0.28), transparent 30%),
    radial-gradient(circle at 86% 26%, rgba(111, 191, 221, 0.24), transparent 24%),
    linear-gradient(120deg, rgba(255, 240, 210, 0.98) 0 42%, rgba(255, 240, 210, 0.56) 62%, rgba(255, 240, 210, 0.16) 100%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(8, 39, 31, 0.035) 24px);
}

.home-hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  gap: 16px;
  max-width: 500px;
  padding: 22px 24px 20px;
  border: 1px solid rgba(8, 39, 31, 0.1);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 249, 234, 0.94), rgba(255, 249, 234, 0.72));
  box-shadow:
    0 20px 56px rgba(8, 39, 31, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.home-hero-copy .title {
  max-width: 500px;
  font-size: clamp(38px, 3.5vw, 54px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.home-hero-copy .title span {
  color: var(--club-mid);
  text-shadow: 2px 2px 0 rgba(255, 191, 39, 0.5);
}

.home-hero-copy .lead-text {
  max-width: 30ch;
  font-size: 18px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(8, 39, 31, 0.14);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: var(--club-dark);
  font-size: 13px;
  font-weight: 900;
}

.home-hero-team {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: end;
  width: min(100%, 520px);
  aspect-ratio: 1.04 / 1;
  max-height: 460px;
  margin: 8px 0 -10px;
  object-fit: cover;
  object-position: center bottom;
  border: 1px solid rgba(8, 39, 31, 0.08);
  border-radius: 34px 34px 20px;
  background: linear-gradient(135deg, rgba(255, 249, 234, 0.82), rgba(230, 201, 157, 0.34));
  box-shadow:
    0 24px 54px rgba(8, 39, 31, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  mix-blend-mode: normal;
  filter: saturate(1.02) contrast(1.01);
  transform: translateY(0) rotate(-1deg);
}

.dashboard-hero .balance-card,
.dashboard-hero .stats-grid {
  grid-column: 1 / -1;
  position: relative;
  z-index: 3;
}

.dashboard-hero .balance-card {
  overflow: hidden;
}

.dashboard-hero .balance-card::after {
  content: "";
  position: absolute;
  inset: auto -8% -55% auto;
  width: 200px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 210, 0.28), transparent 68%);
  pointer-events: none;
}

.hero-actions {
  margin-top: 4px;
}

.hero-actions button:first-child {
  min-width: 190px;
}

.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  color: var(--club-dark);
  font-size: 25px;
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
}

.login-brand > span {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border: 3px solid var(--club-dark);
  clip-path: polygon(50% 0, 92% 18%, 86% 72%, 50% 100%, 14% 72%, 8% 18%);
  background: var(--gold);
  font-size: 29px;
}

.login-brand small {
  color: var(--club-mid);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.login-team-art {
  display: block;
  width: min(100%, 720px);
  max-height: 410px;
  margin: 12px auto -8px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.selection-status {
  display: flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  margin-top: 18px;
  border: 2px solid var(--club-dark);
  border-radius: 999px;
  padding: 6px 12px 6px 7px;
  background: var(--paper);
}

.selection-status strong {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 32px;
  border-radius: 999px;
  color: var(--paper);
  background: var(--club-mid);
}

.selection-status span {
  font-weight: 800;
}

.selection-status-roster {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 860px) {
  body {
    background: var(--club-dark);
  }

  .app-shell {
    width: 100%;
    padding: 0 0 calc(82px + env(safe-area-inset-bottom));
  }

  .game-content {
    padding: 12px 12px calc(112px + env(safe-area-inset-bottom));
  }

  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 240, 210, 0.2);
    border-radius: 0;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    color: var(--paper);
    background: rgba(8, 39, 31, 0.96);
    box-shadow: none;
    backdrop-filter: blur(12px);
  }

  .mobile-topbar .icon-button {
    width: 42px;
    min-height: 42px;
    border-color: rgba(255, 240, 210, 0.38);
    color: var(--paper);
    background: var(--club);
    box-shadow: none;
  }

  .mobile-brand {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    gap: 9px !important;
    align-items: center;
  }

  .mobile-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    aspect-ratio: 1;
    border: 2px solid var(--gold);
    border-radius: 8px;
    color: var(--gold) !important;
    font-size: 18px;
  }

  .mobile-brand > div {
    gap: 0;
  }

  .mobile-brand strong {
    max-width: 180px;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-brand span {
    color: var(--paper-deep);
    font-size: 11px;
  }

  .mobile-balance {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    gap: 5px !important;
    align-items: center;
    color: var(--gold);
  }

  .mobile-balance span {
    color: var(--gold);
    font-size: 10px;
  }

  .mobile-balance strong {
    font-size: 16px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 240, 210, 0.18);
    background: var(--club-dark);
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
    animation: bottomNavEnter 360ms var(--motion-ease) both;
  }

  .mobile-nav-item {
    display: grid;
    gap: 3px;
    place-items: center;
    min-width: 0;
    min-height: 58px;
    border: 0;
    border-radius: 10px;
    padding: 6px 2px;
    color: var(--paper-deep);
    background: transparent;
    box-shadow: none;
    transition:
      transform var(--motion-fast) var(--motion-ease),
      background var(--motion-fast) ease,
      color var(--motion-fast) ease;
  }

  .mobile-nav-item:hover:not(:disabled) {
    transform: translateY(-2px);
    color: var(--paper);
    background: rgba(255, 240, 210, 0.08);
    box-shadow: none;
  }

  .mobile-nav-item.is-active {
    color: var(--club-dark);
    background: var(--gold);
    transform: translateY(-3px);
  }

  .mobile-nav-item > span {
    font-size: 21px;
    line-height: 1;
  }

  .mobile-nav-item small {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel {
    border-radius: 14px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
    animation: none !important;
    transform: none !important;
  }

  .dashboard-hero .panel-body {
    grid-template-columns: 1fr;
    padding-bottom: 0;
    background: var(--paper);
  }

  .home-hero-copy {
    text-align: left;
  }

  .home-hero-copy .title {
    font-size: clamp(34px, 10vw, 54px);
  }

  .home-hero-team {
    grid-row: 2;
    max-height: 350px;
    margin-top: -18px;
  }

  .dashboard-hero .balance-card {
    grid-row: 3;
    margin-top: -16px;
  }

  .dashboard-hero .stats-grid {
    grid-row: 4;
    padding-bottom: 16px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .hero-actions button:first-child {
    min-width: 0;
  }

  .team-select-intro {
    animation: none !important;
    transform: none !important;
  }

  .team-select-actions {
    position: static;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    margin-top: 14px;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .team-select-actions button {
    min-height: 44px;
    padding: 9px 12px;
  }

  .team-roster {
    margin-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .team-roster .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-roster .character-card {
    grid-template-columns: 66px 1fr;
    min-width: 0;
    padding: 10px;
  }

  .team-roster .avatar {
    width: 66px;
    height: 78px;
  }

  .team-roster .stats-list,
  .team-roster .ability {
    grid-column: 1 / -1;
  }

  .login-shell {
    padding: 12px;
  }

  .login-hero {
    gap: 12px;
  }

  .login-team-art {
    max-height: 330px;
  }

  .login-hero .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .game-content {
    padding: 9px 9px calc(108px + env(safe-area-inset-bottom));
  }

  .mobile-brand strong {
    max-width: 138px;
  }

  .panel-body {
    padding: 15px;
  }

  .home-hero-copy .lead-text {
    font-size: 15px;
  }

  .home-hero-team {
    width: calc(100% + 20px);
    max-width: none;
    margin-left: -10px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions .button-secondary {
    display: none;
  }

  .dashboard-hero .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-roster .panel-body {
    padding: 10px;
  }

  .team-roster .cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .team-roster .character-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .team-pitch {
    min-height: 340px;
    gap: 18px;
    padding: 30px 10px 22px;
  }

  .pitch-lines {
    inset: 14px;
  }

  .pitch-formation {
    gap: 7px;
  }

  .pitch-formation.row-2 {
    width: 86%;
  }

  .pitch-player {
    width: 62px;
    gap: 6px;
    padding: 6px;
    animation: none;
    transform: none;
  }

  .pitch-role {
    max-width: 58px;
    padding: 2px 4px;
    font-size: 10px;
    line-height: 1.1;
  }

  .pitch-avatar {
    width: 38px;
    height: 38px;
  }

  .pitch-popover-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    border: 0;
    border-radius: 0;
  }

  .pitch-player-popover {
    position: fixed;
    top: max(74px, env(safe-area-inset-top));
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 12px;
    grid-template-columns: 96px minmax(0, 1fr);
    align-content: center;
    width: auto;
    min-height: 0;
    gap: 10px;
    overflow: auto;
    padding: 10px;
    transform: scale(0.96);
  }

  .pitch-player:hover .pitch-player-popover,
  .pitch-player:focus-visible .pitch-player-popover,
  .pitch-player:focus-within .pitch-player-popover {
    transform: scale(1);
  }

  .pitch-popover-photo {
    align-self: center;
    width: 96px;
    height: 154px;
    min-height: 0;
  }

  .pitch-popover-body strong {
    font-size: 18px;
  }

  .pitch-popover-body p,
  .pitch-popover-body b,
  .pitch-popover-body small {
    font-size: 11px;
  }

  .team-roster .avatar {
    width: 84px;
    height: 96px;
  }

  .team-select-intro .title {
    font-size: 36px;
  }

  .login-shell {
    padding: 9px;
  }

  .login-brand {
    margin-bottom: 18px;
  }

  .login-team-art {
    width: calc(100% + 18px);
    max-width: none;
    margin-left: -9px;
  }
}

/* Reference-aligned refinement: compact football-manager UI */

@media (max-width: 860px) {
  :root {
    --shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    --soft-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  }

  body {
    font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  }

  button,
  input,
  .panel,
  .rule-card,
  .stat,
  .character-card,
  .ability,
  .balance-card,
  .locked-teaser,
  .locked-mode-card {
    border-width: 1px;
  }

  button {
    box-shadow: none;
  }

  button:hover:not(:disabled),
  button:active:not(:disabled) {
    transform: none;
    box-shadow: none;
  }

  .panel::before {
    height: 5px;
  }

  .title {
    font-size: clamp(31px, 9vw, 44px);
    line-height: 1.02;
    letter-spacing: -0.025em;
  }

  .eyebrow {
    min-height: 24px;
    border: 0;
    border-radius: 999px;
    padding: 0 10px;
    box-shadow: none;
    font-size: 10px;
    letter-spacing: 0.05em;
  }

  .lead-text {
    font-size: 15px;
    line-height: 1.4;
  }

  .dashboard-hero {
    border-color: rgba(255, 240, 210, 0.28);
    background: var(--club-mid);
  }

  .dashboard-hero::before {
    background: var(--gold);
  }

  .dashboard-hero .panel-body {
    gap: 12px;
    color: var(--paper);
    background:
      radial-gradient(circle at 18% 14%, rgba(255, 191, 39, 0.2), transparent 24%),
      radial-gradient(circle at 85% 18%, rgba(85, 185, 87, 0.34), transparent 40%),
      linear-gradient(145deg, #175a32, #0e3b28 66%);
  }

  .dashboard-hero .lead-text {
    color: rgba(255, 240, 210, 0.78);
  }

  .dashboard-hero .eyebrow {
    color: var(--club-dark);
  }

  .home-hero-copy {
    gap: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .home-hero-copy .title span {
    color: var(--gold);
    text-shadow: 2px 2px 0 rgba(8, 39, 31, 0.3);
  }

  .home-hero-copy .lead-text {
    max-width: 28ch;
  }

  .hero-badges {
    gap: 8px;
  }

  .hero-badge {
    min-height: 30px;
    border-color: rgba(255, 240, 210, 0.16);
    background: rgba(8, 39, 31, 0.38);
    box-shadow: none;
    color: var(--paper);
    font-size: 11px;
  }

  .home-hero-team {
    width: calc(100% + 30px);
    max-height: 310px;
    margin: -12px -15px -8px;
    object-position: center bottom;
    mix-blend-mode: normal;
    filter: none;
    transform: translateY(0) rotate(0);
  }

  .hero-actions {
    position: relative;
    z-index: 4;
  }

  .hero-actions button:first-child {
    min-height: 54px;
    border-color: var(--gold-dark);
    border-radius: 12px;
    font-size: 18px;
  }

  .dashboard-hero .balance-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    margin-top: 0;
    border-color: rgba(255, 240, 210, 0.2);
    padding: 13px 15px;
    color: var(--paper);
    background: rgba(8, 39, 31, 0.72);
    box-shadow: none;
  }

  .dashboard-hero .balance-card strong {
    grid-row: 1 / 3;
    grid-column: 2;
    align-self: center;
    color: var(--gold);
    text-shadow: none;
    font-size: 42px;
  }

  .dashboard-hero .balance-card small {
    color: rgba(255, 240, 210, 0.78);
    font-size: 11px;
  }

  .dashboard-hero .stats-grid {
    gap: 7px;
    margin-top: 0;
    padding-bottom: 2px;
  }

  .dashboard-hero .stat {
    min-height: 70px;
    border-color: rgba(255, 240, 210, 0.16);
    padding: 10px;
    color: var(--paper);
    background: rgba(8, 39, 31, 0.78);
    box-shadow: none;
  }

  .dashboard-hero .stat span {
    margin-bottom: 5px;
    color: rgba(255, 240, 210, 0.82);
    font-size: 10px;
  }

  .dashboard-hero .stat strong {
    color: var(--gold);
    font-size: 24px;
  }

  .content-grid > .panel:not(.dashboard-hero),
  .home-rules,
  .locked-teaser {
    border-color: rgba(255, 240, 210, 0.2);
    box-shadow: var(--soft-shadow);
  }

  .rules-grid,
  .rules-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .rule-card {
    min-height: 76px;
    padding: 9px 7px;
    box-shadow: none;
  }

  .rule-card strong {
    font-size: clamp(20px, 7vw, 24px);
  }

  .rule-card small {
    font-size: 10px;
    line-height: 1.15;
  }

  .cards-grid,
  .team-roster .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .character-card,
  .team-roster .character-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    border-color: var(--paper-deep);
    border-radius: 12px;
    padding: 7px;
    background: var(--paper);
    box-shadow: none;
    animation: none;
  }

  .character-card:nth-child(n) {
    background: var(--paper);
  }

  .character-card::before,
  .character-card::after {
    display: none;
  }

  .character-card:hover,
  .character-card.is-selected {
    transform: none;
    background: #dfe8cb;
    box-shadow: inset 0 0 0 2px var(--club-mid);
  }

  .character-card.is-selected {
    outline: 2px solid var(--gold);
    outline-offset: 0;
  }

  .avatar,
  .team-roster .avatar {
    width: 64px;
    height: 78px;
    border: 0;
    border-radius: 9px;
    background: #e7d0aa;
    box-shadow: none;
    animation: none;
  }

  .card-title {
    font-size: 13px;
    line-height: 1.1;
  }

  .card-meta {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .rating-pill {
    min-height: 23px;
    border: 0;
    border-radius: 999px;
    padding: 0 7px;
    box-shadow: none;
    font-size: 10px;
  }

  .stats-list,
  .team-roster .stats-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    margin-top: 2px;
  }

  .mini-stat {
    border: 0;
    border-radius: 4px;
    padding: 4px 2px 6px;
    text-align: center;
    box-shadow: none;
  }

  .mini-stat span {
    padding: 0;
    font-size: 10px;
    line-height: 1.1;
  }

  .mini-stat strong {
    position: static;
    display: block;
    margin-top: 3px;
    font-size: 11px;
  }

  .mini-stat strong::after {
    display: none;
  }

  .ability,
  .team-roster .ability {
    display: block;
    margin-top: 2px;
    border: 0;
    border-radius: 6px;
    padding: 5px 7px;
    box-shadow: none;
    animation: none;
  }

  .ability span {
    margin-right: 5px;
    font-size: 10px;
    line-height: 1.1;
  }

  .ability strong {
    display: inline;
    font-size: 10px;
  }

  .minigames-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }

  .minigame-card {
    gap: 10px;
    padding: 12px;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .minigame-card-head {
    gap: 3px;
  }

  .minigame-card-head strong {
    font-size: 20px;
    line-height: 1.05;
  }

  .minigame-card p {
    font-size: 13px;
    line-height: 1.3;
  }

  .minigame-rewards span {
    border-width: 1px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .team-select-intro .panel-body {
    background: var(--paper);
  }

  .selection-status {
    border-width: 1px;
  }

  .login-shell {
    background: var(--club-dark);
  }

  .login-hero .intro-panel {
    color: var(--paper);
    background: var(--club-mid);
  }

  .login-hero .intro-panel::before {
    background: var(--gold);
  }

  .login-hero .intro-panel .lead-text,
  .login-hero .intro-panel .login-brand {
    color: var(--paper);
  }

  .login-hero .login-team-art {
    mix-blend-mode: normal;
    filter: brightness(1.08) saturate(1.08);
  }

  .login-card {
    max-width: none;
    box-shadow: var(--soft-shadow);
  }
}

@media (max-width: 430px) {
  .mobile-brand strong {
    max-width: 122px;
    font-size: 12px;
  }

  .game-content {
    padding: 9px 9px calc(108px + env(safe-area-inset-bottom));
  }

  .home-hero-copy .title {
    font-size: 34px;
  }

  .home-hero-copy .lead-text {
    max-width: none;
  }

  .home-hero-team {
    max-height: 245px;
  }

  .hero-badges {
    gap: 6px;
  }

  .hero-badge {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
  }

  .dashboard-hero .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-hero .stat {
    min-height: 62px;
    padding: 8px 5px;
    text-align: center;
  }

  .dashboard-hero .stat strong {
    font-size: 21px;
  }

  .cards-grid,
  .team-roster .cards-grid {
    grid-template-columns: 1fr;
  }

  .character-card,
  .team-roster .character-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .avatar,
  .team-roster .avatar {
    width: 64px;
    height: 78px;
  }

  .stats-list,
  .team-roster .stats-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }

  .mobile-nav-item small {
    font-size: 10px;
  }
}

@media (max-width: 860px) {
  .preview-hero,
  .match-panel,
  .result-panel {
    border-color: rgba(255, 240, 210, 0.24);
    color: var(--paper);
    background:
      radial-gradient(circle at 80% 0, rgba(85, 185, 87, 0.18), transparent 36%),
      var(--club-dark);
  }

  .preview-hero::before,
  .match-panel::before,
  .result-panel::before {
    background: var(--gold);
  }

  .preview-hero .lead-text,
  .match-panel .muted {
    color: rgba(255, 240, 210, 0.78);
  }

  .preview-grid {
    gap: 10px;
  }

  .match-prediction-layout {
    grid-template-columns: 1fr;
  }

  .prediction-summary {
    padding: 14px;
    box-shadow: none;
  }

  .prediction-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .prediction-item {
    border: 1px solid rgba(255, 240, 210, 0.18);
    border-radius: 12px;
    padding: 10px;
    background: rgba(8, 39, 31, 0.42);
  }

  .prediction-item div {
    color: var(--paper);
  }

  .prediction-meter {
    border-color: rgba(255, 240, 210, 0.22);
    background: rgba(255, 240, 210, 0.08);
  }

  .preview-grid .team-summary-panel .panel-body {
    padding: 12px;
  }

  .preview-grid .team-summary-head {
    margin-bottom: 9px;
  }

  .preview-grid .section-title {
    font-size: 20px;
  }

  .preview-grid .team-rating {
    border-color: rgba(255, 240, 210, 0.32);
    color: var(--club-dark);
    font-size: 10px;
    box-shadow: none;
  }

  .preview-grid .panel {
    border-color: rgba(255, 240, 210, 0.2);
    color: var(--paper);
    background: var(--club);
  }

  .preview-grid .panel::before {
    height: 3px;
    background: var(--club-live);
  }

  .preview-grid .muted {
    color: rgba(255, 240, 210, 0.78);
  }

  .preview-grid .summary-row {
    min-height: 32px;
    border-color: rgba(255, 240, 210, 0.2);
    padding: 5px 8px;
    color: var(--paper);
    background: rgba(8, 39, 31, 0.5);
    box-shadow: none;
    font-size: 13px;
  }

  .preview-actions {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    margin: 12px 0 calc(10px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255, 240, 210, 0.2);
    border-radius: 12px;
    padding: 6px;
    background: rgba(8, 39, 31, 0.96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  }

  .preview-actions button {
    min-height: 44px;
    padding: 9px 12px;
  }

  .match-panel .title {
    margin-bottom: 16px;
  }

  .match-panel .scoreboard {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
  }

  .match-panel .scoreboard > div,
  .match-panel .scoreboard > strong {
    min-width: 0;
    border: 1px solid rgba(255, 240, 210, 0.18);
    border-radius: 12px;
    padding: 12px 7px;
    color: var(--paper);
    background: rgba(14, 59, 40, 0.86);
    box-shadow: none;
  }

  .match-panel .scoreboard > strong {
    display: grid;
    place-items: center;
    min-width: 74px;
    color: var(--gold);
    font-size: 14px;
  }

  .match-panel .decision-panel.is-priority {
    position: sticky;
    top: calc(66px + env(safe-area-inset-top));
    z-index: 7;
    margin-top: 0;
    margin-bottom: 14px;
    border-width: 1px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  }

  .match-panel .scoreboard p {
    margin-bottom: 7px;
    overflow-wrap: anywhere;
    font-size: 10px;
  }

  .match-panel .score {
    color: var(--paper);
    font-size: 46px;
  }

  .match-panel .match-progress-card {
    border: 1px solid rgba(255, 240, 210, 0.18);
    border-radius: 12px;
    color: var(--paper);
    background: rgba(14, 59, 40, 0.72);
    box-shadow: none;
  }

  .match-panel .match-progress-head span,
  .match-panel .match-progress-scale {
    color: rgba(255, 240, 210, 0.78);
  }

  .match-panel .match-progress-track {
    border-color: rgba(255, 240, 210, 0.3);
    background: rgba(8, 39, 31, 0.9);
  }

  .match-panel .timeline {
    border: 1px solid rgba(255, 240, 210, 0.18);
    border-radius: 12px;
    padding: 8px;
    background: rgba(8, 39, 31, 0.82);
  }

  .match-panel .event {
    border-color: rgba(255, 240, 210, 0.15);
    color: var(--paper);
    background: rgba(14, 59, 40, 0.76);
    box-shadow: none;
  }

  .match-panel .event-time {
    color: var(--gold);
    background: var(--club-dark);
  }

  .match-panel .decision-panel,
  .match-panel .decision-panel.is-priority {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 1200;
    max-height: calc(100dvh - max(14px, env(safe-area-inset-top)) - 98px - env(safe-area-inset-bottom));
    margin: 0;
    overflow: auto;
    border: 0;
    border-radius: 18px;
    padding: 16px;
    color: var(--paper);
    background:
      linear-gradient(135deg, rgba(23, 90, 50, 0.98), rgba(8, 39, 31, 0.98));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
  }

  .match-panel .decision-panel p,
  .match-panel .decision-choice span {
    color: rgba(255, 240, 210, 0.82);
  }

  .match-panel .decision-choice {
    border: 0;
    border-radius: 14px;
    color: var(--paper);
    background: rgba(8, 39, 31, 0.72);
    box-shadow: none;
  }

  .match-panel .decision-actions,
  .match-panel .decision-actions.binary,
  .match-panel .decision-actions.halftime {
    grid-template-columns: 1fr;
  }

  .selection-status-inline {
    display: none;
  }

  .selection-status-roster {
    position: sticky;
    top: calc(58px + env(safe-area-inset-top));
    z-index: 6;
    width: 100%;
    margin: 0 0 12px;
    justify-content: space-between;
    border: 1px solid rgba(255, 240, 210, 0.22);
    background: rgba(8, 39, 31, 0.94);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  }

  .selection-status-roster span {
    color: var(--paper);
  }

  .selection-status-roster strong {
    min-width: 52px;
  }
}

/* Final main screen override: login and dashboard */

.login-shell,
.login-hero {
  width: 100%;
}

.login-hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}

.login-hero .panel {
  background: var(--paper);
}

.login-hero .panel::before {
  height: 8px;
  background: var(--gold);
  animation: none;
}

.login-hero .intro-panel {
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(255, 191, 39, 0.12), transparent 34%),
    linear-gradient(150deg, #0e3b28 0%, #175a32 58%, #0a2c22 100%);
}

.login-hero .intro-panel .panel-body {
  display: grid;
  min-height: min(760px, calc(100vh - 88px));
  grid-template-rows: auto auto auto auto minmax(280px, 1fr) auto;
  gap: 16px;
  padding: clamp(24px, 3vw, 42px);
}

.login-hero .login-brand,
.login-hero .lead-text {
  color: var(--paper);
}

.login-hero .login-brand {
  margin-bottom: 6px;
}

.login-hero .login-brand small {
  color: var(--gold);
}

.login-hero .eyebrow {
  width: fit-content;
  color: var(--club-dark);
}

.login-hero .title {
  max-width: 720px;
  color: var(--paper);
  font-size: clamp(54px, 6vw, 96px);
  line-height: 0.92;
}

.login-hero .lead-text {
  max-width: 54ch;
  font-size: 20px;
}

.login-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-kpis span {
  min-height: 38px;
  border: 2px solid rgba(255, 240, 210, 0.26);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--paper);
  background: rgba(8, 39, 31, 0.42);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-hero .login-team-art {
  align-self: end;
  width: min(100%, 780px);
  max-height: none;
  min-height: 300px;
  margin: 0 auto -18px;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: saturate(1.08) contrast(1.04);
}

.login-hero .rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.login-hero .rule-card {
  min-height: 96px;
  border-color: rgba(255, 240, 210, 0.28);
  background: rgba(255, 240, 210, 0.94);
}

.login-card {
  max-width: none;
  align-self: start;
}

.login-card .panel-body {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 2.5vw, 34px);
}

.login-card .section-title {
  font-size: clamp(32px, 3vw, 46px);
}

.login-card .form-hint,
.login-card .login-note {
  margin: 0;
}

.login-card .form-grid {
  display: grid;
  gap: 16px;
}

.login-card button[type="submit"] {
  min-height: 56px;
  font-size: 18px;
}

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

.dashboard-hero .panel-body {
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
  gap: 18px 30px;
  min-height: 640px;
  padding: clamp(24px, 3vw, 42px);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(255, 191, 39, 0.16), transparent 30%),
    linear-gradient(150deg, #0e3b28 0%, #175a32 56%, #08271f 100%);
}

.dashboard-hero .home-hero-copy {
  align-self: center;
  max-width: 620px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--paper);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.dashboard-hero .home-hero-copy .title {
  color: var(--paper);
  font-size: clamp(52px, 5.2vw, 82px);
}

.dashboard-hero .home-hero-copy .title span {
  color: var(--gold);
  text-shadow: 3px 3px 0 rgba(8, 39, 31, 0.45);
}

.dashboard-hero .home-hero-copy .lead-text {
  max-width: 42ch;
  color: rgba(255, 240, 210, 0.82);
  font-size: 20px;
}

.dashboard-hero .hero-badge {
  border-color: rgba(255, 240, 210, 0.22);
  color: var(--paper);
  background: rgba(8, 39, 31, 0.44);
  box-shadow: none;
}

.dashboard-hero .home-hero-team {
  width: min(100%, 680px);
  max-height: 560px;
  margin: 0 0 -10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.04);
  transform: none;
}

.dashboard-hero .balance-card,
.dashboard-hero .stats-grid {
  grid-column: auto;
}

.dashboard-hero .balance-card {
  grid-column: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 18px;
  color: var(--paper);
  background: rgba(8, 39, 31, 0.58);
  box-shadow: none;
}

.dashboard-hero .balance-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ink);
  font-size: clamp(46px, 5vw, 72px);
}

.dashboard-hero .balance-card small {
  color: rgba(255, 240, 210, 0.78);
}

.dashboard-hero .stats-grid {
  grid-column: 2;
  align-self: end;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-hero .stat {
  min-height: 92px;
  color: var(--paper);
  background: rgba(255, 240, 210, 0.12);
  box-shadow: none;
}

.dashboard-hero .stat span {
  color: rgba(255, 240, 210, 0.78);
}

.dashboard-hero .stat strong {
  color: var(--gold);
}

@media (max-width: 1080px) {
  .login-hero {
    grid-template-columns: 1fr;
  }

  .login-card {
    width: min(100%, 620px);
  }

  .dashboard-hero .panel-body {
    grid-template-columns: 1fr;
  }

  .dashboard-hero .home-hero-team,
  .dashboard-hero .balance-card,
  .dashboard-hero .stats-grid {
    grid-column: 1;
  }
}

@media (max-width: 860px) {
  .login-hero {
    gap: 12px;
    padding: 12px;
  }

  .login-hero .intro-panel .panel-body {
    min-height: auto;
    grid-template-rows: auto;
    padding: 20px;
  }

  .login-hero .title {
    font-size: clamp(40px, 12vw, 58px);
  }

  .login-hero .lead-text {
    font-size: 16px;
  }

  .login-hero .login-team-art {
    min-height: 0;
    max-height: 330px;
    margin-top: 8px;
    margin-bottom: -4px;
  }

  .login-hero .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-hero .rule-card span,
  .login-hero .rule-card small {
    color: rgba(8, 39, 31, 0.76);
  }

  .login-card {
    width: 100%;
    order: -1;
  }

  .dashboard-hero .panel-body {
    min-height: auto;
    padding: 18px;
  }

  .dashboard-hero .home-hero-copy .title {
    font-size: clamp(36px, 11vw, 56px);
  }

  .dashboard-hero .home-hero-copy .lead-text {
    font-size: 16px;
  }

  .dashboard-hero .home-hero-team {
    max-height: 248px;
    margin-top: 0;
  }

  .dashboard-hero .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .login-hero {
    padding: 8px;
  }

  .login-hero .intro-panel .panel-body,
  .login-card .panel-body {
    padding: 16px;
  }

  .login-kpis {
    gap: 7px;
  }

  .login-kpis span {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .login-hero .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .login-hero .rule-card {
    min-height: 82px;
    padding: 10px;
  }

  .login-hero .rule-card strong {
    font-size: 28px;
  }

  .minigame-options {
    grid-template-columns: 1fr;
  }

  .dashboard-hero .balance-card {
    grid-template-columns: 1fr;
  }

  .dashboard-hero .balance-card strong {
    grid-row: auto;
    grid-column: auto;
  }

  .dashboard-hero .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Desktop first-screen correction */

@media (min-width: 861px) {
  .login-hero .intro-panel .panel-body {
    min-height: min(820px, calc(100vh - 88px));
    grid-template-rows: auto auto auto auto auto minmax(230px, 1fr) auto;
    gap: 14px;
  }

  .login-hero .title {
    font-size: clamp(48px, 5vw, 76px);
  }

  .login-hero .lead-text {
    font-size: 18px;
  }

  .login-hero .login-team-art {
    max-height: 330px;
    margin: 0 auto;
  }

  .login-hero .rule-card {
    min-height: 88px;
  }
}

@media (max-width: 860px) {
  .dashboard-hero .home-hero-team {
    margin-top: 0;
    max-height: 248px;
  }
}

/* Rating screen polish */

.rating-hero {
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(255, 191, 39, 0.14), transparent 32%),
    linear-gradient(150deg, var(--club), var(--club-dark));
}

.rating-hero::before {
  background: var(--gold);
  animation: none;
}

.rating-hero .lead-text {
  max-width: 720px;
  color: rgba(255, 240, 210, 0.78);
}

.rating-hero .mega-stats-grid {
  margin-top: 2px;
}

.rating-hero .mega-stat {
  min-height: 132px;
}

.rating-hero .mega-stat strong {
  color: var(--club-dark);
}

.rating-season-strip span {
  color: var(--paper);
  background: rgba(8, 39, 31, 0.52);
  border-color: rgba(255, 240, 210, 0.24);
  box-shadow: none;
}

.rating-season-strip b {
  color: var(--gold);
}

.rating-panel .panel-body {
  display: grid;
  gap: 16px;
}

.rating-row {
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}

.rating-row:not(.rating-head):hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.rating-row .rating-points {
  color: var(--club-mid);
  font-size: 22px;
}

@media (max-width: 860px) {
  .rating-hero {
    color: var(--paper);
    background:
      linear-gradient(145deg, #175a32, #0e3b28 68%);
  }

  .rating-hero .panel-body {
    gap: 12px;
  }

  .rating-hero .title {
    color: var(--paper);
    font-size: clamp(34px, 10vw, 48px);
  }

  .rating-hero .lead-text {
    color: rgba(255, 240, 210, 0.78);
  }

  .rating-hero .mega-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .rating-hero .mega-stat {
    min-height: 104px;
    padding: 12px;
  }

  .rating-hero .mega-stat.hot {
    grid-column: 1 / -1;
  }

  .rating-hero .mega-stat strong {
    font-size: clamp(24px, 8vw, 36px);
    line-height: 1.02;
  }

  .rating-season-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .rating-season-strip span {
    padding: 8px 10px;
    font-size: 12px;
  }

  .rating-table {
    gap: 9px;
    overflow: visible;
  }

  .rating-head {
    display: none;
  }

  .rating-row {
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
  }

  .rating-player {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .rating-row b,
  .rating-row > span:not(.rating-rank),
  .rating-row em {
    display: grid;
    gap: 2px;
    min-width: 0;
    border: 1px solid rgba(8, 39, 31, 0.18);
    border-radius: 8px;
    padding: 6px 7px;
    background: rgba(255, 255, 255, 0.36);
    font-size: 13px;
  }

  .rating-row b::before,
  .rating-row > span:not(.rating-rank)::before,
  .rating-row em::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
  }

  .rating-row .rating-points {
    font-size: 18px;
  }
}

/* Character select screen polish */

.character-select-panel .panel-body {
  display: grid;
  gap: 18px;
}

.character-select-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 20px;
  align-items: end;
  margin: -8px -8px 2px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: clamp(18px, 2.2vw, 28px);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(255, 191, 39, 0.12), transparent 34%),
    linear-gradient(150deg, var(--club), var(--club-dark));
  box-shadow: var(--soft-shadow);
}

.character-select-head .title {
  color: var(--paper);
}

.character-select-head .lead-text {
  max-width: 62ch;
  color: rgba(255, 240, 210, 0.78);
}

.draft-summary {
  display: grid;
  gap: 8px;
}

.draft-summary span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border: 2px solid rgba(255, 240, 210, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  color: rgba(255, 240, 210, 0.78);
  background: rgba(8, 39, 31, 0.46);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.draft-summary b {
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
}

.character-select-panel .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.character-select-panel .character-card {
  min-height: 386px;
}

.character-select-panel .ability {
  color: var(--ink);
  background: rgba(255, 249, 234, 0.92);
}

.character-select-panel .ability span {
  color: var(--muted);
}

.character-select-panel .character-card.is-selected .ability,
.character-select-panel .character-card:hover .ability {
  color: var(--paper);
  background: var(--club-mid);
}

.character-select-panel .character-card.is-selected .ability {
  animation: none;
}

.character-select-panel .character-card.is-selected .ability span,
.character-select-panel .character-card:hover .ability span {
  color: var(--gold);
}

@media (max-width: 860px) {
  .character-select-panel .panel-body {
    gap: 12px;
  }

  .character-select-head {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: -2px -2px 0;
    padding: 16px;
  }

  .character-select-head .title {
    font-size: clamp(34px, 10vw, 46px);
  }

  .draft-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .draft-summary span {
    display: grid;
    justify-items: start;
    min-height: 58px;
    padding: 8px;
    font-size: 10px;
    line-height: 1.15;
  }

  .draft-summary b {
    font-size: 21px;
  }

  .character-select-panel .cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .character-select-panel .character-card {
    min-height: 0;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 7px;
    padding: 7px;
  }

  .character-select-panel .avatar {
    width: 64px;
    height: 78px;
  }

  .character-select-panel .card-title {
    font-size: 13px;
  }

  .character-select-panel .stats-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    margin-top: 2px;
  }

  .character-select-panel .mini-stat {
    padding: 4px 2px 6px;
  }

  .character-select-panel .mini-stat span {
    padding-right: 0;
    text-align: center;
    font-size: 10px;
    line-height: 1.1;
  }

  .character-select-panel .mini-stat strong {
    position: static;
    display: block;
    margin-top: 4px;
    text-align: center;
  }

  .character-select-panel .ability {
    margin-top: 2px;
    padding: 5px 7px;
  }
}

/* Tutorial screen polish */

.tutorial-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 18px;
  align-items: end;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: clamp(18px, 2.2vw, 28px);
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(255, 191, 39, 0.14), transparent 32%),
    linear-gradient(150deg, var(--club), var(--club-dark));
  box-shadow: var(--soft-shadow);
}

.tutorial-head .title {
  color: var(--paper);
}

.tutorial-head .lead-text {
  max-width: 70ch;
  color: rgba(255, 240, 210, 0.78);
}

.tutorial-scorecard {
  display: grid;
  gap: 6px;
  border: 2px solid rgba(255, 240, 210, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(8, 39, 31, 0.48);
}

.tutorial-scorecard span {
  color: rgba(255, 240, 210, 0.82);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-scorecard strong {
  color: var(--gold);
  font-size: 44px;
  line-height: 1;
}

.tutorial-panel .tutorial-steps {
  gap: 8px;
}

.tutorial-panel .tutorial-steps span {
  display: grid;
  min-height: 58px;
  align-content: center;
}

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

.tutorial-guide-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 164px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: #fff9ea;
  box-shadow: var(--soft-shadow);
}

.tutorial-guide-grid article span {
  color: var(--club-mid);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.tutorial-guide-grid article p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.32;
}

@media (max-width: 1180px) {
  .tutorial-guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .tutorial-head {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .tutorial-head .title {
    font-size: clamp(34px, 10vw, 46px);
  }

  .tutorial-scorecard {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 10px 12px;
  }

  .tutorial-scorecard strong {
    font-size: 34px;
  }

  .tutorial-guide-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tutorial-guide-grid article {
    min-height: 0;
    padding: 11px;
  }
}
