:root {
  --bg: #030812;
  --bg-soft: #071321;
  --panel: rgba(8, 22, 38, 0.92);
  --panel-strong: #0a1a2c;
  --panel-light: rgba(17, 39, 62, 0.82);
  --line: rgba(137, 191, 230, 0.16);
  --line-strong: rgba(82, 205, 255, 0.42);
  --text: #f2f8ff;
  --muted: #91a9bd;
  --ice: #57d6ff;
  --blue: #268cff;
  --blue-deep: #1554d1;
  --green: #3de4a0;
  --red: #ff4f67;
  --yellow: #ffc857;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(38, 140, 255, 0.22), transparent 30rem),
    radial-gradient(circle at 92% 24%, rgba(87, 214, 255, 0.10), transparent 27rem),
    linear-gradient(155deg, var(--bg) 0%, #071525 50%, #030812 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255, 79, 103, 0.08) 49.8%, rgba(255, 79, 103, 0.08) 50.2%, transparent 50.2%),
    linear-gradient(90deg, transparent 23%, rgba(38, 140, 255, 0.06) 23%, rgba(38, 140, 255, 0.06) 23.3%, transparent 23.3%),
    linear-gradient(90deg, transparent 76.7%, rgba(38, 140, 255, 0.06) 76.7%, rgba(38, 140, 255, 0.06) 77%, transparent 77%);
}

button,
input,
select {
  font: inherit;
}

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

.ice-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.puck {
  position: fixed;
  z-index: -1;
  width: 28px;
  height: 28px;
  top: 78%;
  left: -60px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  opacity: 0.26;
  pointer-events: none;
  background: radial-gradient(circle at 35% 28%, #738295, #02050a 65%);
  box-shadow: 0 0 25px rgba(87, 214, 255, 0.48);
  animation: puck-travel 18s linear infinite;
}

@keyframes puck-travel {
  from { transform: translateX(-70px) rotate(0); }
  to { transform: translateX(calc(100vw + 130px)) rotate(1080deg); }
}

.game-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 18, 0.86);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.game-topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(87, 214, 255, 0.7), transparent);
}

.game-topbar-inner {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 24px;
  width: min(100% - 40px, 1320px);
  min-height: 76px;
  margin: 0 auto;
}

.game-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(87, 214, 255, 0.56);
  border-radius: 13px 4px 13px 4px;
  color: #00101c;
  background: linear-gradient(145deg, #a7ecff, var(--ice) 48%, var(--blue));
  box-shadow: 0 0 24px rgba(87, 214, 255, 0.22);
  font-size: 0.83rem;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.brand-mark::after {
  position: absolute;
  width: 58px;
  height: 6px;
  content: "";
  background: rgba(255, 255, 255, 0.34);
  transform: rotate(-42deg);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--ice);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.game-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid rgba(137, 191, 230, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  scrollbar-width: none;
}

.game-nav::-webkit-scrollbar {
  display: none;
}

.game-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 850;
  transition: 160ms ease;
}

.game-nav a:hover {
  color: var(--text);
  background: rgba(87, 214, 255, 0.08);
}

.game-nav a.active {
  color: #03101a;
  background: linear-gradient(135deg, var(--ice), #9eeaff);
  box-shadow: 0 8px 22px rgba(87, 214, 255, 0.18);
}

.nav-icon {
  font-size: 0.72rem;
}

.season-chip {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(61, 228, 160, 0.24);
  border-radius: 999px;
  color: #c7fbe4;
  background: rgba(61, 228, 160, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 228, 160, 0.10), 0 0 13px rgba(61, 228, 160, 0.76);
}

.container {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 34px 0 70px;
}

.page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 44px;
  min-height: 270px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px 8px 28px 8px;
  background:
    linear-gradient(105deg, rgba(10, 29, 49, 0.98), rgba(6, 19, 34, 0.82)),
    radial-gradient(circle at 80% 20%, rgba(87, 214, 255, 0.20), transparent 22rem);
  box-shadow: var(--shadow);
}

.page-hero::before {
  position: absolute;
  top: -95px;
  right: -75px;
  width: 360px;
  height: 360px;
  content: "";
  border: 46px solid rgba(87, 214, 255, 0.045);
  border-radius: 50%;
}

