/* Homepage equipment stage. Its canvas and static fallback occupy the same frame. */
.home .arena-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100svh - var(--nav-height));
  margin: 0;
  padding: 42px 0;
  text-align: left;
  background: #111215;
  isolation: isolate;
  overflow: hidden;
}
.home .arena-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(111deg, transparent 65%, #f8754521 65.1%, transparent 66%, transparent 77%, #fff1 77.1%, transparent 77.28%),
    radial-gradient(ellipse at 80% 68%, #422422 0, #231a1c 40%, transparent 68%),
    repeating-linear-gradient(90deg, transparent 0 59px, #ffffff06 59px 60px);
}
.hero-layout { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); gap: clamp(26px, 4.5vw, 72px); align-items: center; }
.hero-text { position: relative; min-width: 0; padding-block: 8px; }
.hero-kicker { display: flex; align-items: center; gap: 9px; color: #ddd3cf; font-size: 14px; letter-spacing: .16em; font-weight: 720; }
.hero-kicker::before { content: ""; width: 20px; height: 5px; background: var(--accent); transform: skewX(-28deg); }
.home .arena-hero h1 {
  display: grid;
  gap: 2px;
  margin: 16px 0 20px;
  color: var(--txt);
  -webkit-text-fill-color: currentColor;
  font: 900 clamp(55px, 6.1vw, 99px)/.98 var(--font);
  letter-spacing: -.047em;
  text-shadow: none;
  background: none;
  animation: none;
}
.hero-latin { font: italic 900 clamp(78px, 9.8vw, 156px)/.87 var(--display); letter-spacing: -.09em; margin-left: -.047em; color: #f6f3f0; }
.hero-cn { white-space: nowrap; }
.hero-lead { color: #d0c8c4; font-size: clamp(14px, 1.3vw, 19px); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-actions .arena-button { min-height: 50px; padding-inline: 18px; gap: 25px; font-size: 14px; }
.hero-actions .primary { min-width: 151px; }
.hero-actions .arena-button span { font: 720 17px/1 var(--mono); }
.hero-stats { display: flex; gap: 28px; border-top: 1px solid #ffffff2b; padding-top: 18px; margin-top: 40px; width: min(100%, 350px); }
.hero-stats > div { display: flex; align-items: baseline; gap: 8px; }
.hero-stats > div + div { padding-left: 25px; border-left: 1px solid #ffffff24; }
.hero-stats dt { order: 1; color: #c1b9b7; font-size: 12px; white-space: nowrap; }
.hero-stats dd { color: var(--txt); font: 800 29px/1 var(--mono); font-variant-numeric: tabular-nums; }

.scene-shell { min-width: 0; background: #141519; border: 1px solid #ffffff2b; box-shadow: 0 25px 72px #0504048f; }
.scene-display {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(384px, 40vw, 623px);
  color: var(--txt);
  background:
    linear-gradient(119deg, transparent 56%, #f9a5762c 56.15%, #ff583029 61%, transparent 61.15%, transparent 65%, #ff735626 65.2%, transparent 66%),
    radial-gradient(ellipse at 70% 54%, #58302a 0, #282022 41%, #15161a 75%);
}
.scene-display::before, .scene-display::after {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
  width: 25px;
  height: 25px;
  border: 1px solid #fff8;
}
.scene-display::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.scene-display::after { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }
#arenaCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; touch-action: pan-y; }
.scene-display[data-webgl="ready"] #arenaCanvas { opacity: 1; cursor: grab; }
.scene-display[data-webgl="ready"].is-dragging #arenaCanvas { cursor: grabbing; }
.scene-display[data-webgl="ready"] .scene-fallback { visibility: hidden; }
.scene-display:not([data-webgl="ready"]) .scene-hint { visibility: hidden; }
.scene-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(#0d0d13aa, transparent 19% 80%, #0c0c10a6);
}
.scene-fallback { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; perspective: 580px; }
.fallback-deck {
  width: 64%;
  height: 42%;
  position: absolute;
  bottom: 4%;
  transform: rotateX(58deg) rotateZ(-16deg);
  background: repeating-linear-gradient(90deg, transparent 0 14%, #fff2 14% 14.5%), #2f3037;
  border: 3px solid #f2593d;
  outline: 12px solid #ff7e5932;
  box-shadow: 0 14px #202127, 0 24px #1c1d23, 0 38px #100f14, 0 45px 65px #000b;
}
.scene-fallback img {
  z-index: 1;
  width: clamp(104px, 38%, 260px);
  height: auto;
  max-height: 79%;
  object-fit: contain;
  image-rendering: pixelated;
  transform: translateY(-6%) rotate(-14deg);
  filter: drop-shadow(12px 18px 17px #070608ab);
}
.scene-display[data-equipment="bow"] .scene-fallback img { mix-blend-mode: screen; image-rendering: auto; transform: translateY(-7%) rotate(-11deg) scale(1.55); }
.scene-head { position: absolute; z-index: 2; top: 24px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: start; gap: 12px; pointer-events: none; }
.scene-head h2 { font-size: 22px; line-height: 1.25; font-weight: 820; letter-spacing: -.015em; }
.scene-head p { color: #dfc7bf; font: 650 12px/1.4 var(--font); margin-top: 5px; }
.scene-hint { color: #eee0d9; padding: 4px 7px; background: #111217ad; border: 1px solid #ffffff28; font-size: 11px; white-space: nowrap; }
.scene-link {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  z-index: 4;
  bottom: 19px;
  right: 19px;
  min-height: 44px;
  padding: 8px 11px;
  background: #18191eea;
  border: 1px solid #ffffff48;
  color: var(--txt);
  font-size: 12px;
  font-weight: 720;
  transition: background .16s, border-color .16s, transform .16s;
}
.scene-link:hover { background: #39231f; border-color: var(--accent-dim); transform: translateY(-2px); }
.scene-link span { color: var(--accent-dim); font: 750 16px/1 var(--mono); }
.scene-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #ffffff2e; }
.scene-mode {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-right: 1px solid var(--line);
  color: #c8c8d0;
  background: #16171b;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.scene-mode:last-child { border-right: 0; }
.scene-mode:hover { background: #2b2728; color: var(--txt); }
.scene-mode[aria-pressed="true"] { background: #322320; color: var(--txt); box-shadow: inset 0 2px var(--accent); }
.scene-mode:focus-visible { outline-offset: -4px; }

.page-arrival [data-enter] .hero-text { animation: arena-enter .54s var(--ease) both; }
.page-arrival [data-enter] .scene-shell { animation: arena-enter .72s var(--ease) both; }
.entry-sweep { display: none; position: fixed; pointer-events: none; z-index: 120; inset: 0; isolation: isolate; overflow: hidden; place-items: center; }
.entry-sweep.is-running { display: grid; }
.entry-sweep > span { font-size: clamp(25px, 6vw, 84px); font-weight: 900; color: #f8f7f4; text-shadow: 2px 4px #110c0c; animation: entry-word .86s var(--ease) both; }
.entry-sweep > span b { color: var(--accent); font: italic 900 .78em var(--display); }
.entry-shutter, .entry-strike { position: absolute; z-index: -1; inset: -25%; }
.entry-shutter { background: linear-gradient(113deg, #111114 0 53%, #3e211c 53.1% 65%, #201618 65.1% 100%); animation: entry-shutter .92s var(--ease) both; }
.entry-strike { background: linear-gradient(112deg, transparent 0 57%, #ff573c 57.3% 60%, #ffd5bb 60.1% 60.4%, transparent 60.8%); animation: entry-strike .8s var(--ease) both; }
@keyframes entry-shutter {
  0%, 27% { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-107%); opacity: .4; }
}
@keyframes entry-strike {
  from { transform: translateX(-94%); }
  64% { opacity: 1; }
  to { transform: translateX(92%); opacity: 0; }
}
@keyframes entry-word {
  from { transform: translateY(9px); opacity: 0; }
  24%, 43% { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-6px); opacity: 0; }
}

/* Rankings and featured players */
#ranking:focus { outline: none; }
.rank-section { border-top: 1px solid var(--line); background: #111216; padding: 52px 0 58px; }
.ranking-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.ranking-heading h2 { display: flex; gap: 12px; align-items: center; color: var(--txt); font: 840 clamp(29px, 4vw, 52px)/1.16 var(--font); letter-spacing: -.044em; }
.ranking-heading h2::before { content: ""; width: 5px; height: .71em; background: var(--accent); transform: skewX(-14deg); }
.text-button { padding-inline: 5px; }
.text-button span { color: var(--accent-dim); }
.scoreboard { border: 1px solid var(--line); background: var(--panel); }
.mode-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.home .mode-tabs .tab {
  min-height: 58px;
  padding: 8px;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: #191a20;
  color: #c9c8d0;
  font-weight: 720;
  font-size: 13px;
  letter-spacing: 0;
  transform: none;
  transition: background .16s, color .16s;
}
.home .mode-tabs .tab + .tab { border-left: 1px solid var(--line); }
.home .mode-tabs .tab::before { display: none; }
.home .mode-tabs .tab:hover { background: #303137; color: var(--txt); }
.home .mode-tabs .tab.active { box-shadow: inset 0 -3px var(--accent); background: #352420; color: var(--txt); }
.home .mode-tabs .tab:focus-visible { outline-offset: -4px; }
.home .board { position: relative; border: 0; background: var(--panel); border-radius: 0; box-shadow: none; overflow: hidden; margin: 0; }
.home .board::before, .home .board::after { display: none; }
.board-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.board-label { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.board-label h3 { font-size: 17px; line-height: 1.3; }
.board-label span { color: var(--dim); font-size: 12px; white-space: nowrap; }
.board-filters { display: flex; gap: 8px; align-items: center; }
.board-filters select, .board-search { display: flex; align-items: center; border: 1px solid #46474e; background: #111216; color: var(--txt); border-radius: 4px; min-height: 44px; }
.board-filters select { padding: 6px 10px; font-size: 13px; cursor: pointer; }
.board-search { width: 228px; gap: 9px; padding: 0 10px; }
.search-glyph { position: relative; display: block; flex: 0 0 12px; height: 12px; border: 1.5px solid var(--dim); border-radius: 50%; }
.search-glyph::after { content: ""; width: 5px; height: 1.5px; background: var(--dim); position: absolute; bottom: -1px; right: -4px; rotate: 45deg; }
.board-search input { width: 100%; min-width: 0; height: 42px; background: none; border: 0; color: var(--txt); font-size: 13px; padding: 0; }
.board-search input:focus-visible { outline: none; }
.board-search:focus-within { outline: 2px solid var(--accent-dim); outline-offset: 2px; }
.board-search input::placeholder { color: var(--dim); }
.board-search kbd { color: var(--dim); border: 1px solid var(--line-strong); border-radius: 3px; font: 11px var(--mono); padding: 1px 4px; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 15px 20px; background: #131418; border-bottom: 1px solid var(--line); }
.podium-player {
  --metal: #c4cbd2;
  --metal-edge: #79818b;
  --podium-ground: #25282e;
  display: grid;
  gap: 9px;
  position: relative;
  min-width: 0;
  padding: 13px 13px 14px;
  background: linear-gradient(127deg, var(--podium-ground), #1c1d23 80%);
  border: 1px solid var(--line-strong);
  border-top-color: var(--metal-edge);
  transition: transform .18s var(--ease), border-color .18s, box-shadow .18s;
}
.podium-player::after { content: ""; position: absolute; pointer-events: none; right: 11px; top: 0; width: 32px; height: 4px; transform: skewX(-30deg); background: var(--metal); }
.podium-player.place-1 { --metal: #ffd29d; --metal-edge: #af7750; --podium-ground: #422d26; }
.podium-player.place-3 { --metal: #f0b69d; --metal-edge: #94614b; --podium-ground: #322624; }
.podium-player:hover, .podium-player:focus-visible { border-color: var(--metal); box-shadow: 0 6px 18px #0004; transform: translateY(-2px); }
.podium-player:active { transform: translateY(1px); }
.podium-top, .podium-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; }
.home .podium-player .rank-num { width: auto; height: auto; display: inline; color: var(--metal); text-shadow: 1px 2px 0 #121216; border: 0; font: italic 850 clamp(25px, 3.2vw, 43px)/.96 var(--display); letter-spacing: -.045em; }
.home .podium-main .avatar { width: 40px; height: 40px; }
.rank-columns, .rank-row { display: grid; grid-template-columns: 53px minmax(125px, 1fr) 59px minmax(0, 1.8fr) 62px; align-items: center; gap: 12px; padding-inline: 20px; }
.rank-columns { min-height: 37px; background: #121317; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.points-heading { text-align: right; }
.rank-row { min-height: 71px; background: #18191f; opacity: 1; border-bottom: 1px solid var(--line); padding-block: 9px; transition: background .16s, box-shadow .16s; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover, .rank-row:focus-visible { background: #292a31; box-shadow: inset 3px 0 var(--accent); outline-offset: -3px; }
.home .rank-cell { justify-content: start; }
.home .rank-row .rank-num { width: auto; height: auto; background: none; border: 0; color: #c2c2cb; font: 800 21px/1 var(--mono); text-shadow: none; }
.home .tiers-cell { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.home .single-mode .tiers-cell { grid-template-columns: minmax(0, 230px); }
.home .tier-tile:not(.lg) .t-mode { display: none; }
.home .score-cell { text-align: right; flex: none; }
.home .score-cell b { display: block; color: var(--txt); font: 800 21px/1 var(--mono); text-shadow: none; }
.home .score-cell span { color: var(--dim); font-size: 10px; letter-spacing: 0; }
.home .podium-main .score-cell b { font-size: 25px; }
.rank-loading { padding: 32px 20px; color: var(--dim); }
.home .pager { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; border-top: 1px solid var(--line); padding: 12px 20px; }
.home .pg-info { width: auto; margin: 0 auto 0 0; color: var(--dim); }
.board-wipe { position: absolute; z-index: 3; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(108deg, transparent 25%, #ff745433 49%, #ff7a5533 53%, transparent 60%); }
.rank-shift .board-wipe { animation: rank-sweep .46s var(--ease) both; }
@keyframes rank-sweep { from { opacity: 1; transform: translateX(-100%); } to { opacity: 0; transform: translateX(100%); } }
.site-notice { display: grid; grid-template-columns: minmax(115px, .2fr) 1fr; gap: 18px; margin-top: 27px; padding-top: 23px; border-top: 1px solid var(--line); }
.site-notice h2 { font-size: 18px; font-weight: 800; }
.site-notice h3 { font-size: 15px; }
.site-notice p { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--dim); margin-top: 7px; }
.site-notice time { color: var(--dim); display: block; margin-top: 7px; font: 11px var(--mono); }
.rules-dialog { width: min(554px, calc(100% - 30px)); max-height: 88svh; margin: auto; padding: 24px; overflow: auto; background: var(--panel-solid); color: var(--txt); border: 1px solid var(--line-strong); border-top: 2px solid var(--accent); border-radius: var(--r); box-shadow: var(--shadow); }
.rules-dialog::backdrop { background: #08080bc9; }
.rules-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rules-head h2 { font-size: 22px; line-height: 1.25; }
.rules-dialog p { color: #d0ccca; font-size: 13px; margin: 14px 0; }
.rules-table { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.rules-table div { text-align: center; min-width: 0; padding: 7px 3px; border: 1px solid var(--line); border-radius: 4px; }
.rules-table b { display: block; font: 800 20px var(--mono); color: var(--gc); }
.rules-table span { font-size: 11px; color: var(--dim); }

@media (max-width: 1100px) {
  .rank-columns, .rank-row { grid-template-columns: 44px minmax(114px, 1fr) minmax(0, 1.6fr) 58px; gap: 9px; }
  .rank-columns .column-region, .rank-row .region-cell { display: none; }
  .podium-player { padding-inline: 10px; }
  .podium-player .tier-sub { display: none; }
}
@media (max-width: 880px) {
  .hero-layout { gap: 23px; }
  .hero-stats { gap: 12px; }
  .hero-stats > div + div { padding-left: 12px; }
  .hero-stats dd { font-size: 23px; }
  .home .arena-hero h1 { font-size: clamp(45px, 7.2vw, 68px); }
  .hero-latin { font-size: clamp(69px, 11.2vw, 104px); }
  .hero-actions .arena-button { gap: 12px; padding-inline: 11px; min-width: 0; }
  .podium { gap: 6px; padding-inline: 12px; }
  .podium-player .tier-tile:not(.lg) { gap: 2px; padding-inline: 2px; }
  .podium-player .tier-tile:not(.lg) .mode-icon { width: 14px; height: 14px; }
}
@media (max-width: 735px) {
  .home .arena-hero { min-height: calc(100svh - var(--nav-height)); padding: 29px 0; align-items: center; }
  .hero-layout { grid-template-columns: 1fr; gap: 19px; }
  .hero-text { padding: 0; }
  .home .arena-hero h1 { display: flex; align-items: baseline; gap: 12px; font-size: clamp(40px, 8.3vw, 68px); margin: 11px 0; }
  .hero-latin { font-size: clamp(47px, 12vw, 88px); }
  .hero-actions { margin-top: 17px; }
  .hero-actions .arena-button { min-height: 44px; padding-inline: 12px; }
  .hero-stats { margin-top: 18px; padding-top: 12px; gap: 14px; }
  .hero-stats > div + div { padding-left: 14px; }
  .hero-stats dd { font-size: 22px; }
  .scene-display { height: clamp(270px, 83vw, 495px); }
  .scene-mode { min-height: 48px; gap: 3px; }
  .scene-mode .mode-icon { width: 19px; height: 19px; }
  .scene-head { top: 17px; left: 17px; right: 17px; }
  .scene-head h2 { font-size: 18px; }
  .scene-head p { font-size: 11px; }
  .scene-link { bottom: 14px; right: 14px; }
  .rank-section { padding-block: 33px 35px; }
  .mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home .mode-tabs .tab { min-height: 49px; padding: 4px; gap: 5px; font-size: 12px; }
  .home .mode-tabs .tab:nth-child(n+4) { border-top: 1px solid var(--line); }
  .home .mode-tabs .tab:nth-child(4) { border-left: 0; }
  .mode-tabs .mode-icon { width: 20px; height: 20px; }
  .board-tools { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .board-filters { width: 100%; min-width: 0; }
  .board-search { flex: 1; width: auto; min-width: 0; }
  .board-search input { font-size: 16px; }
  .board-search kbd { display: none; }
  .podium { grid-template-columns: 1fr; gap: 6px; padding: 9px 10px; }
  .podium-player { grid-template-columns: 32px minmax(0, 1fr); gap: 5px 6px; padding: 8px; }
  .podium-top { align-items: start; }
  .podium-top .region-tag { display: none; }
  .podium-player .podium-top .rank-num { font-size: 23px; margin-top: 5px; }
  .home :is(.podium-main, .rank-row) .avatar { width: 31px; height: 31px; }
  .podium-player .tiers-cell { grid-column: 2; }
  .rank-columns { display: none; }
  .rank-row {
    grid-template-columns: 32px minmax(0, 1fr) 42px;
    grid-template-areas: "rank player points" "rank tiers tiers";
    gap: 6px 7px;
    padding: 8px 12px;
    min-height: 74px;
  }
  .rank-row .rank-cell { grid-area: rank; }
  .rank-row .p-cell { grid-area: player; }
  .rank-row .tiers-cell { grid-area: tiers; }
  .rank-row .score-cell { grid-area: points; }
  .home .rank-row .rank-num, .home .score-cell b { font-size: 17px; }
  .home .tier-tile:not(.lg) { min-height: 30px; gap: 4px; padding: 2px; }
  .home .tier-tile .mode-icon { width: 15px; height: 15px; }
  .home .tier-tile:not(.lg) .tier-sub { display: none; }
  .home .pager { padding-inline: 12px; }
  .site-notice { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 410px) {
  .scene-mode { font-size: 11px; }
  .scene-mode .mode-icon { width: 16px; height: 16px; }
  .home .mode-tabs .tab { font-size: 11.5px; }
  .rules-dialog { padding: 14px; }
}
