/* United Portal — shared design system for profile.* and pvp.* sites.
   Tokens match the registration landing (styles.css) so the whole
   ecosystem reads as one product. */

:root {
  color-scheme: dark;
  --ink: #080b0f;
  --surface: #10151b;
  --surface-raised: #171e26;
  --surface-hover: #1d2630;
  --line: #2a343e;
  --line-soft: #212a33;
  --text: #f2f5f7;
  --muted: #9eaab4;
  --muted-dim: #6d7883;
  --accent: #ff8a32;
  --accent-bright: #ffad62;
  --accent-ink: #1a0f04;
  --success: #5fe09a;
  --danger: #ff6b6b;
  --focus: #8bd8ff;
  --gold: #ffd166;
  --silver: #cdd6df;
  --bronze: #d29a6b;
  --platinum: #9fe8e0;
  --diamond: #8bd8ff;
  --elite: #ff8adf;
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  background: var(--ink);
  color: var(--text);
}

* { box-sizing: border-box; }
/* Long translated labels (German, Arabic, CJK) must stay inside cards. */
button, input, select, textarea { max-width: 100%; }
h1, h2, h3, h4, p, label, .panel-sub, .hero-meta, .stat .label { overflow-wrap: anywhere; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 138, 50, .07), transparent 60%),
    radial-gradient(900px 420px at 0% 0%, rgba(139, 216, 255, .05), transparent 55%),
    var(--ink);
}

a { color: var(--accent-bright); -webkit-tap-highlight-color: transparent; }
a:hover { color: var(--text); }

::selection { background: rgba(255, 138, 50, .35); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------- top navigation ---------------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 58px;
  padding: 0 22px;
  background: rgba(8, 11, 15, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.topnav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .14em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.topnav .brand img { width: 26px; height: 26px; display: block; }

.topnav .site-tag {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topnav nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.topnav nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.topnav nav a:hover { color: var(--text); background: var(--surface-raised); }

.topnav nav a.active {
  color: var(--accent-bright);
  background: rgba(255, 138, 50, .12);
}

.topnav .session {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.account-menu { position: relative; }
.account-summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; }
.account-summary::-webkit-details-marker { display:none; }
.account-summary .who { max-width:180px; }
.account-chevron { color:var(--muted); font-size:1rem; transition:transform .15s ease; }
.account-menu[open] .account-chevron { transform:rotate(180deg); }
.account-popover { position:absolute; top:calc(100% + 10px); right:0; z-index:60; display:grid; min-width:190px; gap:10px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--surface); box-shadow:0 16px 40px rgba(0,0,0,.42); }
.account-role { color:var(--muted); font-size:.78rem; }
.account-popover .portal-language { width:100%; }
.account-language-slot { min-width:0; }

.topnav .session .who {
  color: var(--muted);
  font-size: .8rem;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav .session .who b { color: var(--text); font-weight: 700; }

.portal-language {
  flex: none;
  min-width: 42px;
  max-width: 118px;
  padding: 6px 24px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface);
  font: inherit;
  font-size: .75rem;
}
.portal-language:focus { color: var(--text); }
html[dir="rtl"] .topnav { direction: rtl; }
html[dir="rtl"] .topnav nav { direction: rtl; }
html[dir="rtl"] .topnav .session { direction: rtl; }
html[dir="rtl"] .page-head,
html[dir="rtl"] .profile-hero,
html[dir="rtl"] .team-hero,
html[dir="rtl"] .tournament-hero { direction: rtl; }

/* ---------------- layout ---------------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 80px;
}

.page-narrow { max-width: 760px; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: 1.65rem;
  letter-spacing: .01em;
}

.page-head .sub { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------------- profile / team / tournament heroes ---------------- */

.profile-hero,
.team-hero,
.tournament-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  min-height: 214px;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background:
    radial-gradient(520px 220px at 88% 0%, rgba(255, 138, 50, .2), transparent 68%),
    linear-gradient(135deg, rgba(255, 138, 50, .08), rgba(139, 216, 255, .04) 55%, var(--surface) 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

.profile-hero::after,
.team-hero::after,
.tournament-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  bottom: -150px;
  border: 1px solid rgba(255, 173, 98, .25);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 173, 98, .04), 0 0 0 48px rgba(255, 173, 98, .025);
  pointer-events: none;
}

/* If the player has selected an in-game profile background, reuse its
   extracted artwork as a quiet atmospheric layer. The blur and dark veil
   keep the name, avatar and metrics legible while the normal hero gradient
   remains the fallback when no selection is available. */
.profile-hero-modern.has-game-background::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(7, 10, 14, .92) 0%, rgba(7, 10, 14, .68) 48%, rgba(7, 10, 14, .82) 100%),
    var(--profile-game-background);
  background-position: center;
  background-size: cover;
  filter: blur(12px);
  opacity: .7;
  transform: scale(1.04);
  pointer-events: none;
}

