:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080b0f;
  color: #edf3fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #080b0f url("ti-arcane-background.jpg") center top / cover fixed no-repeat;
}

.privacy-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.privacy-back {
  color: #aebdd0;
  text-decoration: none;
}

.privacy-back:hover,
.privacy-back:focus-visible { color: #ffffff; }

.privacy-kicker {
  margin: 56px 0 8px;
  color: #ef6258;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 58px);
  letter-spacing: 0;
}

.privacy-lead {
  margin: 18px 0 42px;
  color: #bac6d6;
  font-size: 18px;
  line-height: 1.65;
}

section {
  padding: 24px 0;
  border-top: 1px solid rgba(177, 192, 211, 0.18);
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: 0;
}

section p {
  margin: 0;
  color: #aeb9c8;
  line-height: 1.7;
}

html[data-app-mode="public"] {
  background: #0c0b08;
}

body.public-mode {
  --ux-bg: #0c0b08;
  --ux-panel: #15130e;
  --ux-panel-raised: #1d1a12;
  --ux-panel-soft: #100f0b;
  --ux-border: #3d3523;
  --ux-border-strong: #625333;
  --ux-text: #f7f0dc;
  --ux-muted: #b8aa84;
  --ux-subtle: #8e8265;
  --ux-accent: #d5aa45;
  --ux-accent-hover: #f0cb70;
  --ux-success: #75c69b;
  --ux-warning: #e1b955;
  --ux-danger: #e26b58;
  color: var(--ux-text);
  background-color: #0c0b08;
  background-blend-mode: multiply;
}

body.public-mode :focus-visible {
  outline-color: #f0cb70;
}

body.public-mode .topbar {
  border-bottom-color: #4b3e25;
  background: rgba(12, 11, 8, 0.96);
}

body.public-mode .topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-self: end;
}

body.public-mode .project-telegram {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  color: #d9ca9f;
  border-bottom: 1px solid transparent;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

body.public-mode .project-telegram img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

body.public-mode .project-telegram:hover,
body.public-mode .project-telegram:focus-visible {
  color: #f0cb70;
  border-bottom-color: #d5aa45;
}

body.public-mode #connectionBadge {
  display: none !important;
}

body.public-mode .developer-support {
  position: relative;
}

body.public-mode .developer-support summary {
  padding: 10px 0;
  color: #d9ca9f;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  list-style: none;
  white-space: nowrap;
}

body.public-mode .developer-support summary::-webkit-details-marker {
  display: none;
}

body.public-mode .developer-support summary:hover,
body.public-mode .developer-support[open] summary {
  color: #f0cb70;
  border-bottom-color: #d5aa45;
}

body.public-mode .developer-support-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid #5a4b2d;
  border-radius: 6px;
  background: #15130e;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .48);
}

body.public-mode .developer-support-menu span {
  display: block;
  padding: 7px 9px 9px;
  color: #8e8265;
  font-size: 9px;
  text-transform: uppercase;
}

body.public-mode .developer-support-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 9px;
  color: #fff0c7;
  border-radius: 4px;
  background: #211d13;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
}