.page-hero::after {
  position: absolute;
  right: 12%;
  bottom: 0;
  width: 170px;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  box-shadow: 0 0 18px rgba(255, 79, 103, 0.55);
}

.compact-hero {
  min-height: 210px;
}

.dashboard-hero {
  min-height: 300px;
}

.eyebrow,
.section-kicker {
  display: block;
  margin: 0 0 9px;
  color: var(--ice);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.compact-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}

h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
}

h3 {
  letter-spacing: -0.025em;
}

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

.subtitle {
  max-width: 720px;
  margin: 18px 0 0;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: 235px;
  padding: 20px;
  border: 1px solid rgba(87, 214, 255, 0.25);
  border-radius: 18px 5px 18px 5px;
  background: rgba(3, 12, 22, 0.68);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.hero-panel-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-panel strong {
  font-size: 1.12rem;
}

.hero-panel small {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #b8d0e2;
}

.hero-emblem {
  position: relative;
  z-index: 1;
  display: grid;
  width: 124px;
  height: 124px;
  place-items: center;
  border: 1px solid rgba(87, 214, 255, 0.35);
  border-radius: 50%;
  color: var(--ice);
  background:
    radial-gradient(circle, rgba(87, 214, 255, 0.16), rgba(3, 12, 22, 0.86) 68%);
  box-shadow: inset 0 0 0 10px rgba(87, 214, 255, 0.025), 0 0 35px rgba(87, 214, 255, 0.10);
  font-size: 1rem;
  font-weight: 1000;
  letter-spacing: 0.18em;
}

.hero-emblem::after {
  position: absolute;
  inset: 12px;
  content: "";
  border: 1px dashed rgba(87, 214, 255, 0.28);
  border-radius: inherit;
}

.goalie-emblem {
  color: var(--yellow);
  border-color: rgba(255, 200, 87, 0.38);
  background:
    radial-gradient(circle, rgba(255, 200, 87, 0.14), rgba(3, 12, 22, 0.86) 68%);
  box-shadow: inset 0 0 0 10px rgba(255, 200, 87, 0.025), 0 0 35px rgba(255, 200, 87, 0.09);
}

.goalie-emblem::after {
  border-color: rgba(255, 200, 87, 0.3);
}

.card,
.status {
  position: relative;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(11, 29, 49, 0.94), rgba(6, 18, 32, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.card {
  padding: 24px;
  overflow: hidden;
  border-radius: 22px 6px 22px 6px;
}

.card::before {
  position: absolute;
  top: 0;
  left: 24px;
  width: 70px;
  height: 2px;
  content: "";
  background: var(--ice);
  box-shadow: 0 0 14px rgba(87, 214, 255, 0.7);
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px 4px 12px 4px;
  font-size: 0.86rem;
}

.status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  content: "";
  background: var(--muted);
}

.status.ok {
  color: #c9fae5;
  border-color: rgba(61, 228, 160, 0.25);
  background: rgba(19, 71, 56, 0.36);
}

.status.ok::before {
  background: var(--green);
  box-shadow: 0 0 12px rgba(61, 228, 160, 0.7);
}

.status.error {
  color: #ffd0d7;
  border-color: rgba(255, 79, 103, 0.30);
  background: rgba(86, 24, 37, 0.38);
}

.status.error::before {
  background: var(--red);
}

.dashboard,
.grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

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

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

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

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

.stat {
  position: relative;
  min-height: 145px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px 5px 18px 5px;
  background:
    linear-gradient(145deg, rgba(13, 34, 56, 0.96), rgba(5, 17, 30, 0.94));
  box-shadow: var(--shadow);
}

.stat::after {
  position: absolute;
  right: -28px;
  bottom: -45px;
  width: 130px;
  height: 130px;
  content: "";
  border: 20px solid rgba(87, 214, 255, 0.045);
  border-radius: 50%;
}

.stat-code {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 7px;
  border: 1px solid rgba(87, 214, 255, 0.22);
  border-radius: 5px;
  color: var(--ice);
  background: rgba(87, 214, 255, 0.07);
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.stat-code.live {
  color: #c7fbe4;
  border-color: rgba(61, 228, 160, 0.25);
  background: rgba(61, 228, 160, 0.08);
}

.stat small {
  display: block;
  padding-right: 50px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat .stat-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  font-size: clamp(2.15rem, 5vw, 3rem);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.06em;
}

.stat em {
  display: block;
  margin-top: 8px;
  color: #678298;
  font-size: 0.74rem;
  font-style: normal;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

.range-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(137, 191, 230, 0.16);
  border-radius: 11px 3px 11px 3px;
  background: rgba(1, 9, 18, 0.56);
}

.range-switch button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px 2px 8px 2px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: 160ms ease;
}

.range-switch button:hover {
  color: var(--text);
  background: rgba(87, 214, 255, 0.07);
}

.range-switch button.active {
  color: #03101a;
  background: linear-gradient(135deg, var(--ice), #9eeaff);
  box-shadow: 0 7px 18px rgba(87, 214, 255, 0.16);
}

.section-kicker {
  margin-bottom: 6px;
  color: #6baac6;
  font-size: 0.61rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(87, 214, 255, 0.24);
  border-radius: 5px 12px 5px 12px;
  color: #bfeeff;
  background: rgba(87, 214, 255, 0.07);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.pill.live {
  color: #c8fae5;
  border-color: rgba(61, 228, 160, 0.28);
  background: rgba(61, 228, 160, 0.08);
}

.action-card {
  min-height: 225px;
  padding: 30px;
}

.action-card::after {
  position: absolute;
  right: -42px;
  bottom: -58px;
  width: 190px;
  height: 190px;
  content: "PLR";
  display: grid;
  place-items: center;
  border: 28px solid rgba(87, 214, 255, 0.035);
  border-radius: 50%;
  color: rgba(87, 214, 255, 0.07);
  font-size: 1.2rem;
  font-weight: 1000;
}

.action-card.team-action::after {
  content: "TMS";
  border-color: rgba(61, 228, 160, 0.035);
  color: rgba(61, 228, 160, 0.07);
}

.action-card.goalie-action::after {
  content: "GLS";
  border-color: rgba(255, 200, 87, 0.04);
  color: rgba(255, 200, 87, 0.09);
}

.action-card p {
  position: relative;
  z-index: 1;
  max-width: 460px;
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.55;
}

.action-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ice);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-link span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(87, 214, 255, 0.24);
  border-radius: 50%;
  transition: 160ms ease;
}

.action-link:hover span {
  color: #00111c;
  background: var(--ice);
  transform: translateX(3px);
}

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

.competition-card {
  position: relative;
  display: grid;
  min-height: 150px;
  align-content: end;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(137, 191, 230, 0.14);
  border-radius: 16px 4px 16px 4px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(17, 39, 62, 0.86), rgba(5, 17, 30, 0.9));
  text-decoration: none;
  transition: 170ms ease;
}

.competition-card::after {
  position: absolute;
  top: -42px;
  right: -42px;
  width: 120px;
  height: 120px;
  content: "";
  border: 18px solid rgba(87, 214, 255, 0.04);
  border-radius: 50%;
}

.competition-card:hover {
  border-color: rgba(87, 214, 255, 0.4);
  background: linear-gradient(145deg, rgba(21, 57, 89, 0.92), rgba(6, 22, 38, 0.94));
  transform: translateY(-3px);
}

.competition-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.12rem;
}