.hero-identity { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; min-width: 0; }
.hero-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(255, 173, 98, .65);
  border-radius: 20px;
  color: var(--accent-bright);
  background: rgba(255, 138, 50, .13);
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: .04em;
  box-shadow: 0 0 30px rgba(255, 138, 50, .14);
}
.hero-kicker { margin: 0 0 7px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero-title { max-width: 100%; margin: 0; color: var(--text); font-size: clamp(1.7rem, 3vw, 2.65rem); letter-spacing: -.045em; line-height: 1.05; overflow-wrap: anywhere; }
.hero-meta { max-width: 100%; margin: 9px 0 0; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.hero-meta a { color: var(--text); font-weight: 700; }
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.roster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.roster-card { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-raised); }
.roster-card .mini-avatar { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 11px; color: var(--accent-bright); background: rgba(255, 138, 50, .13); font-size: .75rem; font-weight: 850; }
.roster-card .roster-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 700; text-decoration: none; }
.roster-card .roster-role { margin-top: 3px; color: var(--muted); font-size: .72rem; }

.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 9px; min-width: min(390px, 42%); }
.hero-stat { padding: 12px 13px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 11px; background: rgba(8, 11, 15, .34); }
.hero-stat .label { color: var(--muted); font-size: .64rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.hero-stat .value { margin-top: 5px; color: var(--text); font-size: 1.15rem; font-weight: 800; }

.bracket-featured { margin-bottom: 22px; border-color: rgba(255, 138, 50, .3); background: linear-gradient(135deg, rgba(255, 138, 50, .1), var(--surface) 45%); }
.bracket-featured h2 { display: flex; align-items: center; gap: 10px; }
.bracket-featured h2::after { content: "LIVE VIEW"; padding: 3px 7px; border: 1px solid rgba(95, 224, 154, .4); border-radius: 999px; color: var(--success); font-size: .58rem; letter-spacing: .12em; }
.podium { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.2fr) minmax(0, .86fr); align-items: end; gap: 12px; margin-top: 16px; }
.podium-card { min-height: 132px; padding: 18px 14px 16px; border: 1px solid var(--line); border-radius: 13px 13px 10px 10px; text-align: center; background: var(--surface-raised); }
.podium-card.champion { min-height: 176px; border-color: rgba(255, 209, 102, .6); background: linear-gradient(180deg, rgba(255, 209, 102, .17), var(--surface-raised)); box-shadow: 0 14px 35px rgba(255, 209, 102, .1); }
.podium-card.finalist { border-color: rgba(139, 216, 255, .42); background: linear-gradient(180deg, rgba(139, 216, 255, .1), var(--surface-raised)); }
.podium-place { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.podium-card.champion .podium-place { color: var(--gold); }
.podium-team { display: block; margin-top: 12px; color: var(--text); font-size: 1.05rem; font-weight: 800; text-decoration: none; }
.podium-team:hover { color: var(--accent-bright); }
.podium-tag { margin-top: 4px; color: var(--muted); font-family: Consolas, monospace; font-size: .76rem; }
.podium-score { margin-top: 13px; color: var(--text); font-size: 1.35rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.podium.two-up { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 760px; }
.podium-fourth { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 13px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--muted); background: var(--surface-raised); font-size: .78rem; }
.podium-fourth > span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.podium-fourth .podium-team { display: inline-block; margin: 0; font-size: .86rem; }
.podium-fourth em { margin-left: auto; color: var(--muted); font-size: .72rem; font-style: normal; }
.reward-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.reward-plan-card { padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-raised); }
.reward-plan-card .reward-kind { color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reward-plan-card .reward-label { margin-top: 6px; color: var(--text); font-weight: 750; }
.reward-plan-card .reward-place { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.reward-plan-card .reward-details { margin-top: 8px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.reward-plan-card .reward-remove { margin-top: 10px; }
.reward-editor { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.custom-reward-hint { margin: 8px 0 14px; padding: 9px 12px; border-left: 2px solid var(--accent); color: var(--muted); background: rgba(255, 138, 50, .06); font-size: .78rem; }
.catalog-picker { margin: 12px 0 16px; }
.catalog-picker > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.catalog-search-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.catalog-search-row .input { max-width: 340px; }
.catalog-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; margin-top: 10px; max-height: 330px; overflow-y: auto; }
.catalog-item-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--text); background: var(--surface-raised); font: inherit; text-align: left; cursor: pointer; }
.catalog-item-card:hover, .catalog-item-card.selected { border-color: rgba(255, 138, 50, .55); background: rgba(255, 138, 50, .1); }
.catalog-item-visual { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border: 1px solid rgba(139, 216, 255, .3); border-radius: 9px; color: var(--focus); background: rgba(139, 216, 255, .1); font-weight: 850; }
.catalog-item-visual.icon-weapon { color: var(--accent-bright); border-color: rgba(255, 138, 50, .35); background: rgba(255, 138, 50, .1); }
.catalog-item-visual.icon-function { color: var(--gold); border-color: rgba(255, 209, 102, .35); background: rgba(255, 209, 102, .1); }
.catalog-item-copy { min-width: 0; flex: 1; }
.catalog-item-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.catalog-item-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.catalog-item-action { color: var(--accent-bright); font-size: .7rem; font-weight: 750; white-space: nowrap; }
.catalog-selected { margin-top: 10px; padding: 10px; border: 1px solid rgba(95, 224, 154, .35); border-radius: 10px; background: rgba(95, 224, 154, .06); }
.selected-item-heading { margin-bottom: 7px; color: var(--success); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.catalog-selected .catalog-item-card { border: none; padding: 0; background: transparent; cursor: default; }
.team-search-results { display: grid; gap: 8px; margin-top: 10px; }
.team-result-card { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-raised); }
.team-result-mark { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border: 1px solid rgba(255, 173, 98, .5); border-radius: 11px; color: var(--accent-bright); background: rgba(255, 138, 50, .12); font-size: .72rem; font-weight: 850; }
.team-result-copy { min-width: 0; flex: 1; }
.team-result-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.team-result-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.empty.compact { padding: 14px; font-size: .78rem; }

@media (max-width: 720px) {
  .profile-hero, .team-hero, .tournament-hero { align-items: flex-start; flex-direction: column; min-height: 0; padding: 22px; }
  .hero-stats { width: 100%; min-width: 0; }
  .hero-actions { justify-content: flex-start; }
  .podium { grid-template-columns: 1fr; align-items: stretch; }
  .podium.two-up { grid-template-columns: 1fr; max-width: none; }
  .podium-card.champion { min-height: 150px; }
  .podium-fourth { align-items: flex-start; flex-wrap: wrap; }
  .podium-fourth em { width: 100%; margin-left: 0; }
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 18px;
}

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

@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .topnav { flex-wrap: wrap; padding: 8px 14px; row-gap: 6px; }
  .topnav nav { order: 3; width: 100%; }
  .topnav .site-tag { display: none; }
  .topnav .session .who { display: none; }
  .topnav .session .account-summary .who { display: block; max-width: 120px; }
  .account-popover { right: -4px; min-width: 180px; }
  .portal-language { width: 44px; min-width: 44px; padding-left: 4px; padding-right: 4px; }
}

