:root {
  color-scheme: light;
  --ink: #12172f;
  --muted: #68718d;
  --line: #dfe5f2;
  --soft: #f5f7ff;
  --paper: #ffffff;
  --navy: #071233;
  --blue: #3158ff;
  --purple: #6f3ff5;
  --teal: #3158ff;
  --red: #e33155;
  --gold: #ffffff;
  --green: #22906b;
  --sky: #4f7dff;
  --violet-soft: #f0ecff;
  --shadow: 0 20px 58px rgba(7, 18, 51, 0.16);
  --shadow-strong: 0 28px 80px rgba(7, 18, 51, 0.24);
}

* {
  box-sizing: border-box;
}

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

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

@keyframes surfaceRise {
  from {
    opacity: 0.72;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lightSweep {
  from {
    transform: translateX(-130%) skewX(-18deg);
  }
  to {
    transform: translateX(130%) skewX(-18deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 12px 26px rgba(49, 88, 255, 0.24);
  }
  50% {
    box-shadow: 0 16px 34px rgba(111, 63, 245, 0.34), 0 0 0 3px rgba(227, 49, 85, 0.08);
  }
}

@keyframes assistantFloat {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

@keyframes assistantRing {
  0% {
    transform: scale(0.86);
    opacity: 0.72;
  }
  80%, 100% {
    transform: scale(1.36);
    opacity: 0;
  }
}

@keyframes thinkingDot {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.42;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes stadiumLights {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 52px 0;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(49, 88, 255, 0.09) 0%, rgba(111, 63, 245, 0.08) 34%, rgba(227, 49, 85, 0.06) 62%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, #fbfcff 0%, #eef2fb 46%, #f8faff 100%);
  background-size: 220% 220%, 100% 100%;
  animation: backgroundFlow 18s ease-in-out infinite;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  color: rgba(104, 113, 141, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--blue);
}

.police-beian img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px clamp(16px, 4vw, 40px);
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 18, 51, 0.98) 0%, rgba(22, 25, 82, 0.98) 47%, rgba(69, 27, 119, 0.96) 100%);
  background-size: 180% 180%;
  animation: gradientFlow 14s ease-in-out infinite;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 38px rgba(7, 18, 51, 0.28);
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple) 56%, var(--red));
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 22px rgba(49, 88, 255, 0.28);
  font-weight: 900;
  flex: 0 0 auto;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

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

.nav-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-button:hover,
.nav-button.active {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px rgba(7, 18, 51, 0.16);
}

.nav-button.primary {
  color: var(--navy);
  background: white;
  border-color: rgba(255, 255, 255, 0.56);
  font-weight: 800;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 800;
}

.main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 20px clamp(14px, 4vw, 32px) 48px;
}

.main > * {
  animation: surfaceRise 0.52s ease both;
}

.section {
  margin-top: 18px;
}

.page-head {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--purple);
  font-size: 13px;
  font-weight: 800;
}

.page-title {
  margin: 0;
  font-size: clamp(25px, 4vw, 40px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tournament-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  min-height: 250px;
  padding: clamp(24px, 4vw, 34px);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 18, 51, 0.98) 0%, rgba(26, 38, 117, 0.94) 42%, rgba(88, 42, 168, 0.9) 70%, rgba(199, 36, 72, 0.88) 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.075) 0 8px, transparent 8px 24px);
  background-size: 220% 220%, auto;
  animation: gradientFlow 13s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-strong);
}

.tournament-hero::before,
.team-hero::before,
.auth-visual::before {
  content: "";
  position: absolute;
  inset: -30% auto -30% -40%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
  animation: lightSweep 7s ease-in-out infinite;
}

.tournament-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, #3158ff 0 28%, #ffffff 28% 38%, #6f3ff5 38% 62%, #ffffff 62% 72%, #e33155 72% 100%);
}

.tournament-hero .page-copy {
  color: rgba(255, 255, 255, 0.78);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-stats span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.hero-stats strong {
  font-size: 18px;
}

.host-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.host-strip span,
.city-rail span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
}

