:root {
  --color-text-primary: #123047;
  --ink-strong: #123047;
  --ink: #224862;
  --muted: #5d7388;
  --line: rgba(18, 48, 71, 0.12);
  --line-strong: rgba(18, 48, 71, 0.2);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-tint: rgba(236, 244, 248, 0.8);
  --accent: #49b37d;
  --accent-strong: #2d8a5c;
  --accent-soft: rgba(73, 179, 125, 0.14);
  --navy: #123047;
  --shadow-lg: 0 24px 60px rgba(18, 48, 71, 0.14);
  --shadow-md: 0 14px 32px rgba(18, 48, 71, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Aptos", Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(circle at top left, rgba(73, 179, 125, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(18, 48, 71, 0.12), transparent 28%),
    linear-gradient(180deg, #eef4f7 0%, #f8fbfc 46%, #eef3f7 100%);
}

body.auth-loading {
  visibility: hidden;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.page-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 22px 0 6px;
}

.page-footer a {
  color: var(--ink-strong);
  font-weight: 700;
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.96), rgba(22, 78, 99, 0.88)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  box-shadow: var(--shadow-lg);
  color: #f7fbfd;
}

.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3.3vw, 3rem);
  line-height: 1;
  white-space: nowrap;
}

.hero p {
  margin: 0;
  max-width: 560px;
  color: rgba(247, 251, 253, 0.82);
  font-size: 1.02rem;
}

.hero-meta {
  position: relative;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(180px, 220px);
  gap: 12px;
  min-width: 220px;
  margin-left: auto;
  justify-items: end;
  pointer-events: auto;
}

.hero-stat {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-stat-btn {
  box-shadow: none;
}

.hero-stat-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  transform: none;
}

#myTeamRankingBtn {
  margin-bottom: 6px;
}