.competition-card small {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: var(--muted);
}

.competition-code {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 8px;
  border: 1px solid rgba(87, 214, 255, 0.24);
  border-radius: 5px;
  color: var(--ice);
  background: rgba(87, 214, 255, 0.07);
  font-size: 0.66rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
}

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

.row {
  display: flex;
  gap: 12px;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(137, 191, 230, 0.18);
  border-radius: 10px 3px 10px 3px;
  outline: none;
  color: var(--text);
  background: rgba(1, 9, 18, 0.62);
  transition: 160ms ease;
}

input::placeholder {
  color: #647d92;
}

input:hover,
select:hover {
  border-color: rgba(87, 214, 255, 0.32);
}

input:focus,
select:focus {
  border-color: var(--ice);
  box-shadow: 0 0 0 3px rgba(87, 214, 255, 0.10), 0 0 20px rgba(87, 214, 255, 0.07);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 0 19px;
  border: 1px solid rgba(87, 214, 255, 0.6);
  border-radius: 10px 3px 10px 3px;
  color: #00111d;
  background: linear-gradient(135deg, #a6edff, var(--ice) 55%, #29aee8);
  box-shadow: 0 10px 28px rgba(87, 214, 255, 0.13);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: 160ms ease;
}

.btn:hover {
  border-color: #d8f7ff;
  box-shadow: 0 14px 34px rgba(87, 214, 255, 0.22);
  transform: translateY(-2px);
}

.btn.secondary {
  color: var(--text);
  border-color: rgba(137, 191, 230, 0.24);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.btn.secondary:hover {
  color: var(--ice);
  border-color: rgba(87, 214, 255, 0.42);
  background: rgba(87, 214, 255, 0.07);
}

.btn.danger {
  color: #fff;
  border-color: rgba(255, 79, 103, 0.62);
  background: linear-gradient(135deg, #db3852, #9d1932);
  box-shadow: 0 10px 28px rgba(255, 79, 103, 0.14);
}

.btn.danger:hover {
  border-color: #ff9aaa;
  box-shadow: 0 14px 34px rgba(255, 79, 103, 0.22);
}

.season-control-card {
  padding: 22px 24px;
}

.season-control-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.season-select-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.season-control-copy {
  display: grid;
  gap: 5px;
  align-self: center;
}

.season-control-copy strong {
  color: var(--ice);
  font-size: 1.05rem;
}

.season-control-copy small {
  color: var(--muted);
}

.edit-btn,
.icon-btn {
  border: 1px solid rgba(87, 214, 255, 0.35);
  color: var(--ice);
  background: rgba(25, 93, 139, 0.2);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: 160ms ease;
}

.edit-btn {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 10px 3px 10px 3px;
  white-space: nowrap;
}

.edit-btn:hover,
.icon-btn:hover {
  border-color: var(--ice);
  color: #fff;
  background: rgba(31, 166, 255, 0.24);
  box-shadow: 0 0 20px rgba(31, 166, 255, 0.14);
}

.reset-match-btn {
  border-color: rgba(255, 76, 126, 0.55);
  color: #ff9ab7;
  white-space: nowrap;
}

.reset-match-btn:hover {
  background: rgba(255, 76, 126, 0.14);
  border-color: #ff4c7e;
  color: #ffd4df;
}

.game-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid rgba(103, 204, 255, 0.32);
  border-radius: 22px 5px 22px 5px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(13, 39, 61, 0.98), rgba(5, 20, 33, 0.99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.game-dialog::backdrop {
  background: rgba(1, 10, 18, 0.78);
  backdrop-filter: blur(6px);
}

.dialog-form {
  padding: 26px;
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(122, 191, 231, 0.15);
}

.dialog-head h2 {
  margin: 3px 0 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.dialog-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rating-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dialog-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(103, 204, 255, 0.16);
  border-radius: 12px 3px 12px 3px;
  color: var(--muted);
  background: rgba(55, 130, 175, 0.08);
}

.dialog-actions {
  justify-content: flex-end;
  padding-top: 18px;
  border-top: 1px solid rgba(122, 191, 231, 0.15);
}

.dialog-actions .btn {
  min-width: 150px;
}

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

.generator-panel {
  display: grid;
  align-content: start;
  padding: 20px;
  border: 1px solid rgba(137, 191, 230, 0.14);
  border-radius: 15px 4px 15px 4px;
  background: rgba(255, 255, 255, 0.025);
}

.generator-label {
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 7px;
  border: 1px solid rgba(87, 214, 255, 0.22);
  border-radius: 5px;
  color: var(--ice);
  background: rgba(87, 214, 255, 0.07);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.generator-panel p,
.table-note {
  color: var(--muted);
  line-height: 1.5;
}

.generator-panel .btn {
  margin-top: auto;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
}

.button-group .btn {
  min-width: 88px;
}

.roster-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin: -4px 0 14px;
}

.roster-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
  font-weight: 850;
}

.roster-team .team-logo {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  padding: 3px;
  border-radius: 8px 2px 8px 2px;
}

.free-agent {
  color: var(--muted);
  border-color: rgba(137, 191, 230, 0.14);
  background: rgba(255, 255, 255, 0.025);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.7);
  transform: none;
}

.compact-btn {
  min-height: 38px;
}

.match-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 10px;
  margin-bottom: 14px;
}

.match-simulation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(87, 214, 255, 0.16);
  border-radius: 12px 3px 12px 3px;
  background: rgba(87, 214, 255, 0.04);
}

