:root {
  --radius: 0.65rem;
  --background: #071018;
  --foreground: #eef3f7;
  --card: #0e1822;
  --card-2: #132231;
  --border: rgba(194, 212, 225, 0.14);
  --accent: #162636;
  --muted: #101b26;
  --muted-foreground: #9db0bf;
  --text-disabled: #6f8190;
  --layout-sections-color: #0a121a;
  --brand: #e8b84a;
  --brand-deep: #9a6a1a;
  --brand-ember: #c27a2e;
  --brand-gold: #f3d27a;
  --steel: #c2d4e1;
  --steel-dim: #abbdc8;

  --lt: #1c3e20;
  --lt-foreground: #89f19c;
  --lv: #193845;
  --lv-foreground: #5dccdc;
  --ee: #4d4525;
  --ee-foreground: #e5d386;

  --ht1: #6d5d2c;
  --ht1-foreground: #e8ba3a;
  --lt1: #584c25;
  --lt1-foreground: #d5b355;
  --ht2: #5e6979;
  --ht2-foreground: #c4d3e7;
  --lt2: #4a505a;
  --lt2-foreground: #a0a7b2;
  --ht3: #6b4b36;
  --ht3-foreground: #f89f5a;
  --lt3: #593722;
  --lt3-foreground: #c67b42;
  --ht4: #303144;
  --ht4-foreground: #81749a;
  --lt4: #2c2e40;
  --lt4-foreground: #655b79;
  --ht5: #2b2c3d;
  --ht5-foreground: #8f82a8;
  --lt5: #262a3a;
  --lt5-foreground: #655b79;
  --placement-other: #1e2634;
  --tier-1: #41361b;
  --tier-1-foreground: #f0b857;
  --tier-2: #343843;
  --tier-2-foreground: #a9b1b9;
  --tier-3: #352620;
  --tier-3-foreground: #d59161;
  --tier-4: #161e2a;
  --tier-4-foreground: #b1c0cc;
  --tier-5: #161e2a;
  --tier-5-foreground: #b1c0cc;
  --hightier: #263244;
  --hightier-hover: #3e4f68;
  --hightier-icon: #3d526f;
  --hightier-icon-hover: #637998;
  --lowtier: #161e2a;
  --lowtier-hover: #263242;
  --lowtier-icon: #253449;
  --lowtier-icon-hover: #374d6c;

  --font: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "DM Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(90% 55% at 12% -5%, rgba(0, 114, 206, 0.18), transparent 50%),
    radial-gradient(70% 45% at 90% 8%, rgba(253, 185, 19, 0.12), transparent 48%),
    radial-gradient(60% 40% at 70% 100%, rgba(158, 48, 57, 0.1), transparent 55%),
    linear-gradient(180deg, #071018 0%, #0b1520 55%, #09131c 100%);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app {
  width: 100%;
  min-height: 100vh;
  color: var(--foreground);
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: min(1352px, calc(100% - 1.5rem));
  margin: 0.35rem auto 0;
  padding: 0.55rem 0.85rem;
  background: rgba(10, 18, 28, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

.top-header .country-ranking {
  flex: 1 1 auto;
  min-width: 0;
}

.site-masthead {
  display: grid;
  place-items: center;
  width: min(1352px, calc(100% - 1.5rem));
  margin: 0.65rem auto 0;
  position: relative;
  z-index: 35;
}

.top-brand {
  position: relative;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.top-brand img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 8px rgba(240, 146, 68, 0.45));
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.top-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 14rem;
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--foreground);
  pointer-events: none;
  user-select: none;
}

.top-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  background: #1e2430;
}

.top-discord-name {
  font-size: 0.82rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.15rem;
}

.top-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.top-link:hover {
  color: var(--brand-gold);
  border-color: rgba(243, 210, 122, 0.35);
}

.top-user {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  margin-right: 0.25rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  width: 100%;
  max-width: 1352px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 0 0.75rem;
}