.hero-stat-inline {
  display: inline-block;
  color: rgba(247, 251, 253, 0.9);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.profile-menu {
  position: relative;
  z-index: 10001;
}

.profile-menu-btn {
  position: relative;
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 0;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
}

.profile-trigger-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.profile-trigger-name {
  display: block;
  color: #f7fbfd;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger-label {
  color: rgba(247, 251, 253, 0.72);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eef4f7;
  color: #123047;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.profile-avatar-large {
  width: 52px;
  height: 52px;
  font-size: 1.05rem;
}

.profile-menu-dropdown {
  position: fixed;
  top: calc(100% + 10px);
  right: 0;
  z-index: 9999;
  width: min(340px, calc(100vw - 24px));
}

.profile-menu-panel {
  padding: 12px;
  border: 1px solid rgba(18, 48, 71, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 44px rgba(18, 48, 71, 0.18);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
}

.profile-menu-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px;
}

.profile-menu-copy {
  min-width: 0;
}

.profile-menu-label,
.profile-menu-name,
.profile-menu-email,
.profile-menu-membership {
  margin: 0;
}

.profile-menu-label {
  color: rgba(18, 48, 71, 0.7);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-menu-name {
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 800;
}

.hero .profile-menu-email {
  margin-top: 3px;
  color: #10293d;
  font-size: 0.92rem;
  font-weight: 700;
  word-break: break-word;
}

.profile-menu-label-plan {
  margin-top: 10px;
}

.hero .profile-menu-tier {
  margin-top: 3px;
  color: #123047;
  font-size: 0.9rem;
  font-weight: 700;
}

.profile-menu-membership {
  display: none !important;
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.9rem;
}

.profile-menu-membership strong {
  color: var(--accent-strong);
}

.profile-menu-actions {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.profile-menu-item {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  background: rgba(18, 48, 71, 0.04);
  color: var(--color-text-primary);
  font-weight: 700;
  box-shadow: none;
}

.profile-menu-item:hover {
  background: rgba(18, 48, 71, 0.08);
  box-shadow: none;
  transform: none;
}

.profile-menu-item-signout {
  background: rgba(18, 48, 71, 0.04);
  color: var(--color-text-primary);
}

.profile-menu-item-signout:hover {
  background: rgba(18, 48, 71, 0.08);
}

.profile-menu-divider {
  width: 100%;
  margin: 6px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 22px rgba(18, 48, 71, 0.08);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 12px;
  z-index: 10;
}

.tab-btn {
  flex: 1 1 180px;
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tab-btn:hover {
  background: rgba(18, 48, 71, 0.08);
  color: var(--ink-strong);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--navy), #1c5a70);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 48, 71, 0.2);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 252, 0.88) 100%);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: var(--ink-strong);
}

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.spaced-row { margin-top: 14px; }

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.opponent-search-field {
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 6px;
  max-height: min(240px, 52vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(18, 48, 71, 0.12);
}

.search-dropdown-item {
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(18, 48, 71, 0.04);
  color: var(--ink-strong);
  text-align: left;
  font-weight: 600;
  box-shadow: none;
  touch-action: manipulation;
}

.search-dropdown-item:hover {
  background: rgba(73, 179, 125, 0.14);
  transform: none;
  box-shadow: none;
}

.search-dropdown-item.empty,
.search-dropdown-item.empty:hover {
  background: rgba(18, 48, 71, 0.03);
  color: var(--muted);
}

.multi-select-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.multi-select-label {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.chip-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-check {
  position: relative;
  display: inline-flex;
  width: auto;
  cursor: pointer;
}

.chip-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-check span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.chip-check:hover span {
  background: rgba(18, 48, 71, 0.05);
}

.chip-check input:checked + span {
  background: linear-gradient(135deg, var(--navy), #1f5f72);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(18, 48, 71, 0.16);
}

.chip-check input:focus-visible + span {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(73, 179, 125, 0.18);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface-strong);
  color: var(--ink-strong);
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(73, 179, 125, 0.65);
  box-shadow: 0 0 0 4px rgba(73, 179, 125, 0.18);
}

textarea { resize: vertical; min-height: 120px; }

button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  min-height: 44px;
  background: var(--navy);
  color: #ffffff;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18, 48, 71, 0.14);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.cta {
  width: 100%;
  padding: 14px 16px;
  font-weight: 700;
}

#saveAndAddAnotherBtn,
#saveSeasonGameBtn,
.open-report-btn {
  background: linear-gradient(135deg, #56c78f, #3aa96d);
  color: #10281d;
}

#saveAndAddAnotherBtn:hover,
#saveSeasonGameBtn:hover,
.open-report-btn:hover {
  background: linear-gradient(135deg, #61d79a, #39a76d);
}

.team-profile {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(73, 179, 125, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(18, 48, 71, 0.03), #ffffff 32%);
}

.team-selector-box {
  margin-bottom: 18px;
}

.selected-team-label {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(73, 179, 125, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(73, 179, 125, 0.12), rgba(18, 48, 71, 0.04));
  color: var(--ink-strong);
  font-size: 1.22rem;
  font-weight: 700;
}

.team-selector-box .season-manager-actions {
  margin-top: 12px;
}

.team-profile .season-manager-actions {
  margin-top: 18px;
}

.team-save-action {
  display: flex;
  align-items: end;
}

.team-save-action .cta {
  width: 100%;
}

.team-profile-header {
  margin-bottom: 14px;
}

.team-profile-header h3 {
  margin: 0 0 6px;
  color: var(--ink-strong);
  font-size: 1.05rem;
}

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

.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.slider-card {
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 249, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.thumb-slider {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  appearance: none;
  touch-action: pan-x;
}

.thumb-slider:focus {
  box-shadow: none;
}

.thumb-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(18, 48, 71, 0.16), rgba(73, 179, 125, 0.55));
}

.thumb-slider::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -7px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #2f8a63);
  box-shadow: 0 8px 18px rgba(18, 48, 71, 0.22);
}

.thumb-slider::-moz-range-track {
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(18, 48, 71, 0.16), rgba(73, 179, 125, 0.55));
}

.thumb-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #2f8a63);
  box-shadow: 0 8px 18px rgba(18, 48, 71, 0.22);
}

.slider-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 96px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #173626;
  font-size: 0.9rem;
}

.recorder {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.team-notes-actions {
  margin-top: 12px;
}

.team-notes-table-wrap {
  margin-top: 14px;
}

.team-notes-table-wrap td:last-child {
  white-space: pre-wrap;
}

.team-note-action {
  min-width: 88px;
}

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

.muted { margin-top: 0; }

.hidden { display: none !important; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-strong);
}

.season-table-actions {
  display: flex;
  justify-content: center;
  padding-top: 12px;
}

.season-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.mc-main {
  display: none;
}

.season-manager {
  display: grid;
  gap: 0.7rem;
  margin: 0.8rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(246, 249, 252, 0.92);
}

.season-manager-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(240px, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.season-manager-label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #304154;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.season-name-field input,
.season-manager-label select {
  width: 100%;
}

.season-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.season-manager-actions .cta {
  width: auto;
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.1;
}

.season-row-select {
  min-width: 150px;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-strong);
  font: inherit;
}

.report-share-menu {
  position: relative;
  display: inline-flex;
}

.report-share-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 170px;
  max-width: min(280px, calc(100vw - 32px));
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.report-share-option {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-strong);
  text-align: left;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
}

.report-share-option:hover {
  background: rgba(18, 48, 71, 0.08);
}

.season-table th,
.season-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.season-table th {
  background: var(--surface-tint);
  color: var(--ink-strong);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  box-shadow: none;
}

.table-sort-btn:hover,
.table-sort-btn:focus-visible {
  color: var(--navy);
  background: transparent;
  transform: none;
  box-shadow: none;
}

.sort-indicator {
  display: inline-block;
  min-width: 10px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1;
}

.sort-indicator.active {
  color: var(--navy);
}

.opponent-knowledge-gate {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.opponent-knowledge-question {
  margin: 0;
  color: var(--ink-strong);
  font-weight: 700;
}

.opponent-knowledge-actions {
  display: flex;
  gap: 10px;
}

.opponent-knowledge-btn {
  min-width: 88px;
  background: rgba(18, 48, 71, 0.06);
  color: var(--ink-strong);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.opponent-knowledge-btn:hover {
  background: rgba(73, 179, 125, 0.14);
  transform: none;
  box-shadow: none;
}

.opponent-knowledge-btn.is-active {
  background: linear-gradient(135deg, var(--navy), #1f5f72);
  color: #ffffff;
  border-color: transparent;
}

.opponent-knowledge-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

#opponentKnowledgeDetails {
  margin-top: 16px;
}

.reports-table .active-report-row td {
  background: rgba(73, 179, 125, 0.12);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

@media (min-width: 900px) {
  .dashboard-grid .metric-full-span {
    grid-column: 1 / -1;
  }
}

.report-context {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(18, 48, 71, 0.04), rgba(73, 179, 125, 0.08)),
    #ffffff;
}

.report-title {
  display: none;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.report-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.export-btn {
  width: auto;
  min-width: 260px;
}

.metric {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(112, 255, 142, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(32, 33, 36, 0.96), rgba(24, 25, 28, 0.98));
  box-shadow: 0 20px 40px rgba(2, 8, 10, 0.25);
}

.metric.metric-compact-empty {
  min-height: 180px;
  gap: 10px;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 233, 108, 0.12), transparent 68%);
  pointer-events: none;
}

.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.metric h3 {
  margin: 0;
  color: #f1f4f6;
  font-size: 1.35rem;
  font-weight: 700;
}

.metric-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.metric-stat strong {
  color: #b8f07a;
  font-size: 1.65rem;
  line-height: 1;
}

.metric-stat span {
  color: rgba(233, 237, 241, 0.6);
  font-size: 0.8rem;
}

.metric p {
  margin: 0;
  color: rgba(233, 237, 241, 0.78);
  line-height: 1.62;
  font-size: 0.95rem;
}

.metric-copy-block {
  display: grid;
  gap: 12px;
}

.key-insights-copy {
  gap: 10px;
}

.key-insights-copy p {
  margin: 0;
  color: rgba(233, 237, 241, 0.82);
  line-height: 1.58;
  font-size: 0.95rem;
}

.key-insights-copy strong {
  color: #f4f7f8;
}

.key-insights-copy .metric-trigger {
  color: #f4f7f8;
  text-decoration-color: rgba(184, 240, 122, 0.45);
}

.key-insights-copy .metric-trigger:hover {
  color: #d9f5ae;
}

.opponent-type-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.opponent-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.opponent-type-icon {
  font-size: 1rem;
  line-height: 1;
}

.opponent-type-text {
  color: #f4f7f8;
}

.type-grinder {
  background: linear-gradient(135deg, #6f7d8f, #445160);
}

.type-bully {
  background: linear-gradient(135deg, #f28f3b, #bd5f14);
}

.type-giant-killer {
  background: linear-gradient(135deg, #b85eff, #6f3cf0);
}

.type-wall {
  background: linear-gradient(135deg, #47b96f, #1f7d47);
}

.type-shootout {
  background: linear-gradient(135deg, #ff715b, #c53929);
}

.type-volatile {
  background: linear-gradient(135deg, #f9c74f, #d88700);
}

.type-consistent {
  background: linear-gradient(135deg, #5bc1ff, #2d7be9);
}

.type-underrated {
  background: linear-gradient(135deg, #2bc0a4, #0f8c74);
}

.projected-score-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.projected-score-header {
  color: rgba(244, 247, 248, 0.95);
}

.projected-score-grid {
  display: grid;
  gap: 10px;
}

.projected-score-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.projected-score-label {
  color: rgba(233, 237, 241, 0.62);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.projected-score-value {
  color: #f4f7f8;
  font-size: 1rem;
  font-weight: 700;
}

.projected-score-subgrid {
  display: grid;
  gap: 4px;
  color: rgba(233, 237, 241, 0.88);
}

.projected-score-block-compact {
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
}

.projected-score-block-compact .projected-score-grid {
  gap: 8px;
}

.projected-score-block-compact .projected-score-row {
  grid-template-columns: minmax(126px, 150px) minmax(0, 1fr);
  gap: 10px;
}

.projected-score-block-compact .projected-score-label {
  font-size: 0.72rem;
}

.projected-score-block-compact .projected-score-value {
  font-size: 0.94rem;
}

.projected-score-block-compact .projected-score-subgrid {
  gap: 2px;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .projected-score-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .projected-score-block-compact .projected-score-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.metric strong {
  color: #f4f7f8;
}

.momentum-label {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.momentum-hot {
  color: #fff5f3;
  background: linear-gradient(135deg, #ff6b57, #c9342c);
  border: 1px solid rgba(255, 141, 126, 0.34);
  text-shadow: 0 1px 0 rgba(106, 16, 7, 0.35);
}

.momentum-cold {
  color: #eaf5ff;
  background: linear-gradient(135deg, #5bc1ff, #2d7be9);
  border: 1px solid rgba(133, 202, 255, 0.3);
  text-shadow: 0 1px 0 rgba(12, 48, 105, 0.35);
}

.momentum-neutral {
  color: #f4f7f8;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-viz {
  position: relative;
  min-height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.viz-bubbles {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  align-items: center;
}

.viz-ranking-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.win-gauge-panel {
  display: flex;
  justify-content: center;
  padding-bottom: 4px;
}

.win-gauge-panel-inline {
  padding-top: 10px;
  padding-bottom: 2px;
}

.win-gauge {
  --gauge-fill: calc(var(--gauge-value) * 1%);
  width: 146px;
  height: 146px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(18, 48, 71, 0.96) 0 58%, transparent 59% 100%),
    conic-gradient(#7ee26d 0 var(--gauge-fill), rgba(255, 255, 255, 0.12) var(--gauge-fill) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.win-gauge-inner {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(180deg, rgba(18, 48, 71, 0.96), rgba(16, 39, 57, 0.98));
  text-align: center;
}

.win-gauge-inner strong {
  color: #f4f7f8;
  font-size: 1.55rem;
  line-height: 1;
}

.win-gauge-inner span {
  max-width: 78px;
  color: rgba(233, 237, 241, 0.74);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rank-bar-header,
.rank-bar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rank-bar-header span,
.rank-bar-footer span {
  color: rgba(233, 237, 241, 0.72);
  font-size: 0.83rem;
}

.rank-bar-header strong,
.rank-bar-footer strong {
  color: #f4f7f8;
  font-size: 0.88rem;
}

.rank-bar-subsection {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-bar-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.rank-bar-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rank-bar-label span {
  color: rgba(233, 237, 241, 0.68);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rank-bar-label strong {
  color: #f4f7f8;
  font-size: 1rem;
}

.rank-unranked-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #b8f07a;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(184, 240, 122, 0.7);
  text-underline-offset: 3px;
  cursor: pointer;
}

.rank-unranked-trigger:hover,
.rank-unranked-trigger:focus-visible {
  color: #dff6b3;
}

.rank-unranked-inline {
  color: #b8f07a;
  font-weight: 800;
}

.rank-bar-track {
  position: relative;
  overflow: hidden;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.rank-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.our-rank-fill {
  background: linear-gradient(90deg, #b8f07a, #63d47f);
}

.opponent-rank-fill {
  background: linear-gradient(90deg, #5bc1ff, #2d7be9);
}

@media (max-width: 640px) {
  .rank-bar-header,
  .rank-bar-footer,
  .rank-bar-row {
    grid-template-columns: 1fr;
  }

  .rank-bar-header,
  .rank-bar-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.viz-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.viz-bubble.large {
  grid-row: 1 / span 2;
  min-height: 110px;
  background: #b8f07a;
  color: #09110b;
  font-size: 1.3rem;
}

.viz-bubble.mid {
  min-height: 70px;
  background: #55c66d;
  color: #f5fff5;
  font-size: 1rem;
}

.viz-bubble.small {
  min-height: 52px;
  background: #25905f;
  color: #effff1;
  font-size: 0.9rem;
}

.viz-bubble.outline {
  min-height: 60px;
  border: 1px solid rgba(184, 240, 122, 0.7);
  color: #d9f5ae;
  background: transparent;
}

.viz-priority {
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(184, 240, 122, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.priority-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.priority-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(184, 240, 122, 0.14);
  color: #c7f48e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.priority-header strong {
  font-size: 1rem;
  line-height: 1.35;
}

.priority-header .metric-trigger {
  color: #f6fbff;
  text-decoration: none;
}

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

.priority-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.priority-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8f07a, #56ca68);
  color: #0b130d;
  font-weight: 800;
  font-size: 1rem;
}

.priority-item p {
  margin: 0;
  color: #eff4f7;
  line-height: 1.45;
  font-size: 0.96rem;
}

.viz-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 18px;
}

.viz-area span {
  flex: 1;
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, rgba(100, 231, 114, 0.9), rgba(52, 153, 100, 0.15));
  clip-path: polygon(0 100%, 0 58%, 18% 72%, 35% 30%, 52% 42%, 70% 18%, 100% 64%, 100% 100%);
}

.viz-area span:nth-child(1) { height: 43px; }
.viz-area span:nth-child(2) { height: 58px; }
.viz-area span:nth-child(3) { height: 38px; }
.viz-area span:nth-child(4) { height: 75px; }
.viz-area span:nth-child(5) { height: 50px; }
.viz-area span:nth-child(6) { height: 66px; }
.viz-area span:nth-child(7) { height: 46px; }

.viz-trend-up {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(184, 240, 122, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.trend-icon {
  width: 100%;
  max-width: 260px;
  height: auto;
  overflow: visible;
}

.trend-icon rect,
.trend-icon path {
  fill: #b8f07a;
  filter: drop-shadow(0 10px 18px rgba(184, 240, 122, 0.16));
}

.viz-tactics-board {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(184, 240, 122, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.tactics-icon {
  width: 100%;
  max-width: 280px;
  height: auto;
  overflow: visible;
}

.tactics-icon rect,
.tactics-icon line,
.tactics-icon circle,
.tactics-icon path {
  fill: none;
  stroke: #b8f07a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.tactics-icon polygon {
  fill: #b8f07a;
  stroke: none;
}

.viz-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.viz-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.viz-list-row span {
  color: rgba(233, 237, 241, 0.72);
  min-width: 0;
  padding-right: 4px;
}

.viz-list-row strong {
  color: #9deb70;
  white-space: nowrap;
}

.viz-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 16px 18px;
}

.viz-bars span {
  flex: 1;
  height: var(--bar);
  min-height: 24px;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, #b4f173, #2d9a60);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.viz-idea {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 12px;
  background:
    radial-gradient(circle at top right, rgba(184, 240, 122, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.idea-icon {
  width: 100%;
  max-width: 180px;
  height: auto;
  overflow: visible;
}

.idea-icon path:first-child {
  fill: #b8f07a;
  stroke: none;
  filter: drop-shadow(0 10px 18px rgba(184, 240, 122, 0.16));
}

.idea-icon path:not(:first-child) {
  fill: none;
  stroke: rgba(24, 25, 28, 0.42);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.viz-wave {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
}

.viz-wave span {
  height: 96px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 50%, rgba(184, 240, 122, 0.92) 0 2px, transparent 3px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(111, 241, 120, 0.26), transparent 60%);
  position: relative;
}

.viz-wave span::after {
  content: "";
  position: absolute;
  inset: 24px 10px;
  border-radius: 999px;
  border-top: 2px solid rgba(155, 235, 112, 0.85);
  border-bottom: 2px solid rgba(61, 170, 103, 0.6);
  transform: skewY(-8deg);
}

.metric .score-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 2px;
  padding: 3px 9px;
  border: 1px solid rgba(73, 179, 125, 0.35);
  border-radius: 999px;
  background: rgba(184, 240, 122, 0.12);
  color: #dff6b3;
  font-weight: 700;
}

.metric .score-chip .score-icon {
  font-size: 13px;
  line-height: 1;
}

.metric .metric-trigger {
  color: #f4f7f8;
  text-decoration: underline;
  text-decoration-color: rgba(184, 240, 122, 0.55);
  text-underline-offset: 3px;
}

.metric .metric-trigger:hover {
  color: #b8f07a;
}

.tendency-sections {
  display: grid;
  gap: 12px;
}

.tendency-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(252, 254, 255, 0.9);
  overflow: hidden;
}

.tendency-group summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--ink-strong);
  font-weight: 800;
  background: linear-gradient(180deg, rgba(18, 48, 71, 0.03), transparent);
}

.tendency-group-body { padding: 0 16px 16px; }

.tendency-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 10px 0 12px;
}

.tendency-item,
.confidence-btn {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-strong);
}

.tendency-item {
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}

.tendency-item:hover,
.confidence-btn:hover {
  background: rgba(18, 48, 71, 0.06);
}

.tendency-item.active,
.confidence-btn.active {
  background: linear-gradient(135deg, var(--navy), #1f5f72);
  border-color: transparent;
  color: #ffffff;
}

.confidence-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.subsection-box {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 48, 71, 0.04), transparent 32%),
    #ffffff;
}

.subsection-box h2 { margin-top: 0; }

.improvement-box {
  margin-top: 16px;
}

.assistant-box .muted + .muted {
  margin-top: 8px;
}

.assistant-chat-shell {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(73, 179, 125, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(18, 48, 71, 0.03), #ffffff 32%);
  overflow: hidden;
}

.assistant-chat-log {
  display: grid;
  gap: 12px;
  min-height: 24px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}

.assistant-chat-message {
  max-width: 720px;
  padding: 14px 16px;
  border-radius: 18px;
}

.assistant-chat-message.assistant {
  background: rgba(18, 48, 71, 0.06);
  color: var(--ink-strong);
}

.assistant-chat-message.user {
  background: rgba(73, 179, 125, 0.12);
  color: var(--ink-strong);
  justify-self: end;
  text-align: right;
}

.assistant-chat-message.assistant-loading {
  opacity: 0.55;
  font-style: italic;
}

.assistant-chat-message strong {
  display: block;
  margin-bottom: 6px;
}

.assistant-chat-message p {
  margin: 0;
  line-height: 1.5;
}

.assistant-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
}

.assistant-prompt {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(18, 48, 71, 0.04);
  color: var(--ink-strong);
  box-shadow: none;
  font-weight: 700;
}

.assistant-prompt:hover {
  background: rgba(73, 179, 125, 0.14);
  transform: none;
  box-shadow: none;
}

.assistant-chat-input {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

#evaluatePostGame {
  margin-top: 12px;
}

.improvement-trend-card {
  margin: 16px 0 18px;
}

.improvement-metric {
  min-height: auto;
}

.ranking-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.ranking-empty-state .muted {
  margin: 0;
}

.viz-ranking-lines {
  padding: 16px;
}

.ranking-panels {
  display: grid;
  gap: 16px;
}

.ranking-panels-grid {
  display: grid;
  gap: 16px;
}

.ranking-panel {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.ranking-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.ranking-panel-head h4 {
  margin: 0 0 4px;
  color: #eff4f7;
  font-size: 1rem;
}

.ranking-panel-head p {
  margin: 0;
  color: rgba(233, 237, 241, 0.66);
  font-size: 0.82rem;
}

.ranking-panel-stat {
  text-align: right;
}

.ranking-panel-stat strong {
  display: block;
  color: #eff4f7;
  font-size: 1.35rem;
  line-height: 1;
}

.ranking-panel-stat span {
  display: block;
  margin-top: 4px;
  color: rgba(233, 237, 241, 0.66);
  font-size: 0.8rem;
}

.ranking-chart-shell {
  position: relative;
}

.ranking-y-axis-title {
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
  color: rgba(233, 237, 241, 0.66);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.ranking-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: rgba(233, 237, 241, 0.76);
  font-size: 0.84rem;
  font-weight: 700;
}

.ranking-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.legend-swatch.state-line,
.ranking-line.state-line,
.ranking-point.state-line {
  color: #b8f07a;
  stroke: #b8f07a;
  fill: #b8f07a;
}

.legend-swatch.national-line,
.ranking-line.national-line,
.ranking-point.national-line {
  color: #69d2ff;
  stroke: #69d2ff;
  fill: #69d2ff;
}

.ranking-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ranking-grid-line {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.ranking-y-tick {
  fill: rgba(233, 237, 241, 0.68);
  font-size: 11px;
  font-weight: 700;
  text-anchor: end;
}

.ranking-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ranking-point {
  stroke: rgba(24, 25, 28, 0.96);
  stroke-width: 2;
}

.ranking-axis-labels {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  margin-top: 8px;
  color: rgba(233, 237, 241, 0.58);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ranking-panel-summary {
  margin: 10px 0 0;
  color: rgba(233, 237, 241, 0.82);
  font-size: 0.86rem;
}

@media (max-width: 760px) {
  .ranking-chart-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-panel-head {
    flex-direction: column;
  }

  .ranking-panel-stat {
    text-align: left;
  }

  .ranking-y-axis-title {
    left: -4px;
    font-size: 0.68rem;
  }

  .ranking-axis-labels {
    font-size: 0.62rem;
  }
}

.trend-list {
  margin: 0;
  padding-left: 18px;
  color: #375168;
}

.trend-list li {
  margin-bottom: 10px;
  line-height: 1.55;
}

.trend-list li:last-child {
  margin-bottom: 0;
}

.info-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(18, 48, 71, 0.06);
  color: var(--ink-strong);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  vertical-align: super;
}

.info-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 48, 71, 0.45);
  z-index: 999;
}

.info-modal.hidden { display: none !important; }

.info-modal-content {
  width: min(320px, 100%);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 50px rgba(18, 48, 71, 0.22);
}

.info-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.info-modal-header h3 {
  margin: 0;
  color: var(--ink-strong);
}

.info-modal-close {
  background: transparent;
  color: var(--ink-strong);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.info-modal p {
  margin: 0;
  color: #375168;
  line-height: 1.5;
  font-size: 14px;
}

.info-modal-body {
  color: #375168;
  font-size: 14px;
  line-height: 1.5;
}

.info-modal-body p {
  margin: 0 0 10px;
}

.info-modal-body p:last-child {
  margin-bottom: 0;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.secondary-btn {
  background: rgba(18, 48, 71, 0.08);
  color: var(--ink-strong);
}

.secondary-btn:hover {
  background: rgba(18, 48, 71, 0.14);
}

.auth-page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-page {
  width: min(100%, 520px);
}

.auth-card {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 32px;
  padding: 34px;
  background:
    linear-gradient(160deg, rgba(18, 48, 71, 0.97), rgba(24, 91, 95, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  box-shadow: var(--shadow-lg);
  color: #f7fbfd;
}

.auth-eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1rem;
  font-weight: 800;
  color: rgba(247, 251, 253, 0.9);
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.02;
}

.auth-copy {
  margin: 0 0 24px;
  color: rgba(247, 251, 253, 0.82);
  font-size: 1rem;
  line-height: 1.55;
}

.auth-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-primary-btn,
.auth-secondary-btn {
  min-height: 52px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
}

.auth-primary-btn {
  border: 0;
  background: linear-gradient(135deg, #49b37d, #6ecb97);
  color: #103326;
  cursor: pointer;
}

.auth-primary-btn:hover {
  filter: brightness(1.04);
}

.auth-secondary-btn {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbfd;
}

.auth-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.auth-status {
  margin: 0;
  color: rgba(247, 251, 253, 0.76);
  font-size: 0.95rem;
}

.agreement-card {
  display: grid;
  gap: 20px;
}

.agreement-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
    rgba(9, 28, 42, 0.24);
}

.agreement-title {
  margin: 0 0 14px;
  color: #f7fbfd;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .page { padding: 16px 12px 24px; }
  .hero {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    margin-bottom: 10px;
  }
  .hero-copy {
    flex: 1 1 auto;
    min-width: 0;
  }
  .hero h1 {
    white-space: normal;
    font-size: clamp(1.2rem, 5.2vw, 1.6rem);
    line-height: 1.1;
  }
  .hero p {
    font-size: 0.88rem;
    max-width: none;
  }
  .hero-meta {
    grid-template-columns: auto;
    min-width: 0;
    gap: 8px;
    margin-left: 0;
    flex-shrink: 0;
  }
  .hero-stat {
    padding: 11px 12px;
    border-radius: 14px;
  }
  .profile-menu-btn {
    gap: 8px;
    padding: 10px 12px;
  }
  .profile-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
  }
  .profile-menu-dropdown {
    width: min(360px, calc(100vw - 28px));
  }
  .tab-bar {
    top: 8px;
    border-radius: 999px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
    padding: 6px;
  }
  .tab-bar::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 13px;
    min-height: 0;
    width: auto;
  }
  .card { padding: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .season-manager-row { grid-template-columns: 1fr; }
  #mySeason .mc-main {
    display: block;
    padding: 10px 12px;
    border: none;
  }

  #mySeason .mc-desktop-date,
  #mySeason .mc-desktop-season,
  #mySeason .mc-desktop-opponent,
  #mySeason .mc-desktop-type,
  #mySeason .mc-desktop-location,
  #mySeason .mc-desktop-report,
  #mySeason .mc-desktop-share,
  #mySeason .mc-desktop-postgame,
  #mySeason .mc-desktop-edit,
  #mySeason .mc-desktop-delete {
    display: none;
  }

  #mySeason .season-table {
    min-width: 0;
  }

  #mySeason .season-table thead {
    display: none;
  }

  #mySeason .season-table tbody tr {
    display: block;
    background: var(--surface-strong, #fff);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    margin-bottom: 8px;
    overflow: hidden;
  }

  #mySeason .season-table td {
    border-bottom: none;
  }

  #mySeason .mc-top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  #mySeason .mc-info {
    min-width: 0;
    flex: 1;
  }

  #mySeason .mc-opponent {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-strong, #111);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #mySeason .mc-meta {
    font-size: 11px;
    color: var(--muted, #888);
    margin: 2px 0 0;
  }

  #mySeason .mc-actions {
    display: flex;
    gap: 5px;
  }

  #mySeason .mc-actions .mc-dots-btn {
    width: auto;
    min-height: 0;
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
  }

  #mySeason .mc-actions .mc-dots-btn {
    flex: 0 0 auto;
  }

  #mySeason .mc-open {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 8px 10px;
    min-height: 0;
    width: auto;
    background: linear-gradient(135deg, #56c78f, #3aa96d);
    color: #10281d;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
  }

  #mySeason .mc-dots-btn {
    background: var(--surface-strong, #f5f5f5);
    border: 1px solid rgba(18,48,71,0.15);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--muted, #888);
    cursor: pointer;
    min-height: 0;
    width: auto;
    box-shadow: none;
  }

  #mySeason .mc-menu {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(18,48,71,0.08);
  }

  #mySeason .mc-menu.hidden {
    display: none;
  }

  #mySeason .mc-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 6px;
  }

  #mySeason .mc-menu-btn {
    font-size: 11px;
    padding: 8px 6px;
    min-height: 0;
    width: auto;
  }

  #mySeason .mc-delete-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #A32D2D;
    font-size: 12px;
    cursor: pointer;
    padding: 6px;
    text-align: center;
    box-shadow: none;
    margin-bottom: 6px;
  }

  #mySeason .mc-delete-btn:hover {
    background: none;
    box-shadow: none;
    transform: none;
    color: #791F1F;
  }

  #mySeason .mc-season-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(18,48,71,0.08);
    margin-top: 6px;
  }

  #mySeason .mc-season-label {
    font-size: 11px;
    color: var(--muted, #888);
  }

  #mySeason .mc-season-row .season-row-select {
    flex: 1;
    min-width: 0;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 12px 10px 22px;
  }

  .hero,
  .card,
  .auth-card {
    padding: 12px;
    border-radius: 18px;
  }

  .hero {
    gap: 10px;
  }

  .hero h1 {
    font-size: clamp(1.1rem, 6vw, 1.4rem);
    line-height: 1.08;
  }

  .auth-card h1 {
    font-size: clamp(1.3rem, 7.2vw, 1.75rem);
    line-height: 1.08;
  }

  .hero p,
  .auth-copy,
  .muted,
  .metric p,
  .priority-item p,
  .viz-list-row span,
  .viz-list-row strong {
    font-size: 0.9rem;
  }

  .hero-stat-inline {
    white-space: normal;
  }

  .profile-menu-btn {
    gap: 8px;
    padding: 8px 10px;
  }

  .profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .profile-menu-dropdown {
    right: 0;
    left: auto;
  }

  .tab-bar {
    gap: 4px;
    padding: 5px;
    border-radius: 999px;
  }

  .tab-btn {
    padding: 7px 12px;
    font-size: 12px;
    min-height: 0;
    width: auto;
  }

  .cta,
  .open-report-btn,
  .auth-primary-btn,
  .auth-secondary-btn,
  .opponent-knowledge-btn,
  .report-share-option,
  .team-note-action,
  .season-row-select {
    width: 100%;
    min-height: 48px;
  }

  .grid.two,
  .grid.three,
  .team-profile-grid,
  .slider-grid,
  .action-row,
  .hero-meta {
    grid-template-columns: 1fr;
  }

  .selected-team-label {
    font-size: 1rem;
    line-height: 1.4;
  }

  .team-profile {
    padding: 14px;
  }

  .slider-card {
    padding: 14px;
  }

  .thumb-slider::-webkit-slider-runnable-track {
    height: 14px;
  }

  .thumb-slider::-webkit-slider-thumb {
    width: 30px;
    height: 30px;
    margin-top: -8px;
  }

  .thumb-slider::-moz-range-track {
    height: 14px;
  }

  .thumb-slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
  }

  .report-context {
    padding: 14px;
  }

  .report-meta {
    gap: 6px;
  }

  .report-chip {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .report-actions,
  .season-manager-actions,
  .opponent-knowledge-actions,
  .confirm-actions,
  .page-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .export-btn {
    width: 100%;
    min-width: 0;
  }

  #reportsLibrary .table-wrap,
  .team-notes-table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .reports-table,
  .team-notes-table-wrap .season-table {
    min-width: 0;
  }

  .reports-table thead,
  .team-notes-table-wrap thead {
    display: none;
  }

  .reports-table,
  .reports-table tbody,
  .reports-table tr,
  .reports-table td,
  .team-notes-table-wrap .season-table,
  .team-notes-table-wrap .season-table tbody,
  .team-notes-table-wrap .season-table tr,
  .team-notes-table-wrap .season-table td {
    display: block;
    width: 100%;
  }

  .reports-table tr,
  .team-notes-table-wrap .season-table tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(18, 48, 71, 0.08);
  }

  .reports-table td,
  .team-notes-table-wrap .season-table td {
    display: grid;
    grid-template-columns: minmax(96px, 120px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
  }

  .reports-table td:last-child,
  .team-notes-table-wrap .season-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .reports-table td::before,
  .team-notes-table-wrap .season-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .reports-table td > button,
  .team-notes-table-wrap .season-table td > button {
    width: 100%;
  }

  .reports-table .empty-table-row td,
  .team-notes-table-wrap .empty-table-row td {
    display: block;
    padding: 0;
    border: 0;
  }

  .reports-table .empty-table-row td::before,
  .team-notes-table-wrap .empty-table-row td::before {
    content: none;
  }

  .metric {
    min-height: 0;
    padding: 16px;
    border-radius: 22px;
  }

  .metric h3 {
    font-size: 1.1rem;
  }

  .viz-bubbles,
  .rank-bar-row {
    grid-template-columns: 1fr;
  }

  .viz-bubble.large {
    grid-row: auto;
    min-height: 82px;
  }

  .win-gauge {
    width: 124px;
    height: 124px;
  }

  .win-gauge-inner {
    width: 88px;
    height: 88px;
  }

  .info-modal {
    padding: 10px;
  }

  .info-modal-content {
    width: 100%;
    padding: 14px;
  }
}
.disclaimer-box {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid rgba(18, 48, 71, 0.12);
  border-radius: 12px;
  background: rgba(238, 244, 247, 0.5);
}

.disclaimer-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: #dcebf6;
  cursor: pointer;
}

.disclaimer-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #123047;
}

.disclaimer-label a {
  color: #9fe5bd;
  font-weight: 600;
  text-decoration: underline;
}

.agreement-checkbox {
  font-size: 0.95rem;
  line-height: 1.7;
}

.agreement-checkbox input[type="checkbox"] {
  margin-top: 4px;
}
