/* ==========================================================================
   GUM Guild Wars — guild hall theme
   Black void, pink for attack and highlights, teal for stamina and gains.
   ========================================================================== */

:root {
  --black: #000000;
  --pink: #ff2e88;
  --teal: #0ea3ae;
  --teal-bright: #3fe0ea;
  --bone: #e9f1f0;
  --bone-rgb: 233, 241, 240; /* --bone as an RGB triple for faint fills (html2canvas can't read color-mix) */
  --ash: #8b9a9e;

  /* Finish palette (validated for colour-vision deficiency on black) */
  --f-spin: #0ea3ae;
  --f-over: #8c6cff;
  --f-burst: #ff2e88;
  --f-extreme: #bf8218;

  --surface: rgba(14, 163, 174, 0.05);
  --surface-raised: rgba(14, 163, 174, 0.09);
  --line: rgba(233, 241, 240, 0.1);
  --line-strong: rgba(14, 163, 174, 0.45);

  --font-ui: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-title: "Sora", "Segoe UI", system-ui, sans-serif;

  /* Type scale: 15px base, ratio 1.25 */
  --t-xs: 0.8rem;
  --t-s: 0.9rem;
  --t-m: 1rem;
  --t-l: 1.25rem;
  --t-xl: 1.5625rem;
  --t-2xl: 1.953rem;
  --t-3xl: 2.441rem;
  --t-4xl: 3.052rem;

  --hud-h: 64px;
  --bevel-lg: 18px;
  --bevel-sm: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: 0.2s ease;
}

/* ---------- Light theme ----------
   html[data-theme="light"] (set in index.html before paint, toggled in app.js). Only the palette changes;
   a few spots that assumed a black page get light versions below. The admin never sets data-theme. */
:root[data-theme="light"] {
  color-scheme: light;
  --black: #f5f7f7;
  --bone: #0d1719;
  --bone-rgb: 13, 23, 25;
  --ash: #55666b;
  --teal-bright: #0a8f99;
  --surface: rgba(14, 163, 174, 0.07);
  --surface-raised: rgba(14, 163, 174, 0.13);
  --line: rgba(13, 23, 25, 0.12);
  --line-strong: rgba(14, 163, 174, 0.55);
}
[data-theme="light"] .hud { background: rgba(245, 247, 247, 0.92); }
[data-theme="light"] .skel { background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.04) 30%, rgba(0, 0, 0, 0.09) 50%, rgba(0, 0, 0, 0.04) 70%); }
[data-theme="light"] .data-table th { background: #eaf0f0; }
[data-theme="light"] .map { background: #e6eef0; }
[data-theme="light"] .map .leaflet-tile-pane { filter: none; }
[data-theme="light"] .map .leaflet-control-attribution { background: rgba(255, 255, 255, 0.8); }
[data-theme="light"] .modal-overlay { background: rgba(13, 23, 25, 0.45); }
[data-theme="light"] .share-overlay { background: rgba(245, 247, 247, 0.97); }
/* Neon glows are softer on a light page. */
[data-theme="light"] .sched-panel { box-shadow: 0 0 10px color-mix(in srgb, var(--glow) 40%, transparent), inset 0 0 10px color-mix(in srgb, var(--glow) 12%, transparent); }

/* ---------- Theme wipe ----------
   The toggle swaps themes inside a View Transition: the new theme's snapshot is revealed by a clip-path
   wipe (app.js toggleTheme), and a glowing line on its own transition layer rides the edge. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-group(theme-wipe-line) { animation: none; z-index: 2; }

/* Page switches (app.js route) slide sideways: forward into Schedules, back to the dashboard.
   The header gets its own layer only while sliding, so it stays put (and the theme wipe still covers it). */
:root[data-slide] .hud { view-transition-name: hud; }
:root[data-slide="forward"]::view-transition-old(root) { animation: slide-out-left 0.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
:root[data-slide="forward"]::view-transition-new(root) { animation: slide-in-right 0.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
:root[data-slide="back"]::view-transition-old(root) { animation: slide-out-right 0.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
:root[data-slide="back"]::view-transition-new(root) { animation: slide-in-left 0.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes slide-out-left { to { transform: translateX(-100%); } }
@keyframes slide-in-right { from { transform: translateX(100%); } }
@keyframes slide-out-right { to { transform: translateX(100%); } }
@keyframes slide-in-left { from { transform: translateX(-100%); } }
.theme-wipe-line {
  view-transition-name: theme-wipe-line;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  width: 2px;
  background: linear-gradient(180deg, var(--pink), var(--teal-bright));
  box-shadow: 0 0 12px var(--pink), 0 0 28px var(--teal-bright);
  pointer-events: none;
}

* { box-sizing: border-box; }

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: var(--t-m);
  line-height: 1.5;
  background: var(--black);
  color: var(--bone);
  padding-top: var(--hud-h);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.scroll-locked { overflow: hidden; }

button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; }

.hidden { display: none !important; }

/* ---------- Scrollbars ----------
   A thin teal rail (like the season path's track) with a ridged slider
   that lights up pink while you hover or drag it. */

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-corner { background: transparent; }

::-webkit-scrollbar-track {
  background: linear-gradient(90deg, transparent 5.5px, rgba(14, 163, 174, 0.28) 5.5px 6.5px, transparent 6.5px);
}

::-webkit-scrollbar-track:horizontal {
  background: linear-gradient(180deg, transparent 5.5px, rgba(14, 163, 174, 0.28) 5.5px 6.5px, transparent 6.5px);
}

::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 3px solid transparent;
  border-radius: 3px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.4) 3px 4px) padding-box,
    var(--teal) padding-box;
}

::-webkit-scrollbar-thumb:horizontal {
  background:
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(0, 0, 0, 0.4) 3px 4px) padding-box,
    var(--teal) padding-box;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active { background-color: var(--pink); }

::-webkit-scrollbar-thumb:vertical:hover,
::-webkit-scrollbar-thumb:vertical:active {
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.4) 3px 4px) padding-box,
    var(--pink) padding-box;
}

::-webkit-scrollbar-thumb:horizontal:hover,
::-webkit-scrollbar-thumb:horizontal:active {
  background:
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(0, 0, 0, 0.4) 3px 4px) padding-box,
    var(--pink) padding-box;
}

/* Firefox only supports colour and width. (Kept out of Chromium on purpose:
   setting these there would switch off the custom slider above.) */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--teal) transparent; }
}