.host-strip span {
  background: rgba(255, 255, 255, 0.13);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.stadium-board {
  position: relative;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.stadium-board::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -42px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.stadium-board strong {
  font-size: 62px;
  line-height: 0.92;
  z-index: 1;
}

.stadium-board span,
.stadium-board small {
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.stadium-lights {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.stadium-lights::before,
.stadium-lights::after {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0 8px, rgba(255, 255, 255, 0.16) 8px 18px);
  background-size: 52px 100%;
  animation: stadiumLights 3.2s linear infinite;
}

.city-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
}

.selection-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  padding: 13px 14px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple) 62%, var(--red));
  background-size: 180% 180%;
  animation: gradientFlow 9s ease-in-out infinite;
  box-shadow: 0 14px 34px rgba(49, 88, 255, 0.2);
}

.selection-guide strong,
.selection-guide span {
  display: block;
}

.selection-guide span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.city-rail span {
  color: #071c3d;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(49, 88, 255, 0.13);
  box-shadow: 0 8px 20px rgba(7, 18, 51, 0.06);
  white-space: nowrap;
}

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

.search {
  position: relative;
}

.search input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(49, 88, 255, 0.16);
  border-radius: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  outline: none;
  box-shadow: 0 10px 24px rgba(7, 18, 51, 0.06);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(111, 63, 245, 0.14), 0 12px 28px rgba(7, 18, 51, 0.08);
}

.group-tabs,
.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.seg {
  min-width: 54px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(49, 88, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(7, 18, 51, 0.06);
  white-space: nowrap;
}

.seg.active {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  background-size: 180% 180%;
  animation: gradientFlow 8s ease-in-out infinite;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(49, 88, 255, 0.24);
}

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

.team-card,
.match-card,
.panel,
.metric-card {
  border: 1px solid rgba(49, 88, 255, 0.13);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 251, 255, 0.96));
  box-shadow: var(--shadow);
}

.panel,
.standing-card,
.rate,
.kpi {
  position: relative;
  overflow: hidden;
}

.team-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  animation: surfaceRise 0.5s ease both;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--purple), var(--red));
  opacity: 0.9;
}

.team-card:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 63, 245, 0.32);
  box-shadow: var(--shadow-strong);
}

.team-card::after,
.match-card::after,
.standing-card::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(49, 88, 255, 0.08) 38%, rgba(111, 63, 245, 0.08) 52%, transparent 70%);
  opacity: 0;
  transform: translateX(-40%);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.38s ease;
}

.team-card:hover::after,
.match-card:hover::after,
.standing-card:hover::after,
.panel:hover::after {
  opacity: 1;
  transform: translateX(40%);
}

.team-card img,
.flag {
  width: 58px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(49, 88, 255, 0.15);
  background: var(--soft);
  box-shadow: 0 8px 18px rgba(7, 18, 51, 0.08);
}

.team-name {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.team-name span {
  margin-left: 5px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.team-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--violet-soft);
  color: #4d2dc8;
  font-size: 12px;
  font-weight: 700;
}

.choose-btn,
.primary-btn,
.ghost-btn,
.danger-btn {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 800;
}

.choose-btn,
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  background-size: 180% 180%;
  animation: gradientFlow 8s ease-in-out infinite, pulseGlow 4s ease-in-out infinite;
  box-shadow: 0 12px 26px rgba(49, 88, 255, 0.24);
}

.choose-btn:active,
.primary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.seg:active {
  transform: translateY(1px) scale(0.99);
}

.ghost-btn {
  color: #182463;
  background: #eef2ff;
  border: 1px solid rgba(49, 88, 255, 0.16);
}

.danger-btn {
  color: white;
  background: linear-gradient(135deg, #db274b, var(--red));
}

.wide {
  width: 100%;
}

.team-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 18, 51, 0.96), rgba(39, 42, 129, 0.92) 58%, rgba(111, 63, 245, 0.88));
  background-size: 200% 200%;
  animation: gradientFlow 11s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-strong);
}

