/* Stage is authored at the screenshot's native 2000x923; app.js scales/rotates it to fit. */
:root {
  --txt: #eef2ff;
  --txt-dim: #c9d3f2;
  --side: #bfd2f2;
  --side-active: #23466f;
  --gold-1: #ffe9a8;
  --gold-2: #dcaa48;
  --panel: rgba(66, 76, 128, 0.97);
  --panel-2: rgba(50, 66, 104, 0.97);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
html { overflow: hidden; }
body {
  overflow: hidden;
  background: #121a2c;
  color: var(--txt);
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #9fe0ff; outline-offset: 2px; }

.backdrop {
  position: fixed; inset: -60px;
  background: url(assets/backdrop.jpg) center / cover no-repeat;
  filter: blur(22px) brightness(0.55) saturate(1.15);
}

/* fixed so the untransformed 2000px box never widens the mobile layout viewport */
#stage {
  position: fixed; left: 0; top: 0;
  width: 2000px; height: 923px;
  transform-origin: 0 0;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
}
.bg { position: absolute; inset: 0; width: 2000px; height: 923px; display: block; }

/* ---------- ambient scene ---------- */
.scene { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(220, 230, 255, 0.16), transparent);
  mix-blend-mode: screen;
}
.cloud-a { left: 1100px; top: 640px; width: 1100px; height: 360px; animation: drift 26s ease-in-out infinite alternate; }
.cloud-b { left: -200px; top: 700px; width: 1000px; height: 300px; animation: drift 34s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-80px); } to { transform: translateX(90px); } }
.glow {
  position: absolute; border-radius: 50%;
  mix-blend-mode: screen;
  animation: pulse 2.4s ease-in-out infinite;
}
.glow-fire { left: 380px; top: 10px; width: 300px; height: 150px; background: radial-gradient(closest-side, rgba(255, 120, 50, 0.38), transparent); }
.glow-fire2 { left: 760px; top: -20px; width: 240px; height: 150px; background: radial-gradient(closest-side, rgba(255, 90, 60, 0.32), transparent); animation-delay: -1.1s; }
@keyframes pulse { 0%, 100% { opacity: 0.35; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.06); } }
#fx { position: absolute; inset: 0; width: 2000px; height: 923px; pointer-events: none; }