body.public-mode .developer-support-menu a img {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

body.public-mode .developer-support-menu a span {
  padding: 0;
  color: inherit;
  font-size: inherit;
  text-transform: none;
}

body.public-mode .developer-support-menu a + a { margin-top: 6px; }

body.public-mode .developer-support-menu a:hover,
body.public-mode .developer-support-menu a:focus-visible {
  color: #100d07;
  background: #d5aa45;
}

body.public-mode .brand strong,
body.public-mode .page-intro h1,
body.public-mode .compact-intro h1,
body.public-mode .profile-section h2,
body.public-mode .chart-heading h2 {
  color: #fff5d7;
}

body.public-mode .brand small,
body.public-mode .eyebrow,
body.public-mode .points-cell,
body.public-mode .match-fantasy-points,
body.public-mode .fantasy-total strong {
  color: #deb858;
}

body.public-mode .main-nav {
  border-color: #3d3523;
  background: #12100b;
}

body.public-mode .main-nav a {
  color: #ab9d79;
}

body.public-mode .main-nav a:hover,
body.public-mode .main-nav a.active {
  color: #fff3cf;
  background: #282113;
}

body.public-mode .main-nav a.active::after {
  background: #d5aa45;
}

body.public-mode .connection {
  border-color: #574a2d;
  color: #d9ca9f;
  background: #17140d;
}

body.public-mode .primary-button,
body.public-mode .players-table-toggle strong {
  border-color: #e3bd5e;
  color: #171208;
  background: #d5aa45;
}

body.public-mode .primary-button:hover {
  color: #0c0b08;
  background: #f0cb70;
}

body.public-mode .ghost-button,
body.public-mode .back-button,
body.public-mode .dialog-back,
body.public-mode .players-table-toggle {
  border-color: #5a4b2d;
  color: #e5d8b4;
  background: #17140e;
}

body.public-mode .ghost-button:hover,
body.public-mode .back-button:hover,
body.public-mode .dialog-back:hover,
body.public-mode .players-table-toggle:hover {
  border-color: #d5aa45;
  color: #fff4d3;
  background: #242015;
}

body.public-mode .team-card,
body.public-mode .player-card,
body.public-mode .match-card,
body.public-mode .selection-panel,
body.public-mode .rating-guide details,
body.public-mode .profile-section,
body.public-mode .team-series,
body.public-mode .player-series-card,
body.public-mode .dialog-shell,
body.public-mode .live-schedule-card {
  border-color: #3d3523;
  background: #15130e;
}

body.public-mode .team-card:hover,
body.public-mode .player-card:hover,
body.public-mode .match-card:hover,
body.public-mode .team-series-head:hover,
body.public-mode .player-series-head:hover {
  border-color: #79663b;
  background: #1d1a12;
}

body.public-mode .public-tournament-filter,
body.public-mode .players-toolbar {
  border-color: #4b4027;
  background: rgba(21, 19, 14, 0.96);
}

body.public-mode .players-toolbar input,
body.public-mode .players-toolbar select {
  border-color: #5d5032;
  color: #f7f0dc;
  background: #0f0e0a;
}

body.public-mode .league-toggle,
body.public-mode .global-league-toggle {
  border-color: #463c26;
  color: #b8aa84;
  background: #12100c;
}

body.public-mode .league-toggle:has(input:checked),
body.public-mode .global-league-toggle:has(input:checked) {
  border-color: #a7873f;
  color: #fff0c7;
  background: #272114;
}

body.public-mode .rating-guide {
  display: grid;
  gap: 8px;
}

body.public-mode .rating-guide details[open] {
  border-color: #756137;
}

body.public-mode .rating-guide-icon {
  border-color: #7d6839;
  color: #f0c966;
  background: #201b11;
}

body.public-mode .scoring-formula-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #3d3523;
  border-radius: 6px;
  background: #3d3523;
}

body.public-mode .scoring-formula-grid > span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  align-content: center;
  padding: 10px 12px;
  color: #c2b691;
  background: #100f0b;
  font-size: 11px;
}

body.public-mode .scoring-formula-grid b {
  color: #f2dfaa;
  font-size: 10px;
  text-transform: uppercase;
}

body.public-mode .players-table {
  border-color: #463c26;
  background: #12100c;
}

body.public-mode .players-table th,
body.public-mode .players-table th:first-child,
body.public-mode .players-table th:nth-child(2) {
  border-color: #3d3523;
  color: #b8aa84;
  background: #0e0d09;
}

body.public-mode .players-table td,
body.public-mode .players-table td:first-child,
body.public-mode .players-table td:nth-child(2) {
  border-color: #332d1f;
  background: #15130e;
}

body.public-mode .players-table tbody tr:hover td {
  background: #211d13;
}

body.public-mode .players-table th:first-child {
  background: #0e0d09;
}

body.public-mode .players-table td:first-child {
  background: #15130e;
}

body.public-mode .players-table tbody tr:hover td:first-child {
  background: #211d13;
}

body.public-mode .fantasy-role-row {
  cursor: default;
}

body.public-mode .fantasy-role-cell {
  min-width: 360px;
}

body.public-mode .fantasy-role-rank {
  color: #8e8265;
}

body.public-mode .fantasy-team-mark {
  border-right-color: #4b4027;
}