.match-mechanics-note {
  display: grid;
  gap: 4px;
}

.match-mechanics-note strong {
  color: var(--ice);
}

.match-mechanics-note small {
  color: var(--muted);
}

.played-match {
  background: rgba(61, 228, 160, 0.022);
}

.matches-table {
  min-width: 1380px;
}

.league-table {
  min-width: 940px;
}

.generator-hint {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.generator-panel #generatePlayoffBtn {
  margin-left: 8px;
}

.playoff-cut-label {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(61, 228, 160, 0.32);
  border-radius: 5px;
  color: #bdf8dc;
  background: rgba(61, 228, 160, 0.08);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.playoff-qualified {
  background: linear-gradient(90deg, rgba(61, 228, 160, 0.09), rgba(61, 228, 160, 0.018) 55%);
}

.playoff-qualified td:first-child {
  border-left: 3px solid var(--green);
}

.playoff-out {
  opacity: 0.72;
}

.league-position {
  display: inline-block;
  min-width: 16px;
}

.qualified-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  color: #041711;
  background: var(--green);
  font-size: 0.62rem;
  font-weight: 950;
}

.playoff-bracket {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.dialog-note.validation-error {
  color: var(--pink);
}

.dialog-note.validation-ok {
  color: var(--green);
}

.playoff-series {
  display: grid;
  gap: 9px;
  min-height: 210px;
  padding: 16px;
  border: 1px solid rgba(87, 214, 255, 0.18);
  border-radius: 12px 3px 12px 3px;
  background: linear-gradient(145deg, rgba(87, 214, 255, 0.07), rgba(5, 20, 34, 0.55));
}

.playoff-series.decided {
  border-color: rgba(61, 228, 160, 0.3);
  box-shadow: inset 0 0 28px rgba(61, 228, 160, 0.035);
}

.playoff-series.waiting {
  align-content: center;
  color: var(--muted);
}

.playoff-stage {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.series-team {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
}

.series-team.winner {
  color: #c7fbe4;
  background: rgba(61, 228, 160, 0.1);
}

.series-team span {
  display: grid;
}

.series-team small {
  color: var(--muted);
  font-size: 0.66rem;
}

.series-team b {
  color: var(--yellow);
  font-size: 1.2rem;
}

.series-games {
  display: grid;
  gap: 4px;
}

.series-game {
  color: var(--muted);
  font-size: 0.7rem;
}

.series-game.played {
  color: var(--ice);
}

.series-advance {
  align-self: end;
  padding-top: 8px;
  border-top: 1px solid rgba(87, 214, 255, 0.12);
  color: var(--muted);
  font-size: 0.75rem;
}

.series-advance.ready {
  color: var(--green);
}

.playoff-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(87, 214, 255, 0.2);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.competition-tag.playoff {
  color: #c7fbe4;
  border-color: rgba(61, 228, 160, 0.3);
  background: rgba(61, 228, 160, 0.09);
}

@media (max-width: 900px) {
  .playoff-bracket {
    grid-template-columns: 1fr;
  }

  .generator-panel #generatePlayoffBtn {
    margin: 8px 0 0;
  }
}

.team-table-name {
  display: flex;
  align-items: center;
  gap: 11px;
}

.league-points {
  color: var(--yellow);
  font-size: 0.92rem;
}

.goal-difference.positive {
  color: var(--green);
}

.goal-difference.negative {
  color: var(--pink);
}

.last-five {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.form-result {
  font-weight: 950;
}

.form-v,
.form-vp {
  color: var(--green);
}

.form-pp {
  color: var(--yellow);
}

.form-p {
  color: var(--pink);
}

.form-separator {
  margin-right: 3px;
  color: var(--muted);
}

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

.empty-slot {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.015);
}

.table-note {
  margin: 14px 0 0;
  font-size: 0.82rem;
}

.competition-tag,
.result-code {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 5px 7px;
  border: 1px solid rgba(87, 214, 255, 0.2);
  border-radius: 5px;
  color: #bdeeff;
  background: rgba(87, 214, 255, 0.07);
  font-size: 0.7rem;
  font-weight: 950;
  white-space: nowrap;
}

.competition-tag.national {
  color: #ffe4a8;
  border-color: rgba(255, 200, 87, 0.24);
  background: rgba(255, 200, 87, 0.07);
}

.result-v,
.result-vp {
  color: #c7fbe4;
  border-color: rgba(61, 228, 160, 0.25);
  background: rgba(61, 228, 160, 0.08);
}

.result-p,
.result-pp {
  color: #ffd0d7;
  border-color: rgba(255, 79, 103, 0.24);
  background: rgba(255, 79, 103, 0.07);
}

.empty-competition {
  display: grid;
  min-height: 190px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border: 1px dashed rgba(87, 214, 255, 0.22);
  border-radius: 16px 4px 16px 4px;
  color: var(--muted);
  text-align: center;
  background: rgba(87, 214, 255, 0.025);
}

.empty-competition strong {
  color: var(--text);
  font-size: 1.1rem;
}

.text-value {
  font-size: clamp(1.7rem, 4vw, 2.35rem) !important;
  letter-spacing: 0.02em !important;
}

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

.item {
  padding: 13px 14px;
  border: 1px solid rgba(137, 191, 230, 0.12);
  border-radius: 11px 3px 11px 3px;
  background: rgba(255, 255, 255, 0.027);
  transition: 160ms ease;
}

.item:hover {
  border-color: rgba(87, 214, 255, 0.25);
  background: rgba(87, 214, 255, 0.045);
  transform: translateX(2px);
}

.item strong {
  display: block;
  margin-bottom: 4px;
}

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

.team-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-list-item strong {
  margin-bottom: 4px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(137, 191, 230, 0.10);
  border-radius: 13px 4px 13px 4px;
  scrollbar-color: rgba(87, 214, 255, 0.35) transparent;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(1, 9, 18, 0.22);
  font-size: 0.78rem;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(137, 191, 230, 0.10);
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  color: #8cc7e2;
  background: rgba(8, 25, 42, 0.98);
  font-size: 0.61rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

th.sortable-column {
  padding-right: 25px;
  cursor: pointer;
  user-select: none;
  transition: color 140ms ease, background 140ms ease;
}

th.sortable-column::after {
  content: "↕";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(140, 199, 226, 0.42);
  font-size: 0.72rem;
  letter-spacing: 0;
}

th.sortable-column:hover,
th.sortable-column:focus-visible,
th.sort-active {
  color: #d7f5ff;
  background: rgba(13, 43, 68, 0.99);
  outline: none;
}

th.sort-active::after {
  content: "↑";
  color: var(--ice);
}

th.sort-active.sort-descending::after {
  content: "↓";
}

.table-wrap table .edit-btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.7rem;
}

.table-wrap table .tag,
.table-wrap table .ranking-badge,
.table-wrap table .save-percentage,
.table-wrap table .result-code,
.table-wrap table .competition-tag {
  padding: 3px 6px;
  font-size: 0.61rem;
}

tbody tr {
  transition: 140ms ease;
}

tbody tr:hover {
  background: rgba(87, 214, 255, 0.045);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid rgba(87, 214, 255, 0.18);
  border-radius: 5px;
  color: #bdeeff;
  background: rgba(87, 214, 255, 0.07);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag.off {
  color: #ffc7cf;
  border-color: rgba(255, 79, 103, 0.18);
  background: rgba(255, 79, 103, 0.08);
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 0.8fr 0.8fr;
  gap: 10px;
}

.goalie-filters {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.8fr;
  gap: 10px;
}

.player-rows {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.player-row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(137, 191, 230, 0.13);
  border-radius: 12px 4px 12px 4px;
  background: rgba(255, 255, 255, 0.026);
}

.player-row-label {
  grid-column: 1 / -1;
  color: #7ebbd6;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.position-lock {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 200, 87, 0.18);
  border-radius: 10px 3px 10px 3px;
  color: var(--yellow);
  background: rgba(255, 200, 87, 0.055);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.goalie-table {
  min-width: 1100px;
}

.players-stats-table {
  min-width: 1180px;
}

.points-value {
  color: var(--ice);
  font-size: 1.02rem;
}

.ranking-badge {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid rgba(255, 200, 87, 0.26);
  border-radius: 5px;
  color: #ffe4a8;
  background: rgba(255, 200, 87, 0.08);
  font-weight: 950;
}

.ranking-badge.empty {
  color: var(--muted);
  border-color: rgba(137, 191, 230, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.save-percentage {
  display: inline-flex;
  min-width: 68px;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid rgba(87, 214, 255, 0.2);
  border-radius: 5px;
  color: #bdeeff;
  background: rgba(87, 214, 255, 0.07);
  font-weight: 900;
}

.save-percentage.elite {
  color: #c7fbe4;
  border-color: rgba(61, 228, 160, 0.25);
  background: rgba(61, 228, 160, 0.08);
}

.save-percentage.low {
  color: #ffd0d7;
  border-color: rgba(255, 79, 103, 0.25);
  background: rgba(255, 79, 103, 0.08);
}

.save-percentage.empty {
  color: var(--muted);
  border-color: rgba(137, 191, 230, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.hidden {
  display: none;
}

.country-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag {
  width: 22px;
  height: 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  object-fit: cover;
}

.team-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 5px;
  border: 1px solid rgba(87, 214, 255, 0.18);
  border-radius: 12px 4px 12px 4px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.055);
}

.team-logo.large {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  padding: 8px;
  border-radius: 18px 5px 18px 5px;
}

.team-logo.national-flag {
  padding: 7px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
}

.team-logo.large.national-flag {
  padding: 10px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.roster-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.roster-alert {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 104px;
  padding: 17px;
  border: 1px solid rgba(137, 191, 230, 0.14);
  border-radius: 15px 4px 15px 4px;
  background: linear-gradient(145deg, rgba(17, 39, 62, 0.8), rgba(5, 17, 30, 0.84));
}

.roster-alert.warning {
  border-color: rgba(255, 200, 87, 0.42);
  background: linear-gradient(145deg, rgba(71, 49, 12, 0.42), rgba(28, 19, 5, 0.62));
}

.roster-alert.ready {
  border-color: rgba(61, 228, 160, 0.3);
  background: linear-gradient(145deg, rgba(16, 70, 51, 0.34), rgba(5, 29, 22, 0.58));
}

.roster-alert.empty {
  opacity: 0.68;
}

.roster-alert-icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border: 1px solid rgba(137, 191, 230, 0.18);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.3rem;
  font-weight: 1000;
}

.roster-alert.warning .roster-alert-icon {
  color: var(--yellow);
  border-color: rgba(255, 200, 87, 0.35);
  background: rgba(255, 200, 87, 0.09);
}

.roster-alert.ready .roster-alert-icon {
  color: var(--green);
  border-color: rgba(61, 228, 160, 0.3);
  background: rgba(61, 228, 160, 0.08);
}

.roster-alert-copy {
  display: grid;
  min-width: 0;
}

.roster-alert-copy small {
  color: #7ebbd6;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.roster-alert-copy strong {
  margin-top: 3px;
}

.roster-alert-copy em {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(137, 191, 230, 0.13);
  border-radius: 16px 4px 16px 4px;
  background: linear-gradient(145deg, rgba(17, 39, 62, 0.82), rgba(5, 17, 30, 0.82));
  transition: 170ms ease;
}

.team-card.roster-incomplete {
  border-color: rgba(255, 200, 87, 0.22);
}

.team-card.roster-complete {
  border-color: rgba(61, 228, 160, 0.2);
}

.team-roster-check {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  margin: 15px 0;
  padding: 13px;
  border: 1px solid rgba(137, 191, 230, 0.12);
  border-radius: 11px 3px 11px 3px;
  background: rgba(1, 9, 18, 0.34);
}

.team-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
}

.roster-ready-tag {
  color: #c7fbe4;
  border-color: rgba(61, 228, 160, 0.25);
  background: rgba(61, 228, 160, 0.08);
}

.roster-warning-tag {
  color: #ffe4a8;
  border-color: rgba(255, 200, 87, 0.26);
  background: rgba(255, 200, 87, 0.08);
}

.position-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.position-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid rgba(137, 191, 230, 0.11);
  border-radius: 7px 2px 7px 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  font-size: 0.68rem;
  font-weight: 900;
}

.position-check b {
  font-size: 0.73rem;
}

.position-check.ready {
  color: #c7fbe4;
  border-color: rgba(61, 228, 160, 0.2);
  background: rgba(61, 228, 160, 0.055);
}

.position-check.missing {
  color: #ffe4a8;
  border-color: rgba(255, 200, 87, 0.22);
  background: rgba(255, 200, 87, 0.055);
}

.team-card .edit-btn {
  width: 100%;
  margin-top: auto;
}

.team-card::after {
  position: absolute;
  top: -20px;
  right: -30px;
  width: 95px;
  height: 95px;
  content: "";
  border: 15px solid rgba(87, 214, 255, 0.035);
  border-radius: 50%;
}

.team-card:hover {
  border-color: rgba(87, 214, 255, 0.32);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  transform: translateY(-3px);
}

.team-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-card h3 {
  margin: 0 0 6px;
}

.team-card p {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.team-filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
}

.logo-convention {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 1px dashed rgba(87, 214, 255, 0.34);
  border-radius: 14px 4px 14px 4px;
  background: rgba(87, 214, 255, 0.045);
}

.logo-convention p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.45;
}

.logo-convention code {
  color: var(--ice);
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .game-topbar-inner {
    grid-template-columns: 1fr auto;
    gap: 10px 18px;
    padding: 11px 0;
  }

  .game-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    order: 3;
  }

  .season-chip {
    grid-column: 2;
    grid-row: 1;
  }

  .page-hero {
    gap: 24px;
  }

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

@media (max-width: 1400px) {
  .game-topbar-inner {
    grid-template-columns: 1fr auto;
    gap: 10px 18px;
    padding: 11px 0;
  }

  .game-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    order: 3;
  }

  .season-chip {
    grid-column: 2;
    grid-row: 1;
  }

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

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

@media (max-width: 820px) {
  .container {
    width: min(100% - 24px, 1240px);
    padding-top: 20px;
  }

  .page-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 22px;
  }

  .hero-panel {
    width: 100%;
  }

  .hero-emblem {
    position: absolute;
    right: -22px;
    bottom: -28px;
    width: 105px;
    height: 105px;
    opacity: 0.35;
  }

  .grid.two,
  .grid.three,
  .dashboard,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .competition-grid,
  .generator-layout,
  .season-control-grid {
    grid-template-columns: 1fr;
  }

  .roster-alert-grid {
    grid-template-columns: 1fr;
  }

  .season-control-grid .btn {
    width: 100%;
  }

  .roster-toolbar .btn {
    width: 100%;
  }

  .row {
    flex-direction: column;
  }

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

  .dialog-form {
    padding: 20px;
  }

  .dialog-actions .btn {
    min-width: 0;
  }

  .filters,
  .goalie-filters,
  .team-filters,
  .player-row {
    grid-template-columns: 1fr;
  }

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

  .match-simulation-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .match-simulation-toolbar .button-group .btn {
    flex: 1 1 180px;
  }

  .section-head {
    flex-wrap: wrap;
  }

  .section-tools {
    width: 100%;
    justify-content: space-between;
  }

  .logo-convention {
    align-items: flex-start;
  }
}

@media (max-width: 580px) {
  .game-topbar-inner {
    width: min(100% - 20px, 1320px);
  }

  .brand-copy strong {
    font-size: 0.78rem;
  }

  .brand-copy small {
    font-size: 0.58rem;
  }

  .season-chip {
    padding: 8px 10px;
    font-size: 0.62rem;
  }

  .game-nav {
    width: 100%;
  }

  .game-nav a {
    flex: 0 0 auto;
    justify-content: center;
    min-width: 0;
    padding: 0 6px;
    font-size: 0.69rem;
  }

  .nav-icon {
    display: none;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.5rem);
  }

  .card {
    padding: 20px 16px;
  }

  .section-head {
    gap: 10px;
  }

  .pill {
    padding: 6px 8px;
    font-size: 0.58rem;
  }

  .hero-actions .btn,
  .form > .btn {
    width: 100%;
  }
}

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