/* ---------- Logo ---------- */

.hud-logo, .hero-logo { display: block; height: auto; }

/* The one orchestrated moment: the logo pops in as the page opens. */
.hero-logo { animation: logo-pop 0.9s cubic-bezier(0.18, 1.4, 0.4, 1) both; }

@keyframes logo-pop {
  from { opacity: 0; transform: scale(0.7) rotate(-6deg); }
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--pink);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: var(--pink);
  color: var(--black);
  font-weight: 700;
  font-size: var(--t-m);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.btn-primary:hover { background: #ff5aa2; }

.btn-secondary { background: transparent; color: var(--bone); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-raised); }

.text-btn {
  border: none;
  background: none;
  color: var(--ash);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: transparent;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.icon-btn:hover { border-color: var(--teal); background: var(--surface-raised); }

/* ---------- Loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--black);
}
#loader:not(.failed) { display: none; }

/* Skeleton placeholders, replaced by the real content once the league data loads. */
.skel {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 70%) 0 0 / 300% 100%;
  animation: skel-shimmer 1.4s linear infinite;
}
@keyframes skel-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel-line { height: 0.9em; margin: 0.35em 0; }
.skel-row { height: 56px; margin-bottom: 8px; list-style: none; }
.skel-block { grid-column: 1 / -1; height: 220px; }
.skel-pill { width: 96px; height: 36px; border-radius: 999px; }
.skel-node { width: 44px; height: 44px; border-radius: 10px; }
.stage .skel-line { width: 70%; margin-top: 12px; }

.load-error { color: var(--pink); text-align: center; max-width: 36ch; }

/* ---------- Header ---------- */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--hud-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-title);
  font-size: var(--t-l);
  line-height: 1;
  white-space: nowrap;
}

.hud-logo { width: auto; height: 44px; }

.hud-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: none;
  color: var(--bone);
  text-decoration: none;
  font-size: var(--t-s);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.nav-link i { color: var(--teal); width: 1em; text-align: center; }
.nav-link:hover { background: var(--surface-raised); }
.nav-link:hover i { color: var(--pink); }

.theme-toggle-icon { order: 1; margin-left: 10px; color: var(--teal); }
.theme-toggle-icon:hover { color: var(--pink); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: none;
  background: none;
  cursor: pointer;
}

.menu-toggle .bar {
  width: 24px;
  height: 2px;
  background: var(--bone);
  transition: transform var(--ease), opacity var(--ease);
}

.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.dashboard {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
}

.section { padding-top: 88px; }

.section-head { margin-bottom: 28px; }

.section-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--t-3xl);
  line-height: 1.1;
}

.section-note {
  margin: 10px 0 0;
  max-width: 64ch;
  color: var(--ash);
  font-size: var(--t-s);
}

.subsection-title {
  margin: 56px 0 16px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 1;
}

.panel {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--bevel-lg);
  corner-shape: bevel;
}

.panel-title { margin: 0 0 12px; font-size: var(--t-l); font-weight: 600; }
.panel-title .muted { color: var(--ash); font-weight: 500; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 40px;
  padding-top: 56px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-status {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: var(--t-l);
  line-height: 1.4;
}

.hero-status strong { color: var(--pink); font-weight: 600; }

.hero-updated { margin: 8px 0 0; color: var(--ash); font-size: var(--t-s); }

.hero-logo { width: clamp(220px, 32vw, 420px); }

/* Season path: weeks as stages on a level-select track. */
.season-path {
  grid-column: 1 / -1;
  display: flex;
  list-style: none;
  margin: 24px 0 0;
  padding: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.season-path::-webkit-scrollbar { display: none; }

.stage {
  position: relative;
  flex: 1 0 104px;
  padding-right: 8px;
}

/* The track segment leading to the next stage */
.stage::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 44px;
  right: 0;
  height: 2px;
  background: var(--line);
}

.stage:last-child::before { display: none; }
.stage.done::before { background: var(--pink); }
.stage.live::before { background: linear-gradient(90deg, var(--pink) var(--p), var(--line) var(--p)); }

.stage-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 10px;
  corner-shape: bevel;
  background: var(--black);
  color: var(--ash);
  font-weight: 700;
  font-size: var(--t-l);
  font-variant-numeric: tabular-nums;
}

.stage.done .stage-node { border-color: var(--pink); color: var(--bone); }

.stage.done .stage-node::after {
  content: "\f00c";
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  color: var(--black);
  font: 900 9px "Font Awesome 6 Free";
}

.stage.live .stage-node {
  border-color: var(--pink);
  background: var(--pink);
  color: var(--black);
  box-shadow: 0 0 0 4px rgba(255, 46, 136, 0.2);
}

.season-caption {
  display: none;
  grid-column: 1 / -1;
  margin: 14px 0 0;
  color: var(--ash);
  font-size: var(--t-s);
}

.stage-label { display: block; margin-top: 10px; font-weight: 600; font-size: var(--t-s); }
.stage-meta { display: block; color: var(--ash); font-size: var(--t-xs); }
.stage.live .stage-meta { color: var(--pink); }

/* ---------- Top bladers: character sheet + party list ---------- */

.party {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px;
  align-items: start;
}

.char-sheet {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px 22px;
  padding: 24px;
  border: 1px solid var(--pink);
  border-radius: var(--bevel-lg);
  corner-shape: bevel;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 46, 136, 0.16), transparent 60%),
    var(--black);
  cursor: pointer;
  transition: background var(--ease);
}

@media (min-width: 1081px) {
  .char-sheet { position: sticky; top: calc(var(--hud-h) + 16px); }
}

.char-sheet:hover {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 46, 136, 0.24), transparent 60%),
    var(--black);
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--pink);
  border-radius: 14px;
  corner-shape: bevel;
  background: linear-gradient(160deg, rgba(255, 46, 136, 0.35), rgba(14, 163, 174, 0.3));
  font-family: var(--font-title);
  font-size: 2.6rem;
  line-height: 1;
}

.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.rank-crown {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 1px 8px;
  border-radius: 4px;
  background: var(--pink);
  color: var(--black);
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 700;
}