/* ---------------- panels ---------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 20px;
  min-width: 0;
}

.panel + .panel { margin-top: 18px; }

.panel h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.panel .panel-sub { margin: 0 0 16px; color: var(--muted); font-size: .82rem; }

.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-toolbar .spacer { flex: 1; }

/* ---------------- stat cards ---------------- */

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

.stat {
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px 16px;
}

.stat .label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.stat .value {
  margin-top: 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}

.stat .value small { font-size: .8rem; color: var(--muted); font-weight: 600; }

.stat.hero-stat .value { color: var(--accent-bright); }

/* ---------------- tables ---------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 12px; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

table.data th {
  padding: 11px 14px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

table.data tr:last-child td { border-bottom: none; }

table.data tbody tr:hover td { background: rgba(255, 255, 255, .02); }

table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

table.data .rank-cell {
  width: 52px;
  color: var(--muted);
  font-weight: 700;
}

table.data .rank-cell.top { color: var(--accent-bright); }

.row-link { color: var(--text); font-weight: 600; text-decoration: none; }
.row-link:hover { color: var(--accent-bright); }

.mono { color: var(--muted-dim); font-size: .8rem; font-family: Consolas, monospace; }

/* ---------------- tabs ---------------- */

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.tabs button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.tabs button:hover { color: var(--text); background: var(--surface-hover); }