/* ---------- sidebar ---------- */
.sidebar { position: absolute; left: 0; top: 0; width: 350px; height: 923px; }
.back { position: absolute; left: 172px; top: 12px; width: 116px; height: 64px; border-radius: 8px; }
.back:active { transform: scale(0.94); }
.hl {
  position: absolute; left: 0; top: calc(var(--hl, 142px) - 50px);
  width: 350px; height: 106px;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: top 0.32s cubic-bezier(0.3, 1.25, 0.5, 1);
  animation: hlPulse 2.8s ease-in-out infinite;
}
@keyframes hlPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }
.tab {
  position: absolute; left: 0; top: calc(var(--c) - 34px);
  width: 350px; height: 68px;
  padding-right: 70px;
  text-align: right;
  font-size: 28px; line-height: 68px;
  color: var(--side);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: color 0.2s ease;
}
.tab:hover { color: #eaf3ff; }
.tab.active { color: var(--side-active); text-shadow: none; font-weight: 500; }
.tab.more::after {
  content: ""; position: absolute; left: 297px; top: 26px;
  width: 10px; height: 10px;
  border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.tab.more.active::after { transform: rotate(225deg) translate(-4px, -4px); }

/* ---------- profile panel text (screenshot pixels) ---------- */
.panel { position: absolute; inset: 0; pointer-events: none; }
.panel button { pointer-events: auto; }
.t {
  position: absolute; margin: 0;
  line-height: 1; white-space: nowrap;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(10, 14, 40, 0.45);
}
.title { left: 372px; top: 25px; font-size: 33px; color: rgba(232, 238, 255, 0.52); text-shadow: none; }
.server { left: 527px; top: 171px; font-size: 19.5px; color: #cfd5ea; }
.region { left: 433px; top: 264px; font-size: 22.5px; color: #eef2ff; }
.lbl { width: 280px; text-align: center; font-size: 23px; color: #e9edff; }
.l-rank { left: 310px; top: 496px; }
.l-top { left: 594px; top: 496px; }
.l-mythic { left: 894px; width: 240px; top: 495px; font-size: 16.5px; color: #dfe5ff; }
.b-lbl { top: 650px; font-size: 21.5px; }
.bl1 { left: 308px; }
.bl2 { left: 592px; }
.bl3 { left: 873px; }
.brawler { left: 759px; top: 701px; font-size: 24px; line-height: 24px; color: #eef3ff; }
.collector { left: 951px; top: 703px; font-size: 14px; color: #e3e9ff; }
.visits { left: 390px; top: 813px; font-size: 23px; color: #e6ebff; }
.kv { left: 772px; width: 250px; text-align: right; font-size: 21px; color: #e6ebff; }
.matches { top: 792px; }
.likes { top: 832px; }

.dots { position: absolute; left: 995px; top: 473px; width: 36px; height: 14px; }
.dots i { position: absolute; top: 1px; width: 12px; height: 12px; border-radius: 50%; }
.dots i:first-child { left: 0; }
.dots i:last-child { left: 21px; }
.dots i.on { box-shadow: 0 0 0 0 rgba(255, 214, 90, 0.7); animation: ring 2s ease-out infinite; }
@keyframes ring { to { box-shadow: 0 0 0 9px rgba(255, 214, 90, 0); } }

.hot { position: absolute; border-radius: 10px; }
.hot-avatar { left: 374px; top: 121px; width: 126px; height: 120px; }

/* metallic glints masked to each emblem's bright pixels */
.glint {
  position: absolute; pointer-events: none;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.9) 49%, rgba(255, 246, 210, 0.6) 52%, transparent 62%) no-repeat;
  background-size: 320% 100%;
  background-position: 135% 0;
  mix-blend-mode: screen;
  animation: sweep 6s ease-in-out infinite;
  animation-delay: var(--gd, 0s);
}
@keyframes sweep { 0%, 72% { background-position: 135% 0; } 100% { background-position: -35% 0; } }
body.no-shine .glint { animation: none; opacity: 0; }
.g-rank { left: 392px; top: 350px; width: 111px; height: 121px; -webkit-mask-image: url(assets/glint-rank.png); mask-image: url(assets/glint-rank.png); --gd: 0.9s; }
.g-top { left: 678px; top: 350px; width: 107px; height: 121px; -webkit-mask-image: url(assets/glint-top.png); mask-image: url(assets/glint-top.png); --gd: 1.2s; }
.g-mythic { left: 955px; top: 350px; width: 109px; height: 125px; -webkit-mask-image: url(assets/glint-mythic.png); mask-image: url(assets/glint-mythic.png); --gd: 1.5s; }
.g-b1 { left: 398px; top: 530px; width: 103px; height: 113px; -webkit-mask-image: url(assets/glint-b1.png); mask-image: url(assets/glint-b1.png); --gd: 1.8s; }
.g-b2 { left: 681px; top: 530px; width: 103px; height: 113px; -webkit-mask-image: url(assets/glint-b2.png); mask-image: url(assets/glint-b2.png); --gd: 2.1s; }
.g-b3 { left: 964px; top: 530px; width: 101px; height: 113px; -webkit-mask-image: url(assets/glint-b3.png); mask-image: url(assets/glint-b3.png); --gd: 2.4s; }
.g-avatar { left: 372px; top: 119px; width: 130px; height: 125px; -webkit-mask-image: url(assets/glint-avatar.png); mask-image: url(assets/glint-avatar.png); --gd: 0.5s; }
.g-plate { left: 518px; top: 116px; width: 85px; height: 41px; -webkit-mask-image: url(assets/glint-plate.png); mask-image: url(assets/glint-plate.png); --gd: 0.3s; }
.g-level { left: 514px; top: 200px; width: 57px; height: 43px; -webkit-mask-image: url(assets/glint-level.png); mask-image: url(assets/glint-level.png); --gd: 0.7s; }
.g-brawler { left: 684px; top: 682px; width: 79px; height: 75px; -webkit-mask-image: url(assets/glint-brawler.png); mask-image: url(assets/glint-brawler.png); --gd: 2.7s; }
.g-collector { left: 874px; top: 680px; width: 83px; height: 77px; -webkit-mask-image: url(assets/glint-collector.png); mask-image: url(assets/glint-collector.png); --gd: 3s; }

/* ---------- hero mode: the skin's scene fills the whole right side ---------- */
.showcase {
  position: absolute; left: 1130px; top: 0; width: 870px; height: 923px;
  z-index: 5;
  overflow: hidden;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s linear 0s;
}
/* soft left edge into the panel; kept off the video layer, since a mask over a
   cross-origin <iframe> makes the YouTube video render black */
.hs-bg, .hs-fx, .sc-glow {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 170px);
          mask-image: linear-gradient(90deg, transparent 0, #000 170px);
}
.showcase.off { opacity: 0; visibility: hidden; transform: translateX(40px); pointer-events: none; transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s; }
.hs-bg {
  position: absolute; left: 0; top: -24px; right: -24px; bottom: -24px;
  background: url(assets/scene.webp) center / cover no-repeat;
  animation: bgDrift 28s ease-in-out infinite alternate;
}
.hs-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 50% 55%, transparent 40%, rgba(12, 6, 32, 0.55) 100%);
}
@keyframes bgDrift { from { transform: scale(1.02) translate(-8px, 4px); } to { transform: scale(1.07) translate(10px, -6px); } }
.hs-fx { position: absolute; inset: 0; width: 870px; height: 923px; pointer-events: none; }
#hero3d {
  position: absolute; left: 30px; top: 0; width: 780px; height: 923px;
  z-index: 1;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: transparent;
  opacity: 0;
  transition: opacity 0.8s ease;
  animation: float 4.6s ease-in-out infinite;
  cursor: grab;
}
#hero3d:active { cursor: grabbing; }
.showcase.show-3d #hero3d { opacity: 1; }
@keyframes float { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-8px); } }
.sc-glow {
  position: absolute; left: 120px; top: 170px; z-index: 0;
  width: 600px; height: 640px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(220, 140, 255, 0.42), rgba(110, 160, 255, 0.16) 60%, transparent);
  mix-blend-mode: screen;
  opacity: 0; transition: opacity 0.8s ease;
  animation: pulse 3s ease-in-out infinite;
}
.showcase.show-3d .sc-glow { opacity: 1; }
.sc-video {
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  background: #05040c;
  opacity: 0; transition: opacity 0.5s ease;
  pointer-events: none;
}
.showcase.playing .sc-video { opacity: 1; }
/* the source video is ~2.17:1 — oversize the player and centre-crop it so YouTube's
   top title bar and bottom chrome fall outside the scene */
.sc-video iframe {
  position: absolute; top: -80px; left: 50%;
  width: 2350px; height: 1084px;
  transform: translateX(-50%);
  border: 0; pointer-events: none;
}
.sc-flash { position: absolute; inset: 0; z-index: 3; background: radial-gradient(circle, #fff, #bdf3ff 60%, #6ad8ff); opacity: 0; pointer-events: none; }
.sc-flash.go { animation: flash 0.9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.sc-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; pointer-events: none; transition: opacity 0.4s; }
.sc-loading i { width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(190, 210, 255, 0.25); border-top-color: #bcd6ff; animation: spin 0.9s linear infinite; }
.showcase.model-ready .sc-loading { opacity: 0; }
.showcase.pending .sc-loading { opacity: 1; z-index: 3; }
@keyframes spin { to { transform: rotate(360deg); } }
.sc-name {
  position: absolute; left: 120px; bottom: 60px; z-index: 4;
  display: flex; flex-direction: column; gap: 3px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  opacity: 0; transform: translateY(8px); transition: opacity 0.5s 0.3s, transform 0.5s 0.3s;
  pointer-events: none;
}
.showcase.show-3d .sc-name { opacity: 1; transform: none; }
.sc-name b { font-size: 32px; font-weight: 700; }
.sc-name span { font-size: 20px; color: #d8e2ff; }
.sc-name em {
  align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 3px;
  font: 700 12px/1.3 Roboto, sans-serif; letter-spacing: 2px; font-style: normal; color: #2a1600;
  background: linear-gradient(90deg, #ffe7a0, #f0b23c, #ffe7a0); background-size: 200% 100%;
  animation: shimmer 2.5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.sc-hint {
  position: absolute; left: 420px; top: 110px; z-index: 4;
  transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(10, 16, 40, 0.55); border: 1px solid rgba(170, 200, 255, 0.3);
  font-size: 16px; color: #e3ecff; white-space: nowrap;
  opacity: 0; transition: opacity 0.5s; pointer-events: none;
}
.sc-hint.show { opacity: 1; }
.sc-btn {
  position: absolute; z-index: 5;
  color: #eaf2ff; background: rgba(10, 16, 40, 0.5);
  border: 1px solid rgba(170, 200, 255, 0.35);
  transition: background 0.2s, opacity 0.3s;
}
.sc-btn:hover { background: rgba(60, 90, 160, 0.65); }
.sc-replay { left: 120px; top: 96px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; }
.sc-replay svg { width: 26px; height: 26px; }
.showcase.playing .sc-replay { opacity: 0; pointer-events: none; }
.sc-skip { left: 120px; bottom: 60px; padding: 9px 18px; border-radius: 4px; font-size: 19px; opacity: 0; pointer-events: none; }
.showcase.playing .sc-skip { opacity: 1; pointer-events: auto; }
.showcase.playing .sc-name { opacity: 0; }
.sc-credit {
  position: absolute; right: 14px; bottom: 8px; z-index: 4;
  font-size: 11px; color: rgba(220, 230, 255, 0.55); text-decoration: none;
}
.sc-credit:hover { color: #fff; }
.showcase.playing .sc-credit { opacity: 0; }

.album-hot { position: absolute; top: 676px; width: 148px; height: 190px; border-radius: 4px; transition: box-shadow 0.2s; }
.album-hot:hover { box-shadow: inset 0 0 0 2px rgba(170, 210, 255, 0.7); }
.ah1 { left: 1192px; }
.ah2 { left: 1352px; }
.ah3 { left: 1512px; }

/* ---------- right column ---------- */
/* the right column always sits above the hero scene and its video */
.settings, .side-btn, .edge-tab { z-index: 10; }
.settings {
  position: absolute; left: 1669px; top: 21px; width: 184px; height: 51px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 23px; color: #e4ecf8;
  background: linear-gradient(180deg, rgba(110, 150, 205, 0.6), rgba(78, 114, 170, 0.6));
  border: 1px solid rgba(170, 205, 245, 0.6);
  border-radius: 3px;
  box-shadow: inset 0 0 14px rgba(190, 225, 255, 0.28);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease;
}
.settings:hover { background: linear-gradient(180deg, rgba(126, 168, 225, 0.78), rgba(88, 128, 190, 0.78)); }
.settings svg { width: 26px; height: 26px; opacity: 0.85; transition: transform 0.6s ease; }
.settings:hover svg { transform: rotate(120deg); }
.side-btn { position: absolute; left: 1759px; width: 120px; height: 90px; border-radius: 10px; }
.side-btn span {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 22px; line-height: 1; color: #eef3ff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
.side-btn i {
  position: absolute; left: 33px; top: 3px; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(46, 66, 102, 0.62);
  box-shadow: inset 0 0 0 1px rgba(170, 205, 255, 0.18);
  color: #cfe3fb;
  transition: transform 0.2s ease, background 0.2s ease;
}
.side-btn i svg { width: 30px; height: 30px; }
.side-btn:hover i { transform: scale(1.08); background: rgba(70, 100, 150, 0.75); }
.sb-follow { top: 555px; } .sb-follow span { top: 56px; }
.sb-info { top: 654px; }   .sb-info span { top: 55px; }
.sb-mode { top: 755px; }   .sb-mode span { top: 54px; }
/* the mode button offers the other view: "Gallery" while the hero is shown, "Hero" in the gallery */
.sb-mode .ic-hero, .sb-mode .lbl-hero { display: none; }
.sb-mode[aria-pressed="false"] .ic-gallery, .sb-mode[aria-pressed="false"] .lbl-gallery { display: none; }
.sb-mode[aria-pressed="false"] .ic-hero { display: grid; }
.sb-mode[aria-pressed="false"] .lbl-hero { display: block; }
.edge-tab {
  position: absolute; left: 1950px; top: 321px; width: 50px; height: 205px;
  border-radius: 16px 0 0 16px;
  display: grid; place-items: center;
  background: rgba(36, 46, 66, 0.72);
  color: #e8eef8;
}
.edge-tab svg { width: 22px; height: 44px; }

/* ---------- other sections ---------- */
.sheet {
  position: absolute; left: 350px; top: 0; width: 820px; height: 923px;
  padding: 26px 34px 30px 24px;
  background:
    radial-gradient(600px 300px at 60% 0%, rgba(255, 150, 90, 0.1), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  border-right: 1px solid rgba(160, 180, 255, 0.12);
  overflow: hidden;
  animation: sheetIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
@keyframes sheetIn { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.sheet h2 { margin: 0 0 24px 18px; font: 400 33px/1 Roboto, sans-serif; color: rgba(225, 232, 255, 0.6); }
.sheet .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-left: 18px; }
.tile {
  position: relative; border-radius: 6px; overflow: hidden;
  background: rgba(20, 28, 60, 0.45);
  border: 1px solid rgba(170, 190, 255, 0.18);
  text-align: center; padding: 18px 10px 16px;
  animation: pop 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
.tile b { display: block; font-size: 26px; font-weight: 500; color: #fff; }
.tile small { display: block; margin-top: 6px; font-size: 17px; color: var(--txt-dim); }
.album { grid-template-columns: repeat(2, 1fr) !important; }
.photo { padding: 0; cursor: zoom-in; height: 380px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.photo:hover img { transform: scale(1.04); }
.empty { position: absolute; left: 0; right: 0; top: 360px; text-align: center; color: var(--txt-dim); font-size: 24px; }
.empty::before {
  content: ""; display: block; width: 96px; height: 96px; margin: 0 auto 18px;
  border-radius: 50%; border: 2px dashed rgba(180, 200, 255, 0.35);
  animation: spin 14s linear infinite;
}
.sprite { display: block; background-image: url(assets/bg.webp); background-repeat: no-repeat; }
.tile .sprite, .card-ranks .sprite {
  margin: 0 auto 10px;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}

/* ---------- modals ---------- */
.modal {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: rgba(4, 8, 22, 0.62);
  animation: fade 0.25s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.x { position: absolute; right: 14px; top: 10px; width: 46px; height: 46px; font-size: 24px; color: #cfe0ff; border-radius: 50%; z-index: 2; }
.x:hover { background: rgba(255, 255, 255, 0.08); }

.card { position: relative; width: 1000px; padding: 36px 40px 32px; border-radius: 14px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); animation: cardIn 0.4s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: scale(0.88) translateY(20px); } to { opacity: 1; transform: none; } }
.card-border {
  position: absolute; inset: -4px; border-radius: 16px; z-index: -1;
  background: conic-gradient(from var(--a, 0deg), #ff3fa4, #ffb347, #ffe66d, #3fd0ff, #b44dff, #ff3fa4);
  animation: spinBorder 4s linear infinite;
}
.card-border::after { content: ""; position: absolute; inset: -10px; border-radius: 24px; background: inherit; filter: blur(18px); opacity: 0.6; }
/* painted after .card-border (same z-index, later in order) so only its rim shows */
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 14px; background: linear-gradient(160deg, #283f78, #171f46); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinBorder { to { --a: 360deg; } }
.card-top { display: flex; gap: 26px; align-items: center; }
.card-top .sprite { flex: none; border-radius: 6px; }
.card-name { font-size: 36px; font-weight: 700; }
.card-id { margin-top: 8px; font-size: 20px; color: var(--txt-dim); }
.card-squad { margin-top: 10px; font-size: 22px; }
.card-squad b { font-weight: 500; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-region { margin-top: 8px; font-size: 19px; color: var(--txt-dim); }
.card-ranks { display: flex; justify-content: space-around; margin: 30px 0 22px; padding: 20px 0; border-block: 1px solid rgba(170, 190, 255, 0.16); }
.card-ranks figure { margin: 0; text-align: center; }
.card-ranks figcaption { font-size: 24px; font-weight: 700; color: #fff7dc; }
.card-ranks small { display: block; margin-top: 6px; font-size: 17px; font-weight: 400; color: var(--txt-dim); }
.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.card-stats b { display: block; font-size: 34px; font-weight: 500; }
.card-stats span { color: var(--txt-dim); font-size: 18px; }


.dialog {
  position: relative; width: 660px; padding: 30px 36px 26px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(48, 70, 124, 0.98), rgba(30, 42, 80, 0.98));
  border: 1px solid rgba(160, 196, 255, 0.45);
  box-shadow: inset 0 0 30px rgba(120, 170, 255, 0.15), 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: cardIn 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.dialog h2 { margin: 0 0 18px; font: 500 30px/1 Roboto, sans-serif; letter-spacing: 1px; color: #cbd8ff; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; font-size: 23px; cursor: pointer; border-top: 1px solid rgba(170, 190, 255, 0.14); }
.row input { position: absolute; opacity: 0; pointer-events: none; }
.row i { position: relative; width: 70px; height: 34px; border-radius: 17px; background: rgba(10, 18, 40, 0.7); border: 1px solid rgba(160, 190, 255, 0.4); transition: background 0.2s ease; }
.row i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #9fb4e6; transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.2s; }
.row input:checked + i { background: linear-gradient(180deg, #4fa3ff, #2d6fd1); }
.row input:checked + i::after { transform: translateX(36px); background: #fff; }
.row input:focus-visible + i { outline: 2px solid #9fe0ff; outline-offset: 2px; }

.lightbox { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(3, 6, 18, 0.88); cursor: zoom-out; animation: fade 0.2s ease both; }
.lightbox img { max-width: 1700px; max-height: 840px; min-height: 600px; border-radius: 6px; box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7); }

.toast {
  position: absolute; left: 50%; bottom: 40px; z-index: 40;
  transform: translate(-50%, 30px); opacity: 0;
  padding: 14px 28px; border-radius: 6px;
  background: rgba(20, 30, 62, 0.92); border: 1px solid rgba(150, 190, 255, 0.4);
  font-size: 22px; color: #e8f0ff; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.rotate-hint {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%);
  padding: 10px 16px; border-radius: 999px;
  background: rgba(20, 30, 62, 0.9); border: 1px solid rgba(150, 190, 255, 0.4);
  color: #e8f0ff; font-size: 14px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.rotate-hint.show { opacity: 1; }

/* ---------- intro choreography ---------- */
.intro .tab, .intro .t, .intro .settings, .intro .side-btn span { opacity: 0; }
.play .tab { animation: slideIn 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; animation-delay: calc(var(--d, 0) * 1ms); }
.play .t, .play .settings, .play .side-btn span { animation: rise 0.5s ease both; animation-delay: calc(var(--d, 0) * 1ms); }
.play .hl { animation: hlIn 0.6s ease both, hlPulse 2.8s ease-in-out 0.6s infinite; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hlIn { from { opacity: 0; transform: translateX(-80px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