.char-name {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.char-guild { margin: 6px 0 0; color: var(--ash); font-size: var(--t-s); }

.char-score { margin: 14px 0 0; display: flex; align-items: baseline; gap: 8px; }
.char-score b { font-size: var(--t-3xl); font-weight: 700; color: var(--pink); line-height: 1; font-variant-numeric: tabular-nums; }
.char-score span { color: var(--ash); font-size: var(--t-s); }

.gauges { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }

.gauge { min-width: 0; }
.gauge dt { display: flex; justify-content: space-between; font-size: var(--t-s); color: var(--ash); }
.gauge dt b { color: var(--bone); font-weight: 600; font-variant-numeric: tabular-nums; }
.gauge dd { margin: 6px 0 0; }

/* Segmented HP-style bar */
.meter {
  position: relative;
  height: 8px;
  background: rgba(var(--bone-rgb), 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--meter, var(--teal));
  transition: width 0.8s ease;
}

.meter.segmented::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), var(--black) calc(10% - 2px) 10%);
}

.party-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.party-row {
  display: grid;
  grid-template-columns: 36px 36px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--ease);
}

.party-row:hover { background: var(--surface-raised); }
.party-rank { color: var(--ash); font-weight: 700; font-variant-numeric: tabular-nums; }
.party-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-guild { display: block; color: var(--ash); font-size: var(--t-xs); font-weight: 400; }
.party-xp { margin-top: 5px; height: 4px; }
.party-score { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Avatars and badges ---------- */

.avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid var(--av-line, var(--teal));
  border-radius: 8px;
  corner-shape: bevel;
  background: var(--av-bg, rgba(14, 163, 174, 0.18));
  font-size: var(--t-xs);
  font-weight: 700;
}

.avatar.pink { --av-line: var(--pink); --av-bg: rgba(255, 46, 136, 0.18); }

/* Guild colours: fill + border from the guild's `colors`, text in black or white for contrast */
.avatar.guild { border-width: 2px; color: var(--av-ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.bracket-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  corner-shape: bevel;
  color: var(--bone);
  font-size: var(--t-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 4px;
  background: rgba(var(--bone-rgb), 0.07);
  color: var(--ash);
  font-size: var(--t-xs);
  font-weight: 500;
}

.tag.top { background: rgba(255, 46, 136, 0.16); color: var(--pink); }
.tag.unranked { background: none; border: 1px dashed var(--line); }
.tag.role { background: rgba(14, 163, 174, 0.16); color: var(--teal); }
.tag.ign { background: rgba(var(--bone-rgb), 0.08); color: var(--bone); }

/* ---------- Season titles ---------- */

.titles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  margin: 0;
  border-top: 1px solid var(--line);
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--ease);
}

.title-row:hover { background: var(--surface-raised); }
.title-row dt { font-family: var(--font-title); font-size: var(--t-l); line-height: 1.2; }
.title-row .holder { grid-column: 1; margin: 0; color: var(--ash); font-size: var(--t-s); }
.title-row .holder b { color: var(--bone); font-weight: 600; }
.title-row .score { margin: 0; grid-column: 2; grid-row: 1 / span 2; text-align: right; }
.title-row .value { display: block; font-size: var(--t-2xl); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.title-row .unit { color: var(--ash); font-size: var(--t-xs); }

.title-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--sw);
  vertical-align: 0.15em;
}

/* ---------- How battles end ---------- */

.meta-bar { display: flex; gap: 2px; height: 40px; }

.meta-seg {
  min-width: 4px;
  height: 100%;
  background: var(--sw);
  border-radius: 4px;
  transition: filter var(--ease);
}

.meta-seg:hover { filter: brightness(1.25); }

.meta-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.meta-legend li { display: flex; align-items: baseline; gap: 8px; font-size: var(--t-s); }
.meta-legend b { font-size: var(--t-xl); font-variant-numeric: tabular-nums; }
.meta-legend .muted { color: var(--ash); }

/* ---------- Command tabs (RPG menu cursor) ---------- */

.command-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 20px;
}

.command-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 26px;
  border: 1px solid transparent;
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: none;
  color: var(--ash);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}

.command-tab::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 10px;
  transform: translateY(-50%);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: var(--pink);
  opacity: 0;
  transition: opacity var(--ease);
}

.command-tab:hover { color: var(--bone); }
.command-tab.active { color: var(--bone); border-color: var(--line-strong); background: var(--surface-raised); }
.command-tab.active::before { opacity: 1; }

.command-tabs.compact { margin-bottom: 0; }
.command-tabs.compact .command-tab { padding: 6px 10px 6px 22px; font-size: var(--t-s); }
.command-tabs.compact .command-tab::before { left: 8px; }

.swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--sw); flex-shrink: 0; }

/* ---------- Tables ---------- */

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

.table-wrap { max-height: 460px; overflow: auto; scrollbar-gutter: stable; }

/* Let the scrollbar sit in the panel's padding so the table lines up with its title. */
.panel .table-wrap { margin-right: -16px; padding-right: 4px; }

.data-table { width: 100%; border-collapse: collapse; font-size: var(--t-s); }

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 6px;
  background: #020707;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ash);
  font-size: var(--t-xs);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.data-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
.data-table tbody tr { cursor: pointer; transition: background var(--ease); }
.data-table tbody tr:hover { background: var(--surface-raised); }
.data-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table .strong { font-weight: 700; }
.data-table .col-rank { width: 48px; }
.data-table .empty { text-align: center; color: var(--ash); padding: 32px 8px; cursor: default; }

.rank-cell { font-weight: 700; color: var(--ash); font-variant-numeric: tabular-nums; }
.rank-cell.first { color: var(--pink); }