.tabs button.active {
  color: var(--accent-ink);
  background: var(--accent);
}

/* ---------------- buttons ---------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-size: .87rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}

.button:hover { background: var(--surface-hover); border-color: var(--muted-dim); }

.button:disabled { opacity: .45; cursor: not-allowed; }

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }

.button.danger {
  background: transparent;
  border-color: rgba(255, 107, 107, .5);
  color: var(--danger);
}

.button.danger:hover { background: rgba(255, 107, 107, .12); border-color: var(--danger); }

.button.small { padding: 6px 12px; font-size: .78rem; border-radius: 8px; }

.button.ghost { background: transparent; }

/* ---------------- badges ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.accent { color: var(--accent-bright); border-color: rgba(255, 138, 50, .45); background: rgba(255, 138, 50, .1); }
.badge.success { color: var(--success); border-color: rgba(95, 224, 154, .45); background: rgba(95, 224, 154, .08); }
.badge.danger { color: var(--danger); border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .08); }
.badge.info { color: var(--focus); border-color: rgba(139, 216, 255, .45); background: rgba(139, 216, 255, .08); }

/* ---------------- medals ---------------- */

.medal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
}

.medal svg { width: 20px; height: 20px; flex: none; }

.medal.m1 { color: var(--bronze); }
.medal.m2 { color: var(--silver); }
.medal.m3 { color: var(--gold); }
.medal.m4 { color: var(--platinum); }
.medal.m5 { color: var(--diamond); }
.medal.m6 { color: var(--elite); }

.medal .medal-sub { color: var(--muted); font-weight: 600; font-size: .74rem; }
.medal-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; color: var(--muted-dim); font-size: .72rem; }
.medal-legend span { padding: 4px 8px; border: 1px solid var(--line-soft); border-radius: 999px; }

/* ---------------- forms ---------------- */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  color: var(--text);
  font: inherit;
  font-size: .92rem;
}

.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 50, .18); }

.input::placeholder { color: var(--muted-dim); }

textarea.input { min-height: 90px; resize: vertical; }

.rich-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px; border-bottom: 1px solid var(--line-soft); background: var(--surface-raised); }
.rich-toolbar button { min-width: 32px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; }
.rich-toolbar button:hover { border-color: var(--line); color: var(--text); background: var(--surface-hover); }
.rich-content { min-height: 180px; padding: 13px 14px; color: var(--text); font-size: .92rem; line-height: 1.55; outline: none; }
.rich-content:focus { box-shadow: inset 0 0 0 2px rgba(255, 138, 50, .25); }
.rich-content:empty::before { content: attr(data-placeholder); color: var(--muted-dim); pointer-events: none; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 12px 0 6px; }
.rich-content p { margin: 0 0 8px; }
.rich-content ul, .rich-content ol { margin: 6px 0 10px 22px; }
.rich-content blockquote { margin: 8px 0; border-left: 3px solid var(--accent); padding-left: 12px; color: var(--muted); }
.rich-content a { color: var(--accent-bright); }
.regulations-content { line-height: 1.65; }
.regulations-content h2, .regulations-content h3, .regulations-content h4 { margin: 18px 0 8px; }
.regulations-content p { margin: 0 0 10px; }
.regulations-content ul, .regulations-content ol { margin: 8px 0 12px 24px; }
.regulations-content blockquote { margin: 10px 0; border-left: 3px solid var(--accent); padding-left: 14px; color: var(--muted); }

select.input option { background: var(--surface); color: var(--text); }

.form-hint { margin: 6px 0 0; color: var(--muted-dim); font-size: .78rem; }