.team-hero > * {
  position: relative;
  z-index: 1;
}

.team-hero img {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.team-hero h2,
.team-hero p {
  margin: 0;
}

.team-hero p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.team-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.team-hero-tags > span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.roster-panel {
  overflow: hidden;
}

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

.roster-group {
  min-width: 0;
  border: 1px solid rgba(49, 88, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 255, 0.92));
}

.roster-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(49, 88, 255, 0.1);
}

.roster-group-title strong {
  color: var(--navy);
}

.roster-group-title span {
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
}

.roster-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.roster-player {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 7px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 18px rgba(7, 18, 51, 0.06);
}

.roster-player > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  font-size: 12px;
  font-weight: 900;
}

.roster-player strong,
.roster-player small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-player strong {
  color: var(--ink);
  font-size: 13px;
}

.roster-player small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.layout-2 {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: start;
}

.panel {
  padding: 16px;
}

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

.panel-title h3 {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

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

.match-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-color: rgba(49, 88, 255, 0.14);
  background: linear-gradient(180deg, #ffffff, #f9faff);
}

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

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

.side-team:last-child {
  justify-content: flex-end;
  text-align: right;
}

.side-team img {
  width: 38px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(49, 88, 255, 0.16);
  box-shadow: 0 6px 14px rgba(7, 18, 51, 0.07);
}

.score {
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: center;
  color: white;
  background: linear-gradient(135deg, var(--navy), #182463 48%, var(--purple));
  background-size: 180% 180%;
  animation: gradientFlow 7s ease-in-out infinite;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(7, 18, 51, 0.16);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, #6c748b, #4b556e);
  font-size: 12px;
  font-weight: 800;
}

.status.live {
  background: linear-gradient(135deg, #db274b, var(--red));
  animation: pulseGlow 2.6s ease-in-out infinite;
}

.status.finished {
  background: var(--green);
}

.status.not_started {
  color: #24306b;
  background: #eef2ff;
  border: 1px solid rgba(49, 88, 255, 0.12);
}

.status.postponed,
.status.cancelled {
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--red));
}

.match-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.metric-card {
  padding: 12px;
  box-shadow: none;
  background: #fbfcff;
}

.metric-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf8;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--red));
  background-size: 180% 100%;
  animation: gradientFlow 5s ease-in-out infinite;
}

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

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

.standings-head {
  padding: 8px 0 0;
}

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

.standing-card {
  overflow: hidden;
  border: 1px solid rgba(49, 88, 255, 0.13);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: var(--shadow);
}

.standing-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(49, 88, 255, 0.12);
  background:
    linear-gradient(90deg, rgba(49, 88, 255, 0.08), rgba(111, 63, 245, 0.06), rgba(227, 49, 85, 0.04)),
    #ffffff;
}

.standing-card-head h3 {
  margin: 0;
  font-size: 22px;
  color: var(--navy);
}

.standing-cols {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.standing-row {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 34px minmax(0, 1fr) repeat(6, 29px);
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(49, 88, 255, 0.1);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.standing-row:hover {
  background: rgba(49, 88, 255, 0.05);
}

.standing-row:last-child {
  border-bottom: 0;
}

.standing-row img {
  width: 32px;
  height: 22px;
  border: 1px solid rgba(49, 88, 255, 0.16);
  border-radius: 5px;
  object-fit: cover;
}

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

.standing-row span,
.standing-row b {
  text-align: center;
}

.standing-row .rank {
  color: var(--muted);
  font-weight: 800;
}

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

.player {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(49, 88, 255, 0.12);
  border-radius: 8px;
  background: #fbfcff;
  font-size: 13px;
}

.shirt {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: white;
  background: linear-gradient(135deg, var(--navy), var(--purple));
  font-weight: 900;
}

.ai-answer {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 255, 0.96));
  border: 1px solid rgba(49, 88, 255, 0.14);
  box-shadow: 0 14px 34px rgba(7, 18, 51, 0.08);
}