.name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-cell .stack { display: flex; flex-direction: column; min-width: 0; }
.name-cell .primary { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-cell .secondary { color: var(--ash); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gain { color: var(--teal-bright); }
.loss { color: var(--pink); }

/* ---------- Guild ranking ---------- */

.ranking { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.rank-row {
  display: grid;
  grid-template-columns: 48px 40px minmax(0, 1.6fr) 84px minmax(120px, 1fr) 64px;
  align-items: center;
  gap: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--ease);
}

.rank-row:hover { background: var(--surface-raised); }

.rank-row .pos {
  font-family: var(--font-title);
  font-size: var(--t-xl);
  line-height: 1;
  color: var(--ash);
}

.rank-row:first-child .pos { color: var(--pink); }
.rank-row .avatar { width: 40px; height: 40px; }
.rank-row .guild { min-width: 0; }
.rank-row .guild-name { font-weight: 600; font-size: var(--t-l); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .guild-meta { color: var(--ash); font-size: var(--t-xs); display: flex; flex-wrap: wrap; gap: 0 10px; }
.rank-row .guild-meta span { white-space: nowrap; }
.rank-row .record { font-variant-numeric: tabular-nums; color: var(--ash); font-size: var(--t-s); }
.rank-row .record b { color: var(--bone); font-size: var(--t-l); }
.rank-row .wr { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Win-rate meter: diverging around 50% (pink below, teal above) */
.wr-meter { position: relative; height: 8px; background: rgba(var(--bone-rgb), 0.08); border-radius: 2px; }
.wr-meter::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ash); }
.wr-meter > span { position: absolute; top: 0; bottom: 0; border-radius: 2px; }

/* ---------- Map ---------- */

.map {
  height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--bevel-lg);
  corner-shape: bevel;
  overflow: hidden;
  background: #061012;
  z-index: 1;
}

/* Turn the light OSM tiles into a dark map that suits the theme. */
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.4); }
.map .leaflet-control-attribution { background: rgba(0, 0, 0, 0.7); color: var(--ash); }
.map .leaflet-control-attribution a { color: var(--teal-bright); }
.map .leaflet-bar a { background: var(--black); color: var(--bone); border-color: var(--line); }
.map .leaflet-popup-content-wrapper,
.map .leaflet-popup-tip { background: var(--black); color: var(--bone); border: 1px solid var(--line-strong); }
.map .leaflet-popup-content { font-family: var(--font-ui); font-size: var(--t-s); }
.map .leaflet-popup-content a { color: var(--teal-bright); }
.map-popup-head { font-weight: 700; font-size: var(--t-m); margin-bottom: 6px; }
.map .leaflet-popup-content a.map-popup-link { display: inline-block; margin-top: 8px; font-weight: 600; }

/* Guild markers: logo (or initials) in a bevelled tile at the guild's location */
.guild-pin-wrap { display: grid; place-items: center; background: none; border: none; }

.guild-pin {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 3px solid var(--pin-line, var(--teal));
  border-radius: 9px;
  corner-shape: bevel;
  background: var(--pin-bg, var(--black));
  color: var(--pin-ink, var(--bone));
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  transition: transform var(--ease), border-color var(--ease);
}

.guild-pin.pink { border-color: var(--pink); }

/* A stack of guilds: one guild's pin with an offset "card behind" edge and a count badge */
.guild-stack { position: relative; display: grid; cursor: pointer; }
.guild-pin.stacked { box-shadow: 4px 4px 0 -1px var(--pink), 0 4px 14px rgba(0, 0, 0, 0.7); }

.stack-count {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--pink);
  color: var(--bone);
  font-size: 0.65rem;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--black);
}

/* Spider legs when a stack fans out */
.map .leaflet-cluster-spider-leg { stroke: var(--teal); stroke-opacity: 0.6; }
/* .map beats Leaflet's ".leaflet-container .leaflet-marker-pane img { width: auto }" */
.map .guild-pin img { width: 100%; height: 100%; object-fit: cover; }
.leaflet-marker-icon:hover .guild-pin,
.leaflet-marker-icon:focus-visible .guild-pin { transform: scale(1.15); border-color: var(--bone); }

.map .leaflet-tooltip.guild-tip {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--black);
  color: var(--bone);
  font-family: var(--font-ui);
  font-size: var(--t-xs);
  font-weight: 600;
  box-shadow: none;
}

.map .leaflet-tooltip.guild-tip::before { border-top-color: var(--line-strong); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ash);
  font-size: var(--t-s);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
}

.site-footer a { color: var(--pink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Tooltip & toast ---------- */

.tooltip {
  position: fixed;
  z-index: 4000;
  pointer-events: none;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--black);
  color: var(--bone);
  font-size: var(--t-s);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.12s ease;
}

.tooltip.show { opacity: 1; }
.tooltip .muted { color: var(--ash); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 3000;
  transform: translate(-50%, 140px);
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: var(--black);
  font-size: var(--t-s);
  transition: transform 0.3s ease;
}

.toast.show { transform: translate(-50%, 0); }

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
  height: 86vh;
  overflow: hidden;
  background: var(--black);
  border: 1px solid var(--line-strong);
  border-radius: var(--bevel-lg);
  corner-shape: bevel;
  box-shadow: 0 30px 90px rgba(14, 163, 174, 0.12);
  animation: modal-in 0.18s ease-out;
}

.modal-card.wide { max-width: 760px; }
.modal-card.auto { height: auto; max-height: 88vh; }

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

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.modal-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--t-l);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-title .avatar { display: inline-grid; vertical-align: middle; width: 44px; height: 44px; margin-right: 12px; }
.modal-title .avatar:has(img) { border: 0; background: none; }
.modal-title .avatar img { object-fit: contain; }

.modal-body { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.modal-body.padded { padding: 20px; }
.modal-lead { margin: 0 0 18px; color: var(--ash); font-size: var(--t-s); }

.modal-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: var(--surface);
  outline: none;
  transition: border-color var(--ease);
}

.search-input::placeholder { color: var(--ash); }
.search-input:focus { border-color: var(--teal); }

.scroll-view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.list { list-style: none; margin: 0; padding: 0; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--ease);
}