.form-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 107, 107, .4);
  border-radius: 10px;
  background: rgba(255, 107, 107, .08);
  color: var(--danger);
  font-size: .85rem;
}

.form-ok {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid rgba(95, 224, 154, .4);
  border-radius: 10px;
  background: rgba(95, 224, 154, .08);
  color: var(--success);
  font-size: .85rem;
}

.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; }

@media (max-width: 620px) { .form-row { flex-direction: column; gap: 0; } }

/* Tournament creation wizard */
.tournament-wizard { width: min(680px, calc(100vw - 28px)); }
.wizard-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.wizard-heading h3 { margin-bottom:0; }
.wizard-heading .eyebrow { margin-bottom:4px; }
.wizard-progress { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; list-style:none; padding:0; margin:18px 0 24px; }
.wizard-progress li { position:relative; display:flex; align-items:center; gap:7px; color:var(--muted); font-size:.78rem; min-width:0; }
.wizard-progress li:not(:last-child)::after { content:""; height:1px; background:var(--line); position:absolute; left:30px; right:-8px; top:13px; z-index:0; }
.wizard-progress span { display:grid; place-items:center; width:27px; height:27px; flex:0 0 27px; border:1px solid var(--line); border-radius:50%; background:var(--surface); position:relative; z-index:1; }
.wizard-progress b { font-weight:600; white-space:nowrap; }
.wizard-progress li.active, .wizard-progress li.done { color:var(--accent); }
.wizard-progress li.active span, .wizard-progress li.done span { border-color:var(--accent); color:var(--accent); }
.wizard-progress li.done:not(:last-child)::after { background:var(--accent); }
.wizard-step h4 { margin:0 0 5px; font-size:1.05rem; }
.wizard-step > .form-hint { margin-bottom:18px; }
.wizard-checks { align-items:flex-end; flex-wrap:wrap; }
.wizard-checks > label { flex:1; min-width:180px; padding:9px 0; }
.wizard-checks .field { min-width:130px; }
.wizard-format-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.wizard-format-card { min-width:0; padding:15px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.018); }
.wizard-format-card h5 { margin:0 0 4px; font-size:.92rem; }
.wizard-format-card > p { margin:0 0 14px; color:var(--muted); font-size:.78rem; line-height:1.4; }
.wizard-format-card .field { margin-bottom:10px; }
.wizard-format-card .field:last-child { margin-bottom:0; }
.wizard-format-card .field[hidden],
.wizard-format-card .field > [hidden] { display:none !important; }
.wizard-inline-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.wizard-switch { display:flex; align-items:flex-start; gap:10px; padding:9px 0; cursor:pointer; }
.wizard-switch + .wizard-switch { border-top:1px solid var(--line); }
.wizard-switch input { margin-top:3px; accent-color:var(--accent); }
.wizard-switch span { display:grid; gap:2px; min-width:0; }
.wizard-switch b { font-size:.84rem; font-weight:600; }
.wizard-switch small { color:var(--muted); font-size:.74rem; }
.input-suffix { position:relative; }
.input-suffix .input { padding-right:48px; }
.input-suffix > span { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:.78rem; pointer-events:none; }
.wizard-actions { padding:18px 0 0; margin-top:22px; border-top:1px solid var(--line); }
.wizard-actions button[hidden] { display:none !important; }
.wizard-spacer { flex:1; }
.wizard-review-list { margin:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.wizard-review-list > div { display:grid; grid-template-columns:minmax(120px,.7fr) 1.5fr; gap:14px; padding:11px 14px; border-bottom:1px solid var(--line); }
.wizard-review-list > div:last-child { border-bottom:0; }
.wizard-review-list dt { color:var(--muted); font-size:.82rem; }
.wizard-review-list dd { margin:0; overflow-wrap:anywhere; }
@media (max-width: 620px) {
  .tournament-wizard { padding:18px 16px; }
  .wizard-progress { gap:4px; margin:14px 0 20px; }
  .wizard-progress b { display:none; }
  .wizard-progress li { justify-content:center; }
  .wizard-progress li:not(:last-child)::after { left:50%; right:-8px; }
  .wizard-progress span { width:25px; height:25px; flex-basis:25px; }
  .wizard-review-list > div { grid-template-columns:1fr; gap:3px; }
  .wizard-actions .button { min-width:88px; }
  .wizard-format-grid { grid-template-columns:1fr; gap:10px; }
  .wizard-format-card { padding:13px; }
}

/* ---------------- Twitch-style code input ---------------- */

.code-input {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 4px;
}

.code-input input {
  width: 52px;
  height: 64px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--ink);
  color: var(--text);
  font: inherit;
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  caret-color: var(--accent);
  transition: border-color .12s ease, box-shadow .12s ease;
}