.rate-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rate {
  padding: 10px;
  border-radius: 8px;
  background: white;
  border: 1px solid rgba(49, 88, 255, 0.13);
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rate:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 63, 245, 0.28);
  box-shadow: 0 12px 26px rgba(49, 88, 255, 0.12);
}

.rate strong {
  display: block;
  margin-bottom: 3px;
  font-size: 20px;
  color: var(--purple);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

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

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(49, 88, 255, 0.13);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 34px rgba(7, 18, 51, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid rgba(49, 88, 255, 0.1);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  background: #f5f7ff;
  font-weight: 800;
}

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

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

.mini-actions button {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  background: #eef2ff;
  color: #24306b;
  font-weight: 800;
}

.mini-actions button.danger {
  color: white;
  background: linear-gradient(135deg, #db274b, var(--red));
}

.empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(49, 88, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.notice {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--red);
  background: linear-gradient(90deg, rgba(227, 49, 85, 0.08), rgba(111, 63, 245, 0.06));
  color: #4a2148;
  border-radius: 8px;
}

.login {
  max-width: 420px;
  margin: 40px auto;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 420px;
  gap: 18px;
  align-items: stretch;
  margin-top: 32px;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 18, 51, 0.98), rgba(34, 53, 145, 0.95) 40%, rgba(111, 63, 245, 0.9) 70%, rgba(227, 49, 85, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 36px);
  background-size: 220% 220%, auto;
  animation: gradientFlow 12s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-strong);
}

.auth-visual > * {
  position: relative;
  z-index: 1;
}

.auth-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--blue), white 32%, var(--purple) 54%, white 68%, var(--red));
}

.auth-visual h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: 0;
}

.auth-orbit {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 10px;
  align-items: center;
}

.auth-orbit span,
.auth-orbit strong {
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 56px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 24px;
}

.auth-orbit strong {
  min-width: 96px;
  color: var(--navy);
  background: white;
  font-size: 19px;
}

.auth-card {
  align-self: center;
  margin: 0;
}

.session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  color: #24306b;
  background: #eef2ff;
  border: 1px solid rgba(49, 88, 255, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.session-banner button,
.auth-switch button {
  color: var(--purple);
  background: transparent;
  font-weight: 900;
}

.auth-switch {
  margin-top: 14px;
  color: var(--muted);
  text-align: center;
}

.auth-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.permission-panel {
  max-width: 560px;
  margin: 42px auto;
}

.permission-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ai-orb {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 70;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: white;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18) 22%, transparent 34%),
    linear-gradient(135deg, var(--blue), var(--purple) 52%, var(--red));
  background-size: 170% 170%;
  animation: gradientFlow 7s ease-in-out infinite, pulseGlow 2.8s ease-in-out infinite;
  box-shadow: 0 18px 48px rgba(49, 88, 255, 0.34), 0 8px 24px rgba(227, 49, 85, 0.2);
}

.ai-orb::before,
.ai-orb::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(111, 63, 245, 0.32);
  border-radius: 28px;
  animation: assistantRing 2.6s ease-out infinite;
  pointer-events: none;
}

.ai-orb::after {
  animation-delay: 1.2s;
  border-color: rgba(227, 49, 85, 0.26);
}

.ai-orb:hover {
  transform: translateY(-3px);
}

.ai-orb:active {
  transform: translateY(1px) scale(0.98);
}

.ai-orb-face {
  position: relative;
  width: 43px;
  height: 35px;
  display: block;
  border-radius: 15px 15px 13px 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 -7px 14px rgba(49, 88, 255, 0.16);
}

.ai-orb-face::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 2px;
  height: 9px;
  background: rgba(255, 255, 255, 0.86);
}

.ai-orb-face::after {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  top: -14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
}

.ai-orb-face i,
.ai-orb-face b {
  position: absolute;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 15px 0 0 var(--red);
}