.list-item:hover { background: var(--surface-raised); }
.list-item.static { cursor: default; }
.list-item.static:hover { background: none; }
.list-item .stack { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-item .primary { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .secondary { color: var(--ash); font-size: var(--t-xs); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.list-item .chev { color: var(--ash); }

/* Schedule: month calendars with match days marked by kind; the selected day's match-ups show below */
.schedule-cal { --k-siege: var(--pink); --k-raid: var(--teal); --k-event: var(--f-extreme); --k-holiday: var(--f-over); }
/* The schedule page (/Schedules) */
.schedule-page .section { padding-top: 40px; }
/* Three panels: the next Weekly Pod above the calendar on the left, and the next (or picked) Guild Siege
   down the right. Phones stack them with the two "upcoming" panels first. */
.sched-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto 1fr; grid-template-areas: "pod siege" "cal siege"; gap: 24px; align-items: start; }
/* Each panel has a neon border with a matching glow (--glow). */
.sched-panel { --glow: var(--line); padding: 20px; border: 2px solid var(--glow); border-radius: 14px; box-shadow: 0 0 6px var(--glow), 0 0 18px color-mix(in srgb, var(--glow) 75%, transparent), 0 0 42px color-mix(in srgb, var(--glow) 45%, transparent), inset 0 0 18px color-mix(in srgb, var(--glow) 30%, transparent); }
.sched-cal { --glow: var(--teal-bright); grid-area: cal; }
.sched-pod { --glow: var(--f-extreme); grid-area: pod; }
.sched-pod .sched-when { margin-bottom: 0; }
.sched-siege { grid-area: siege; align-self: stretch; display: flex; flex-direction: column; min-height: 0; --glow: var(--pink); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-nav h2 { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: var(--t-l); }
.cal-nav .icon-btn:disabled { opacity: 0.3; cursor: default; }
.sched-cal .cal-day { min-height: 58px; }
/* The details box under the calendar keeps one size whether it shows a picked day or the prompt. */
.sched-cal .cal-detail { flex: none; height: 104px; margin-top: 12px; overflow-y: auto; }
.cal-detail.placeholder { display: flex; align-items: center; border-style: dashed; border-left-width: 1px; border-left-style: dashed; }
.cal-detail.placeholder p { margin: 0; font-size: var(--t-s); }
/* Day names stay inside their box: never wider than it, long words wrap, two lines at most. */
.cal-event { min-width: 0; overflow: hidden; }
.cal-label, .cal-holiday { max-width: 100%; overflow-wrap: anywhere; }
.sched-cal .cal-label { font-size: 0.62rem; }
.sched-kicker { margin: 0 0 4px; color: var(--ash); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; }
.sched-pod .sched-kicker { color: var(--f-extreme); }
.sched-siege .sched-kicker { color: var(--pink); }
.sched-title { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: var(--t-2xl); line-height: 1.1; }
.sched-when { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 14px; color: var(--ash); font-size: var(--t-s); }
.sched-countdown { color: var(--bone); font-weight: 600; }
/* The match-ups scroll inside the panel. On desktop the list takes no height of its own (contain: size),
   so the panel ends level with the calendar and the list fills what's left. */
/* Desktop: the schedule page fits the screen between the header and the footer. The calendar's weeks
   share the height left over, and anything that doesn't fit scrolls inside its panel. */
@media (min-width: 761px) and (min-height: 540px) {
  body.on-schedule { height: 100dvh; }
  .schedule-page { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 24px; max-width: max(1200px, 150dvh); }
  .schedule-page .section { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 20px; }
  .schedule-page .breadcrumb { margin-bottom: 14px; }
  #schedule-list { flex: 1; min-height: 0; }
  .sched-layout { height: 100%; grid-template-rows: auto minmax(0, 1fr); }
  .sched-cal { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
  .sched-cal .cal-grid { flex: 1; min-height: 240px; grid-template-rows: auto; grid-auto-rows: minmax(0, 1fr); }
  .sched-cal .cal-day { min-height: 0; overflow: hidden; }
  .sched-siege { height: 100%; }
  .sched-layout { gap: 18px; }
  .sched-panel { padding: 16px 18px; }
  .sched-title { font-size: var(--t-xl); }
  .sched-when { margin: 6px 0 10px; }
  .cal-nav { margin-bottom: 6px; }
  .cal-nav h2 { font-size: var(--t-m); }
  .cal-nav .icon-btn { width: 32px; height: 32px; }
  .sched-cal .cal-legend { margin-bottom: 6px; }
  .sched-cal .cal-detail { margin-top: 10px; padding: 10px 14px 4px; height: 92px; }
  .sched-cal .cal-detail h4 { font-size: var(--t-m); }
}
/* Short desktop screens: tighter page heading too. */
@media (min-width: 761px) and (min-height: 540px) and (max-height: 860px) {
  .schedule-page .section { padding-top: 12px; }
  .schedule-page .breadcrumb { margin-bottom: 10px; }
  .sched-cal .cal-grid { min-height: 168px; }
  .sched-cal .cal-detail { height: 72px; padding: 8px 12px 2px; }
  .sched-cal .cal-detail .cal-meta { margin-bottom: 4px; }
  .cal-detail.placeholder p { font-size: var(--t-xs); }
}
@media (min-width: 761px) and (min-height: 540px) and (max-height: 700px) {
  .schedule-page { padding-bottom: 14px; }
  .schedule-page .section { padding-top: 8px; }
  .schedule-page .breadcrumb { margin-bottom: 6px; padding-bottom: 6px; }
  .sched-layout { gap: 12px; }
  .sched-panel { padding: 12px 14px; }
  .sched-title { font-size: var(--t-l); }
  .sched-cal .cal-legend { display: none; }
  .sched-cal .cal-detail { height: 58px; margin-top: 8px; }
  body.on-schedule .site-footer { padding-top: 12px; padding-bottom: 12px; }
}
.sched-siege .fixtures { flex: 1 1 0; min-height: 160px; contain: size; overflow-y: auto; padding: 0 8px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; padding-bottom: 12px; font-size: var(--t-s); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ash); text-decoration: none; }
.crumb-sep { color: var(--ash); }
.crumb-current { color: var(--bone); font-weight: 600; }
.back-link:hover { color: var(--teal-bright); }
.nav-link.active { color: var(--teal-bright); background: var(--surface-raised); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0 0 14px; padding: 0; color: var(--ash); font-size: var(--t-xs); }
.cal-legend li { display: flex; align-items: center; gap: 6px; }
.cal-legend .swatch { width: 10px; height: 10px; border-radius: 2px; }
.cal-legend .swatch.siege { background: var(--k-siege); }
.cal-legend .swatch.raid { background: var(--k-raid); }
.cal-legend .swatch.event { background: var(--k-event); }
.cal-legend .swatch.holiday { background: var(--k-holiday); }
.cal-months { display: grid; gap: 18px; }
.cal-month h4 { margin: 0 0 8px; font-family: var(--font-title); font-weight: 600; font-size: var(--t-m); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-weekday { color: var(--ash); font-size: var(--t-xs); text-align: center; padding-bottom: 2px; }
.cal-day { min-height: 52px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; font-size: var(--t-xs); color: var(--ash); display: flex; flex-direction: column; }
.cal-day.blank { border: 0; }
.cal-day.today { border-color: var(--bone); }
.cal-day.has-event { padding: 0; border: 0; }
.cal-num { font-variant-numeric: tabular-nums; }
.cal-event { --k: var(--k-event); flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 4px; border: 1px solid var(--k); border-radius: 6px; background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--bone); font: inherit; font-size: var(--t-xs); text-align: left; cursor: pointer; }
.cal-event.siege { --k: var(--k-siege); }
.cal-event.raid { --k: var(--k-raid); }
.cal-event:hover { background: color-mix(in srgb, var(--k) 28%, transparent); }
.cal-event.selected { background: var(--k); color: var(--black); }
.cal-event.done .cal-num::after { content: " ✓"; }
.cal-event .cal-num { font-weight: 700; }
/* PH holidays: the name under the date; regular holidays are bolder than special non-working days */
.cal-day.holiday:not(.has-event) { border-color: color-mix(in srgb, var(--k-holiday) 55%, transparent); }
.cal-holiday { margin-top: 2px; color: var(--k-holiday); font-size: 0.64rem; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-holiday::before { content: "● "; font-size: 0.55rem; }
.cal-holiday.regular { font-weight: 700; }
.cal-event.selected .cal-holiday { color: var(--black); }
.cal-holiday-note { margin: 4px 0 0; color: var(--k-holiday); font-size: var(--t-s); }
.cal-label { font-size: 0.68rem; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cal-undated { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: var(--t-xs); }
.cal-undated .cal-event { width: auto; flex: none; }
.cal-detail { --k: var(--k-event); margin-top: 18px; padding: 14px 16px 6px; border: 1px solid var(--line); border-left: 3px solid var(--k); border-radius: 8px; }
.cal-months .cal-detail { margin-top: -6px; }
.cal-detail.siege { --k: var(--k-siege); }
.cal-detail.raid { --k: var(--k-raid); }
.cal-detail h4 { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: var(--t-l); }
.cal-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 10px; color: var(--ash); font-size: var(--t-xs); }
.cal-detail .fixtures { padding: 0 0 8px; border-bottom: 0; }

.fixtures { list-style: none; margin: 0; padding: 0 16px 12px 64px; border-bottom: 1px solid var(--line); }
.fixture { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 0; }
.fixture + .fixture { border-top: 1px solid var(--line); }
.fixture-team { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ash); font-size: var(--t-s); }
.fixture-team:last-child { flex-direction: row-reverse; text-align: right; }
.fixture-team span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fixture-team .avatar { width: 28px; height: 28px; }
.fixture-team.won { color: var(--bone); font-weight: 600; }
.fixture-name { display: grid; min-width: 0; }
.fixture-team:last-child .fixture-name { justify-items: end; }
.fixture-role { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.fixture-role.attack { color: var(--pink); }
.fixture-role.defend { color: var(--teal); }
.fixture-vs { color: var(--ash); font-size: var(--t-xs); text-transform: uppercase; }
.fixture-score { font-variant-numeric: tabular-nums; }
.fixture-round { padding: 14px 0 4px; color: var(--teal-bright); font-size: var(--t-xs); font-weight: 700; border-bottom: 1px solid var(--line); }
.fixture-bouts { font-size: var(--t-s); padding-bottom: 6px; }
.fixture-bouts .bout { padding: 6px 0; }
.fixture-bouts .bout-score { font-size: var(--t-m); }
/* The schedule is neutral: no Win/Loss from either side. */
.fixture-bouts .outcome { display: none; }

.empty-state { padding: 48px 24px; text-align: center; color: var(--ash); }
.empty-state i { display: block; margin-bottom: 12px; font-size: 2rem; color: var(--teal); }
.empty-state h4 { margin: 0 0 4px; color: var(--bone); font-size: var(--t-l); }
.empty-state p { margin: 0; font-size: var(--t-s); }

/* Roster */

.roster { padding: 16px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat-strip > div { padding: 12px 8px; background: var(--black); text-align: center; }
.stat-strip b { display: block; font-size: var(--t-xl); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-strip span { color: var(--ash); font-size: var(--t-xs); }

.roster-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.roster-meta p { margin: 0; color: var(--ash); font-size: var(--t-s); }
.roster-meta .btn-secondary { width: auto; padding: 8px 12px; font-size: var(--t-s); }
.roster-actions { display: flex; gap: 8px; }

/* Heading added only to the shared guild card (the modal header isn't part of it) */
.guild-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-family: var(--font-title); font-size: var(--t-2xl); line-height: 1.2; }
.guild-card-head .avatar { width: 64px; height: 64px; font-size: var(--t-m); }
.guild-card-head .avatar:has(img) { border: 0; background: none; }
.guild-card-head .avatar img { object-fit: contain; }

.blader-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.blader-card:hover { border-color: var(--teal); background: var(--surface-raised); }
.blader-card .avatar { width: 44px; height: 44px; font-size: var(--t-s); }
.blader-info { flex: 1; min-width: 0; }
.blader-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blader-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.blader-score { text-align: right; }
.blader-score b { display: block; font-size: var(--t-xl); line-height: 1; font-variant-numeric: tabular-nums; }
.blader-score span { color: var(--ash); font-size: var(--t-xs); }

/* Profile */

.profile { padding: 20px 16px 28px; background: var(--black); }

.profile-head {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.profile-head .portrait { width: 112px; font-size: 2.2rem; border-color: var(--teal); }
.profile.champion .profile-head .portrait { border-color: var(--pink); }

.profile-name {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.profile-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }

.guild-link {
  border: none;
  padding: 0;
  background: none;
  color: var(--teal-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.share-btn {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  corner-shape: bevel;
  background: var(--pink);
  color: var(--black);
  font-size: var(--t-s);
  cursor: pointer;
}

.profile .stat-strip { --cols: 3; margin: 20px 0 0; }
.profile .stat-strip b { font-size: var(--t-3xl); line-height: 1; }
.profile .stat-strip .first b { color: var(--pink); }

.stat-block { margin-top: 28px; }

.stat-block h5 {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--t-l);
  line-height: 1;
}

.stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.stat-row span:first-child { color: var(--ash); }
.stat-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

.finish-rows { display: grid; gap: 12px; }
.finish-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: var(--t-s); }
.finish-row .label { display: flex; align-items: center; gap: 8px; }
.finish-row .val { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.finish-row .val small { color: var(--ash); }

.achievements { display: flex; flex-wrap: wrap; gap: 8px; }

.achievement {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  corner-shape: bevel;
  font-size: var(--t-s);
}

.achievement i { color: var(--teal); }
.achievement.won { border-color: var(--pink); }
.achievement.won i { color: var(--pink); }

/* Guild EXP: a season bar with a marker per guild skill */
.guild-exp { margin: 0 0 20px; }
.guild-exp h5 { display: flex; justify-content: space-between; align-items: baseline; }
.guild-exp .exp-sources + h5 { margin-top: 20px; }
.exp-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.exp-total small { color: var(--ash); font-weight: 400; font-size: var(--t-s); }
.exp-track { position: relative; }
.exp-track .meter { height: 12px; }
.exp-mark { position: absolute; top: -3px; width: 4px; height: 18px; margin-left: -2px; border-radius: 1px; background: var(--line); }
.exp-mark.unlocked { background: var(--teal-bright); }
.exp-sources { margin: 8px 0 12px; color: var(--ash); font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.skills { list-style: none; margin: 0 0 12px; padding: 0; }
.skill { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ash); font-size: var(--t-s); }
.skill-text span { display: block; font-size: var(--t-xs); }
.skill-exp { font-variant-numeric: tabular-nums; }
.skill.unlocked { color: var(--bone); }
.skill.unlocked i { color: var(--teal-bright); }

/* GGW2 achievements on the blader profile: tall slate cards with a gold frame, a diamond emblem and the name */
.ach-head { display: flex; justify-content: space-between; align-items: baseline; }
.ach-grid { --gold: #e3c98f; --gold-dim: rgba(227, 201, 143, 0.45); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
/* Every card is the same size: rows share one height (the tallest card's), and each card fills its cell. */
.ach-grid > li { display: flex; aspect-ratio: 0.68; }
.ach-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px 6px;
  border: 2px solid var(--gold-dim);
  border-radius: 10px;
  corner-shape: scoop;
  background: linear-gradient(180deg, #3b4258, #2a2f41);
  color: var(--gold);
  font: inherit;
  cursor: pointer;
}
/* Inner gold frame. Drawn with a border (not an inset shadow) so the shared profile image shows it too. */
.ach-card::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(227, 201, 143, 0.28); border-radius: 7px; pointer-events: none; }
.ach-emblem { position: relative; display: grid; place-items: center; width: 52px; height: 52px; }
.ach-emblem::before { content: ""; position: absolute; inset: 7px; border: 2px solid var(--gold-dim); transform: rotate(45deg); background: rgba(227, 201, 143, 0.08); }
.ach-emblem i { position: relative; font-size: 1.5rem; text-shadow: 0 0 12px rgba(227, 201, 143, 0.45); }
/* The name always takes two lines' height, so the EXP pills line up across a row. */
.ach-name { display: flex; align-items: center; justify-content: center; min-height: 2.3em; font-family: var(--font-title); font-weight: 600; font-size: var(--t-xs); line-height: 1.15; text-align: center; color: #f3e6c4; }
.ach-exp { margin-top: -2px; padding: 1px 8px; border: 1px solid var(--gold-dim); border-radius: 999px; font-size: var(--t-xs); font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.ach-lock { position: absolute; top: 10px; right: 12px; font-size: 0.75rem; color: var(--ash); }
/* Locked cards are greyed with plain colours (the share image can't apply CSS filters). */
.ach-card:not(.unlocked) { border-color: rgba(233, 241, 240, 0.14); background: linear-gradient(180deg, #26282e, #1c1d22); color: #5d6168; }
.ach-card:not(.unlocked)::after { border-color: rgba(233, 241, 240, 0.08); }
.ach-card:not(.unlocked) .ach-emblem::before { border-color: rgba(233, 241, 240, 0.16); background: none; }
.ach-card:not(.unlocked) .ach-emblem i { text-shadow: none; }
.ach-card:not(.unlocked) .ach-name { color: #6f737a; }
.ach-card:not(.unlocked) .ach-exp { border-color: rgba(233, 241, 240, 0.14); color: #6f737a; }

/* Guild Quest badges, under the roster */
.guild-quests { margin-bottom: 8px; }
.guild-quests h5 { display: flex; justify-content: space-between; align-items: baseline; }
.quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; corner-shape: bevel; color: var(--ash); font-size: var(--t-s); }
.quest-badge { display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid var(--line); border-radius: 12px; corner-shape: bevel; line-height: 1; }
.quest-badge i { font-size: 1.1rem; }
.quest-badge b { font-size: var(--t-xs); margin-top: -6px; }
.quest-text b { display: block; color: var(--bone); font-weight: 600; }
.quest-text span { display: block; font-size: var(--t-xs); }
.quest-state { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; }
.quest.unlocked { border-color: var(--pink); }
.quest.unlocked .quest-badge { border-color: var(--pink); background: rgba(255, 46, 136, 0.14); color: var(--pink); }
.quest.unlocked .quest-state { color: var(--pink); font-weight: 600; }
.quest:not(.unlocked) .quest-badge { opacity: 0.55; }

/* Share preview */

.share-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.96);
  text-align: center;
}

.share-overlay.open { display: flex; }
.share-overlay h4 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: var(--t-xl); }
.share-overlay img { max-width: 100%; max-height: 55%; border: 1px solid var(--line-strong); }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 360px; }

/* Battle log */

.log-hero { padding: 20px 16px 4px; }
.log-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.log-identity .avatar { width: 52px; height: 52px; font-size: var(--t-m); }
.log-identity h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: var(--t-xl); line-height: 1.15; }
.log-identity p { margin: 4px 0 0; color: var(--ash); font-size: var(--t-s); }
.log-hero .stat-strip { --cols: 5; }

.log-note { margin: 0 16px; padding: 10px 12px; border-left: 2px solid var(--teal); color: var(--ash); font-size: var(--t-xs); }

.log-list { padding: 16px; }
.log-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.log-toolbar p { margin: 0; color: var(--ash); font-size: var(--t-s); }
.log-toolbar .actions { display: flex; gap: 6px; }

.small-btn {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  corner-shape: bevel;
  background: none;
  font-size: var(--t-xs);
  cursor: pointer;
}

.small-btn:hover { border-color: var(--teal); }

.encounter {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
}

.encounter.won { border-left-color: var(--teal); }
.encounter.lost { border-left-color: var(--pink); }

.encounter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}

.encounter-head:hover { background: var(--surface-raised); }
.encounter-title { font-weight: 600; }
.encounter-title .vs { color: var(--ash); font-weight: 400; margin: 0 6px; }
.encounter-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; color: var(--ash); font-size: var(--t-xs); }
.encounter-result { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.encounter-score { font-size: var(--t-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.encounter-chev { color: var(--ash); transition: transform var(--ease); }
.encounter.expanded .encounter-chev { transform: rotate(180deg); }

.outcome { font-size: var(--t-xs); font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.outcome.win { background: rgba(14, 163, 174, 0.2); color: var(--teal-bright); }
.outcome.loss { background: rgba(255, 46, 136, 0.18); color: var(--pink); }
.outcome.draw { background: rgba(var(--bone-rgb), 0.08); color: var(--ash); }

.encounter-bouts { display: none; padding: 0 14px 12px; }
.encounter.expanded .encounter-bouts { display: block; }

.bout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.bout-side { min-width: 0; }
.bout-side.right { text-align: right; }
.bout-player { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.bout-player:hover { color: var(--teal-bright); text-decoration: underline; }
.bout-team { display: block; color: var(--ash); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bout-center { text-align: center; }
.bout-score { font-size: var(--t-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.bout-rounds { display: flex; justify-content: center; gap: 3px; margin-top: 4px; }
.bout-rounds span { width: 10px; height: 10px; border-radius: 2px; background: var(--sw); }
.bout-rounds span.theirs { background: transparent; box-shadow: inset 0 0 0 2px var(--sw); }

.round-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; color: var(--ash); font-size: var(--t-xs); }
.round-key span { display: inline-flex; align-items: center; gap: 6px; }
.round-key .swatch.hollow { background: transparent; box-shadow: inset 0 0 0 2px var(--ash); }
.round-key .swatch.solid { background: var(--ash); }

/* Brackets */

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

.bracket-launch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  text-decoration: none;
  transition: border-color var(--ease), background var(--ease);
}

a.bracket-launch:hover { border-color: var(--pink); background: var(--surface-raised); }
.bracket-launch .letter { font-family: var(--font-title); font-size: var(--t-3xl); line-height: 1; width: 44px; text-align: center; }
.bracket-launch .name { display: block; font-weight: 600; }
.bracket-launch .status { color: var(--ash); font-size: var(--t-xs); }
.bracket-launch.unavailable { opacity: 0.55; }

/* Upload */

.upload-form { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.upload-form label { display: block; margin-bottom: 6px; color: var(--ash); font-size: var(--t-s); }

.form-control {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  background: var(--black);
}

.form-control:focus { outline: none; border-color: var(--teal); }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 170px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--bevel-sm);
  corner-shape: bevel;
  color: var(--ash);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.dropzone.drag, .dropzone:hover { border-color: var(--teal); background: var(--surface-raised); }
.dropzone i { font-size: 1.8rem; color: var(--teal); }
.dropzone img { width: 140px; height: 140px; object-fit: cover; border: 2px solid var(--pink); border-radius: 12px; corner-shape: bevel; }

.form-msg { min-height: 1.5em; text-align: center; font-size: var(--t-s); }
.form-msg.ok { color: var(--teal-bright); }
.form-msg.err { color: var(--pink); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .menu-toggle { display: flex; }
  .theme-toggle-icon { order: 0; margin-left: auto; }

  .hud-nav {
    position: fixed;
    top: var(--hud-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
    z-index: -1;
  }

  .hud-nav.active { transform: none; visibility: visible; }
  .nav-link { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: var(--t-m); }

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

@media (max-width: 760px) {
  .sched-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "pod" "siege" "cal"; gap: 16px; }
  .sched-panel { padding: 16px; }
  .sched-siege .fixtures { flex: none; contain: none; max-height: 60vh; }
  /* Season path: a compact track that fits the screen instead of scrolling
     sideways. Labels move into the caption; screen readers still get them. */
  .season-path { overflow: visible; margin-top: 8px; padding-bottom: 6px; }
  .stage { flex: 1 1 0; min-width: 0; padding-right: 0; }
  .stage:last-child { flex: 0 0 36px; }
  .stage::before { top: 17px; left: 36px; }
  .stage-node { width: 36px; height: 36px; border-radius: 8px; font-size: var(--t-m); }
  .stage.done .stage-node::after { width: 15px; height: 15px; right: -5px; bottom: -5px; font-size: 8px; }
  .stage.live .stage-node { box-shadow: 0 0 0 3px rgba(255, 46, 136, 0.25); }

  .stage-label,
  .stage-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .season-caption { display: block; }

  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-logo { grid-row: 1; justify-self: center; width: min(260px, 70vw); }
  .hero-status { margin-inline: auto; }
  .section { padding-top: 64px; }
  .section-title { font-size: var(--t-2xl); }

  .titles, .table-pair { grid-template-columns: minmax(0, 1fr); }

  .char-sheet { grid-template-columns: 96px minmax(0, 1fr); padding: 18px; }
  .char-sheet .portrait { width: 96px; font-size: 2rem; }
  .char-name { font-size: var(--t-xl); }
  .gauges { grid-template-columns: minmax(0, 1fr); }

  .rank-row { grid-template-columns: 36px 36px minmax(0, 1fr) 56px; gap: 6px 10px; }
  .rank-row .avatar { width: 36px; height: 36px; }
  .rank-row .record { display: none; }
  .rank-row .wr-meter { grid-column: 3 / -1; grid-row: 2; }
  .rank-row .pos { font-size: var(--t-l); }

  .map { height: 340px; }
}

@media (max-width: 560px) {
  .fixtures { padding-left: 16px; }
  .ach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sched-cal .cal-day { min-height: 52px; }
  :root { --hud-h: 56px; }
  .hud-brand { font-size: var(--t-m); }
  .hud-logo { height: 38px; }

  /* Smaller map markers so phones show more of the map (they stay centred on the spot) */
  .guild-pin { width: 32px; height: 32px; border-radius: 7px; font-size: 0.7rem; }

  .modal-overlay { padding: 0; }
  .modal-card, .modal-card.wide, .modal-card.auto { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: none; }

  .roster .stat-strip { --cols: 2; }
  .log-hero .stat-strip { --cols: 3; }
  .bracket-grid { grid-template-columns: minmax(0, 1fr); }
  .finish-row { grid-template-columns: 76px minmax(0, 1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Display type (Sora) ---------- */

.hero-title, .section-title, .subsection-title, .hud-brand,
.char-name, .portrait, .title-row dt, .rank-row .pos, .modal-title,
.profile-name, .stat-block h5, .share-overlay h4, .log-identity h2, .bracket-launch .letter {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-title { font-weight: 700; letter-spacing: -0.035em; }
.portrait, .rank-row .pos, .bracket-launch .letter { font-weight: 700; }