.code-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 50, .2);
}

.code-input input.filled { border-color: var(--accent); background: rgba(255, 138, 50, .06); }

.code-input input.error { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 107, .18); }

@media (max-width: 480px) {
  .code-input input { width: 42px; height: 56px; font-size: 1.4rem; }
}

/* ---------------- login card ---------------- */

.auth-shell {
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.auth-card h1 { margin: 0 0 6px; font-size: 1.4rem; }

.auth-card .auth-sub { margin: 0 0 22px; color: var(--muted); font-size: .88rem; }

.auth-card .auth-back-link {
  margin: 18px 0 0;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: .8rem;
}

.auth-steps { display: grid; gap: 18px; }
.auth-card[data-step="email"] #step-code,
.auth-card[data-step="code"] #step-email,
.auth-card > [hidden] { display: none !important; }

/* ---------------- dialogs ---------------- */

dialog {
  width: min(480px, calc(100vw - 36px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
}

dialog::backdrop { background: rgba(4, 6, 9, .72); backdrop-filter: blur(3px); }

.dialog-body { padding: 22px 24px; }

#create-dialog { width: min(700px, calc(100vw - 28px)); }
.tournament-wizard .dialog-close { border:0; color:var(--muted); background:transparent; font-size:1.5rem; line-height:1; cursor:pointer; padding:2px 6px; }

.dialog-body h3 { margin: 0 0 8px; font-size: 1.1rem; }

.dialog-body p { margin: 0 0 18px; color: var(--muted); font-size: .88rem; line-height: 1.5; }

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

/* ---------------- toast ---------------- */

.toast-zone {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
}

.toast {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: .86rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  animation: toast-in .18s ease;
}

.toast.error { border-color: rgba(255, 107, 107, .5); color: var(--danger); }
.toast.success { border-color: rgba(95, 224, 154, .5); color: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- bracket ---------------- */

.bracket {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 6px 2px 14px;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 14px;
  min-width: 240px;
}

.bracket-third { display: flex; min-width: 240px; flex-direction: column; justify-content: center; gap: 14px; }
.bracket-third .round-title { color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-align: center; }

.bracket-round .round-title {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
}

.bracket-slot {
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}

.bracket-slot .slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  font-size: .84rem;
}

.bracket-slot .slot-row + .slot-row { border-top: 1px solid var(--line-soft); }

.bracket-slot .slot-row.win { background: rgba(95, 224, 154, .08); }
.bracket-slot .slot-row.win .slot-name { color: var(--success); font-weight: 700; }
.bracket-slot .slot-row.lose { opacity: .55; }

.bracket-slot .slot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.bracket-slot .slot-name.set { color: var(--text); font-weight: 600; }

.bracket-slot .slot-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.bracket-slot .slot-score.win { color: var(--success); }

.bracket-slot.tbd .slot-row { color: var(--muted-dim); }

.bracket-slot a.slot-link {
  display: block;
  padding: 6px 12px 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-dim);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
  text-align: center;
}

.bracket-slot a.slot-link:hover { color: var(--accent-bright); }

/* ---------------- misc ---------------- */

.empty {
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  font-size: .88rem;
}

.empty b { display: block; margin-bottom: 6px; color: var(--text); font-size: .95rem; }

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

.kv-list .kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .87rem;
}

.kv-list .kv:last-child { border-bottom: none; }

.kv-list .kv .k { color: var(--muted); }
.kv-list .kv .v { font-weight: 600; text-align: right; }

.section-gap { height: 22px; }

.player-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.player-headline h1 { margin: 0; font-size: 1.6rem; }

.player-headline .usn { color: var(--muted-dim); font-size: .82rem; font-family: Consolas, monospace; }

.loading { color: var(--muted); padding: 30px 0; text-align: center; font-size: .88rem; }

.wdl { display: inline-flex; gap: 6px; font-variant-numeric: tabular-nums; }
.wdl .w { color: var(--success); font-weight: 700; }
.wdl .d { color: var(--muted); }
.wdl .l { color: var(--danger); font-weight: 700; }

.evidence-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-raised);
}