.ai-orb-face i {
  left: 10px;
}

.ai-orb-face b {
  display: none;
}

.ai-orb-label {
  position: absolute;
  right: 8px;
  bottom: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--navy);
  background: white;
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
}

.assistant-gate,
.assistant-hero {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(135deg, rgba(7, 18, 51, 0.98), rgba(49, 88, 255, 0.9) 38%, rgba(111, 63, 245, 0.92) 68%, rgba(227, 49, 85, 0.88)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 44px);
  background-size: 220% 220%, auto;
  animation: gradientFlow 12s ease-in-out infinite;
  box-shadow: var(--shadow-strong);
}

.assistant-gate::after,
.assistant-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--blue), white 30%, var(--purple) 52%, white 68%, var(--red));
}

.assistant-gate {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: clamp(24px, 5vw, 42px);
}

.assistant-gate > *,
.assistant-hero > * {
  position: relative;
  z-index: 1;
}

.assistant-gate .page-title,
.assistant-gate .page-copy,
.assistant-hero .page-title,
.assistant-hero .page-copy {
  color: white;
}

.assistant-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: clamp(22px, 4vw, 34px);
}

.assistant-bot {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, var(--blue), var(--purple) 55%, var(--red));
  background-size: 180% 180%;
  animation: assistantFloat 4s ease-in-out infinite, gradientFlow 8s ease-in-out infinite;
  box-shadow: 0 24px 60px rgba(7, 18, 51, 0.26);
}

.assistant-bot.large {
  width: 118px;
  height: 118px;
}

.assistant-bot span {
  position: relative;
  width: 64px;
  height: 50px;
  display: block;
  border-radius: 20px 20px 16px 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 -10px 18px rgba(49, 88, 255, 0.16);
}

.assistant-bot span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 3px;
  height: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.assistant-bot span::after {
  content: "";
  position: absolute;
  left: calc(50% - 6px);
  top: -22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.9);
}

.assistant-bot i,
.assistant-bot b {
  position: absolute;
  top: 20px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--blue);
}

.assistant-bot i {
  left: 17px;
  box-shadow: 21px 0 0 var(--red);
}

.assistant-bot b {
  display: none;
}

.assistant-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.assistant-chat,
.assistant-prompts {
  animation: surfaceRise 0.5s ease both;
}

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

.prompt-list button {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 12px;
  border-radius: 8px;
  color: #253065;
  text-align: left;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(49, 88, 255, 0.08), rgba(111, 63, 245, 0.1), rgba(227, 49, 85, 0.08));
  border: 1px solid rgba(49, 88, 255, 0.14);
}

.prompt-list button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-120%) skewX(-18deg);
}

.prompt-list button:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 63, 245, 0.3);
  box-shadow: 0 14px 34px rgba(49, 88, 255, 0.12);
}

.prompt-list button:hover::after {
  animation: lightSweep 0.7s ease;
}

.assistant-next {
  margin-top: 14px;
}

.assistant-thinking {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px;
  border-radius: 8px;
  color: #253065;
  background: linear-gradient(135deg, rgba(49, 88, 255, 0.08), rgba(227, 49, 85, 0.06));
  font-weight: 900;
}

.assistant-thinking span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--red));
  animation: thinkingDot 1.1s ease-in-out infinite;
}

.assistant-thinking span:nth-child(2) {
  animation-delay: 0.14s;
}

.assistant-thinking span:nth-child(3) {
  animation-delay: 0.28s;
}

.admin-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi {
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fafbff);
  border: 1px solid rgba(49, 88, 255, 0.13);
  box-shadow: 0 14px 34px rgba(7, 18, 51, 0.08);
}