body.public-mode .fantasy-role-members {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.public-mode .fantasy-role-member {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 0;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body.public-mode .fantasy-role-member:hover {
  color: #f0cb70;
  background: #2a2416;
}

body.public-mode .fantasy-role-member .ranking-avatar,
body.public-mode .fantasy-role-member .player-avatar-placeholder {
  width: 36px;
  height: 42px;
  border-color: #5b4c2d;
  border-radius: 4px;
}

body.public-mode .fantasy-role-member span {
  display: grid;
  min-width: 0;
}

body.public-mode .fantasy-role-member strong,
body.public-mode .fantasy-role-member small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.public-mode .fantasy-role-member strong {
  color: #f7f0dc;
  font-size: 11px;
}

body.public-mode .fantasy-role-member small {
  color: #8e8265;
  font-size: 9px;
}

body.public-mode .role-name-badge {
  min-width: 56px;
  border-color: #755f30;
  color: #f0ca68;
  background: #211b10;
}

body.public-mode .stage-points-cell {
  color: #ffd976;
  font-weight: 800;
}

body.public-mode .roster-role-card {
  border-color: #4b4027;
  border-top-color: #d5aa45;
  background: #15130e;
}

body.public-mode .roster-role-player {
  background: #12100c;
}

body.public-mode .roster-role-player:hover,
body.public-mode .roster-role-player:focus-visible {
  background: #211d13;
}

body.public-mode .roster-role-summary > span {
  background: #100f0b;
}

body.public-mode .ranking-team img,
body.public-mode .series-opponent-logo,
body.public-mode .hero-logo {
  background: transparent;
}

.archive-notice {
  display: none;
}

body.public-mode .archive-notice {
  width: min(1380px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 13px 16px;
  border: 1px solid #705a2b;
  border-left: 3px solid #d5aa45;
  background: #17140d;
  color: #b9ad8e;
  display: flex;
  align-items: center;
  gap: 10px 18px;
  line-height: 1.45;
}

body.public-mode .archive-notice strong {
  flex: 0 0 auto;
  color: #f0ca68;
  font-size: 14px;
}

body.public-mode .archive-notice span {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 13px;
}

body.public-mode .archive-notice a {
  flex: 0 0 auto;
  color: #e3c36f;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body.public-mode .public-footer {
  border-top-color: #3d3523;
  color: #8e8265;
  align-items: flex-start;
}

body.public-mode .public-footer-copy {
  display: grid;
  max-width: 760px;
  gap: 5px;
  line-height: 1.45;
}

body.public-mode .public-footer-copy strong {
  color: #d9ca9f;
  font-size: 13px;
  font-weight: 750;
}

body.public-mode .public-footer-copy span {
  color: #8e8265;
  font-size: 12px;
}

body.public-mode .public-footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 16px;
}

body.public-mode .public-footer-links a {
  white-space: nowrap;
}

.legal-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.legal-page h1 {
  max-width: 900px;
}

.legal-page section {
  padding: 26px 0;
}

.legal-contact {
  display: inline-flex;
  margin-top: 14px;
  color: #f0cb70;
  font-weight: 750;
  text-decoration: none;
}

.legal-contact:hover,
.legal-contact:focus-visible {
  color: #ffffff;
}

.legal-steps {
  margin: 14px 0 0;
  padding-left: 22px;
  color: #aeb9c8;
  line-height: 1.65;
}

.asset-registry-scroll {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid rgba(213, 170, 69, 0.24);
  border-radius: 6px;
}

.asset-registry {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: rgba(12, 11, 8, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

.asset-registry th,
.asset-registry td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(177, 192, 211, 0.13);
  text-align: left;
  vertical-align: top;
}

.asset-registry th {
  color: #f0cb70;
  background: rgba(213, 170, 69, 0.08);
  font-size: 12px;
}

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

.asset-registry code {
  color: #e8ddbf;
  font-size: 12px;
}

.asset-registry a,
.legal-page section a {
  color: #d5aa45;
}

.legal-note {
  margin-top: 16px;
  color: #8e8265;
  font-size: 12px;
  line-height: 1.6;
}

/* Public statistics must remain readable without browser zoom. */
body.public-mode main small {
  font-size: 11px;
  line-height: 1.35;
}

body.public-mode .brand small,
body.public-mode .developer-support-menu span {
  font-size: 11px;
}

body.public-mode main .eyebrow,
body.public-mode .favorite-hero strong,
body.public-mode .favorite-hero span {
  font-size: 12px;
  line-height: 1.25;
}

body.public-mode .profile-team-link {
  font-size: 12px;
}

body.public-mode .profile-stat-strip span {
  min-height: 66px;
}

body.public-mode .profile-stat-strip small {
  overflow: visible;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

body.public-mode .tournament-filter-copy > strong,
body.public-mode .profile-emblem-grid strong {
  font-size: 13px;
}

body.public-mode .tournament-filter-copy small,
body.public-mode .profile-emblem-grid small,
body.public-mode .fantasy-role-member small {
  font-size: 11px;
  line-height: 1.3;
}

body.public-mode .profile-title-advice,
body.public-mode .profile-emblem-recommendations > a {
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  body.public-mode .scoring-formula-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.public-mode .topbar-actions {
    gap: 10px;
    max-width: 184px;
  }

  body.public-mode .project-telegram {
    padding: 8px 2px;
  }

  body.public-mode .project-telegram img {
    width: 23px;
    height: 23px;
  }

  body.public-mode .project-telegram span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.public-mode .developer-support summary {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
  }

  body.public-mode .developer-support-menu {
    width: min(220px, calc(100vw - 24px));
  }

  body.public-mode .players-table th:first-child,
  body.public-mode .players-table td:first-child,
  body.public-mode .fantasy-role-cell {
    min-width: 250px;
  }

  body.public-mode .fantasy-role-members {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }

  body.public-mode .fantasy-role-member {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 2px;
  }

  body.public-mode .fantasy-role-member .ranking-avatar,
  body.public-mode .fantasy-role-member .player-avatar-placeholder {
    width: 30px;
    height: 34px;
  }

  body.public-mode .scoring-formula-grid {
    grid-template-columns: 1fr;
  }

  body.public-mode .public-footer-links {
    justify-content: flex-start;
  }

  body.public-mode .archive-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .legal-page {
    padding-top: 32px;
  }
}