.evidence-file + .evidence-file { margin-top: 10px; }

.evidence-file .file-icon { font-size: 1.3rem; }

.evidence-file .file-meta { flex: 1; min-width: 0; }

.evidence-file .file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: .88rem;
}

.evidence-file .file-sub { color: var(--muted-dim); font-size: .76rem; margin-top: 2px; }

.notice {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}

.notice b { color: var(--text); }

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-raised);
  border-radius: 10px;
  min-height: 16px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  animation: skeleton 1.4s infinite;
}

@keyframes skeleton {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Tournament media gallery */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.media-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.media-card img,
.media-card video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  background: var(--ink);
}

.media-card video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.media-card figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- player profile redesign ---------------- */
.profile-hero-modern { align-items: center; min-height: 230px; padding: 30px 34px; }
.profile-hero-modern .hero-identity { flex: 1; }
.profile-avatar { position: relative; overflow: hidden; width: 104px; height: 104px; border-radius: 28px; font-size: 2rem; }
.hero-avatar-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-upload { position: absolute; inset: auto 5px 5px; padding: 4px 3px; border-radius: 7px; color: var(--text); background: rgba(8,11,15,.82); font-size: .62rem; font-weight: 700; text-align: center; cursor: pointer; opacity: 0; transition: opacity .2s; }
.profile-avatar:hover .avatar-upload, .avatar-upload:focus-within { opacity: 1; }
.avatar-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.profile-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 5px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 12px; background: rgba(16,21,27,.86); scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs a { flex: 0 0 auto; padding: 10px 18px; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 700; text-decoration: none; }
.profile-tabs a:hover { color: var(--text); background: var(--surface-hover); }
.profile-tabs a[aria-selected="true"] { color: var(--accent-bright); background: rgba(255,138,50,.14); }
.profile-tab-panel[hidden] { display: none; }
.panel-heading-row { display: flex; align-items: center; justify-content: space-between; }
.profile-stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.item-chip { padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: 999px; color: var(--muted); background: var(--surface-raised); font-size: .78rem; }
.item-chip b { color: var(--accent-bright); }
.clan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.clan-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 13px; color: var(--text); text-decoration: none; background: var(--surface-raised); transition: transform .16s, border-color .16s, background .16s; }
.clan-card:hover { transform: translateY(-2px); border-color: rgba(255,138,50,.5); background: var(--surface-hover); }
.clan-mark { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border: 1px solid rgba(255,173,98,.5); border-radius: 12px; color: var(--accent-bright); background: rgba(255,138,50,.12); font-size: .76rem; font-weight: 850; }
.clan-copy { min-width: 0; flex: 1; }
.clan-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clan-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.clan-arrow, .match-open { color: var(--accent-bright); font-size: 1.2rem; }
.match-list { display: grid; gap: 9px; }
.match-card { display: grid; grid-template-columns: 110px minmax(0,1fr) auto 22px; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: 11px; color: var(--text); text-decoration: none; background: var(--surface-raised); transition: border-color .16s, background .16s, transform .16s; }
.match-card:hover { transform: translateX(2px); border-color: rgba(139,216,255,.5); background: var(--surface-hover); }
.match-date { color: var(--muted-dim); font-size: .74rem; font-variant-numeric: tabular-nums; }
.match-main { min-width: 0; }
.match-main b, .match-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-main small { margin-top: 4px; color: var(--muted); font-size: .73rem; }
.match-score { min-width: 80px; text-align: right; color: var(--muted); font-size: .78rem; font-weight: 800; }
.match-score.success { color: var(--success); } .match-score.danger { color: var(--danger); }
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.achievement-card { display: flex; gap: 12px; min-height: 118px; padding: 15px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface-raised); opacity: .65; }
.achievement-card.is-unlocked { opacity: 1; border-color: rgba(255,209,102,.35); background: linear-gradient(135deg, rgba(255,209,102,.1), var(--surface-raised)); }
.achievement-icon { display: grid; width: 48px; height: 48px; flex: none; place-items: center; border: 1px solid rgba(255,173,98,.42); border-radius: 13px; color: var(--gold); background: rgba(255,138,50,.1); font-size: 1.3rem; }
.achievement-copy { min-width: 0; flex: 1; } .achievement-copy b { display: block; font-size: .9rem; } .achievement-copy p { margin: 5px 0 8px; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.achievement-copy small { color: var(--muted-dim); font-size: .68rem; } .achievement-unlocked { color: var(--gold) !important; }
.progress { height: 5px; margin: 8px 0 4px; overflow: hidden; border-radius: 999px; background: var(--line); } .progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.match-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.match-dialog .dialog-body { position: relative; } .dialog-close { position: absolute; top: 12px; right: 14px; border: 0; color: var(--muted); background: transparent; font-size: 1.4rem; cursor: pointer; }
.participant-list { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
@media (max-width: 720px) { .profile-hero-modern { padding: 22px; } .profile-avatar { width: 84px; height: 84px; } .match-card { grid-template-columns: 1fr auto 18px; } .match-date { grid-column: 1 / -1; } .match-score { min-width: 0; } }

/* Keep the three headline metrics inside the hero on narrow phones.  The
   desktop 100px column minimum is wider than the 274px content box at 320px
   and otherwise causes the last metric to be clipped. */
@media (max-width: 720px) {
  .profile-hero-modern .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .profile-hero-modern .hero-stat {
    min-width: 0;
    padding-inline: 9px;
  }
  .profile-hero-modern .hero-stat .label,
  .profile-hero-modern .hero-stat .value {
    overflow-wrap: anywhere;
  }
}

.muted { color: var(--muted); }
.participant-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.participant-list li small { color: var(--muted); font-variant-numeric: tabular-nums; }
.match-map { display:flex; align-items:center; gap:12px; margin:8px 0 12px; color:var(--text); }
.match-map-preview,.match-map-fallback { width:120px; height:68px; object-fit:cover; border:1px solid var(--line); border-radius:8px; }
.match-map-fallback { display:grid; place-items:center; color:var(--muted); background:var(--surface-raised); font-size:.72rem; text-align:center; }
.match-final-score { margin:8px 0; font-size:1.8rem; text-align:center; }
.match-teams { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.match-teams h4 { margin:10px 0 4px; color:var(--muted); font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; }
.participant-list li a { color:var(--text); text-decoration:none; }
.participant-list li a:hover { color:var(--accent-bright); }
@media (max-width:620px) { .match-teams { grid-template-columns:1fr; gap:6px; } }
.rank-progress { margin-top: 16px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-raised); }
.rank-progress > div:first-child { display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:.78rem; }
.rank-progress > div:first-child b { color:var(--text); }
.rank-progress .progress { margin:10px 0 5px; }
.rank-progress small { color:var(--muted-dim); font-size:.7rem; }
.share-feedback { color:var(--success); font-size:.74rem; }
.share-feedback.is-error { color:var(--danger); }
@media (max-width:720px) { .profile-hero-modern .hero-actions { width:100%; } }
.profile-share { position:absolute; top:16px; right:18px; z-index:3; display:flex; align-items:center; gap:8px; }
.share-icon-button { display:grid; width:38px; height:38px; padding:0; place-items:center; border-radius:11px; font-size:1.2rem; }
.share-feedback { position:absolute; top:44px; right:0; width:max-content; max-width:220px; padding:6px 9px; border:1px solid rgba(95,224,154,.35); border-radius:8px; color:var(--success); background:var(--surface); font-size:.72rem; opacity:0; pointer-events:none; transform:translateY(-3px); transition:opacity .2s, transform .2s; }
.share-feedback.is-visible { opacity:1; transform:none; }
.share-feedback.is-error { color:var(--danger); border-color:rgba(255,107,107,.35); }
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:720px) { .profile-share { top:12px; right:12px; } }

@media (max-width:720px) {
  .profile-hero-modern.has-game-background::before {
    inset: -12px;
    background-position: center top;
    filter: blur(9px);
    opacity: .62;
  }
}

.description-content img, .regulations-content img { max-width:100%; height:auto; border-radius:10px; display:block; margin:10px 0; }
.create-rewards { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }


.catalog-group { grid-column: 1 / -1; display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:8px; }
.catalog-group h5 { grid-column:1 / -1; margin: 8px 0 2px; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.catalog-group .catalog-item-card { margin-top: 6px; }