.kpi strong {
  display: block;
  font-size: 24px;
  color: var(--purple);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(480px, calc(100vw - 28px));
  padding: 11px 14px;
  border-radius: 8px;
  color: white;
  background: rgba(7, 18, 51, 0.96);
  box-shadow: var(--shadow);
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .toolbar,
  .layout-2,
  .lineups,
  .admin-grid,
  .auth-layout,
  .roster-groups,
  .tournament-hero {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 300px;
  }

  .stadium-board {
    min-height: 138px;
  }

  .team-hero {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .team-hero img {
    width: 62px;
    height: 62px;
  }

  .match-main {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .side-team:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .score {
    width: 100%;
  }

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

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

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

  .standing-card-head {
    grid-template-columns: 1fr;
  }

  .standing-row {
    grid-template-columns: 22px 32px minmax(54px, 1fr) repeat(6, 25px);
    gap: 6px;
    padding: 8px 10px;
  }
}

@media (max-width: 640px) {
  body {
    min-width: 320px;
    background:
      linear-gradient(145deg, rgba(49, 88, 255, 0.12), rgba(111, 63, 245, 0.1) 48%, rgba(227, 49, 85, 0.07)),
      linear-gradient(180deg, #fbfcff 0%, #eef2ff 100%);
    -webkit-tap-highlight-color: transparent;
  }

  .shell {
    min-height: 100svh;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom));
    font-size: 12px;
    text-align: center;
  }

  .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    min-height: 58px;
    flex-direction: row;
    align-items: center;
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
    border-bottom-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(7, 18, 51, 0.22);
  }

  .brand {
    width: 100%;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
  }

  .nav-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 7px max(10px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(49, 88, 255, 0.12);
    box-shadow: 0 -16px 38px rgba(7, 18, 51, 0.13);
    backdrop-filter: blur(16px);
  }

  .nav-button {
    min-width: 0;
    min-height: 50px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 3px 2px;
    border: 0;
    border-radius: 8px;
    color: #4f5876;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 800;
  }

  .nav-button::before {
    content: attr(data-short);
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(49, 88, 255, 0.22);
  }

  .nav-button.active {
    color: var(--navy);
    background: rgba(49, 88, 255, 0.08);
  }

  .nav-button.active::before {
    background: linear-gradient(135deg, var(--purple), var(--red));
    animation: gradientFlow 5s ease-in-out infinite;
  }

  .nav-button:active {
    transform: translateY(1px);
  }

  .user-pill {
    display: none;
  }

  .main {
    width: 100%;
    padding: calc(76px + env(safe-area-inset-top)) 12px calc(88px + env(safe-area-inset-bottom));
  }

  .ai-orb {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: 62px;
    height: 62px;
    border-radius: 20px;
  }

  .ai-orb::before,
  .ai-orb::after {
    border-radius: 24px;
  }

  .ai-orb-face {
    width: 36px;
    height: 30px;
    border-radius: 13px 13px 11px 11px;
  }

  .ai-orb-face i,
  .ai-orb-face b {
    top: 12px;
    width: 7px;
    height: 7px;
    box-shadow: 13px 0 0 var(--red);
  }

  .ai-orb-face i {
    left: 9px;
  }

  .ai-orb-label {
    right: 6px;
    bottom: 5px;
    font-size: 10px;
  }

  .page-head {
    gap: 8px;
    margin-bottom: 14px;
  }

  .page-title {
    font-size: 28px;
    line-height: 1.12;
  }

  .page-copy {
    font-size: 14px;
    line-height: 1.58;
  }

  .tournament-hero {
    min-height: 210px;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
    box-shadow: 0 18px 46px rgba(7, 18, 51, 0.2);
  }

  .tournament-hero .page-title {
    font-size: 30px;
  }

  .host-strip {
    gap: 6px;
    margin-top: 14px;
  }

  .hero-stats {
    gap: 6px;
    margin-top: 12px;
  }

  .hero-stats span {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .host-strip span,
  .city-rail span {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 13px;
  }

  .stadium-board {
    min-height: 132px;
    padding-top: 24px;
    align-content: start;
    gap: 0;
  }

  .stadium-board strong {
    margin-top: 12px;
    font-size: 42px;
    line-height: 0.9;
  }

  .stadium-lights {
    top: 16px;
    left: 28px;
    right: 28px;
    gap: 6px;
  }

  .stadium-lights::before,
  .stadium-lights::after {
    height: 6px;
  }

  .selection-guide {
    margin-top: 12px;
    padding: 12px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 14px 0;
  }

  .search input,
  .field input,
  .field select,
  .field textarea {
    min-height: 46px;
    font-size: 16px;
  }

  .group-tabs,
  .admin-tabs {
    margin: 0 -12px;
    padding: 2px 12px 4px;
  }

  .seg {
    min-height: 34px;
    min-width: 48px;
    padding: 0 10px;
    font-size: 13px;
  }

  .city-rail {
    margin: 0 -12px;
    padding: 0 12px 12px;
  }

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

  .team-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .team-card img,
  .flag {
    width: 50px;
    height: 34px;
  }

  .team-name {
    font-size: 16px;
  }

  .tag-row {
    align-items: center;
    justify-content: space-between;
  }

  .choose-btn,
  .primary-btn,
  .ghost-btn,
  .danger-btn {
    min-height: 40px;
  }

  .team-hero {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .team-hero img {
    width: 56px;
    height: 56px;
  }

  .team-hero h2 {
    font-size: 24px;
    line-height: 1.1;
  }

  .team-hero-tags {
    gap: 6px;
  }

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

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

  .assistant-gate {
    min-height: 360px;
    padding: 22px;
  }

  .assistant-hero {
    min-height: 224px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }

  .assistant-bot,
  .assistant-bot.large {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .assistant-bot span {
    width: 45px;
    height: 36px;
    border-radius: 15px 15px 12px 12px;
  }

  .assistant-bot i,
  .assistant-bot b {
    top: 14px;
    width: 8px;
    height: 8px;
  }

  .assistant-bot i {
    left: 12px;
    box-shadow: 15px 0 0 var(--red);
  }

  .prompt-list button {
    min-height: 44px;
    font-size: 14px;
  }

  .panel {
    padding: 14px;
  }

  .panel-title {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .panel-title h3 {
    font-size: 16px;
  }

  .match-card {
    padding: 12px;
  }

  .match-main {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
  }

  .side-team {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    font-size: 13px;
  }

  .side-team:last-child {
    align-items: flex-end;
    justify-content: flex-start;
    text-align: right;
  }

  .score {
    width: auto;
    min-width: 58px;
    padding: 7px 8px;
  }

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

  .metrics-grid,
  .rate-row,
  .lineups,
  .layout-2,
  .auth-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .standings-grid {
    gap: 10px;
  }

  .standing-card-head {
    padding: 12px;
  }

  .standing-card-head h3 {
    font-size: 20px;
  }

  .standing-cols {
    grid-template-columns: repeat(6, minmax(22px, 1fr));
    font-size: 12px;
  }

  .standing-row {
    grid-template-columns: 20px 30px minmax(50px, 1fr) repeat(6, 22px);
    gap: 5px;
    min-height: 52px;
    padding: 8px;
    font-size: 12px;
  }

  .standing-row strong {
    font-size: 13px;
  }

  .standing-row img {
    width: 28px;
    height: 20px;
  }

  .player {
    grid-template-columns: 32px minmax(0, 1fr) 38px;
    min-height: 40px;
  }

  .auth-layout {
    margin-top: 0;
    gap: 12px;
  }

  .auth-visual {
    min-height: 196px;
    padding: 20px;
  }

  .auth-visual h2 {
    font-size: 30px;
    line-height: 1.08;
  }

  .auth-orbit span,
  .auth-orbit strong {
    min-width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .auth-orbit strong {
    min-width: 78px;
    font-size: 17px;
  }

  .login {
    max-width: none;
    margin: 0;
  }

  .permission-panel {
    margin: 18px 0;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .table-wrap {
    margin: 0 -2px;
  }

  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

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