.board {
  width: 100%;
  height: fit-content;
  position: relative;
  margin-top: 5.8rem;
  padding: 0.75rem 1.5rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(10, 18, 28, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  /* Do not clip — mode tabs sit above the board (bottom: 100%). */
  overflow: visible;
}

.mode-tabs {
  position: absolute;
  left: 0;
  bottom: 100%;
  z-index: 30;
  display: flex;
  gap: 0.2rem;
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: 0;
  transform: translateY(2px);
}

.mode-tabs-thumb {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0072ce, var(--brand), #9e3039);
  pointer-events: none;
  z-index: 4;
  will-change: left, width;
}

.mode-link {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.mode-tab {
  --mode-pad-x: 0.35rem;
  width: 100%;
  min-width: 0;
  min-height: 3.7rem;
  height: fit-content;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.18rem;
  padding: 0.35rem var(--mode-pad-x) 0.45rem;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 0.85rem 0.85rem 0 0;
  background: rgba(14, 24, 34, 0.95);
  color: color-mix(in oklab, var(--muted-foreground) 70%, transparent);
  white-space: nowrap;
  overflow: hidden;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.mode-tab img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

.mode-name {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: none;
  margin: 0;
  opacity: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-size: clamp(0.58rem, 0.9vw, 0.72rem);
  line-height: 1.1;
  font-weight: 700;
  text-transform: none;
  transform: none;
}

.mode-tab:hover {
  background: rgba(22, 38, 54, 0.98);
  color: var(--brand-gold);
}

.mode-tab.is-active,
.mode-tab.is-open {
  background: rgba(24, 40, 56, 1);
  color: var(--brand-gold);
  box-shadow: inset 0 0 0 1px rgba(243, 210, 122, 0.28);
}

.mode-tab.is-active .mode-name,
.mode-tab.is-open .mode-name {
  opacity: 1;
}

.mode-tab.is-active::after {
  content: none;
}

.info-panel h2,
.info-heading {
  margin: 0.65rem 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground);
}

.info-heading u {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.info-panel p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  line-height: 1.35;
}

.info-links a {
  color: var(--brand);
}

.board-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.35rem 0 0.75rem;
}

.board-tools-end {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.info-rail {
  position: relative;
  top: auto;
  right: auto;
}

.info-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 30;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(12, 18, 28, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.info-rail-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.source-counts {
  margin: 0;
  margin-right: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.source-counts strong {
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.source-counts-sep {
  margin: 0 0.35rem;
  opacity: 0.55;
}

.info-toggle,
.discord-invite {
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  cursor: pointer;
  padding: 0.48rem 0.7rem;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.info-toggle-ico {
  flex: 0 0 auto;
  opacity: 0.9;
}

.info-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
}

.info-tab {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.info-tab.is-active {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.info-pane[hidden] {
  display: none;
}

.info-title-list,
.info-points-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.info-title-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.info-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.info-title-row img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.info-title-name {
  font-size: 0.84rem;
  font-weight: 700;
}

.info-title-name.is-grandmaster,
.info-title-name.is-master {
  color: #fde047;
}

.info-title-name.is-high {
  color: #fda4af;
}

.info-title-name.is-rising {
  color: #d8b4fe;
}

.info-title-name.is-rookie {
  color: #d1d5db;
}

.info-points-list li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-points-list h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--item-color, var(--foreground));
}

.info-points-list h3 img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.info-point-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.15rem;
  padding-left: 0.45rem;
  border-left: 2px solid var(--item-color, var(--border));
}

.info-point-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-width: 5.5rem;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--item-color, var(--foreground));
  white-space: nowrap;
}

.info-point-pill.is-high {
  background: color-mix(in srgb, var(--item-color, #fff) 20%, transparent);
}

.info-point-pill.is-low {
  background: color-mix(in srgb, var(--item-color, #fff) 10%, transparent);
}

.info-point-pill svg {
  flex: 0 0 auto;
}

.info-toggle:hover,
.discord-invite:hover {
  color: var(--brand-gold);
  border-color: rgba(243, 210, 122, 0.35);
}

.discord-invite:hover {
  color: #c8d0ff;
  border-color: rgba(88, 101, 242, 0.55);
  background: rgba(88, 101, 242, 0.12);
}

.source-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.toggle-thumb {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: 0.2rem;
  width: calc(50% - 0.2rem);
  border-radius: 999px;
  background: var(--brand-gold);
  box-shadow: 0 4px 12px rgba(243, 210, 122, 0.28);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  will-change: transform;
}

.source-toggle[data-source="external"] .toggle-thumb {
  transform: translateX(100%);
}

.status-tabs {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.status-tabs .toggle-thumb {
  width: calc(50% - 0.2rem);
  background: var(--brand-gold);
  box-shadow: 0 4px 12px rgba(243, 210, 122, 0.28);
}

.status-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.status-chip:hover {
  color: var(--foreground);
}

.status-chip.is-active {
  color: #0b1520;
  background: transparent;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

tr.is-retired {
  opacity: 0.72;
}

.source-btn {
  position: relative;
  z-index: 1;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.source-btn:hover {
  color: var(--foreground);
}

.source-btn.is-active {
  color: #0b1520;
  background: transparent;
}

.source-btn:active,
.status-chip:active,
.region-chip:active,
.info-toggle:active,
.discord-invite:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .source-btn,
  .status-chip,
  .region-chip,
  .info-toggle,
  .discord-invite {
    transition: none;
  }

  .toggle-thumb {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.region-tabs {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  flex: 0 0 auto;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.region-tabs .toggle-thumb {
  width: calc((100% - 0.4rem) / 4);
  background: var(--brand-gold);
  box-shadow: 0 4px 12px rgba(243, 210, 122, 0.28);
  transform: translateX(0);
  transition: none;
}

.region-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.region-chip:hover {
  color: var(--foreground);
}

.region-chip.is-active {
  color: #0b1520;
}

.flag-ico {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  object-fit: cover;
}

.flag-ico[src*="flag-baltic"] {
  width: 26px;
  height: 16px;
}

.search {
  width: min(14rem, 100%);
  font: inherit;
  color: var(--foreground);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.5rem 0.75rem;
}

.search:focus {
  outline: none;
  border-color: rgba(243, 210, 122, 0.45);
  box-shadow: 0 0 0 2px rgba(243, 210, 122, 0.12);
}

.list-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0 1rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  font-size: 0.72rem;
}

.list-head.desktop {
  display: grid;
  grid-template-columns: 3rem 14rem 1fr auto auto;
  align-items: center;
}

.list-head.mobile {
  display: none;
}

.lh-player {
  text-align: left;
  display: inline-block;
}

.lh-region {
  margin-left: 0;
  text-align: right;
  justify-self: end;
}

.lh-tiers {
  width: auto;
  min-width: 18rem;
  text-align: right;
  margin-left: 0;
  padding-right: 0.5rem;
  justify-self: end;
}

.lh-region-m {
  margin-left: auto;
  width: 84px;
  text-align: right;
}

.players {
  padding-top: 0.7rem;
}

.player-row {
  width: 100%;
  min-height: 5.75rem;
  height: auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin: 0.55rem 0;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(14, 24, 34, 0.88);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
  overflow: visible;
}

.player-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(243, 210, 122, 0.08), transparent 30%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.player-row:hover {
  border-color: rgba(243, 210, 122, 0.35);
  background: rgba(18, 30, 42, 0.95);
  z-index: 3;
}

.player-row:hover::before {
  opacity: 1;
}

@media (min-width: 640px) {
  .player-row:hover {
    transform: translateY(-1px);
  }

  .player-row:active {
    transform: scale(0.997);
  }
}

.player-row[hidden],
.mode-player[hidden],
.source-hidden {
  display: none !important;
}

.player-row-inner {
  width: 100%;
  min-height: 5.75rem;
  height: 100%;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0;
}

.player-left {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: inherit;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.player-right {
  margin-left: auto;
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-right: 0.35rem;
}

.region-box {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  margin-right: 0;
}

@media (min-width: 768px) {
  .region-box.desktop-only {
    margin-left: 0;
    background: transparent;
  }
}

.region-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  line-height: 0;
}

.region-flag img {
  display: block;
  width: 40px;
  height: 28px;
  object-fit: cover;
}

.region-flag.sm img {
  width: 22px;
  height: 15px;
}

.tiers-block {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.2rem 0.15rem;
}

.tier-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.15rem;
}

.tier-slot {
  position: relative;
  width: 2.75rem;
  height: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.tier-ico {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--placement-other);
  overflow: hidden;
  padding: 0.2rem;
  box-sizing: border-box;
}

.tier-ico img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.tier-lbl {
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 2.25rem;
  padding: 0 0.2rem;
  border-radius: 0.5rem;
  font-style: normal;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  background: var(--placement-other);
  color: var(--muted-foreground);
  white-space: nowrap;
}

.tier-slot.ht1 .tier-lbl { color: var(--ht1-foreground); }
.tier-slot.lt1 .tier-lbl { color: var(--lt1-foreground); }
.tier-slot.ht2 .tier-lbl { color: var(--ht2-foreground); }
.tier-slot.lt2 .tier-lbl { color: var(--lt2-foreground); }

.tier-slot.ht3 .tier-ico { border-color: var(--ht3); }
.tier-slot.ht3 .tier-lbl { background: var(--ht3); color: var(--ht3-foreground); }
.tier-slot.lt3 .tier-ico { border-color: var(--lt3); }
.tier-slot.lt3 .tier-lbl { background: var(--lt3); color: var(--lt3-foreground); }
.tier-slot.ht4 .tier-ico { border-color: var(--ht4); }
.tier-slot.ht4 .tier-lbl { background: var(--ht4); color: var(--ht4-foreground); }
.tier-slot.lt4 .tier-ico { border-color: var(--lt4); }
.tier-slot.lt4 .tier-lbl { background: var(--lt4); color: var(--lt4-foreground); }
.tier-slot.ht5 .tier-ico { border-color: var(--ht5); }
.tier-slot.ht5 .tier-lbl { background: var(--ht5); color: var(--ht5-foreground); }
.tier-slot.lt5 .tier-ico { border-color: var(--lt5); }
.tier-slot.lt5 .tier-lbl { background: var(--lt5); color: var(--lt5-foreground); }

.tier-slot.is-empty .tier-ico {
  background: rgba(0, 0, 0, 0.2);
  border: 2px dashed rgba(100, 116, 139, 0.5);
}

.tier-slot.is-empty .tier-lbl {
  bottom: 0.125rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(100, 116, 139, 0.1);
  color: var(--muted-foreground);
  font-weight: 600;
}

.placement {
  max-width: 10rem;
  width: 100%;
  height: 3.5rem;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  overflow: visible;
  border-radius: 0.125rem;
  flex: 0 0 auto;
}

.placement-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placement-num {
  margin: 0;
  position: absolute;
  align-self: flex-end;
  font-size: 2.25rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  filter: drop-shadow(0 3px 1px #232323);
}

.skin {
  position: absolute;
  right: 1.35rem;
  bottom: -0.2rem;
  width: 68px;
  height: 78px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(-4px -2px 1px #00000077);
  pointer-events: none;
}

.player-meta {
  width: 18rem;
  max-width: 18rem;
  overflow: hidden;
}

.player-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #e8e8ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.score-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  padding: 0.08rem 0.32rem;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.35;
  flex: 0 0 auto;
}

.score-tier.ht1 { background: var(--ht1); color: var(--ht1-foreground); }
.score-tier.lt1 { background: var(--lt1); color: var(--lt1-foreground); }
.score-tier.ht2 { background: var(--ht2); color: var(--ht2-foreground); }
.score-tier.lt2 { background: var(--lt2); color: var(--lt2-foreground); }
.score-tier.ht3 { background: var(--ht3); color: var(--ht3-foreground); }
.score-tier.lt3 { background: var(--lt3); color: var(--lt3-foreground); }
.score-tier.ht4 { background: var(--ht4); color: var(--ht4-foreground); }
.score-tier.lt4 { background: var(--lt4); color: var(--lt4-foreground); }
.score-tier.ht5 { background: var(--ht5); color: var(--ht5-foreground); }
.score-tier.lt5 { background: var(--lt5); color: var(--lt5-foreground); }
.score-tier.is-none {
  background: var(--placement-other);
  color: var(--muted-foreground);
}

.player-ach {
  margin: 0;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  color: var(--text-disabled);
  font-size: 0.9rem;
  font-weight: 500;
}

.player-ach img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.ach-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--steel-dim);
}

.ach-pts {
  color: rgba(251, 230, 123, 0.55);
}

.mode-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(12rem, 1fr));
  gap: 0.5rem;
  min-width: 80rem;
  padding-bottom: 2rem;
}

.players:has(.mode-board),
.board-results-body:has(.mode-board) {
  overflow-x: auto;
  scrollbar-width: thin;
}

.mode-col {
  min-width: 0;
  background: transparent;
  border: 0;
}

.mode-col-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3.5rem;
  padding: 0 0.5rem;
  border-radius: 0.75rem 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mode-col-trophy {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: none;
}

.mode-col-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mode-player {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  margin-top: 0.125rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--hightier);
  overflow: hidden;
  min-height: 0;
  cursor: pointer;
  transition: background 0.15s ease;
  z-index: 1;
}

.mode-player.is-lt {
  background: var(--lowtier);
}

.mode-player:hover {
  background: var(--hightier-hover);
  border-color: transparent;
  z-index: 2;
}

.mode-player.is-lt:hover {
  background: var(--lowtier-hover);
}

.mode-region {
  width: 0.125rem;
  height: 100%;
  align-self: stretch;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.2s ease;
}

.mode-region strong {
  opacity: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.1s ease;
}

.mode-player:hover .mode-region {
  width: 2.5rem;
}

.mode-player:hover .mode-region strong {
  opacity: 1;
}

.mode-region-LT {
  border-left: 2px solid var(--lt-foreground);
  background: var(--lt);
}
.mode-region-LT strong { color: var(--lt-foreground); }
.mode-region-LV {
  border-left: 2px solid var(--lv-foreground);
  background: var(--lv);
}
.mode-region-LV strong { color: var(--lv-foreground); }
.mode-region-EE {
  border-left: 2px solid var(--ee-foreground);
  background: var(--ee);
}
.mode-region-EE strong { color: var(--ee-foreground); }

.mode-player .skin {
  position: static;
  width: 30px;
  height: 30px;
  transform: none;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  object-fit: cover;
  filter: none;
  flex: 0 0 auto;
}

.mode-ign {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-pos {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--hightier-icon);
  padding: 0.125rem;
}

.mode-player.is-ht:hover .mode-pos { color: var(--hightier-icon-hover); }
.mode-player.is-lt .mode-pos { color: var(--lowtier-icon); }
.mode-player.is-lt:hover .mode-pos { color: var(--lowtier-icon-hover); }
.mode-player.is-ht .pos-lt { display: none; }
.mode-player.is-lt .pos-ht { display: none; }

.mode-pos svg {
  display: block;
  width: 32px;
  height: 32px;
}

.col-empty {
  color: var(--muted-foreground);
  text-align: center;
  padding: 1rem 0;
}

.footer {
  width: 100%;
  margin-top: 4rem;
  padding: 2rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
  color: var(--muted-foreground);
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flash {
  margin: 1rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(0, 187, 127, 0.35);
  background: rgba(0, 187, 127, 0.12);
  color: #9dffd6;
}

.flash-error {
  border-color: rgba(237, 37, 37, 0.4);
  background: rgba(237, 37, 37, 0.12);
  color: #ffc9c9;
}

.empty {
  color: var(--muted-foreground);
  padding: 1rem 0.25rem;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: flex;
}

/* panel pages */
.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
}

.header-inner,
.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-stack {
  display: grid;
  line-height: 1.15;
}

.brand-text {
  font-size: 1.05rem;
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: var(--muted-foreground);
}

.nav a:hover,
.nav a.active,
.nav .active {
  color: var(--brand-gold);
}

.panel-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 1.25rem;
}

.panel-jump a {
  padding: 0.35rem 0.7rem;
  background: var(--card-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.panel-jump a:hover {
  color: var(--brand-gold);
}

.panel-section {
  margin-bottom: 1.75rem;
}

.panel-section > h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 0.02em;
}

.panel-section > .lede {
  margin-top: 0;
}

.panel {
  background: linear-gradient(133deg, #000 5%, #1c1c1c);
  border: 0;
  border-radius: 0;
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.player-finder {
  display: grid;
  gap: 0.85rem;
}

.player-finder-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.player-finder-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.player-finder-ico {
  position: absolute;
  left: 0.85rem;
  color: var(--brand-gold);
  opacity: 0.75;
  pointer-events: none;
}

.player-finder-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 1px solid rgba(194, 212, 225, 0.18);
  border-radius: 0.85rem;
  background: rgba(8, 14, 22, 0.85);
  font-size: 1.05rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.player-finder-input:focus {
  outline: none;
  border-color: rgba(251, 230, 123, 0.55);
  box-shadow: 0 0 0 3px rgba(251, 230, 123, 0.12);
}

.player-finder-hint {
  margin: 0;
  padding: 1.4rem 1rem;
  text-align: center;
  color: var(--muted-foreground);
  border: 1px dashed rgba(194, 212, 225, 0.16);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
}

.player-finder-results {
  display: grid;
  gap: 0.75rem;
}

.player-manage-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(194, 212, 225, 0.14);
  border-radius: 0.85rem;
  background: rgba(14, 24, 34, 0.72);
  animation: player-card-in 0.22s ease-out;
}

.player-manage-card.is-retired {
  opacity: 0.72;
}

@keyframes player-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.player-manage-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-manage-skin {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.player-manage-meta {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.player-manage-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-manage-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.player-manage-block {
  display: grid;
  gap: 0.4rem;
}

.player-manage-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.region-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.region-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.5rem;
  border: 1px solid rgba(194, 212, 225, 0.16);
  border-radius: 0.65rem;
  background: rgba(8, 14, 22, 0.7);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.region-pick img {
  border-radius: 1px;
}

.region-pick:hover {
  border-color: rgba(251, 230, 123, 0.4);
  transform: translateY(-1px);
}

.region-pick.is-active {
  border-color: rgba(251, 230, 123, 0.65);
  background: rgba(251, 230, 123, 0.1);
  box-shadow: inset 0 0 0 1px rgba(251, 230, 123, 0.2);
}

.region-pick span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}

.player-manage-tier select {
  min-width: 7rem;
}

.player-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(194, 212, 225, 0.1);
}

@media (max-width: 640px) {
  .region-switch {
    grid-template-columns: 1fr;
  }
}

.bg-glow {
  display: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

form {
  display: grid;
  gap: 0.75rem;
}

form.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

input[type="text"],
select,
textarea,
button {
  font: inherit;
  color: var(--foreground);
}

input[type="text"],
select,
textarea {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
}

button {
  justify-self: start;
  background: linear-gradient(135deg, #811b17, #f09244);
  color: #fff;
  border: 0;
  border-radius: 0;
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.btn-danger {
  background: linear-gradient(135deg, #5a040d, #a1503d);
  color: #fff;
}

.btn-discord {
  background: #5865f2;
  color: #fff !important;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  border-radius: 0;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 32rem;
}

.tier-table th,
.tier-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.tier-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-cell .skin {
  position: static;
  width: 36px;
  height: 36px;
}

.tier-pill {
  display: inline-flex;
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  font-weight: 800;
}

.tier-ht1 { background: var(--ht1); color: var(--ht1-foreground); }
.tier-ht2 { background: var(--ht2); color: var(--ht2-foreground); }
.tier-ht3 { background: var(--ht3); color: var(--ht3-foreground); }
.tier-ht4 { background: var(--ht4); color: var(--ht4-foreground); }
.tier-ht5 { background: var(--ht5); color: var(--ht5-foreground); }
.tier-lt1 { background: var(--lt1); color: var(--lt1-foreground); }
.tier-lt2 { background: var(--lt2); color: var(--lt2-foreground); }
.tier-lt3 { background: var(--lt3); color: var(--lt3-foreground); }
.tier-lt4 { background: var(--lt4); color: var(--lt4-foreground); }
.tier-lt5 { background: var(--lt5); color: var(--lt5-foreground); }

.muted,
.lede {
  color: var(--muted-foreground);
}

.actions form {
  display: flex;
  gap: 0.35rem;
}

@media (max-width: 767px) {
  .tier-grid {
    justify-content: center;
    flex-wrap: wrap;
    max-width: 14rem;
  }

  .list-head.desktop {
    display: none;
  }

  .list-head.mobile {
    display: flex;
  }

  .player-row {
    height: fit-content;
  }

  .player-row-inner {
    flex-direction: column;
    height: auto;
    align-items: stretch;
  }

  .player-left {
    flex-wrap: wrap;
  }

  .mobile-only {
    display: flex;
    margin-left: auto;
    margin-right: 0;
    height: auto;
    background: transparent;
  }

  .desktop-only {
    display: none !important;
  }

  .player-right {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.25rem 0.25rem 0.5rem;
  }

  .tiers-block {
    width: 100%;
    justify-content: center;
  }

  .player-meta {
    width: auto;
    max-width: calc(100% - 11rem);
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* player profile tab */
body.profile-open {
  overflow: hidden;
}

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.profile-overlay[hidden] {
  display: none !important;
}

.profile-sheet {
  --profile-ink: #fff;
  --profile-flag:
    linear-gradient(180deg, rgba(10, 18, 28, 0.42), rgba(10, 18, 28, 0.42));
  position: relative;
  width: min(440px, 100%);
  height: min(92vh, 780px);
  max-height: min(92vh, 780px);
  overflow-x: hidden;
  overflow-y: auto;
  margin-top: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 1.25rem 1.25rem 0 0;
  color: var(--profile-ink);
  background-color: rgba(10, 18, 28, 0.96);
  background-image: var(--profile-flag);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  box-shadow: 0 -24px 64px rgba(0, 0, 0, 0.55);
  animation: profile-up 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-content {
  position: relative;
  z-index: 1;
  isolation: isolate;
  min-height: 100%;
}

.profile-sheet[data-region="LT"] {
  --profile-flag: linear-gradient(
    to bottom,
    rgba(253, 185, 19, 0.55) 0%,
    rgba(253, 185, 19, 0.55) 33.333%,
    rgba(0, 106, 68, 0.55) 33.333%,
    rgba(0, 106, 68, 0.55) 66.666%,
    rgba(193, 39, 45, 0.55) 66.666%,
    rgba(193, 39, 45, 0.55) 100%
  );
}

.profile-sheet[data-region="LV"] {
  --profile-flag: linear-gradient(
    to bottom,
    rgba(158, 48, 57, 0.55) 0%,
    rgba(158, 48, 57, 0.55) 40%,
    rgba(255, 255, 255, 0.55) 40%,
    rgba(255, 255, 255, 0.55) 60%,
    rgba(158, 48, 57, 0.55) 60%,
    rgba(158, 48, 57, 0.55) 100%
  );
}

.profile-sheet[data-region="EE"] {
  --profile-flag: linear-gradient(
    to bottom,
    rgba(0, 114, 206, 0.55) 0%,
    rgba(0, 114, 206, 0.55) 33.333%,
    rgba(0, 0, 0, 0.55) 33.333%,
    rgba(0, 0, 0, 0.55) 66.666%,
    rgba(255, 255, 255, 0.55) 66.666%,
    rgba(255, 255, 255, 0.55) 100%
  );
}

@keyframes profile-up {
  from {
    transform: translateY(36px);
    opacity: 0.45;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.profile-close {
  position: sticky;
  top: 0.85rem;
  float: right;
  z-index: 5;
  margin: 0.85rem 0.85rem 0 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.profile-close:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: scale(1.05);
}

.profile-hero {
  position: relative;
  z-index: 2;
  clear: both;
  display: grid;
  grid-template-columns: minmax(140px, 42%) 1fr;
  align-items: end;
  gap: 0.35rem 0.75rem;
  min-height: 22rem;
  padding: 0.35rem 1.15rem 0.5rem;
}

.profile-skin-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 20.5rem;
  animation: skin-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes skin-rise {
  from {
    transform: translateY(28px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.profile-skin {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  image-rendering: auto;
}

.profile-meta {
  min-width: 0;
  padding: 0.55rem 0.65rem 1.1rem;
  margin: 0 0.15rem 0.25rem 0;
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
  animation: meta-fade 0.4s ease 0.08s both;
}

@keyframes meta-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.profile-rank {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.profile-region {
  margin-top: 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.profile-ach {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.7rem 0 0;
  padding: 0.45rem 0.6rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.32);
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.profile-ach img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: brightness(1.15);
}

.profile-ach .ach-pts {
  opacity: 0.8;
  font-weight: 500;
}

.profile-panel {
  position: relative;
  z-index: 2;
  margin: 0.35rem 0.85rem 1rem;
  padding: 0.95rem 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 20, 0.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  animation: meta-fade 0.4s ease 0.14s both;
}

.profile-tiers-label {
  margin: 0 0 0.65rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.profile-source {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--brand-gold);
}

.profile-tiers {
  display: block;
}

.profile-tiers .tier-grid {
  justify-content: flex-start;
  flex-wrap: wrap;
  max-width: none;
  gap: 0.25rem;
}

.profile-tiers .tier-slot {
  width: 2.75rem;
  height: 3.85rem;
}

.profile-tiers .tier-ico {
  width: 2.35rem;
  height: 2.35rem;
}

.profile-tiers .tier-ico img {
  width: 22px;
  height: 22px;
}

.profile-panel .col-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 640px) {
  .profile-overlay {
    align-items: center;
    padding: 1.5rem;
  }

  .profile-sheet {
    width: min(480px, 100%);
    min-height: min(84vh, 720px);
    margin: 0;
    border: 0;
    border-radius: 0;
    border-radius: var(--radius);
    animation: profile-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .profile-hero {
    min-height: 24rem;
    padding: 0.5rem 1.35rem 0.65rem;
  }

  .profile-skin-wrap {
    height: 22rem;
  }

  @keyframes profile-pop {
    from {
      transform: translateY(14px) scale(0.97);
      opacity: 0.4;
    }
    to {
      transform: none;
      opacity: 1;
    }
  }
}

@media (max-width: 420px) {
  .profile-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  .profile-skin-wrap {
    height: 17rem;
    margin-inline: auto;
  }

  .profile-meta {
    padding-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .profile-ach {
    justify-content: center;
  }
}
