:root {
  --ink: #f4f7ef;
  --muted: #8d9aa1;
  --panel: rgba(7, 12, 16, 0.74);
  --line: rgba(210, 232, 229, 0.16);
  --acid: #d9ff43;
  --cyan: #55def1;
  --orange: #ff6a2b;
  --red: #ff345c;
  font-family: "Bahnschrift", "Aptos", "Microsoft YaHei UI", sans-serif;
  color: var(--ink);
  background: #05080b;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05080b;
  user-select: none;
  -webkit-user-select: none;
}

button {
  color: inherit;
  font: inherit;
}

#game-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
}

.screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.screen.is-visible {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

#loading-screen {
  --loading-green: #45e886;
  background: #05080b;
  z-index: 100;
  gap: 24px;
  color: rgba(244, 247, 239, 0.65);
  letter-spacing: 0.2em;
  font-size: 11px;
}

.loading-retry {
  min-width: 190px;
  height: 40px;
  margin: 18px auto 0;
  border: 1px solid rgba(85, 222, 241, 0.38);
  background: rgba(85, 222, 241, 0.08);
  color: var(--cyan);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.loading-retry:hover {
  border-color: var(--cyan);
  background: rgba(85, 222, 241, 0.14);
}

.auth-screen {
  z-index: 60;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 45%, rgba(85, 222, 241, 0.1), transparent 24%),
    linear-gradient(90deg, rgba(2, 5, 8, 0.98), rgba(2, 7, 10, 0.82) 48%, rgba(2, 5, 8, 0.6));
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(85, 222, 241, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 222, 241, 0.045) 1px, transparent 1px);
  background-size: 55px 55px;
  transform: perspective(650px) rotateX(65deg) scale(1.55);
  transform-origin: 70% 80%;
  mask-image: radial-gradient(circle at 68% 62%, black, transparent 60%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(420px, 90vw);
  padding: 32px;
  border: 1px solid rgba(210, 232, 229, 0.16);
  border-top: 2px solid var(--acid);
  background: rgba(5, 10, 14, 0.94);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.auth-brand span {
  color: var(--acid);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-brand b {
  font-size: 11px;
  letter-spacing: 0.1em;
}

.auth-card h2 {
  margin: 0;
  font-size: 37px;
  font-style: italic;
  letter-spacing: -0.03em;
}

.auth-lead {
  margin: 10px 0 19px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.auth-tabs button.active {
  border-bottom-color: var(--acid);
  color: var(--ink);
}

.auth-card > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.auth-card input {
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.auth-card input:focus {
  border-color: var(--cyan);
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 19px;
  border: 0;
  background: var(--acid);
  color: #0a100c;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.55;
}

.auth-error {
  margin: 12px 0 0;
  color: var(--orange);
  font-size: 9px;
  line-height: 1.6;
}

.auth-success {
  margin: 12px 0 0;
  color: var(--acid);
  font-size: 9px;
  line-height: 1.6;
}

.auth-note {
  margin: 16px 0 0;
  color: rgba(141, 154, 161, 0.6);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-align: center;
}

.launch-screen {
  z-index: 40;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(85, 222, 241, 0.11), transparent 19%),
    radial-gradient(circle at 50% 55%, rgba(217, 255, 67, 0.05), transparent 33%),
    rgba(2, 5, 8, 0.5);
}

.launch-grid {
  position: absolute;
  left: 50%;
  top: 57%;
  width: 120vw;
  height: 120vw;
  background-image:
    linear-gradient(rgba(85, 222, 241, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 222, 241, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: translate(-50%, -35%) perspective(620px) rotateX(68deg);
  mask-image: radial-gradient(circle, black 0 28%, transparent 66%);
  animation: launch-grid 12s linear infinite;
}

@keyframes launch-grid {
  from { background-position: 0 0; }
  to { background-position: 0 54px; }
}

.launch-horizon {
  position: absolute;
  left: 50%;
  top: 55%;
  width: min(760px, 90vw);
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 55px 16px rgba(85, 222, 241, 0.15);
}

.launch-orbits {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(620px, 92vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.launch-orbits i {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(85, 222, 241, 0.11);
  border-radius: 50%;
  animation: launch-orbit 18s linear infinite;
}

.launch-orbits i::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 15px var(--cyan);
}

.launch-orbits i:nth-child(2) {
  inset: 21%;
  animation-direction: reverse;
  animation-duration: 11s;
  border-style: dashed;
}

.launch-orbits i:nth-child(3) {
  inset: 33%;
  animation-duration: 7s;
}

@keyframes launch-orbit {
  to { transform: rotate(360deg); }
}

.launch-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.launch-content h1 {
  margin: 9px 0 30px;
  font-size: clamp(56px, 9vw, 118px);
  font-style: italic;
  line-height: 0.8;
  letter-spacing: -0.07em;
  text-shadow: 0 15px 60px rgba(0, 0, 0, 0.7);
}

.launch-content h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 247, 239, 0.66);
}

.launch-button {
  position: relative;
  display: flex;
  width: 238px;
  height: 76px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(217, 255, 67, 0.65);
  background:
    linear-gradient(120deg, rgba(217, 255, 67, 0.15), rgba(3, 11, 14, 0.92) 45%, rgba(85, 222, 241, 0.12));
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow:
    0 0 0 1px rgba(217, 255, 67, 0.05),
    0 0 38px rgba(217, 255, 67, 0.12),
    inset 0 0 24px rgba(85, 222, 241, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}

.launch-button::before {
  content: "";
  position: absolute;
  inset: -80%;
  background: conic-gradient(
    transparent 0 75%,
    rgba(217, 255, 67, 0.8) 81%,
    transparent 86%
  );
  animation: launch-border 3.5s linear infinite;
}

.launch-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #071015;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.launch-button > * {
  position: relative;
  z-index: 2;
}

.launch-button > span {
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.launch-button > small {
  margin-top: 5px;
  color: var(--acid);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.launch-button-light {
  position: absolute;
  z-index: 3;
  top: 0;
  left: -60%;
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: skewX(-22deg);
  animation: launch-shine 3s ease-in-out infinite;
}

.launch-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 0 45px rgba(217, 255, 67, 0.25),
    0 0 90px rgba(85, 222, 241, 0.12),
    inset 0 0 28px rgba(217, 255, 67, 0.12);
}

.launch-button:active {
  transform: scale(0.98);
}

.launch-button:disabled {
  cursor: wait;
}

@keyframes launch-border {
  to { transform: rotate(360deg); }
}

@keyframes launch-shine {
  0%, 20% { left: -60%; }
  65%, 100% { left: 130%; }
}

.launch-hint {
  margin: 16px 0 0;
  color: rgba(141, 154, 161, 0.6);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.launch-corner {
  position: absolute;
  right: 24px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.launch-corner span {
  color: var(--acid);
}

.launch-corner b {
  margin-top: 5px;
  font-weight: 500;
}

.launch-screen.launching .launch-content {
  animation: launch-out 0.62s ease forwards;
}

.launch-screen.launching .launch-orbits {
  animation: orbit-out 0.62s ease forwards;
}

.lobby-screen {
  justify-items: stretch;
  align-items: stretch;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2, 7, 12, 0.94) 0, rgba(4, 13, 21, 0.56) 32%, rgba(6, 15, 24, 0.16) 58%, rgba(2, 8, 14, 0.74) 100%),
    linear-gradient(0deg, rgba(2, 6, 10, 0.94), transparent 39%),
    radial-gradient(circle at 67% 42%, rgba(85, 222, 241, 0.13), transparent 28%);
}

.lobby-screen::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(118deg, transparent 0 43%, rgba(217, 255, 67, 0.09) 43.1% 43.25%, transparent 43.4%),
    linear-gradient(118deg, transparent 0 59%, rgba(85, 222, 241, 0.12) 59.1% 59.25%, transparent 59.4%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.lobby-wash {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.lobby-wash::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(116deg, transparent 0 105px, rgba(255, 255, 255, 0.018) 106px 107px),
    radial-gradient(circle at 66% 46%, transparent 0 16%, rgba(85, 222, 241, 0.025) 16.2% 16.4%, transparent 16.6% 30%);
  transform: translate3d(0, 0, 0);
}

.lobby-wash > i {
  position: absolute;
  border: 1px solid rgba(85, 222, 241, 0.11);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.lobby-wash > i:nth-child(1) {
  top: 14%;
  right: 11%;
  width: 34vw;
  height: 34vw;
  border-style: dashed;
  animation: lobby-orbit 34s linear infinite;
}

.lobby-wash > i:nth-child(2) {
  top: 24%;
  right: 18%;
  width: 21vw;
  height: 21vw;
  border-color: rgba(217, 255, 67, 0.08);
  animation: lobby-orbit 23s linear infinite reverse;
}

.lobby-wash > i:nth-child(3) {
  right: -8%;
  bottom: -34%;
  width: 70vw;
  height: 36vw;
  border-color: rgba(255, 255, 255, 0.05);
}

@keyframes lobby-orbit {
  to { transform: rotate(342deg); }
}

.lobby-header {
  position: absolute;
  z-index: 6;
  top: 25px;
  right: 34px;
  left: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.lobby-season {
  display: flex;
  align-items: center;
  gap: 13px;
  text-shadow: 0 5px 22px rgba(0, 0, 0, 0.7);
}

.lobby-season > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lobby-season > div > span {
  color: var(--cyan);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.lobby-season > div > b {
  font-size: 25px;
  font-style: italic;
  letter-spacing: 0.05em;
}

.lobby-brand-mark,
.competitive-mark {
  position: relative;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.45);
  background: linear-gradient(145deg, rgba(85, 222, 241, 0.18), rgba(2, 8, 12, 0.72));
  color: var(--cyan);
  font-size: 22px;
  font-style: italic;
  font-weight: 800;
  clip-path: polygon(20% 0, 100% 0, 100% 67%, 68% 100%, 0 100%, 0 20%);
  box-shadow: inset 0 0 24px rgba(85, 222, 241, 0.08);
}

.lobby-brand-mark::after,
.competitive-mark::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 8px;
  width: 20px;
  height: 1px;
  background: var(--acid);
  box-shadow: 0 0 9px var(--acid);
}

.lobby-header .lobby-account {
  position: static;
  display: flex;
  min-width: 240px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(3, 10, 16, 0.5);
}

.lobby-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(217, 255, 67, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(145deg, #193036, #071015);
  color: var(--acid);
  font-size: 13px;
  font-style: italic;
  font-weight: 800;
}

.lobby-account-copy {
  display: flex;
  min-width: 90px;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.lobby-mode-menu {
  position: absolute;
  z-index: 5;
  top: 21%;
  left: clamp(34px, 5.8vw, 112px);
  display: flex;
  width: 205px;
  flex-direction: column;
  gap: 2px;
}

.lobby-mode-menu > .eyebrow {
  margin: 0 0 12px 18px;
  color: rgba(244, 247, 239, 0.42);
}

.lobby-mode-menu > button {
  position: relative;
  display: grid;
  min-height: 57px;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 5px 16px 5px 18px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.028), transparent 82%);
  color: rgba(244, 247, 239, 0.62);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.lobby-mode-menu > button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
}

.lobby-mode-menu > button:hover,
.lobby-mode-menu > button.active {
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(85, 222, 241, 0.14), transparent 90%);
  color: var(--ink);
  transform: translateX(3px);
}

.lobby-mode-menu > button:hover::before,
.lobby-mode-menu > button.active::before {
  background: var(--cyan);
  box-shadow: 0 0 17px 4px rgba(85, 222, 241, 0.4);
}

.lobby-mode-menu > button span {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lobby-mode-menu > button small {
  color: rgba(141, 154, 161, 0.55);
  font-size: 6px;
  letter-spacing: 0.12em;
}

.lobby-peak-state {
  margin-top: 5px;
}

.lobby-peak-state b {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 500;
}

.lobby-peak-state.locked {
  opacity: 0.58;
}

.lobby-peak-state.unlocked {
  color: var(--ink);
}

.lobby-peak-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 13px 0 0 18px;
  color: rgba(141, 154, 161, 0.57);
  font-size: 7px;
  line-height: 1.55;
}

.lobby-peak-rule i {
  width: 20px;
  height: 1px;
  margin-top: 5px;
  flex: 0 0 auto;
  background: rgba(85, 222, 241, 0.34);
}

.lobby-title {
  position: absolute;
  z-index: 3;
  left: clamp(38px, 7.5vw, 146px);
  bottom: 13.5vh;
  width: min(700px, 58vw);
  text-shadow: 0 12px 45px rgba(0, 0, 0, 0.72);
}

.lobby-title-season {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--cyan);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.lobby-title-season span {
  display: grid;
  width: 38px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.38);
  background: rgba(4, 15, 20, 0.55);
  color: var(--cyan);
  font-weight: 800;
}

.lobby-title-season b {
  font-size: 11px;
  font-weight: 500;
}

.lobby-title h1 {
  margin: 5px 0 19px;
  font-size: clamp(72px, 9.2vw, 142px);
  font-style: italic;
  line-height: 0.74;
  letter-spacing: -0.085em;
}

.lobby-title h1 span {
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(244, 247, 239, 0.72);
}

.lobby-title > p:last-child {
  max-width: 450px;
  margin: 0;
  color: rgba(244, 247, 239, 0.56);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.lobby-rank-card {
  position: absolute;
  z-index: 3;
  top: 10.5%;
  right: clamp(28px, 4.6vw, 86px);
  display: flex;
  width: clamp(300px, 25vw, 400px);
  min-height: 67vh;
  flex-direction: column;
  padding: 22px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(217, 255, 67, 0.7);
  background:
    linear-gradient(160deg, rgba(8, 18, 24, 0.68), rgba(3, 9, 15, 0.9)),
    radial-gradient(circle at 50% 38%, rgba(85, 222, 241, 0.12), transparent 48%);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.35);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  backdrop-filter: blur(10px);
}

.lobby-rank-card::before,
.lobby-rank-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.lobby-rank-card::before {
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  clip-path: inherit;
}

.lobby-rank-card::after {
  top: 0;
  right: 22%;
  width: 28%;
  height: 2px;
  background: var(--acid);
  box-shadow: 0 0 22px rgba(217, 255, 67, 0.7);
}

.lobby-rank-card-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 5px 10px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lobby-rank-card-head > span {
  color: rgba(244, 247, 239, 0.45);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.lobby-rank-card-head > b {
  font-size: 13px;
  font-style: italic;
}

.lobby-rank-card-head > small {
  grid-column: 1 / -1;
  color: var(--acid);
  font-size: 6px;
  letter-spacing: 0.18em;
}

.lobby-rank-card .emblem-3d {
  min-height: clamp(270px, 38vh, 410px);
  flex: 1;
  border: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(85, 222, 241, 0.12), transparent 43%),
    linear-gradient(145deg, transparent, rgba(255, 255, 255, 0.02));
}

.lobby-rank-card .emblem-3d canvas {
  inset: -6% -8% 2%;
  width: 116%;
  height: 104%;
}

.lobby-rank-card .emblem-copy {
  bottom: 18px;
}

.lobby-rank-card .emblem-copy b {
  font-size: 27px;
}

.lobby-rank-progress {
  position: relative;
  z-index: 2;
  padding: 11px 4px 14px;
}

.lobby-rank-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 8px;
}

.lobby-rank-progress b {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.lobby-rank-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 12px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 8px;
}

.lobby-rank-footer b {
  margin-left: 4px;
  color: var(--acid);
}

.lobby-bottom-actions {
  position: absolute;
  z-index: 7;
  right: clamp(30px, 5vw, 96px);
  bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lobby-action-trail {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-right: -18px;
  padding-right: 33px;
  opacity: 0.52;
}

.lobby-action-trail i {
  display: block;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
  transform: skewX(-35deg);
}

.lobby-action-trail i:nth-child(2) { width: 23px; }
.lobby-action-trail i:nth-child(3) { width: 13px; }
.lobby-action-trail i:nth-child(4) {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 14px var(--acid);
}

.lobby-primary-action {
  position: relative;
  display: grid;
  width: clamp(280px, 24vw, 390px);
  height: 72px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  overflow: hidden;
  padding: 0 27px 0 32px;
  border: 1px solid rgba(255, 244, 169, 0.78);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.9), transparent 22%),
    linear-gradient(100deg, #e6ff67 0%, #d8ff45 48%, #83ecdd 100%);
  color: #07100b;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  box-shadow:
    0 0 0 4px rgba(217, 255, 67, 0.08),
    0 0 40px rgba(217, 255, 67, 0.28);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lobby-primary-action::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(7, 16, 11, 0.14);
  clip-path: inherit;
}

.lobby-primary-action small {
  position: relative;
  z-index: 2;
  grid-column: 1;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.lobby-primary-action b {
  position: relative;
  z-index: 2;
  grid-column: 1;
  margin-top: -11px;
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.lobby-primary-action > i {
  position: relative;
  z-index: 2;
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 25px;
  font-style: normal;
  transition: transform 0.2s;
}

.lobby-primary-action:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow:
    0 0 0 4px rgba(217, 255, 67, 0.11),
    0 0 58px rgba(217, 255, 67, 0.44);
}

.lobby-primary-action:hover > i {
  transform: translateX(5px);
}

.lobby-primary-shine {
  position: absolute;
  top: -30%;
  left: -45%;
  width: 25%;
  height: 160%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  transform: skewX(-20deg);
  animation: lobby-button-shine 3.2s ease-in-out infinite;
}

@keyframes lobby-button-shine {
  0%, 28% { left: -45%; }
  65%, 100% { left: 120%; }
}

.lobby-bottom-utility {
  position: absolute;
  z-index: 6;
  bottom: 31px;
  left: clamp(34px, 5.8vw, 112px);
  display: flex;
  gap: 8px;
}

.lobby-secondary-action,
.lobby-cloud-button {
  display: flex;
  min-width: 122px;
  height: 42px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 9, 14, 0.52);
  color: rgba(244, 247, 239, 0.72);
  font: inherit;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(7px);
}

.lobby-secondary-action span,
.lobby-cloud-button span {
  font-size: 9px;
}

.lobby-secondary-action small,
.lobby-cloud-button small {
  margin-top: 3px;
  color: rgba(141, 154, 161, 0.56);
  font-size: 6px;
  letter-spacing: 0.13em;
}

.lobby-cloud-button {
  border-color: rgba(85, 222, 241, 0.18);
  color: var(--cyan);
}

@keyframes launch-out {
  to {
    opacity: 0;
    transform: scale(1.12);
    filter: blur(7px);
  }
}

@keyframes orbit-out {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.7);
  }
}

.loader-mark {
  width: 86px;
  height: 18px;
  display: flex;
  gap: 5px;
}

.loader-mark span {
  display: block;
  flex: 1;
  background: var(--loading-green);
  transform: skewX(-30deg);
  animation: loadbar 1.1s ease-in-out infinite;
}

.loader-mark span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader-mark span:nth-child(3) {
  animation-delay: 0.3s;
}

.loading-copy {
  width: min(360px, 72vw);
}

.loading-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.loading-title-row p {
  margin: 0;
  color: rgba(244, 247, 239, 0.72);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.loading-title-row b {
  color: var(--loading-green);
  font-size: 20px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
}

.loading-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.loading-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22b85b, var(--loading-green), #8dffb1);
  box-shadow: 0 0 15px rgba(69, 232, 134, 0.62);
  transition: width 0.12s linear;
}

.loading-transfer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 9px;
  color: rgba(157, 178, 184, 0.64);
  font-size: 7px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.loading-resource-size {
  color: var(--loading-green);
  font-weight: 700;
}

.loading-resource-source {
  padding: 2px 6px;
  border: 1px solid rgba(69, 232, 134, 0.22);
  color: rgba(141, 255, 177, 0.76);
}

.loading-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
}

.loading-steps span {
  color: rgba(141, 154, 161, 0.42);
  font-size: 7px;
  letter-spacing: 0.06em;
  transition: color 0.25s;
}

.loading-steps span.complete {
  color: var(--loading-green);
}

.three-preload-ui {
  position: fixed;
  left: 50%;
  bottom: 7vh;
  z-index: 1000;
  width: min(620px, 88vw);
  padding: 17px 20px 14px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  border-left: 2px solid var(--cyan);
  background: rgba(4, 9, 12, 0.9);
  color: var(--ink);
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.tpu-brand {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.tpu-brand span {
  color: var(--cyan);
}

.tpu-brand b {
  font-weight: 500;
}

.tpu-main {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 15px;
}

.tpu-percent {
  color: var(--acid);
  font-size: 43px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tpu-track {
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.tpu-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--acid));
  box-shadow: 0 0 14px rgba(85, 222, 241, 0.55);
  transition: width 0.1s linear;
}

.tpu-meta,
.tpu-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tpu-meta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
}

.tpu-bytes {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.tpu-foot {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 8px;
}

.tpu-source {
  padding: 2px 7px;
  border: 1px solid rgba(85, 222, 241, 0.28);
  color: var(--cyan);
}

.three-preload-ui[data-phase="parsing"] .tpu-percent,
.three-preload-ui[data-phase="parsing"] .tpu-status {
  color: var(--cyan);
}

.three-preload-ui[data-phase="error"] {
  border-color: var(--orange);
}

.three-preload-ui[data-phase="error"] .tpu-percent {
  color: var(--orange);
}

@keyframes loadbar {
  0%,
  100% {
    transform: skewX(-30deg) scaleY(0.35);
    opacity: 0.3;
  }
  50% {
    transform: skewX(-30deg) scaleY(1);
    opacity: 1;
  }
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.hud.is-active {
  opacity: 1;
}

.panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 48%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
}

.hud-brand {
  position: absolute;
  left: 24px;
  top: 24px;
  min-width: 196px;
  padding: 15px 17px 13px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%);
}

.brand-kicker {
  color: var(--acid);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.brand-kicker span {
  display: inline-block;
  max-width: 105px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.brand-title {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.track-length-notice {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 4px 7px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  background: linear-gradient(90deg, rgba(85, 222, 241, 0.08), transparent);
}

.track-length-notice span {
  color: rgba(198, 217, 223, 0.58);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.track-length-notice b {
  color: var(--cyan);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.track-length-notice i {
  color: rgba(217, 255, 67, 0.5);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.1em;
}

.track-distance-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.track-distance-readout span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.track-distance-readout b {
  color: var(--cyan);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.checkpoints {
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.checkpoint {
  width: 22px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.checkpoint.active {
  width: 31px;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(217, 255, 67, 0.6);
}

.checkpoint.final {
  background: var(--orange);
}

.checkpoints b {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.race-info {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  border-top: 2px solid var(--acid);
}

.race-stat {
  min-width: 104px;
  padding: 10px 16px 11px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.race-stat:last-child {
  border-right: 0;
}

.race-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.race-stat b {
  font-variant-numeric: tabular-nums;
  font-size: 19px;
  letter-spacing: 0.04em;
}

.race-stat small {
  color: var(--muted);
  font-size: 11px;
}

.race-time {
  min-width: 142px;
}

.race-time b {
  font-size: 16px;
  font-weight: 500;
}

.minimap-wrap {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 178px;
  padding: 10px;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
}

.minimap-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.minimap-label b {
  color: var(--red);
  font-size: 8px;
}

#minimap {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  opacity: 0.88;
}

.speed-cluster {
  position: absolute;
  left: 24px;
  bottom: 28px;
  width: 310px;
  padding: 12px 15px 14px 19px;
  border-left: 3px solid var(--acid);
  background: linear-gradient(90deg, rgba(5, 9, 12, 0.86), rgba(5, 9, 12, 0));
}

.speed-readout {
  display: inline-flex;
  align-items: flex-end;
  line-height: 0.8;
}

#speed-value {
  font-size: clamp(62px, 8vw, 92px);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(217, 255, 67, 0.15);
}

.speed-readout small {
  margin: 0 0 7px 10px;
  color: var(--acid);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.gear-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-left: 19px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  transform: translateY(-11px);
}

.gear-box span {
  color: var(--muted);
  font-size: 7px;
}

.gear-box b {
  font-size: 25px;
}

.rpm-track {
  width: 100%;
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.11);
}

#rpm-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0 58%, var(--acid) 58% 82%, var(--orange) 82%);
  box-shadow: 0 0 12px rgba(217, 255, 67, 0.55);
  transition: width 0.12s linear;
}

.boost-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.boost-wrap b {
  width: 22px;
  color: var(--cyan);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.boost-track {
  flex: 1;
  height: 3px;
  overflow: hidden;
  background: rgba(85, 222, 241, 0.16);
}

#boost-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(85, 222, 241, 0.65);
}

.lap-card {
  position: absolute;
  right: 24px;
  bottom: 28px;
  display: flex;
  gap: 18px;
  padding: 10px 14px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}

.lap-card .ghost-state {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

#ghost-status {
  color: var(--cyan);
}

.lap-card div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lap-card span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.lap-card b {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.controls-hint {
  position: absolute;
  right: 24px;
  bottom: 86px;
  width: min(390px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-color: rgba(85, 222, 241, 0.24);
  background:
    linear-gradient(145deg, rgba(8, 21, 28, 0.72), rgba(4, 10, 14, 0.52));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0.9;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 0 100%, 0 9px);
}

.controls-hint header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.controls-hint header span {
  color: rgba(244, 247, 239, 0.82);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.controls-hint header small {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.controls-current-bindings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.controls-current-bindings > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.controls-current-bindings span {
  color: rgba(203, 220, 224, 0.68);
  font-size: 8px;
}

.controls-current-bindings kbd {
  border-color: rgba(217, 255, 67, 0.28);
  background: rgba(217, 255, 67, 0.055);
  color: var(--acid);
}

.controls-hint-divider {
  color: rgba(141, 162, 168, 0.48);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.controls-hint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 13px;
}

.controls-hint-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.controls-hint-item > span:first-child {
  overflow: hidden;
  color: rgba(194, 209, 214, 0.62);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls-hint-keys {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

kbd {
  display: inline-grid;
  min-width: 21px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(85, 222, 241, 0.25);
  border-radius: 3px;
  background: rgba(85, 222, 241, 0.055);
  color: rgba(223, 239, 243, 0.88);
  font-family: inherit;
  font-size: 7px;
  line-height: 1;
}

.countdown {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  color: var(--acid);
  font-size: clamp(110px, 20vw, 260px);
  font-style: italic;
  font-weight: 800;
  pointer-events: none;
  text-shadow: 0 0 50px rgba(217, 255, 67, 0.35);
  opacity: 0;
}

.countdown.pop {
  animation: count-pop 0.95s cubic-bezier(0.23, 0.7, 0.2, 1);
}

.countdown.go {
  color: var(--cyan);
}

@keyframes count-pop {
  0% {
    opacity: 0;
    transform: scale(1.45);
    filter: blur(12px);
  }
  18% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

.toast {
  position: fixed;
  left: 50%;
  top: 110px;
  z-index: 19;
  transform: translate(-50%, -14px);
  padding: 9px 16px;
  border-left: 2px solid var(--acid);
  background: rgba(5, 9, 12, 0.8);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.start-screen {
  overflow: hidden;
  justify-items: start;
  padding-left: clamp(30px, 9vw, 150px);
  background:
    radial-gradient(circle at 74% 44%, rgba(85, 222, 241, 0.08), transparent 24%),
    linear-gradient(90deg, rgba(3, 6, 9, 0.96) 0%, rgba(3, 6, 9, 0.82) 34%, rgba(3, 6, 9, 0.15) 70%, rgba(3, 6, 9, 0.55) 100%);
}

.start-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 5, 7, 0.75), transparent 22%);
  pointer-events: none;
}

.start-grid {
  position: absolute;
  width: 65vw;
  height: 65vw;
  left: 49%;
  top: 58%;
  transform: translate(-50%, -50%) perspective(600px) rotateX(68deg);
  background-image:
    linear-gradient(rgba(85, 222, 241, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(85, 222, 241, 0.1) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle, black 5%, transparent 66%);
  opacity: 0.35;
  pointer-events: none;
}

.start-copy {
  position: relative;
  z-index: 2;
  width: min(620px, 74vw);
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--acid);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.eyebrow span {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(217, 255, 67, 0.36);
  color: var(--muted);
}

.start-copy h1 {
  margin: 0;
  font-size: clamp(78px, 13vw, 174px);
  font-style: italic;
  line-height: 0.75;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.45);
}

.start-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244, 247, 239, 0.72);
}

.lead {
  width: min(480px, 80vw);
  margin: 34px 0 34px;
  color: rgba(235, 242, 239, 0.67);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.07em;
}

.start-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 27px;
}

.primary-button {
  position: relative;
  display: inline-flex;
  min-width: 184px;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 22px;
  border: 0;
  background: var(--acid);
  color: #0b100d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
  transition: background 0.2s, transform 0.2s;
}

.primary-button:hover {
  background: #e6ff7d;
  transform: translateY(-2px);
}

.primary-button i {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-left: 1px solid rgba(11, 16, 13, 0.22);
  font-size: 22px;
  font-style: normal;
}

.online-button {
  display: inline-flex;
  min-width: 145px;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 19px;
  border: 1px solid rgba(85, 222, 241, 0.5);
  background: rgba(8, 19, 24, 0.76);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.online-button i {
  color: var(--acid);
  font-size: 8px;
  font-style: normal;
}

.online-button:hover {
  border-color: var(--cyan);
  background: rgba(16, 39, 46, 0.9);
}

.ranked-button {
  height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(255, 106, 43, 0.45);
  background: rgba(38, 14, 8, 0.72);
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.ranked-button i {
  margin-left: 6px;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
}

.peak-button {
  height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(85, 222, 241, 0.4);
  background: rgba(7, 25, 31, 0.74);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.peak-button i {
  margin-left: 6px;
  color: var(--acid);
  font-size: 7px;
  font-style: normal;
}

.competitive-hub {
  z-index: 34;
  padding: 3vh 3vw;
  background: rgba(2, 6, 9, 0.84);
  backdrop-filter: blur(14px);
}

.competitive-shell {
  display: grid;
  width: min(1120px, 94vw);
  height: min(780px, 92vh);
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 2px solid var(--orange);
  background:
    radial-gradient(circle at 70% 20%, rgba(85, 222, 241, 0.055), transparent 35%),
    #070c10;
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.75);
}

.competitive-shell.has-season-menu {
  grid-template-columns: 240px 1fr;
  border-top-color: var(--cyan);
}

.season-menu {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(3, 8, 11, 0.88);
}

.season-menu h3 {
  margin: 0 0 18px;
  font-size: 23px;
  font-style: italic;
}

.season-year-label {
  margin: -11px 0 13px;
  color: var(--orange);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.season-menu-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.season-menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.season-menu-list button.active {
  border-color: rgba(85, 222, 241, 0.35);
  background: rgba(85, 222, 241, 0.07);
  color: var(--ink);
}

.season-menu-list span {
  color: var(--acid);
  font-size: 9px;
  font-weight: 700;
}

.season-menu-list b {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-menu-back {
  margin-top: auto;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

.competitive-page {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 28px;
}

.competitive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 21px;
}

.season-corner {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 150px;
}

.season-corner span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.season-corner b {
  color: var(--acid);
  font-size: 25px;
  font-style: italic;
}

.season-corner small {
  color: var(--ink);
  font-size: 10px;
}

.ghost-corner b {
  color: var(--cyan);
}

.competitive-tabs {
  display: flex;
  gap: 5px;
}

.competitive-tabs button {
  height: 34px;
  padding: 0 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.competitive-tabs button.active {
  border-color: var(--acid);
  background: rgba(217, 255, 67, 0.08);
  color: var(--acid);
}

.competitive-page-title {
  color: var(--ink);
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.competitive-header .dialog-close {
  position: static;
  flex: 0 0 auto;
}

.ranked-showcase {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  min-height: 390px;
}

.ranked-showcase .emblem-3d {
  min-height: 390px;
}

.ranked-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 20px 18px;
  border-left: 1px solid var(--line);
}

.ranked-copy h2 {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 48px;
  font-style: italic;
  line-height: 0.95;
}

.ranked-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.ranked-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.ranked-meta span {
  color: var(--muted);
  font-size: 7px;
}

.ranked-meta b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranked-achievement-strip {
  display: grid;
  max-width: 660px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 11px 0 0;
}

.achievement-item {
  display: flex;
  min-width: 0;
  min-height: 92px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 50% 30%, rgba(85, 222, 241, 0.055), transparent 45%),
    rgba(255, 255, 255, 0.018);
  text-align: center;
}

.achievement-item > small {
  color: rgba(141, 154, 161, 0.65);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.achievement-item > b {
  overflow: hidden;
  max-width: 100%;
  font-size: 8px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-rank-icon,
.achievement-skin-icon,
.achievement-king-icon {
  position: relative;
  display: grid;
  width: 42px;
  height: 48px;
  place-items: center;
  background: linear-gradient(145deg, #b97842, #ffd18b);
  clip-path: polygon(50% 0, 91% 15%, 100% 56%, 73% 86%, 50% 100%, 27% 86%, 0 56%, 9% 15%);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}

.achievement-rank-icon i {
  width: 37%;
  height: 37%;
  border: 2px solid rgba(255, 255, 255, 0.58);
  transform: rotate(45deg);
}

.achievement-rank-icon strong {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgba(255, 252, 229, 0.94);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.72);
}

.achievement-item.street .achievement-rank-icon { background: linear-gradient(145deg, #9ba8ad, #effcff); }
.achievement-item.sprinter .achievement-rank-icon { background: linear-gradient(145deg, #16849a, #6ff5ff); }
.achievement-item.expert .achievement-rank-icon { background: linear-gradient(145deg, #5e8520, #d9ff43); }
.achievement-item.elite .achievement-rank-icon { background: linear-gradient(145deg, #a7471d, #ffb347); }
.achievement-item.navigator .achievement-rank-icon { background: linear-gradient(145deg, #543785, #d89aff); }
.achievement-item.king .achievement-rank-icon { background: linear-gradient(145deg, #a66d16, #fff2a8); }
.achievement-item.sovereign .achievement-rank-icon { background: linear-gradient(145deg, #8e176d, #78f5ff); }

.achievement-item.highest-rank {
  border-color: rgba(85, 222, 241, 0.18);
}

.achievement-item.highest-rank .achievement-rank-icon {
  filter:
    drop-shadow(0 0 9px rgba(85, 222, 241, 0.28))
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.achievement-king-icon {
  width: 48px;
  height: 49px;
  background: linear-gradient(145deg, #fff1a4, #d08d0e);
  clip-path: polygon(50% 0, 66% 28%, 100% 17%, 86% 69%, 50% 100%, 14% 69%, 0 17%, 34% 28%);
}

.achievement-king-icon::before {
  content: "";
  position: absolute;
  inset: 12px 13px 14px;
  border-radius: 50%;
  background: rgba(62, 37, 0, 0.34);
}

.achievement-king-icon i {
  position: relative;
  z-index: 2;
  color: #392100;
  font-size: 13px;
  font-style: italic;
  font-weight: 800;
}

.achievement-king-icon.is-empty {
  background: rgba(141, 154, 161, 0.22);
  clip-path: polygon(50% 0, 86% 13%, 100% 58%, 74% 85%, 50% 100%, 26% 85%, 0 58%, 14% 13%);
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.32));
}

.achievement-king-icon.is-empty::before {
  inset: 2px;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(85, 222, 241, 0.08), transparent 52%),
    #0a1318;
  clip-path: inherit;
}

.achievement-king-icon.is-empty i {
  color: rgba(207, 222, 226, 0.68);
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(85, 222, 241, 0.18);
}

.achievement-item.king-mark.locked {
  border-color: rgba(141, 154, 161, 0.12);
  background:
    radial-gradient(circle at 50% 30%, rgba(141, 154, 161, 0.05), transparent 45%),
    rgba(255, 255, 255, 0.012);
}

.achievement-item.king-mark.locked > small {
  color: rgba(141, 154, 161, 0.48);
}

.achievement-skin-icon {
  width: 54px;
  height: 32px;
  border: 1px solid rgba(85, 222, 241, 0.55);
  border-radius: 15px 15px 7px 7px;
  background: linear-gradient(145deg, rgba(85, 222, 241, 0.25), rgba(5, 15, 21, 0.9));
  clip-path: none;
}

.achievement-skin-icon::before,
.achievement-skin-icon::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid #7f8b90;
  border-radius: 50%;
  background: #071015;
}

.achievement-skin-icon::before { left: 7px; }
.achievement-skin-icon::after { right: 7px; }

.ranked-hero {
  grid-template-rows: minmax(0, 1fr) auto auto;
}

.ranked-achievement-strip {
  grid-row: 2;
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
  margin: 8px 0 6px;
  gap: 10px;
}

.ranked-bottom-bar {
  grid-row: 3;
}

.achievement-item {
  min-height: 104px;
  gap: 4px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(4, 13, 19, 0.7)),
    radial-gradient(circle at 50% 28%, rgba(85, 222, 241, 0.08), transparent 48%);
}

.achievement-item > small {
  font-size: 7px;
}

.achievement-item > b {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}

.achievement-item.skin-count > b {
  color: var(--cyan);
  font-size: 15px;
  font-style: italic;
}

.achievement-item.king-mark > small {
  color: #ffe49a;
}

.achievement-item.skin-count > small {
  color: rgba(85, 222, 241, 0.85);
}

.ranked-achievement-strip .achievement-rank-icon {
  width: 46px;
  height: 53px;
}

.ranked-achievement-strip .achievement-king-icon {
  width: 52px;
  height: 54px;
}

.ranked-achievement-strip .achievement-skin-icon {
  width: 62px;
  height: 36px;
}

.ranked-achievement-strip .achievement-skin-icon::before,
.ranked-achievement-strip .achievement-skin-icon::after {
  bottom: -5px;
  width: 11px;
  height: 11px;
}

.ranked-hero {
  grid-template-rows: minmax(0, 1fr) auto auto auto;
}

.rank-stage {
  flex-direction: column;
  justify-content: stretch;
  gap: 8px;
  padding-bottom: 0;
}

.rank-emblem-visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1;
}

.rank-emblem-visual > .rank-stage-rings {
  inset: 0;
}

.rank-emblem-visual .emblem-3d {
  width: 100%;
  height: 100%;
  min-height: 238px;
}

.rank-emblem-visual {
  min-height: 238px;
}

.rank-stage {
  min-height: 302px;
}

.stage-ranked-action {
  width: 100%;
  max-width: 410px;
  min-height: 52px;
  flex: 0 0 52px;
  align-self: center;
}

.stage-ranked-action small {
  display: none;
}

.stage-ranked-action b {
  margin: 0;
  font-size: 18px;
}

.ranked-room-panel {
  width: min(560px, 100%);
  grid-row: 3;
  grid-column: 1 / -1;
  margin: 0 0 5px;
}

.ranked-bottom-bar {
  grid-row: 4;
  grid-template-columns: 1fr;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 320px auto auto auto;
  }

  .ranked-copy {
    grid-row: 1;
    grid-column: 1;
  }

  .rank-stage {
    grid-row: 2;
    grid-column: 1;
  }

  .ranked-achievement-strip {
    grid-row: 3;
    grid-column: 1;
  }

  .ranked-room-panel {
    grid-row: 4;
    grid-column: 1;
  }

  .ranked-bottom-bar {
    grid-row: 5;
    grid-column: 1;
  }
}

@media (max-width: 850px) {
  .ranked-achievement-strip {
    grid-template-columns: 1fr 1fr;
  }
}

.season-info-link {
  align-self: flex-start;
  margin: 3px 0 13px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.start-ranked {
  height: 44px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #120705;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.start-ranked:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.competitive-history {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.season-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.season-detail-heading {
  grid-column: 1 / -1;
}

.season-detail-heading h2 {
  margin: 0;
  font-size: 46px;
  font-style: italic;
}

.season-detail .emblem-3d {
  min-height: 390px;
}

.season-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 9px;
}

.season-detail-stats > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.season-detail-stats span {
  color: var(--muted);
  font-size: 8px;
}

.season-detail-stats b {
  font-size: 16px;
}

.season-year-archive {
  min-height: 100%;
  padding: 6px 4px;
}

.season-archive-heading {
  margin-bottom: 18px;
}

.season-archive-heading h2 {
  margin: 0;
  color: var(--acid);
  font-size: 45px;
  font-style: italic;
}

.season-archive-heading > span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.season-four-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.season-history-card {
  position: relative;
  min-height: 185px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--archive-accent) 16%, transparent), transparent 45%),
    rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.season-history-card:hover,
.season-history-card.selected {
  border-color: var(--archive-accent);
  transform: translateY(-2px);
}

.season-history-card.current::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 45px;
  height: 4px;
  background: var(--acid);
}

.season-history-card.future {
  opacity: 0.48;
  filter: saturate(0.3);
}

.season-card-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.season-card-index > span {
  color: var(--archive-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.season-card-index small {
  color: var(--muted);
  font-size: 7px;
}

.season-history-card h3 {
  margin: 12px 0 22px;
  font-size: 23px;
  font-style: italic;
}

.season-card-value {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.season-card-value small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.season-card-value b {
  color: var(--ink);
  font-size: 28px;
  font-style: italic;
  line-height: 1;
}

.season-history-card .rank-value b {
  color: var(--archive-accent);
  font-size: 23px;
}

.season-card-foot {
  position: absolute;
  right: 15px;
  bottom: 12px;
  left: 15px;
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 7px;
}

.season-card-foot i {
  font-style: normal;
}

.start-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.start-meta span::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 1px;
  margin-right: 7px;
  vertical-align: middle;
  background: var(--acid);
}

.car-spec-card {
  position: absolute;
  right: clamp(25px, 7vw, 115px);
  bottom: 12vh;
  width: 205px;
  padding: 16px 18px 17px;
  border-top: 2px solid var(--orange);
  background: rgba(5, 9, 12, 0.78);
  backdrop-filter: blur(12px);
  z-index: 2;
}

.spec-top,
.spec-line {
  display: flex;
  justify-content: space-between;
}

.spec-top {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.spec-top b {
  align-self: center;
  color: var(--acid);
  font-size: 9px;
}

.spec-line {
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.spec-line span {
  color: var(--muted);
}

.spec-line b {
  font-weight: 600;
}

.car-spec-card p {
  margin: 16px 0 0;
  color: var(--orange);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.cloud-status {
  position: absolute;
  top: 28px;
  right: clamp(25px, 7vw, 115px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  padding: 10px 13px;
  border: 1px solid rgba(217, 255, 67, 0.2);
  background: rgba(4, 9, 12, 0.7);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.lobby-account {
  position: absolute;
  z-index: 3;
  right: clamp(25px, 7vw, 115px);
  top: 84px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(217, 255, 67, 0.14);
  background: rgba(4, 9, 12, 0.62);
  backdrop-filter: blur(9px);
}

.lobby-account span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.lobby-account b {
  max-width: 130px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-account button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.lobby-account button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.cloud-status:hover {
  border-color: rgba(217, 255, 67, 0.5);
  transform: translateY(-1px);
}

.cloud-status i,
.finish-cloud-status i {
  display: block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 9px currentColor;
}

.cloud-status[data-state="online"] i,
.finish-cloud-status[data-state="verified"] i {
  background: var(--acid);
}

.cloud-status[data-state="pending"] i,
.finish-cloud-status[data-state="pending"] i {
  background: var(--cyan);
  animation: cloud-pulse 1.2s ease-in-out infinite;
}

.cloud-status div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cloud-status span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.15em;
}

.cloud-status b {
  max-width: 210px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes cloud-pulse {
  50% {
    opacity: 0.32;
    transform: scale(0.75);
  }
}

.corner-note {
  position: absolute;
  left: 24px;
  bottom: 20px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 7px;
  line-height: 1.7;
  letter-spacing: 0.12em;
}

.pause-screen,
.finish-screen {
  background: rgba(3, 6, 8, 0.72);
  backdrop-filter: blur(11px);
}

.pause-card,
.finish-card {
  width: min(390px, 88vw);
  padding: 34px;
  border-top: 2px solid var(--acid);
  background: rgba(7, 12, 16, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.account-dialog {
  width: min(420px, 90vw);
  padding: 30px;
  border: 1px solid rgba(217, 255, 67, 0.25);
  border-top: 2px solid var(--acid);
  background: rgba(6, 11, 14, 0.97);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.account-dialog::backdrop {
  background: rgba(2, 5, 7, 0.76);
  backdrop-filter: blur(8px);
}

.account-dialog h2 {
  margin: 0 0 10px;
  font-size: 32px;
  font-style: italic;
}

.account-dialog > p:not(.eyebrow, .account-message) {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.account-dialog label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.account-dialog input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.account-dialog input:focus {
  border-color: var(--cyan);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.account-actions button {
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.account-actions button:first-child {
  border-color: var(--acid);
  background: var(--acid);
  color: #0b100d;
  font-weight: 700;
}

.account-message {
  min-height: 18px;
  margin: 13px 0 0;
  color: var(--orange);
  font-size: 10px;
}

.online-lobby {
  z-index: 32;
  background: rgba(2, 6, 9, 0.78);
  backdrop-filter: blur(12px);
}

.online-room-shell {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  width: min(1100px, 96vw);
  max-height: 92vh;
}

.online-room-shell.with-friends .online-card {
  width: min(680px, 66vw);
}

.online-room-shell .friends-panel {
  width: min(285px, 32vw);
  max-height: 92vh;
}

.online-card {
  position: relative;
  width: min(470px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px;
  border-top: 2px solid var(--cyan);
  background: rgba(6, 12, 16, 0.97);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.online-card h2 {
  margin: 0 0 24px;
  font-size: 42px;
  font-style: italic;
}

.online-card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.online-card input,
.online-card select {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.online-card input:focus,
.online-card select:focus {
  border-color: var(--cyan);
}

.online-card option {
  background: #0a1216;
}

.online-options {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: end;
  gap: 10px;
}

.online-room-capacity {
  display: flex;
  min-height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 5px 8px;
  border: 1px solid rgba(85, 222, 241, 0.18);
  background: rgba(85, 222, 241, 0.04);
}

.online-room-capacity small,
.online-room-capacity span {
  color: var(--muted);
  font-size: 7px;
}

.online-room-capacity b {
  color: var(--cyan);
  font-size: 10px;
}

.online-options button,
.join-row button,
.online-actions button {
  height: 42px;
  border: 1px solid rgba(85, 222, 241, 0.35);
  background: rgba(85, 222, 241, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.create-room,
.start-online {
  border-color: var(--acid) !important;
  background: var(--acid) !important;
  color: #0b100d !important;
  font-weight: 700 !important;
}

.online-card button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.online-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 13px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.online-divider::before,
.online-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.join-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
}

.room-code {
  display: grid;
  width: 100%;
  padding: 15px;
  border: 1px dashed rgba(217, 255, 67, 0.42);
  background: rgba(217, 255, 67, 0.035);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.room-code span,
.room-code small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.room-code b {
  margin: 5px 0;
  color: var(--acid);
  font-size: 36px;
  letter-spacing: 0.22em;
}

.online-connection {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 8px;
}

.online-connection b {
  color: var(--cyan);
}

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

.online-players li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.online-players li i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
}

.online-players li.offline i {
  background: var(--orange);
}

.online-players li.self span {
  color: var(--cyan);
}

.online-players small {
  margin-left: 7px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 7px;
}

.online-players li > b {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.online-player-rank {
  display: block;
  margin-top: 3px;
  color: var(--cyan);
  font-size: 7px;
  font-style: normal;
}

.room-player-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.room-compact-rank {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.room-compact-rank .room-rank-icon {
  width: 20px;
  height: 24px;
  grid-row: auto;
}

.room-compact-rank .room-player-rank-icon {
  width: 26px;
  height: 30px;
  flex: 0 0 auto;
}

.room-compact-rank .room-player-rank-icon i {
  width: 35%;
  height: 35%;
  border-width: 1px;
}

.room-compact-rank .room-player-rank-icon strong {
  font-size: 7px;
}

.room-compact-rank .room-rank-icon::before {
  inset: 5px 4px;
}

.room-compact-rank > b {
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
}

.room-compact-rank.street .room-rank-icon { background: linear-gradient(145deg, #9ba8ad, #effcff); }
.room-compact-rank.sprinter .room-rank-icon { background: linear-gradient(145deg, #16849a, #6ff5ff); }
.room-compact-rank.expert .room-rank-icon { background: linear-gradient(145deg, #5e8520, #d9ff43); }
.room-compact-rank.elite .room-rank-icon { background: linear-gradient(145deg, #a7471d, #ffb347); }
.room-compact-rank.navigator .room-rank-icon { background: linear-gradient(145deg, #543785, #d89aff); }
.room-compact-rank.king .room-rank-icon { background: linear-gradient(145deg, #a66d16, #fff2a8); }
.room-compact-rank.sovereign .room-rank-icon { background: linear-gradient(145deg, #8e176d, #78f5ff); }
.room-compact-rank.street .room-player-rank-icon { background: linear-gradient(145deg, #9ba8ad, #effcff); }
.room-compact-rank.sprinter .room-player-rank-icon { background: linear-gradient(145deg, #16849a, #6ff5ff); }
.room-compact-rank.expert .room-player-rank-icon { background: linear-gradient(145deg, #5e8520, #d9ff43); }
.room-compact-rank.elite .room-player-rank-icon { background: linear-gradient(145deg, #a7471d, #ffb347); }
.room-compact-rank.navigator .room-player-rank-icon { background: linear-gradient(145deg, #543785, #d89aff); }
.room-compact-rank.king .room-player-rank-icon { background: linear-gradient(145deg, #a66d16, #fff2a8); }
.room-compact-rank.sovereign .room-player-rank-icon { background: linear-gradient(145deg, #8e176d, #78f5ff); }

.room-player-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.room-player-name small {
  margin: 0;
  padding: 2px 5px;
  border: 1px solid rgba(217, 255, 67, 0.28);
  color: var(--acid);
  font-size: 6px;
}

.room-player-stats {
  display: grid;
  grid-template-columns: minmax(116px, 1fr) minmax(116px, 1fr) 62px 54px;
  gap: 5px;
}

.room-rank-stat,
.room-king-stat,
.room-skin-stat {
  display: grid;
  min-width: 0;
  grid-template-columns: 25px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 5px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.022);
}

.room-rank-stat > small,
.room-king-stat > small,
.room-skin-stat > small {
  margin: 0;
  color: rgba(141, 154, 161, 0.65);
  font-size: 5px;
  letter-spacing: 0.04em;
}

.room-rank-stat > b {
  overflow: hidden;
  color: var(--ink);
  font-size: 7px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-rank-icon {
  position: relative;
  display: block;
  width: 23px;
  height: 28px;
  grid-row: 1 / 3;
  background: linear-gradient(145deg, #b97842, #ffd18b);
  clip-path: polygon(50% 0, 92% 16%, 100% 56%, 72% 87%, 50% 100%, 28% 87%, 0 56%, 8% 16%);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}

.room-rank-icon::before {
  content: "";
  position: absolute;
  inset: 6px 5px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
}

.room-rank-stat.street .room-rank-icon { background: linear-gradient(145deg, #9ba8ad, #effcff); }
.room-rank-stat.sprinter .room-rank-icon { background: linear-gradient(145deg, #16849a, #6ff5ff); }
.room-rank-stat.expert .room-rank-icon { background: linear-gradient(145deg, #5e8520, #d9ff43); }
.room-rank-stat.elite .room-rank-icon { background: linear-gradient(145deg, #a7471d, #ffb347); }
.room-rank-stat.navigator .room-rank-icon { background: linear-gradient(145deg, #543785, #d89aff); }
.room-rank-stat.king .room-rank-icon { background: linear-gradient(145deg, #a66d16, #fff2a8); }
.room-rank-stat.sovereign .room-rank-icon { background: linear-gradient(145deg, #8e176d, #78f5ff); }

.room-rank-stat.highest {
  border-color: rgba(85, 222, 241, 0.18);
}

.room-rank-stat.highest .room-rank-icon {
  filter:
    drop-shadow(0 0 6px rgba(85, 222, 241, 0.3))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.room-king-stat > i {
  position: relative;
  display: grid;
  width: 25px;
  height: 27px;
  grid-row: 1 / 3;
  place-items: center;
  background: linear-gradient(145deg, #ffe993, #d49318);
  clip-path: polygon(50% 0, 67% 29%, 100% 18%, 86% 69%, 50% 100%, 14% 69%, 0 18%, 33% 29%);
  filter: drop-shadow(0 0 6px rgba(255, 204, 72, 0.35));
}

.room-king-stat > i::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(59, 38, 4, 0.34);
}

.room-king-stat > i > b {
  position: relative;
  z-index: 2;
  color: #351f00;
  font-size: 8px;
  font-style: italic;
}

.room-skin-stat {
  grid-template-columns: 24px minmax(0, 1fr);
}

.room-skin-stat > i {
  position: relative;
  display: block;
  width: 23px;
  height: 13px;
  grid-row: 1 / 3;
  border: 1px solid rgba(85, 222, 241, 0.5);
  border-radius: 7px 7px 4px 4px;
  background: linear-gradient(145deg, rgba(85, 222, 241, 0.28), rgba(5, 16, 22, 0.85));
}

.room-skin-stat > i::before,
.room-skin-stat > i::after {
  content: "";
  position: absolute;
  bottom: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c898e;
}

.room-skin-stat > i::before { left: 2px; }
.room-skin-stat > i::after { right: 2px; }

.online-tip,
.online-error {
  margin: 13px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.online-error {
  color: var(--orange);
}

.online-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.online-actions .leave-online {
  grid-column: 1 / -1;
  height: 32px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.ranked-hub {
  z-index: 33;
  background: rgba(2, 6, 9, 0.8);
  backdrop-filter: blur(12px);
}

.ranked-card {
  position: relative;
  width: min(760px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 32px;
  border-top: 2px solid var(--orange);
  background: rgba(8, 12, 15, 0.98);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.7);
}

.ranked-card h2 {
  margin: 0 0 22px;
  font-size: 42px;
  font-style: italic;
}

.ranked-summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr);
  gap: 10px;
}

.emblem-3d {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 45%, rgba(85, 222, 241, 0.09), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16));
}

.emblem-3d canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.emblem-3d canvas:active {
  cursor: grabbing;
}

.emblem-copy {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 14px;
  display: flex;
  min-width: 150px;
  align-items: center;
  flex-direction: column;
  transform: translateX(-50%);
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.emblem-copy span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.emblem-copy b {
  margin: 3px 0;
  color: var(--ink);
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.04em;
}

.emblem-copy small {
  color: var(--acid);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.emblem-3d.locked {
  filter: saturate(0.15);
}

.emblem-3d.locked .emblem-copy b {
  color: var(--muted);
}

.emblem-scanline {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    transparent 0 48%,
    rgba(85, 222, 241, 0.1) 49%,
    transparent 50%
  );
  background-size: 100% 8px;
  opacity: 0.32;
  pointer-events: none;
}

.rank-badge {
  min-height: 245px;
  border-color: rgba(255, 106, 43, 0.26);
}

.rank-badge .emblem-copy b {
  color: var(--orange);
  font-size: 27px;
}

.peak-panel {
  position: relative;
  min-height: 228px;
  padding: 0 !important;
  overflow: hidden;
}

.peak-badge {
  min-height: 190px;
  border: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(85, 222, 241, 0.13), transparent 52%),
    linear-gradient(155deg, rgba(4, 16, 20, 0.9), rgba(3, 6, 8, 0.96));
}

.peak-badge .emblem-copy {
  bottom: 10px;
}

.peak-badge .emblem-copy b {
  color: var(--cyan);
  font-size: 17px;
}

.peak-panel > small {
  display: block;
  padding: 8px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.rank-emblem,
.season-block,
.competitive-stats > div {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.rank-emblem {
  display: flex;
  min-height: 126px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border-color: rgba(255, 106, 43, 0.32);
  background:
    radial-gradient(circle, rgba(255, 106, 43, 0.14), transparent 65%),
    rgba(255, 255, 255, 0.02);
}

.rank-emblem span,
.season-block span,
.competitive-stats span,
.rank-progress span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.rank-emblem b {
  margin: 6px 0;
  color: var(--orange);
  font-size: 25px;
  font-style: italic;
}

.rank-emblem small,
.season-block small,
.competitive-stats small {
  color: var(--muted);
  font-size: 8px;
}

.season-block {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.season-block b {
  color: var(--acid);
  font-size: 30px;
  font-style: italic;
}

.rank-progress {
  margin: 15px 0;
}

.rank-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.rank-progress b {
  font-size: 9px;
  font-weight: 500;
}

.rank-progress-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.rank-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--acid));
  box-shadow: 0 0 12px rgba(255, 106, 43, 0.45);
}

.competitive-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.competitive-stats > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px;
}

.competitive-stats b {
  color: var(--ink);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.season-inheritance {
  margin: 15px 0;
  padding: 11px;
  border-left: 2px solid var(--cyan);
  background: rgba(85, 222, 241, 0.04);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.ranked-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.ranked-actions button {
  height: 46px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.ranked-actions .start-ranked {
  border-color: var(--orange);
  background: var(--orange);
  color: #130806;
}

.ranked-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.ranked-loading,
.ranked-result {
  color: var(--muted);
  font-size: 10px;
}

.ranked-result {
  color: var(--acid);
}

.ranked-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: -7px 0 14px;
  border-bottom: 1px solid var(--line);
}

.ranked-tabs button {
  height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.ranked-tabs button.active {
  border-bottom-color: var(--orange);
  color: var(--ink);
}

.ranked-tabs span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 7px;
}

.hidden-mmr-note {
  margin: 14px 0 0;
  color: rgba(141, 154, 161, 0.72);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.match-history {
  min-height: 360px;
}

.history-heading {
  display: flex;
  justify-content: space-between;
  padding: 8px 0 10px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.history-heading b {
  color: var(--cyan);
  font-weight: 500;
}

.history-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
}

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

.history-list li {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.history-mode {
  display: flex;
  align-items: center;
  gap: 7px;
}

.history-mode span {
  padding: 4px 7px;
  border: 1px solid rgba(255, 106, 43, 0.34);
  color: var(--orange);
  font-size: 8px;
}

.history-mode.peak span {
  border-color: rgba(85, 222, 241, 0.4);
  color: var(--cyan);
}

.history-mode b {
  font-size: 12px;
  font-style: italic;
}

.history-detail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.history-detail b {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-detail small,
.history-score small {
  color: var(--muted);
  font-size: 7px;
}

.history-score {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 3px;
}

.history-score b {
  color: var(--orange);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.history-score b.positive {
  color: var(--acid);
}

.matchmaking-panel {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(85, 222, 241, 0.28);
  background: rgba(85, 222, 241, 0.045);
}

.matchmaking-panel > div:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.matchmaking-panel span {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.matchmaking-panel b {
  font-size: 13px;
}

.matchmaking-panel small {
  color: var(--muted);
  font-size: 8px;
}

.matchmaking-panel button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.matchmaking-radar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.3);
  border-radius: 50%;
}

.matchmaking-radar::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  border-radius: 50%;
}

.matchmaking-radar i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: radar-dot 1.5s ease-in-out infinite;
}

.matchmaking-radar i:nth-child(2) {
  animation-delay: 0.3s;
  transform: translate(12px, -9px);
}

.matchmaking-radar i:nth-child(3) {
  animation-delay: 0.65s;
  transform: translate(-11px, 10px);
}

@keyframes radar-dot {
  50% {
    opacity: 0.2;
    transform: scale(0.55);
  }
}

.finish-card {
  width: min(470px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
}

.pause-card h2,
.finish-card h2 {
  margin: 0 0 28px;
  font-size: 42px;
  font-style: italic;
  letter-spacing: -0.03em;
}

.pause-card .primary-button,
.finish-card .primary-button {
  width: 100%;
}

.finish-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 10px;
}

.finish-lobby-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 247, 239, 0.74);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.finish-lobby-button:hover {
  border-color: rgba(85, 222, 241, 0.45);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
}

.text-button {
  display: block;
  margin: 19px auto 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.text-button:hover {
  color: var(--ink);
}

.finish-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.finish-rank span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.finish-rank b {
  color: var(--acid);
  font-size: 44px;
  font-style: italic;
}

.finish-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 25px;
}

.finish-stats div {
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.finish-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.finish-stats b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.speed-dashboard {
  --speed-ratio: 0;
  position: absolute;
  left: 22px;
  bottom: 22px;
  width: 284px;
  padding: 10px 14px 13px;
  border-left: 2px solid rgba(217, 255, 67, 0.65);
  background:
    linear-gradient(145deg, rgba(8, 15, 19, 0.92), rgba(5, 9, 12, 0.58)),
    radial-gradient(circle at 40% 35%, rgba(85, 222, 241, 0.08), transparent 60%);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  backdrop-filter: blur(12px);
}

.speedometer {
  position: relative;
  width: 244px;
  height: 244px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(2, 7, 10, 0.95) 0 50%, transparent 51%),
    radial-gradient(circle, rgba(85, 222, 241, 0.07), transparent 68%);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.65);
}

.speedometer::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(214, 238, 235, 0.13);
  border-radius: 50%;
}

.gauge-ticks {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 225deg,
    rgba(218, 238, 237, 0.7) 0deg 1deg,
    transparent 1deg 7.5deg
  );
  mask: radial-gradient(circle, transparent 0 76%, #000 77% 82%, transparent 83%);
  opacity: 0.72;
}

.gauge-arc {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: conic-gradient(
    from 225deg,
    var(--cyan) 0deg,
    var(--acid) calc(var(--speed-ratio) * 270deg),
    rgba(185, 211, 210, 0.12) calc(var(--speed-ratio) * 270deg),
    rgba(185, 211, 210, 0.12) 270deg,
    transparent 270deg 360deg
  );
  mask: radial-gradient(circle, transparent 0 88%, #000 89% 97%, transparent 98%);
  filter: drop-shadow(0 0 7px rgba(85, 222, 241, 0.5));
}

.gauge-needle {
  position: absolute;
  left: calc(50% - 1.5px);
  top: 20%;
  width: 3px;
  height: 80px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--orange), var(--acid));
  box-shadow: 0 0 10px rgba(255, 106, 43, 0.55);
  transform-origin: 50% 100%;
  transform: rotate(calc(-135deg + var(--speed-ratio) * 270deg));
  transition: transform 0.09s linear;
}

.gauge-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  border: 3px solid #0d1519;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 13px rgba(217, 255, 67, 0.55);
  transform: translate(-50%, -50%);
}

.gauge-center {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  width: 158px;
  height: 158px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gauge-model {
  margin-bottom: 2px;
  color: var(--acid);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.gauge-speed {
  color: var(--ink);
  font-size: 50px;
  font-style: italic;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(85, 222, 241, 0.16);
}

.gauge-center > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.dashboard-gear {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.dashboard-gear span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.dashboard-gear b {
  color: var(--acid);
  font-size: 23px;
  font-style: italic;
  line-height: 1;
}

.dashboard-telemetry {
  position: relative;
  z-index: 2;
  margin-top: -22px;
  padding: 9px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 10, 13, 0.7);
}

.rpm-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.rpm-row .rpm-track {
  margin: 0;
}

.dashboard-telemetry .boost-wrap {
  margin-top: 7px;
}

.nitro-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 5px 7px;
  border: 1px solid rgba(85, 222, 241, 0.16);
  background: rgba(85, 222, 241, 0.035);
  font-variant-numeric: tabular-nums;
}

.nitro-timer span {
  color: rgba(184, 205, 211, 0.58);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.nitro-timer b {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
}

.nitro-timer[data-state="active"] {
  border-color: rgba(85, 222, 241, 0.48);
  background: rgba(85, 222, 241, 0.09);
  box-shadow: inset 0 0 14px rgba(85, 222, 241, 0.05);
}

.nitro-timer[data-state="active"] b {
  text-shadow: 0 0 10px rgba(85, 222, 241, 0.72);
}

.nitro-timer[data-state="cooling"] {
  border-color: rgba(255, 153, 74, 0.18);
  background: rgba(255, 119, 43, 0.035);
}

.nitro-timer[data-state="cooling"] b {
  color: #ffad75;
}

.nitro-timer[data-state="ready"] b {
  color: var(--acid);
}

.finish-cloud-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -7px 0 14px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.finish-cloud-status[data-state="verified"] {
  color: var(--acid);
}

.finish-cloud-status[data-state="flagged"] {
  color: var(--orange);
}

.leaderboard-block {
  margin: 0 0 22px;
  border-top: 1px solid var(--line);
}

.leaderboard-heading {
  display: flex;
  justify-content: space-between;
  padding: 11px 0 7px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.leaderboard-heading b {
  color: var(--cyan);
  font-weight: 500;
}

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

.leaderboard-list li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(244, 247, 239, 0.82);
  font-size: 10px;
}

.leaderboard-list li.current {
  color: var(--acid);
}

.leaderboard-list li > span:first-child {
  color: var(--muted);
  font-style: italic;
  font-weight: 700;
}

.leaderboard-list li > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list li > b {
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.leaderboard-list .leaderboard-empty {
  display: block;
  padding: 13px 0;
  color: var(--muted);
  text-align: center;
}

.mobile-controls {
  position: fixed;
  inset: auto 0 22px;
  z-index: 14;
  display: none;
  padding: 0 20px;
  justify-content: space-between;
  pointer-events: none;
}

.mobile-controls button {
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(4, 8, 11, 0.58);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 22px;
  pointer-events: auto;
  touch-action: none;
}

.mobile-steer,
.mobile-pedals {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.mobile-pedals {
  position: relative;
}

.mobile-pedals .reverse-button {
  position: absolute;
  right: 73px;
  bottom: 78px;
  width: 46px;
  height: 36px;
  color: var(--orange);
  font-size: 9px;
}

.mobile-pedals button {
  width: 55px;
  height: 55px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-pedals .throttle-button {
  width: 70px;
  height: 70px;
  border-color: rgba(217, 255, 67, 0.45);
  color: var(--acid);
}

.mobile-pedals .nitro-button {
  width: 42px;
  height: 42px;
  color: var(--cyan);
  font-size: 9px;
}

.screen-vignette {
  position: fixed;
  inset: 0;
  z-index: 8;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.27), transparent 20%, transparent 74%, rgba(0, 0, 0, 0.36)),
    radial-gradient(circle, transparent 57%, rgba(0, 0, 0, 0.38) 100%);
  pointer-events: none;
}

body.impact .screen-vignette {
  background:
    linear-gradient(180deg, rgba(255, 66, 39, 0.12), transparent 30%),
    radial-gradient(circle, transparent 55%, rgba(255, 49, 31, 0.15) 100%);
}

body.boosting .screen-vignette {
  background:
    linear-gradient(180deg, rgba(85, 222, 241, 0.16), transparent 20%),
    radial-gradient(ellipse at center, transparent 36%, rgba(26, 173, 203, 0.2) 100%);
}

.screen-vignette::after {
  content: "";
  position: absolute;
  inset: -12%;
  background: repeating-conic-gradient(
    from 0deg at 50% 57%,
    transparent 0deg 7.2deg,
    rgba(125, 241, 255, 0.1) 7.5deg 7.8deg,
    transparent 8.1deg 15deg
  );
  mask: radial-gradient(circle at 50% 57%, transparent 0 25%, #000 57%, transparent 82%);
  opacity: 0;
  transition: opacity 0.16s ease;
}

body.boosting .screen-vignette::after {
  opacity: 0;
  animation: none;
}

body.boosting .speed-dashboard {
  border-left-color: var(--cyan);
  box-shadow:
    inset 0 0 28px rgba(85, 222, 241, 0.075),
    0 0 26px rgba(85, 222, 241, 0.12);
}

body.boosting .gauge-arc {
  filter: drop-shadow(0 0 12px rgba(85, 222, 241, 0.82));
}

body.boosting .boost-wrap {
  color: var(--cyan);
}

body.boosting .boost-track {
  box-shadow: 0 0 13px rgba(85, 222, 241, 0.55);
}

body.boosting #boost-fill {
  background: linear-gradient(90deg, #55def1, #e3ffff);
  animation: boost-meter 0.16s ease-in-out infinite alternate;
}

@keyframes boost-streaks {
  from {
    transform: scale(1) rotate(0deg);
  }
  to {
    transform: scale(1.08) rotate(1.2deg);
  }
}

@keyframes boost-meter {
  from {
    opacity: 0.64;
  }
  to {
    opacity: 1;
  }
}

body.drifting .screen-vignette {
  background:
    linear-gradient(180deg, rgba(255, 145, 66, 0.14), transparent 22%),
    radial-gradient(ellipse at center, transparent 37%, rgba(255, 106, 43, 0.17) 100%);
}

body.drifting .speed-dashboard {
  border-left-color: var(--orange);
  box-shadow:
    inset 0 0 28px rgba(255, 122, 54, 0.07),
    0 0 24px rgba(255, 92, 38, 0.11);
}

.drift-status {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 143, 77, 0.48);
  background: rgba(53, 16, 8, 0.64);
  color: #ffad75;
  font-size: 8px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.16em;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

body.drifting .drift-status {
  opacity: 1;
  transform: translateY(0);
  animation: drift-status-pulse 0.28s ease-in-out infinite alternate;
}

@keyframes drift-status-pulse {
  from {
    box-shadow: 0 0 4px rgba(255, 119, 50, 0.14);
  }
  to {
    box-shadow: 0 0 16px rgba(255, 119, 50, 0.42);
  }
}

.race-reward-overlay {
  position: fixed;
  z-index: 230;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(circle, rgba(2, 8, 11, 0.18), rgba(2, 7, 10, 0.56));
  pointer-events: none;
}

.race-reward-card {
  position: relative;
  width: min(460px, 92vw);
  padding: 31px 30px 27px;
  border: 1px solid rgba(255, 221, 107, 0.45);
  border-top: 2px solid #ffe27a;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 219, 92, 0.15), transparent 42%),
    linear-gradient(145deg, rgba(8, 23, 29, 0.98), rgba(3, 10, 14, 0.98));
  color: var(--ink);
  text-align: center;
  box-shadow:
    0 28px 100px rgba(0, 0, 0, 0.62),
    0 0 35px rgba(255, 211, 73, 0.08);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.race-reward-coin {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff4ad, #e4a91c);
  box-shadow:
    0 0 0 7px rgba(255, 220, 83, 0.06),
    0 0 28px rgba(255, 211, 73, 0.42);
}

.race-reward-coin::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(102, 64, 0, 0.32);
  border-radius: 50%;
}

.race-reward-coin i {
  position: relative;
  z-index: 1;
  color: #684200;
  font-size: 24px;
  font-style: normal;
  font-weight: 900;
}

.race-reward-coin span {
  position: absolute;
  inset: -12px;
  border: 1px dashed rgba(255, 227, 116, 0.38);
  border-radius: 50%;
  animation: reward-coin-spin 9s linear infinite;
}

.race-reward-card > small {
  color: rgba(255, 222, 111, 0.62);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.race-reward-card h2 {
  margin: 7px 0 11px;
  color: #fff1a9;
  font-size: 32px;
  font-style: italic;
}

.race-reward-card p {
  margin: 0;
  color: rgba(228, 236, 232, 0.82);
  font-size: 13px;
  line-height: 1.8;
}

.race-reward-card p b {
  margin: 0 5px;
  color: #ffe06b;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.race-reward-balance {
  display: inline-block;
  margin-top: 13px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 225, 111, 0.16);
  color: rgba(208, 222, 219, 0.58);
  font-size: 9px;
}

.race-reward-enter-active,
.race-reward-leave-active {
  transition: opacity 0.22s ease;
}

.race-reward-enter-active .race-reward-card,
.race-reward-leave-active .race-reward-card {
  transition: transform 0.24s ease, opacity 0.2s ease;
}

.race-reward-enter-from,
.race-reward-leave-to {
  opacity: 0;
}

.race-reward-enter-from .race-reward-card,
.race-reward-leave-to .race-reward-card {
  opacity: 0;
  transform: translateY(14px) scale(0.94);
}

@keyframes reward-coin-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 850px) {
  .lobby-header {
    top: 14px;
    right: 14px;
    left: 14px;
  }

  .lobby-header .lobby-account span {
    display: none;
  }

  .lobby-mode-menu {
    top: 100px;
    left: 14px;
    width: 145px;
  }

  .lobby-mode-menu > button {
    min-height: 43px;
  }

  .lobby-mode-menu > button span {
    font-size: 12px;
  }

  .lobby-peak-state {
    min-height: 48px;
  }

  .lobby-title {
    left: 25px;
    bottom: 120px;
    width: 85vw;
  }

  .lobby-title h1 {
    font-size: 72px;
  }

  .lobby-rank-card {
    top: 125px;
    right: 14px;
    width: 190px;
    padding: 7px;
  }

  .lobby-rank-card .emblem-3d {
    min-height: 175px;
  }

  .lobby-bottom-actions {
    right: 18px;
    bottom: 18px;
    left: 18px;
    justify-content: flex-end;
  }

  .lobby-primary-action {
    min-width: 185px;
    height: 56px;
  }

  .lobby-secondary-action,
  .lobby-cloud-button {
    display: none;
  }

  .competitive-hub {
    padding: 0;
  }

  .competitive-shell {
    width: 100%;
    height: 100%;
  }

  .competitive-shell.has-season-menu {
    grid-template-columns: 1fr;
    grid-template-rows: 145px 1fr;
  }

  .season-menu {
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .season-menu h3,
  .season-menu .eyebrow,
  .season-menu-back {
    display: none;
  }

  .season-menu-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .season-menu-list button {
    min-width: 115px;
    flex-direction: column;
    align-items: flex-start;
  }

  .competitive-page {
    padding: 16px;
  }

  .ranked-showcase,
  .season-detail {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ranked-showcase .emblem-3d,
  .season-detail .emblem-3d {
    min-height: 255px;
  }

  .ranked-copy {
    border-left: 0;
    padding: 12px 0;
  }

  .ranked-copy h2 {
    font-size: 36px;
  }

  .season-corner {
    min-width: 105px;
  }

  .competitive-tabs button {
    padding: 0 12px;
  }

  .ranked-card {
    padding: 22px;
  }

  .ranked-summary,
  .competitive-stats {
    grid-template-columns: 1fr;
  }

  .rank-badge {
    min-height: 205px;
  }

  .peak-panel {
    min-height: 218px;
  }

  .minimap-wrap {
    top: 16px;
    right: 14px;
    width: 128px;
  }

  .hud-brand {
    top: 14px;
    left: 14px;
    min-width: 144px;
    padding: 11px 12px;
  }

  .brand-title {
    font-size: 16px;
  }

  .checkpoints {
    margin-top: 9px;
  }

  .checkpoint {
    width: 13px;
  }

  .checkpoint.active {
    width: 20px;
  }

  .race-info {
    top: 118px;
  }

  .race-stat {
    min-width: 79px;
    padding: 7px 8px;
  }

  .race-time {
    min-width: 110px;
  }

  .race-stat b {
    font-size: 15px;
  }

  .race-time b {
    font-size: 13px;
  }

  .speed-cluster {
    left: 10px;
    bottom: 92px;
    width: 225px;
    padding-left: 12px;
  }

  .speed-dashboard {
    left: 8px;
    bottom: 86px;
    width: 205px;
    padding: 7px 9px 9px;
    transform: scale(0.82);
    transform-origin: left bottom;
  }

  .speedometer {
    width: 184px;
    height: 184px;
  }

  .gauge-speed {
    font-size: 38px;
  }

  .gauge-center {
    width: 122px;
    height: 122px;
  }

  .gauge-needle {
    height: 59px;
  }

  .gauge-speed {
    font-size: 38px;
  }

  .gear-box {
    margin-left: 10px;
  }

  .lap-card,
  .controls-hint {
    display: none;
  }

  .mobile-controls {
    display: flex;
  }

  .start-screen {
    justify-items: center;
    padding: 30px;
  }

  .start-copy {
    width: 100%;
  }

  .start-copy h1 {
    font-size: clamp(64px, 21vw, 110px);
  }

  .lead {
    margin: 25px 0;
  }

  .car-spec-card {
    display: none;
  }

  .cloud-status {
    top: auto;
    right: auto;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
  }

  .lobby-account {
    top: 82px;
    right: 14px;
  }

  .start-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

.shop-confirm-overlay {
  position: fixed;
  z-index: 140;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(9px);
}

.shop-confirm-dialog {
  width: min(430px, 92vw);
  padding: 27px;
  border: 1px solid rgba(85, 222, 241, 0.25);
  border-top: 2px solid var(--cyan);
  background:
    radial-gradient(circle at 50% 0, rgba(85, 222, 241, 0.1), transparent 45%),
    rgba(5, 12, 18, 0.98);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.68);
}

.shop-confirm-dialog > small {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.shop-confirm-dialog h3 {
  margin: 9px 0 20px;
  font-size: 22px;
  font-style: italic;
  line-height: 1.45;
}

.shop-confirm-balance {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 8px;
}

.shop-confirm-balance b {
  margin-left: 5px;
  color: #ffe49a;
  font-size: 12px;
}

.shop-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 19px;
}

.shop-confirm-actions button {
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.shop-confirm-actions button.confirm {
  border-color: var(--acid);
  background: var(--acid);
  color: #07100b;
  font-weight: 800;
}

.ranked-room-panel {
  width: min(420px, 100%);
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 10, 15, 0.55);
}

.ranked-room-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ranked-room-title > span {
  color: var(--ink);
  font-size: 10px;
}

.ranked-room-title > button,
.ranked-room-join button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(85, 222, 241, 0.3);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.ranked-room-join {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.ranked-room-join input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ranked-room-error {
  display: block;
  margin-top: 6px;
  color: var(--orange);
  font-size: 8px;
}

.transfer-host-button {
  padding: 4px 7px;
  border: 1px solid rgba(85, 222, 241, 0.25);
  background: transparent;
  color: var(--cyan);
  font: inherit;
  font-size: 7px;
  cursor: pointer;
}

.friends-panel {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(160deg, rgba(6, 18, 25, 0.74), rgba(3, 10, 15, 0.9)),
    rgba(3, 10, 15, 0.72);
}

.friends-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.friends-panel h3 {
  margin: 0;
  font-size: 18px;
  font-style: italic;
}

.friends-panel header span {
  color: var(--muted);
  font-size: 7px;
}

.friend-add-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 6px;
  margin: 10px 0;
}

.friend-add-row input {
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
}

.friend-add-row button {
  border: 1px solid rgba(217, 255, 67, 0.32);
  background: rgba(217, 255, 67, 0.08);
  color: var(--acid);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.friend-add-row button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.friend-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.friend-search-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  background: rgba(85, 222, 241, 0.045);
}

.friend-search-result > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.friend-search-result > div > b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-search-result > div > small {
  color: var(--cyan);
  font-size: 7px;
}

.friend-search-result > button {
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(217, 255, 67, 0.35);
  background: rgba(217, 255, 67, 0.08);
  color: var(--acid);
  font: inherit;
  font-size: 7px;
  cursor: pointer;
}

.friend-added {
  color: var(--muted);
  font-size: 7px;
}

.friend-list li {
  display: grid;
  grid-template-columns: 35px 1fr 20px;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.friend-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.28);
  border-radius: 50%;
  background: #10212a;
  color: var(--cyan);
  font-size: 11px;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-list li > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.friend-list li > div > b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-status {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #e34a4a;
  box-shadow: 0 0 7px rgba(227, 74, 74, 0.55);
  vertical-align: middle;
}

.friend-status.online {
  background: #55e37f;
  box-shadow: 0 0 8px rgba(85, 227, 127, 0.7);
}

.friend-list li > div > small {
  color: var(--muted);
  font-size: 7px;
}

.friend-list li > button {
  border: 0;
  background: transparent;
  color: rgba(141, 154, 161, 0.45);
  cursor: pointer;
}

.friend-list li > .friend-invite-button {
  padding: 5px 7px;
  border: 1px solid rgba(85, 222, 241, 0.3);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
  font: inherit;
  font-size: 7px;
}

.friend-list li > .friend-invite-button:disabled {
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(141, 154, 161, 0.45);
  cursor: not-allowed;
}

.friend-message {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.friend-message.error {
  color: var(--orange);
}

.invitation-overlay {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 10, 0.55);
  backdrop-filter: blur(7px);
}

.invitation-dialog {
  position: relative;
  width: min(400px, 92vw);
  overflow: hidden;
  padding: 28px;
  border: 2px solid rgba(85, 222, 241, 0.75);
  background:
    radial-gradient(circle at 50% 0, rgba(85, 222, 241, 0.14), transparent 46%),
    rgba(5, 13, 19, 0.98);
  box-shadow:
    0 0 0 4px rgba(85, 222, 241, 0.08),
    0 28px 100px rgba(0, 0, 0, 0.7);
  text-align: center;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.invitation-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 220px;
  height: 150px;
  border-radius: 50%;
  background: rgba(85, 222, 241, 0.18);
  filter: blur(28px);
  transform: translateX(-50%);
}

.invitation-dialog > small {
  position: relative;
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.invitation-dialog h2 {
  position: relative;
  margin: 10px 0 3px;
  font-size: 28px;
  font-style: italic;
}

.invitation-dialog p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 10px;
}

.invitation-dialog > b {
  display: block;
  color: var(--acid);
  font-size: 23px;
  letter-spacing: 0.18em;
}

.invitation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.invitation-actions button {
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.invitation-actions button.accept {
  border-color: var(--acid);
  background: var(--acid);
  color: #07100b;
  font-weight: 800;
}

.invitation-error {
  color: var(--orange) !important;
}

.shop-center-notice {
  position: fixed;
  z-index: 160;
  top: 50%;
  left: 50%;
  min-width: 190px;
  padding: 17px 28px;
  border: 1px solid rgba(158, 168, 174, 0.78);
  background: rgba(16, 22, 26, 0.94);
  color: rgba(244, 247, 239, 0.9);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.55),
    inset 0 0 22px rgba(255, 255, 255, 0.025);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: shop-notice-in 0.18s ease-out;
}

.daily-reward-toast {
  position: fixed;
  z-index: 170;
  top: 14%;
  left: 50%;
  display: flex;
  min-width: 230px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid rgba(255, 218, 100, 0.5);
  background:
    linear-gradient(110deg, rgba(255, 212, 82, 0.14), rgba(7, 17, 23, 0.96)),
    rgba(7, 17, 23, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.58);
  transform: translateX(-50%);
  animation: daily-reward-in 0.28s ease-out;
  pointer-events: none;
}

.daily-reward-toast span {
  color: var(--muted);
  font-size: 9px;
}

.daily-reward-toast b {
  color: #ffe18a;
  font-size: 17px;
}

@keyframes daily-reward-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

@keyframes shop-notice-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px)) scale(0.96);
  }
}

.friends-panel:not(.friends-room-panel) {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.friends-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.friends-page-header h3 {
  margin: 0;
  font-size: clamp(34px, 3.2vw, 52px);
  font-style: italic;
}

.friends-page-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.friend-search-area {
  display: flex;
  justify-content: flex-start;
  margin: 18px 0;
}

.friend-search-area .friend-add-row {
  width: min(430px, 100%);
  margin: 0;
}

.friend-search-area .friend-add-row input {
  height: 42px;
  font-size: 10px;
}

.friend-search-area .friend-add-row button {
  font-size: 9px;
}

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

.friend-player-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 260px;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  padding: 20px 13px 14px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  background:
    radial-gradient(circle at 50% 22%, rgba(85, 222, 241, 0.1), transparent 38%),
    rgba(4, 12, 18, 0.62);
}

.friend-player-card.offline {
  border-color: rgba(160, 170, 176, 0.13);
  background:
    radial-gradient(circle at 50% 22%, rgba(150, 158, 164, 0.06), transparent 38%),
    rgba(7, 12, 16, 0.66);
  filter: grayscale(0.55);
}

.friend-player-card .friend-avatar {
  width: 76px;
  height: 76px;
  border-width: 2px;
  font-size: 24px;
}

.friend-player-card.offline .friend-avatar {
  border-color: rgba(160, 170, 176, 0.24);
  background: #171c20;
  color: #8b949a;
}

.friend-card-name {
  display: flex;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card-rank {
  color: var(--cyan);
  font-size: 9px;
  text-align: center;
}

.friend-player-card.offline .friend-card-rank,
.friend-player-card.offline > small {
  color: #7f898f;
}

.friend-player-card > small {
  color: #65e68b;
  font-size: 8px;
}

.friend-player-card > button {
  width: 100%;
  height: 34px;
  margin-top: auto;
  border: 1px solid rgba(217, 255, 67, 0.32);
  background: rgba(217, 255, 67, 0.07);
  color: var(--acid);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.friend-player-card:not(.offline) > button:hover {
  background: rgba(217, 255, 67, 0.14);
}

.friend-player-card > button:disabled {
  border-color: rgba(160, 170, 176, 0.12);
  background: rgba(160, 170, 176, 0.035);
  color: #6e787e;
  cursor: not-allowed;
}

.friend-status {
  background: #737f85;
  box-shadow: none;
}

.friend-status.online {
  background: #55e37f;
  box-shadow: 0 0 8px rgba(85, 227, 127, 0.7);
}

.friend-empty-state {
  display: flex;
  min-height: 430px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  color: var(--muted);
}

.friend-empty-box {
  position: relative;
  display: grid;
  width: 96px;
  height: 70px;
  place-items: center;
  border: 1px solid rgba(166, 190, 199, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(85, 222, 241, 0.045), rgba(4, 12, 18, 0.5));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04),
    0 16px 35px rgba(0, 0, 0, 0.18);
}

.friend-empty-box::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 16px;
  width: 34px;
  height: 12px;
  border: 1px solid rgba(166, 190, 199, 0.24);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(5, 14, 20, 0.82);
}

.friend-empty-box i {
  display: block;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(166, 190, 199, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 222, 241, 0.08), transparent 68%);
}

.friend-empty-state p {
  margin: 0;
  font-size: 10px;
}

.friend-page-status {
  margin: 10px 0;
  color: var(--muted);
  font-size: 9px;
}

.friend-page-status.error {
  color: var(--orange);
}

.friends-room-panel {
  width: min(285px, 32vw);
  max-height: 92vh;
}

.friends-room-panel .friends-page-header h3 {
  font-size: 18px;
}

.friends-room-panel .friend-search-area {
  margin: 10px 0;
}

.friends-room-panel .friend-add-row {
  width: 100%;
}

.friends-room-panel .friend-player-grid {
  grid-template-columns: 1fr;
  gap: 5px;
  overflow-y: auto;
}

.friends-room-panel .friend-player-card {
  display: grid;
  min-height: 64px;
  grid-template-columns: 38px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 8px;
  padding: 8px;
}

.friends-room-panel .friend-player-card .friend-avatar {
  width: 36px;
  height: 36px;
  grid-row: 1 / 3;
  font-size: 12px;
}

.friends-room-panel .friend-card-name {
  grid-column: 2;
  font-size: 9px;
}

.friends-room-panel .friend-card-rank {
  grid-column: 2;
  font-size: 7px;
  text-align: left;
}

.friends-room-panel .friend-player-card > small {
  display: none;
}

.friends-room-panel .friend-player-card > button {
  width: auto;
  height: 30px;
  grid-row: 1 / 3;
  grid-column: 3;
  margin: 0;
  padding: 0 8px;
}

.friends-room-panel .friend-empty-state {
  min-height: 180px;
}

@media (max-width: 1050px) {
  .friend-player-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .friend-player-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .friend-player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.friends-panel:not(.friends-room-panel) {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.friends-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding-right: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.friends-page-header {
  display: block;
  padding: 0 0 12px;
}

.friends-page-header h3 {
  margin: 0;
  font-size: 23px;
  font-style: italic;
}

.friends-page-header span {
  margin-top: 4px;
  font-size: 7px;
}

.friend-search-area {
  display: block;
  margin: 14px 0 0;
}

.friend-search-area .friend-add-row {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 7px;
}

.friend-search-area .friend-add-row input {
  width: 100%;
  height: 38px;
}

.friend-search-area .friend-add-row button {
  width: 100%;
  height: 36px;
}

.friends-content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.friends-content .friend-empty-state {
  min-height: min(520px, 68vh);
}

.friends-room-panel {
  display: flex;
  flex-direction: column;
}

.friends-room-panel .friends-sidebar {
  padding-right: 0;
  border-right: 0;
}

.friends-room-panel .friends-page-header {
  padding-bottom: 9px;
}

.friends-room-panel .friends-content {
  flex: 1;
  overflow-y: auto;
}

.friends-room-panel .friend-player-grid {
  grid-template-columns: 1fr;
}

.friends-room-panel .friend-page-status {
  margin-top: 4px;
}

@media (max-width: 1000px) {
  .friends-panel:not(.friends-room-panel) {
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 16px;
  }

  .friend-player-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .friends-panel:not(.friends-room-panel) {
    grid-template-columns: 1fr;
  }

  .friends-sidebar {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .friend-search-area .friend-add-row {
    flex-direction: row;
  }

  .friend-search-area .friend-add-row button {
    width: 82px;
  }
}

@media (max-width: 520px) {
  .season-four-grid {
    grid-template-columns: 1fr;
  }

  .season-history-card {
    min-height: 150px;
  }
}

@media (max-height: 620px) {
  .controls-hint,
  .lap-card {
    display: none;
  }

  .speed-cluster {
    transform: scale(0.82);
    transform-origin: left bottom;
  }

  .start-copy h1 {
    font-size: clamp(64px, 13vh, 110px);
  }

  .lead {
    margin: 20px 0;
  }
}

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

/* Full-screen competitive experience */
.competitive-hub {
  z-index: 34;
  display: block;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(105deg, rgba(2, 7, 12, 0.98), rgba(5, 15, 22, 0.9) 42%, rgba(4, 12, 19, 0.7)),
    #03080d;
  backdrop-filter: blur(13px);
}

.competitive-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.competitive-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 37%, rgba(85, 222, 241, 0.14), transparent 28%),
    radial-gradient(circle at 46% 100%, rgba(217, 255, 67, 0.06), transparent 34%),
    repeating-linear-gradient(118deg, transparent 0 132px, rgba(255, 255, 255, 0.016) 133px 134px);
}

.competitive-atmosphere::after {
  content: "";
  position: absolute;
  right: -15vw;
  bottom: -46vw;
  width: 78vw;
  height: 78vw;
  border: 1px solid rgba(85, 222, 241, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 8vw rgba(85, 222, 241, 0.018),
    0 0 0 18vw rgba(255, 255, 255, 0.009);
}

.competitive-shell,
.competitive-shell.has-season-menu {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: 1fr;
  grid-template-rows: 78px minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.competitive-topbar {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 25px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: linear-gradient(180deg, rgba(3, 9, 14, 0.74), rgba(3, 9, 14, 0.16));
}

.competitive-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.competitive-brand > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.competitive-brand small {
  color: rgba(85, 222, 241, 0.68);
  font-size: 6px;
  letter-spacing: 0.18em;
}

.competitive-brand b {
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.05em;
}

.competitive-mark {
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.competitive-topbar .season-corner {
  min-width: 230px;
  grid-template-columns: auto auto;
  justify-content: center;
  text-align: center;
}

.competitive-topbar .season-corner span {
  color: rgba(244, 247, 239, 0.44);
}

.competitive-topbar .season-corner b {
  color: var(--acid);
  font-size: 25px;
}

.competitive-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(141, 154, 161, 0.64);
  font-size: 6px;
  letter-spacing: 0.14em;
}

.server-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 9px var(--acid);
}

.competitive-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 247, 239, 0.68);
  font-size: 21px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.competitive-close:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: rotate(4deg);
}

.ranked-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: 215px minmax(0, 1fr);
  overflow: hidden;
}

.ranked-side-nav {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 36px 21px 28px 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(90deg, rgba(2, 8, 13, 0.75), rgba(2, 8, 13, 0.2));
}

.ranked-side-nav > .eyebrow {
  margin: 0 0 7px;
}

.ranked-side-nav > h2 {
  margin: 0 0 28px;
  font-size: 25px;
  font-style: italic;
}

.ranked-side-nav > button {
  position: relative;
  display: grid;
  min-height: 67px;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 9px 10px 9px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(244, 247, 239, 0.48);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, padding-left 0.2s;
}

.ranked-side-nav > button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
}

.ranked-side-nav > button:hover,
.ranked-side-nav > button.active {
  padding-left: 5px;
  color: var(--ink);
}

.ranked-side-nav > button:hover::before,
.ranked-side-nav > button.active::before {
  background: var(--cyan);
  box-shadow: 0 0 12px 4px rgba(85, 222, 241, 0.33);
}

.ranked-side-nav > button > span {
  grid-row: 1 / 3;
  color: rgba(85, 222, 241, 0.44);
  font-size: 8px;
  font-style: italic;
}

.ranked-side-nav > button > b {
  font-size: 14px;
  font-weight: 600;
}

.ranked-side-nav > button > small {
  margin-top: 3px;
  color: rgba(141, 154, 161, 0.49);
  font-size: 6px;
  letter-spacing: 0.11em;
}

.ranked-side-nav > button.peak-nav:not(.locked) b {
  color: var(--cyan);
}

.ranked-side-nav > button.peak-nav.locked {
  cursor: not-allowed;
  opacity: 0.5;
}

.ranked-side-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(2, 9, 14, 0.42);
}

.ranked-side-note > span {
  color: rgba(244, 247, 239, 0.4);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.ranked-side-note > b {
  color: rgba(244, 247, 239, 0.6);
  font-size: 13px;
}

.ranked-side-note > small {
  color: rgba(141, 154, 161, 0.58);
  font-size: 7px;
  line-height: 1.6;
}

.ranked-side-note.unlocked {
  border-color: rgba(85, 222, 241, 0.22);
}

.ranked-side-note.unlocked > b {
  color: var(--cyan);
}

.competitive-page {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.ranked-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 22px 34px 18px;
}

.ranked-stage > .ranked-loading,
.ranked-stage > .online-error {
  position: absolute;
  z-index: 20;
  top: 15px;
  left: 50%;
  margin: 0;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(3, 9, 14, 0.9);
  transform: translateX(-50%);
}

.ranked-hero {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(390px, 0.92fr) minmax(360px, 1.08fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0 3%;
}

.ranked-copy {
  position: relative;
  z-index: 3;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 10px 0 7px;
}

.ranked-season-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  padding: 5px 11px 5px 5px;
  border: 1px solid rgba(85, 222, 241, 0.18);
  background: rgba(4, 13, 18, 0.56);
  color: rgba(244, 247, 239, 0.7);
}

.ranked-season-badge span {
  display: grid;
  min-width: 38px;
  height: 23px;
  place-items: center;
  background: var(--cyan);
  color: #041013;
  font-size: 9px;
  font-weight: 800;
}

.ranked-season-badge b {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.09em;
}

.ranked-copy > .eyebrow {
  margin: 0 0 5px;
}

.ranked-copy > h1 {
  margin: 0;
  font-size: clamp(59px, 5.8vw, 102px);
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.065em;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.ranked-copy > h1 span {
  color: transparent;
  font-size: 0.43em;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 1px rgba(244, 247, 239, 0.58);
}

.ranked-title-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 9px 0 13px;
}

.ranked-title-line b {
  color: var(--acid);
  font-size: clamp(24px, 2.2vw, 37px);
  font-style: italic;
}

.ranked-title-line span {
  color: rgba(141, 154, 161, 0.63);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.ranked-lead {
  max-width: 530px;
  margin: 0;
  color: rgba(244, 247, 239, 0.5);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.035em;
}

.ranked-main-progress {
  max-width: 500px;
  margin: 18px 0 14px;
}

.ranked-main-progress .rank-progress-track {
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.055);
}

.ranked-main-progress .rank-progress-track i {
  background: linear-gradient(90deg, var(--cyan), var(--acid));
  box-shadow: 0 0 15px rgba(85, 222, 241, 0.42);
}

.ranked-meta {
  display: flex;
  max-width: 500px;
  gap: 8px;
  margin: 0;
}

.ranked-meta > div {
  min-width: 95px;
  flex: 1;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.007));
}

.ranked-meta span {
  color: rgba(141, 154, 161, 0.63);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.ranked-meta b {
  font-size: 17px;
  font-style: italic;
}

.rank-stage {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 2% 1% 0;
}

.rank-stage::before {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 5%;
  left: 50%;
  width: 54%;
  background: radial-gradient(ellipse at center, rgba(85, 222, 241, 0.12), transparent 64%);
  filter: blur(12px);
  transform: translateX(-50%);
}

.rank-stage .emblem-3d {
  width: 100%;
  height: 100%;
  min-height: 330px;
  border: 0;
  background: transparent;
}

.rank-stage .emblem-3d canvas {
  inset: -8% -5% 1%;
  width: 110%;
  height: 107%;
}

.rank-stage .emblem-copy {
  bottom: 3%;
}

.rank-stage .emblem-copy span,
.rank-stage .emblem-copy small {
  opacity: 0;
}

.rank-stage .emblem-copy b {
  color: transparent;
  font-size: 0;
}

.rank-stage-rings {
  position: absolute;
  inset: 5% 9% 7%;
  border: 1px solid rgba(85, 222, 241, 0.09);
  border-radius: 50%;
  transform: rotate(-12deg) scaleY(0.7);
  pointer-events: none;
}

.rank-stage-rings::before,
.rank-stage-rings::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(85, 222, 241, 0.07);
  border-radius: 50%;
}

.rank-stage-rings::before { inset: 10%; }
.rank-stage-rings::after { inset: 23%; border-style: dashed; }

.rank-stage-rings i {
  position: absolute;
  top: 50%;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.rank-stage-rings i:nth-child(2) {
  top: 14%;
  left: 71%;
  width: 3px;
  height: 3px;
}

.rank-stage-rings i:nth-child(3) {
  top: auto;
  right: 13%;
  bottom: 8%;
  left: auto;
}

.rank-stage-caption {
  position: absolute;
  right: 7%;
  bottom: 8%;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  padding-right: 12px;
  border-right: 1px solid var(--acid);
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.65);
}

.rank-stage-caption span {
  color: rgba(141, 154, 161, 0.68);
  font-size: 6px;
  letter-spacing: 0.17em;
}

.rank-stage-caption b {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  font-style: italic;
}

.ranked-bottom-bar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(420px, 1fr) minmax(250px, 310px);
  align-items: stretch;
  gap: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.peak-inline-card {
  display: grid;
  min-height: 78px;
  grid-template-columns: 44px minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border: 1px solid rgba(85, 222, 241, 0.28);
  background:
    linear-gradient(105deg, rgba(85, 222, 241, 0.09), rgba(3, 10, 15, 0.72) 42%),
    rgba(3, 10, 15, 0.72);
}

.peak-inline-card.locked {
  grid-template-columns: 44px 1fr;
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.03), rgba(3, 10, 15, 0.64));
  filter: saturate(0.35);
}

.peak-inline-mark {
  position: relative;
  display: grid;
  width: 39px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.3);
  clip-path: polygon(50% 0, 100% 20%, 91% 72%, 50% 100%, 9% 72%, 0 20%);
}

.peak-inline-mark i {
  width: 13px;
  height: 13px;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(85, 222, 241, 0.44);
  transform: rotate(45deg);
}

.peak-inline-card.locked .peak-inline-mark i {
  border-color: rgba(244, 247, 239, 0.28);
  box-shadow: none;
}

.peak-inline-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 2px 10px;
}

.peak-inline-copy > span {
  color: rgba(244, 247, 239, 0.45);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.peak-inline-copy > b {
  color: var(--cyan);
  font-size: 19px;
  font-style: italic;
}

.peak-inline-card.locked .peak-inline-copy > b {
  color: rgba(244, 247, 239, 0.44);
}

.peak-inline-copy > small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: rgba(141, 154, 161, 0.65);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peak-inline-card > button {
  height: 35px;
  padding: 0 12px;
  border: 1px solid rgba(85, 222, 241, 0.26);
  background: rgba(85, 222, 241, 0.055);
  color: var(--cyan);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.peak-inline-card > button:hover {
  border-color: var(--cyan);
  background: rgba(85, 222, 241, 0.12);
}

.peak-inline-card > button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.ranked-action-stack {
  display: grid;
  min-width: 0;
  grid-template-rows: 25px 1fr;
  padding: 5px 7px 5px 13px;
  border: 1px solid rgba(217, 255, 67, 0.25);
  background: linear-gradient(120deg, rgba(217, 255, 67, 0.075), rgba(3, 9, 14, 0.76));
}

.season-info-link {
  align-self: center;
  justify-self: end;
  margin: 0;
  color: var(--cyan);
  font-size: 8px;
}

.season-info-link span {
  margin-left: 5px;
  transition: margin-left 0.2s;
}

.season-info-link:hover span {
  margin-left: 10px;
}

.start-ranked {
  display: flex;
  height: auto;
  min-height: 44px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 0;
  background: linear-gradient(105deg, #ebff75, #d9ff43 58%, #79e6da);
  color: #07100b;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.start-ranked small {
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.start-ranked b {
  margin-top: 2px;
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.start-ranked:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.start-ranked:disabled {
  cursor: wait;
  filter: saturate(0.2);
}

.ranked-matchmaking {
  position: absolute;
  z-index: 15;
  right: 34px;
  bottom: 120px;
  width: min(390px, 55vw);
  margin: 0;
  border-color: rgba(85, 222, 241, 0.4);
  background: rgba(3, 12, 17, 0.94);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(11px);
}

.ranked-recent-history {
  min-height: 0;
  margin: 0;
  padding: 1px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ranked-recent-history .history-heading {
  padding: 7px 0 5px;
}

.ranked-recent-history .history-empty {
  min-height: 52px;
  place-items: center start;
  font-size: 8px;
}

.ranked-recent-history .history-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 12px;
}

.ranked-recent-history .history-list li {
  min-width: 0;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 7px 0;
}

.ranked-recent-history .history-mode {
  gap: 5px;
}

.ranked-recent-history .history-mode span {
  padding: 3px 5px;
  font-size: 7px;
}

.ranked-recent-history .history-mode b {
  font-size: 10px;
}

.ranked-recent-history .history-detail b {
  font-size: 9px;
}

.ranked-recent-history .history-score b {
  font-size: 12px;
}

.ranked-result {
  position: absolute;
  z-index: 30;
  top: 90px;
  left: 50%;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid rgba(217, 255, 67, 0.28);
  background: rgba(3, 10, 14, 0.92);
  transform: translateX(-50%);
}

/* Season archive */
.archive-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: 275px minmax(0, 1fr);
  overflow: hidden;
}

.season-menu {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 34px 24px 24px 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(2, 8, 13, 0.7), rgba(2, 8, 13, 0.18));
}

.season-menu > .eyebrow {
  margin: 0 0 7px;
}

.season-menu h3 {
  margin: 0 0 8px;
  font-size: 28px;
  font-style: italic;
}

.season-year-label {
  margin: 0 0 22px;
  color: rgba(85, 222, 241, 0.64);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.season-menu-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.season-menu-list button {
  position: relative;
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  background: transparent;
  color: rgba(244, 247, 239, 0.45);
  text-align: left;
  cursor: pointer;
}

.season-menu-list button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
}

.season-menu-list button:hover,
.season-menu-list button.active {
  background: linear-gradient(90deg, rgba(85, 222, 241, 0.11), transparent);
  color: var(--ink);
}

.season-menu-list button.active::before {
  background: var(--cyan);
  box-shadow: 0 0 10px 3px rgba(85, 222, 241, 0.4);
}

.season-menu-list span {
  color: var(--acid);
  font-size: 9px;
  font-weight: 800;
}

.season-menu-list b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-menu-list i {
  color: rgba(141, 154, 161, 0.45);
  font-size: 6px;
  font-style: normal;
}

.season-menu-back {
  width: 100%;
  margin-top: auto;
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(244, 247, 239, 0.48);
  font: inherit;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

.season-menu-back:hover {
  color: var(--cyan);
}

.archive-page {
  overflow-y: auto;
  padding: 28px 38px 30px;
}

.season-year-archive {
  min-height: 100%;
  padding: 0;
}

.season-archive-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.season-archive-heading .eyebrow {
  margin: 0 0 4px;
}

.season-archive-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(35px, 3.2vw, 53px);
  font-style: italic;
  line-height: 1;
}

.season-archive-heading > span {
  padding-bottom: 4px;
  color: rgba(141, 154, 161, 0.65);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-align: right;
}

.season-four-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.season-history-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: clamp(385px, 56vh, 555px);
  flex-direction: column;
  overflow: hidden;
  padding: 14px 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(6, 18, 26, 0.73), rgba(3, 9, 14, 0.88)),
    radial-gradient(circle at 50% 27%, color-mix(in srgb, var(--archive-accent) 17%, transparent), transparent 48%);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.season-history-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 46%;
  height: 2px;
  background: var(--archive-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--archive-accent) 65%, transparent);
  transform: translateX(-50%);
}

.season-history-card:hover,
.season-history-card.selected {
  border-color: color-mix(in srgb, var(--archive-accent) 64%, rgba(255, 255, 255, 0.1));
  background:
    linear-gradient(180deg, rgba(8, 23, 32, 0.82), rgba(3, 9, 14, 0.92)),
    radial-gradient(circle at 50% 27%, color-mix(in srgb, var(--archive-accent) 25%, transparent), transparent 52%);
  transform: translateY(-3px);
}

.season-history-card.current::after {
  content: "CURRENT";
  position: absolute;
  top: 8px;
  right: -29px;
  width: 104px;
  padding: 3px 0;
  background: var(--acid);
  color: #07100b;
  font-size: 5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  transform: rotate(40deg);
}

.season-history-card.future {
  opacity: 0.5;
  filter: saturate(0.25);
}

.archive-card-visual {
  position: relative;
  display: grid;
  min-height: clamp(235px, 35vh, 350px);
  place-items: center;
  margin: -2px -4px 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--archive-accent) 8%, transparent), transparent 62%),
    radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--archive-accent) 18%, transparent), transparent 52%);
}

.archive-card-visual::before,
.archive-card-visual::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 13%;
  width: 1px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--archive-accent) 36%, transparent), transparent);
}

.archive-card-visual::before { left: 7%; }
.archive-card-visual::after { right: 7%; }

.archive-card-visual > small {
  position: absolute;
  right: 9px;
  bottom: 5px;
  color: rgba(244, 247, 239, 0.42);
  font-size: 6px;
  letter-spacing: 0.11em;
}

.archive-emblem {
  position: relative;
  display: grid;
  width: 70%;
  max-width: 190px;
  aspect-ratio: 0.76;
  place-items: center;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5));
}

.archive-emblem::before,
.archive-emblem::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.archive-emblem::before {
  inset: 4% 0 18%;
  border: 1px solid color-mix(in srgb, var(--archive-accent) 25%, transparent);
  transform: scaleY(0.72);
}

.archive-emblem::after {
  inset: 12% 7% 25%;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  transform: scaleY(0.72) rotate(18deg);
}

.archive-emblem > i {
  position: relative;
  z-index: 2;
  display: block;
  width: 66%;
  height: 78%;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.65), transparent 17%),
    linear-gradient(154deg, transparent 0 34%, color-mix(in srgb, var(--archive-accent) 70%, #111) 34.5% 60%, var(--archive-accent) 60.5% 69%, #090e13 69.5%);
  clip-path: polygon(50% 0, 88% 13%, 100% 42%, 83% 77%, 50% 100%, 17% 77%, 0 42%, 12% 13%);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.65);
}

.archive-emblem > i::before,
.archive-emblem > i::after {
  content: "";
  position: absolute;
}

.archive-emblem > i::before {
  inset: 17% 25% 37%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.05));
  clip-path: polygon(50% 0, 100% 27%, 83% 100%, 50% 78%, 17% 100%, 0 27%);
  box-shadow: 0 0 20px color-mix(in srgb, var(--archive-accent) 44%, transparent);
}

.archive-emblem > i::after {
  right: 18%;
  bottom: 19%;
  left: 18%;
  height: 10%;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.archive-emblem > span {
  position: absolute;
  z-index: 4;
  bottom: 18%;
  padding: 3px 8px;
  background: rgba(4, 10, 15, 0.76);
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.season-history-card > h3 {
  margin: 0;
  padding: 8px 2px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: clamp(15px, 1.25vw, 20px);
  font-style: italic;
  text-align: center;
}

.season-card-period {
  margin: -5px 0 10px;
  color: rgba(244, 247, 239, 0.46);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-align: center;
}

.season-card-value {
  display: flex;
  min-height: 63px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin: 0 -14px;
  padding: 8px;
  background: color-mix(in srgb, var(--archive-accent) 12%, rgba(255, 255, 255, 0.015));
}

.season-card-value small {
  color: rgba(141, 154, 161, 0.65);
  font-size: 6px;
  letter-spacing: 0.11em;
}

.season-card-value b,
.season-history-card .rank-value b {
  overflow: hidden;
  max-width: 100%;
  color: var(--archive-accent);
  font-size: clamp(17px, 1.5vw, 24px);
  font-style: italic;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-card-foot {
  position: static;
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: auto -14px 0;
  padding: 7px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(141, 154, 161, 0.55);
  font-size: 6px;
}

.season-card-foot i {
  font-style: normal;
}

@media (max-width: 1180px) {
  .ranked-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .ranked-side-nav {
    padding-left: 27px;
    padding-right: 15px;
  }

  .ranked-stage {
    padding-right: 25px;
    padding-left: 25px;
  }

  .ranked-hero {
    grid-template-columns: minmax(340px, 0.95fr) minmax(300px, 1.05fr);
  }

  .ranked-bottom-bar {
    grid-template-columns: minmax(370px, 1fr) minmax(225px, 280px);
  }

  .peak-inline-card {
    grid-template-columns: 40px minmax(150px, 1fr) auto;
  }

  .peak-inline-card > button:last-child {
    display: none;
  }

  .ranked-recent-history .history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-layout {
    grid-template-columns: 235px minmax(0, 1fr);
  }

  .season-menu {
    padding-left: 27px;
  }

  .archive-page {
    padding-right: 25px;
    padding-left: 25px;
  }

  .season-four-grid {
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .competitive-hub {
    overflow-y: auto;
  }

  .competitive-shell,
  .competitive-shell.has-season-menu {
    height: auto;
    min-height: 100%;
    grid-template-rows: 64px auto;
    overflow: visible;
  }

  .competitive-topbar {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .competitive-topbar .season-corner {
    display: none;
  }

  .server-status {
    display: none;
  }

  .ranked-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: visible;
  }

  .ranked-side-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 13px 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .ranked-side-nav > .eyebrow,
  .ranked-side-nav > h2,
  .ranked-side-note {
    display: none;
  }

  .ranked-side-nav > button {
    min-height: 48px;
    padding: 5px 9px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .ranked-side-nav > button::before {
    top: auto;
    right: 10px;
    bottom: 4px;
    left: auto;
    transform: none;
  }

  .ranked-stage {
    display: block;
    overflow: visible;
    padding: 22px 18px;
  }

  .ranked-hero {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 310px auto;
  }

  .ranked-copy {
    padding: 0;
  }

  .ranked-copy > h1 {
    font-size: clamp(56px, 11vw, 82px);
  }

  .rank-stage {
    min-height: 310px;
  }

  .rank-stage .emblem-3d {
    min-height: 310px;
  }

  .ranked-bottom-bar {
    grid-template-columns: 1fr;
    margin-top: 10px;
  }

  .ranked-recent-history {
    margin-top: 18px;
  }

  .archive-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: visible;
  }

  .season-menu {
    padding: 14px 18px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .season-menu h3,
  .season-menu > .eyebrow,
  .season-year-label,
  .season-menu-back {
    display: none;
  }

  .season-menu-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .season-menu-list button {
    min-width: 145px;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
  }

  .archive-page {
    overflow: visible;
    padding: 22px 18px 30px;
  }

  .season-four-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .season-history-card {
    min-height: 430px;
  }
}

@media (max-width: 650px) {
  .competitive-brand small {
    display: none;
  }

  .competitive-brand b {
    font-size: 15px;
  }

  .competitive-mark {
    width: 32px;
    height: 32px;
  }

  .ranked-side-nav {
    grid-template-columns: 1fr 1fr;
  }

  .ranked-side-nav > button:last-of-type {
    grid-column: 1 / -1;
  }

  .ranked-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .ranked-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ranked-meta > div:last-child {
    grid-column: 1 / -1;
  }

  .peak-inline-card {
    grid-template-columns: 38px 1fr;
  }

  .peak-inline-card:not(.locked) > button {
    grid-column: 1 / -1;
  }

  .peak-inline-card > button:last-child {
    display: block;
  }

  .ranked-matchmaking {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-bottom: 14px;
  }

  .ranked-recent-history .history-list,
  .season-four-grid {
    grid-template-columns: 1fr;
  }

  .season-archive-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .season-archive-heading > span {
    text-align: left;
  }

  .season-history-card {
    min-height: 410px;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .competitive-shell,
  .competitive-shell.has-season-menu {
    grid-template-rows: 66px minmax(0, 1fr);
  }

  .ranked-stage {
    padding-top: 12px;
    padding-bottom: 11px;
  }

  .ranked-copy > h1 {
    font-size: 62px;
  }

  .ranked-title-line {
    margin-top: 4px;
    margin-bottom: 7px;
  }

  .ranked-lead {
    line-height: 1.55;
  }

  .ranked-main-progress {
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .ranked-meta > div {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .rank-stage .emblem-3d {
    min-height: 250px;
  }

  .ranked-bottom-bar {
    padding-top: 7px;
  }

  .peak-inline-card {
    min-height: 64px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .ranked-recent-history .history-heading {
    padding-top: 3px;
    padding-bottom: 2px;
  }

  .ranked-recent-history .history-list li {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .archive-page {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .season-archive-heading {
    margin-bottom: 13px;
    padding-bottom: 10px;
  }

  .season-archive-heading h2 {
    font-size: 34px;
  }

  .season-history-card {
    min-height: 390px;
  }

  .archive-card-visual {
    min-height: 230px;
  }
}

.lobby-account .lobby-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(217, 255, 67, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(145deg, #193036, #071015);
  color: var(--acid);
  font-size: 13px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
}

.lobby-account .lobby-account-copy {
  display: flex;
  min-width: 90px;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.lobby-account .lobby-account-copy span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.lobby-account .lobby-account-copy b {
  max-width: 130px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-stars-3d {
  position: relative;
  width: 100%;
  height: 86px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 217, 104, 0.1), transparent 66%);
}

.rank-stars-3d canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rank-stars-caption {
  position: absolute;
  right: 8px;
  bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #ffe18a;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.rank-stars-caption b {
  font-size: 12px;
  font-style: italic;
}

.rank-stars-caption span {
  font-size: 8px;
}

.rank-stars-caption small {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 6px;
}

.lobby-rank-stars {
  flex: 0 0 82px;
  margin: -6px 0 3px;
}

.ranked-star-group {
  position: absolute;
  z-index: 4;
  right: 4%;
  bottom: 5%;
  width: min(280px, 42%);
  height: 82px;
  pointer-events: none;
}

.rank-guide {
  z-index: 90;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  overflow: hidden;
  padding: 24px 3vw 30px;
  background:
    linear-gradient(180deg, rgba(4, 11, 18, 0.97), rgba(7, 18, 28, 0.92)),
    #050b12;
}

.rank-guide-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 73% 35%, rgba(85, 222, 241, 0.11), transparent 31%),
    repeating-linear-gradient(118deg, transparent 0 120px, rgba(255, 255, 255, 0.018) 121px 122px);
  pointer-events: none;
}

.rank-guide-header {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.rank-guide-header > div {
  min-width: 0;
  text-align: left;
}

.rank-guide-header h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 49px);
  font-style: italic;
}

.rank-guide-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.rank-guide-header button {
  flex: 0 0 auto;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font-size: 25px;
  cursor: pointer;
}

.rank-guide-layout {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.85fr);
  gap: 20px;
  padding-top: 20px;
}

.rank-guide-list {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(4, minmax(125px, 1fr));
  gap: 10px;
  overflow-y: auto;
}

.rank-guide-list button {
  position: relative;
  display: flex;
  min-height: 205px;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  overflow: hidden;
  padding: 16px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(6, 16, 24, 0.88)),
    rgba(5, 14, 21, 0.8);
  color: rgba(244, 247, 239, 0.58);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 50% 100%, 0 calc(100% - 24px));
}

.rank-guide-list button:hover,
.rank-guide-list button.active {
  border-color: var(--rank-guide-accent, var(--cyan));
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--rank-guide-accent, var(--cyan)) 20%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(6, 16, 24, 0.92));
  color: var(--ink);
}

.rank-guide-list button.rookie { --rank-guide-accent: #b97842; }
.rank-guide-list button.street { --rank-guide-accent: #aeb9be; }
.rank-guide-list button.sprinter { --rank-guide-accent: #25aac1; }
.rank-guide-list button.expert { --rank-guide-accent: #7da82c; }
.rank-guide-list button.elite { --rank-guide-accent: #c45c27; }
.rank-guide-list button.navigator { --rank-guide-accent: #6945ad; }
.rank-guide-list button.king { --rank-guide-accent: #d89224; }
.rank-guide-list button.sovereign { --rank-guide-accent: #e63aa6; }

.rank-guide-sigil,
.rank-guide-large-sigil {
  position: relative;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--rank-guide-accent, var(--cyan)) 76%, white);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 52%),
    linear-gradient(145deg, var(--rank-guide-accent, var(--cyan)), rgba(5, 12, 17, 0.9));
  clip-path: polygon(50% 0, 88% 14%, 100% 48%, 77% 81%, 50% 100%, 23% 81%, 0 48%, 12% 14%);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.rank-guide-sigil {
  width: 82px;
  height: 96px;
  margin-bottom: auto;
}

.rank-guide-sigil::before,
.rank-guide-large-sigil::before {
  content: "";
  position: absolute;
  width: 56%;
  height: 56%;
  border: 2px solid rgba(255, 255, 255, 0.56);
  transform: rotate(45deg);
}

.rank-guide-sigil i,
.rank-guide-large-sigil i {
  width: 19%;
  height: 19%;
  border-radius: 50%;
  background: #fff5cc;
  box-shadow: 0 0 16px var(--rank-guide-accent, var(--cyan));
}

.rank-guide-list button b {
  font-size: 14px;
  font-style: italic;
}

.rank-guide-list button small {
  color: rgba(141, 154, 161, 0.7);
  font-size: 7px;
}

.rank-guide-detail {
  --rank-guide-accent: var(--cyan);
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(4, 12, 19, 0.9)),
    rgba(4, 12, 19, 0.86);
}

.rank-guide-detail.rookie { --rank-guide-accent: #b97842; }
.rank-guide-detail.street { --rank-guide-accent: #aeb9be; }
.rank-guide-detail.sprinter { --rank-guide-accent: #25aac1; }
.rank-guide-detail.expert { --rank-guide-accent: #7da82c; }
.rank-guide-detail.elite { --rank-guide-accent: #c45c27; }
.rank-guide-detail.navigator { --rank-guide-accent: #6945ad; }
.rank-guide-detail.king { --rank-guide-accent: #d89224; }
.rank-guide-detail.sovereign { --rank-guide-accent: #e63aa6; }

.rank-guide-detail-title {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 20px;
}

.rank-guide-large-sigil {
  width: 112px;
  height: 132px;
}

.rank-guide-detail-title small {
  color: var(--rank-guide-accent);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.rank-guide-detail-title h3 {
  margin: 4px 0 9px;
  font-size: 31px;
  font-style: italic;
}

.rank-guide-detail-title p {
  margin: 0;
  color: rgba(244, 247, 239, 0.66);
  font-size: 10px;
  line-height: 1.8;
}

.rank-guide-rule {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 20px 0 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.rank-guide-rule span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.rank-guide-rule b {
  color: var(--rank-guide-accent);
  font-size: 19px;
}

.rank-guide-divisions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.rank-guide-divisions > div,
.rank-guide-king-rule {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.rank-guide-divisions span,
.rank-guide-king-rule span {
  color: var(--ink);
  font-size: 9px;
}

.rank-guide-divisions b,
.rank-guide-king-rule b {
  color: var(--rank-guide-accent);
  font-size: 10px;
}

.rank-guide-king-rule small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.ranked-stage.history-stage {
  display: block;
  overflow-y: auto;
}

.match-history-page {
  min-height: 100%;
  padding: 2px 0 20px;
}

.match-history-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.match-history-header h1 {
  margin: 0;
  font-size: clamp(36px, 3.4vw, 56px);
  font-style: italic;
}

.match-history-header span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.match-history-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
}

.match-history-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 7px;
  list-style: none;
}

.match-history-list li {
  display: grid;
  grid-template-columns: 115px minmax(180px, 1fr) 140px 88px;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(3, 10, 15, 0.48);
}

.match-history-list li.ranked {
  border-left: 2px solid var(--orange);
}

.match-history-list li.peak {
  border-left: 2px solid var(--cyan);
}

.match-history-list li.casual {
  border-left: 2px solid var(--acid);
}

.match-history-mode {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-history-mode span {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
  font-size: 8px;
}

.match-history-list li.ranked .match-history-mode span {
  border-color: rgba(255, 106, 43, 0.4);
  color: var(--orange);
}

.match-history-list li.peak .match-history-mode span {
  border-color: rgba(85, 222, 241, 0.4);
  color: var(--cyan);
}

.match-history-list li.casual .match-history-mode span {
  border-color: rgba(217, 255, 67, 0.35);
  color: var(--acid);
}

.match-history-mode b {
  font-size: 13px;
  font-style: italic;
}

.match-history-main,
.match-history-time,
.match-history-score {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.match-history-main b {
  overflow: hidden;
  font-size: 13px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-history-main small,
.match-history-time small,
.match-history-score small {
  color: var(--muted);
  font-size: 7px;
}

.match-history-date {
  display: block;
  margin-top: 1px;
  color: rgba(216, 229, 228, 0.7);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.035em;
}

.match-history-time span {
  color: var(--muted);
  font-size: 7px;
}

.match-history-time b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.match-history-score {
  align-items: flex-end;
  text-align: right;
}

.match-history-score > b {
  color: var(--orange);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.match-history-score > b.positive {
  color: var(--acid);
}

.match-history-score.neutral > b {
  color: var(--muted);
}

@media (max-width: 950px) {
  .match-history-list li {
    grid-template-columns: 96px minmax(130px, 1fr) 110px 70px;
    gap: 9px;
    padding: 9px;
  }
}

@media (max-width: 650px) {
  .match-history-list li {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .match-history-mode {
    grid-row: 1;
    grid-column: 1 / -1;
  }

  .match-history-main {
    grid-row: 2;
    grid-column: 1;
  }

  .match-history-time {
    grid-row: 3;
    grid-column: 1;
  }

  .match-history-score {
    grid-row: 2 / 4;
    grid-column: 2;
  }
}

@media (max-width: 950px) {
  .rank-guide {
    overflow-y: auto;
    padding: 18px;
  }

  .rank-guide-layout {
    grid-template-columns: 1fr;
  }

  .rank-guide-list {
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    overflow: visible;
  }

  .rank-guide-detail-title {
    grid-template-columns: 90px 1fr;
  }

  .rank-guide-large-sigil {
    width: 82px;
    height: 98px;
  }
}

@media (max-width: 600px) {
  .rank-guide-list {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .rank-guide-divisions {
    grid-template-columns: 1fr;
  }
}

/* Player hub */
.player-hub-screen {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: 76px minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 9, 15, 0.98) 0 220px, rgba(3, 10, 16, 0.5) 37%, rgba(3, 8, 13, 0.28)),
    linear-gradient(0deg, rgba(3, 8, 13, 0.9), transparent 37%);
}

.player-hub-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.player-hub-atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 67% 35%, rgba(85, 222, 241, 0.12), transparent 27%),
    radial-gradient(circle at 83% 75%, rgba(255, 111, 50, 0.08), transparent 28%),
    repeating-linear-gradient(118deg, transparent 0 130px, rgba(255, 255, 255, 0.017) 131px 132px);
}

.player-hub-atmosphere > i {
  position: absolute;
  border: 1px solid rgba(85, 222, 241, 0.08);
  border-radius: 50%;
}

.player-hub-atmosphere > i:nth-child(1) {
  top: 8%;
  right: 8%;
  width: 34vw;
  height: 34vw;
  border-style: dashed;
}

.player-hub-atmosphere > i:nth-child(2) {
  top: 22%;
  right: 18%;
  width: 17vw;
  height: 17vw;
}

.player-hub-atmosphere > i:nth-child(3) {
  right: -12%;
  bottom: -33%;
  width: 62vw;
  height: 45vw;
}

.player-hub-topbar {
  position: relative;
  z-index: 8;
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: linear-gradient(180deg, rgba(3, 9, 14, 0.82), rgba(3, 9, 14, 0.24));
}

.player-hub-identity {
  display: flex;
  min-width: 205px;
  align-items: center;
  gap: 11px;
}

.player-hub-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.58);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(145deg, #19343e, #071015);
  color: var(--acid);
  font-size: 18px;
  font-style: italic;
  box-shadow: 0 0 18px rgba(85, 222, 241, 0.14);
}

.player-hub-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-hub-identity > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-hub-identity small {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.player-hub-identity b {
  max-width: 145px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-hub-currency {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 216, 106, 0.18);
  background: rgba(4, 11, 16, 0.52);
}

.player-hub-currency b {
  color: #ffe49a;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.coin-icon {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff1a9, #d4a31b);
  color: #7b5200;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 11px rgba(255, 211, 80, 0.28);
}

.coin-icon i {
  font-style: normal;
}

.player-hub-account {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.player-hub-account button {
  display: flex;
  height: 35px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 11, 16, 0.55);
  color: var(--muted);
  font-size: 8px;
  cursor: pointer;
}

.player-hub-account button small {
  color: rgba(141, 154, 161, 0.55);
  font-size: 6px;
}

.player-hub-menu {
  position: relative;
  z-index: 7;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 28px 18px 18px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.065);
  background: linear-gradient(90deg, rgba(3, 9, 14, 0.9), rgba(3, 9, 14, 0.38));
}

.player-hub-menu > button,
.player-hub-submenu-title {
  position: relative;
  display: flex;
  min-height: 51px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: rgba(244, 247, 239, 0.56);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
}

.player-hub-menu > button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  transform: translateY(-50%);
}

.player-hub-menu > button:hover,
.player-hub-menu > button.active {
  padding-left: 18px;
  background: linear-gradient(90deg, rgba(85, 222, 241, 0.12), transparent);
  color: var(--ink);
}

.player-hub-menu > button.active::before {
  background: var(--cyan);
  box-shadow: 0 0 12px 4px rgba(85, 222, 241, 0.42);
}

.player-hub-submenu {
  margin-top: 5px;
}

.player-hub-submenu-title {
  width: 100%;
}

.player-hub-submenu-title i {
  color: var(--cyan);
  font-size: 17px;
  font-style: normal;
}

.player-hub-submenu-list {
  display: flex;
  flex-direction: column;
  padding-left: 18px;
}

.player-hub-submenu-list button {
  min-height: 35px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(141, 154, 161, 0.66);
  font: inherit;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.player-hub-submenu-list button:hover,
.player-hub-submenu-list button.active {
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(85, 222, 241, 0.08), transparent);
  color: var(--ink);
}

.player-hub-content {
  position: relative;
  z-index: 5;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 24px 34px 112px;
}

.player-home-view {
  position: relative;
  display: grid;
  height: 100%;
  grid-template-columns: minmax(390px, 1fr) minmax(360px, 0.82fr);
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.player-home-copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.player-home-season {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.player-home-season span {
  display: grid;
  width: 43px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.4);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
}

.player-home-season b {
  color: rgba(244, 247, 239, 0.72);
  font-size: 10px;
  font-weight: 500;
}

.player-home-copy h1 {
  margin: 0 0 25px;
  font-size: clamp(62px, 7vw, 112px);
  font-style: italic;
  line-height: 0.78;
  letter-spacing: -0.08em;
}

.player-home-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(244, 247, 239, 0.7);
}

.player-home-summary {
  display: flex;
  gap: 10px;
  max-width: 720px;
}

.player-home-summary > div {
  display: flex;
  min-width: 145px;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 10, 15, 0.48);
}

.player-home-summary small {
  color: var(--muted);
  font-size: 7px;
}

.player-home-summary b {
  color: var(--acid);
  font-size: 18px;
  font-style: italic;
}

.player-home-car {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.player-home-car .car-skin-preview {
  min-height: 320px;
  flex: 1;
}

.player-home-side {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
}

.player-home-side button {
  display: flex;
  min-height: 91px;
  flex-direction: column;
  justify-content: center;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 2px solid var(--cyan);
  background:
    linear-gradient(105deg, rgba(85, 222, 241, 0.075), rgba(4, 12, 18, 0.65)),
    rgba(4, 12, 18, 0.54);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.player-home-side button:nth-child(2) {
  border-left-color: var(--orange);
}

.player-home-side button:nth-child(3) {
  border-left-color: var(--acid);
}

.player-home-side small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.player-home-side b {
  margin: 4px 0;
  font-size: 17px;
  font-style: italic;
}

.player-home-side span {
  color: rgba(141, 154, 161, 0.62);
  font-size: 8px;
}

.player-home-progress {
  grid-column: 1 / -1;
  max-width: 610px;
  align-self: end;
}

.player-home-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
}

.player-home-progress b {
  color: var(--ink);
}

.player-hub-actions {
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: 0;
  left: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px 18px;
  background: linear-gradient(0deg, rgba(3, 8, 13, 0.94), transparent);
}

.hub-mode-button {
  display: flex;
  width: min(240px, 24vw);
  height: 62px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(4, 12, 18, 0.72);
  color: var(--ink);
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.hub-mode-button small {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.hub-mode-button b {
  margin-top: 3px;
  font-size: 17px;
  font-style: italic;
}

.hub-mode-button.primary,
.hub-mode-button.rank {
  border-color: rgba(217, 255, 67, 0.7);
  background: linear-gradient(105deg, #ebff78, #d9ff43 58%, #72e9db);
  color: #07100b;
}

.hub-mode-button.primary small,
.hub-mode-button.rank small {
  color: rgba(7, 16, 11, 0.58);
}

.player-hub-error,
.player-hub-loading {
  position: absolute;
  z-index: 20;
  right: 24px;
  bottom: 16px;
  margin: 0;
  color: var(--orange);
  font-size: 8px;
}

.player-hub-loading {
  color: var(--cyan);
}

.profile-settings-panel,
.player-game-panel,
.shop-panel {
  height: 100%;
  overflow-y: auto;
  padding: 8px 4px 18px;
}

.profile-settings-panel > header,
.player-game-panel > header,
.shop-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.profile-settings-panel h1,
.player-game-panel h1,
.shop-header h1 {
  margin: 0;
  font-size: clamp(34px, 3.4vw, 54px);
  font-style: italic;
}

.profile-settings-panel header span,
.player-game-panel header span,
.shop-header span {
  color: var(--muted);
  font-size: 8px;
}

.profile-avatar-editor,
.profile-nickname-editor,
.profile-password-editor {
  max-width: 460px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(4, 12, 18, 0.62);
}

.profile-avatar-preview {
  display: grid;
  width: 118px;
  height: 118px;
  margin-bottom: 18px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(85, 222, 241, 0.52);
  border-radius: 50%;
  background: #071016;
  color: var(--acid);
  font-size: 38px;
  font-style: italic;
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-file-button,
.profile-setting-actions button,
.profile-nickname-editor button,
.profile-password-editor button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(85, 222, 241, 0.3);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.profile-file-button input {
  display: none;
}

.profile-setting-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.profile-nickname-editor label,
.profile-password-editor label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 8px;
}

.profile-nickname-editor input,
.profile-password-editor input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
}

.profile-nickname-editor button,
.profile-password-editor button {
  border-color: var(--acid);
  background: var(--acid);
  color: #07100b;
  font-weight: 700;
}

.profile-setting-message {
  margin: 13px 0 0;
  color: var(--acid);
  font-size: 9px;
}

.profile-setting-message.error {
  color: var(--orange);
}

.player-game-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(360px, 1fr) minmax(260px, 0.65fr);
  align-items: center;
  gap: 20px;
}

.player-radar-wrap {
  display: grid;
  min-height: 500px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.1);
  background: radial-gradient(circle, rgba(85, 222, 241, 0.055), transparent 67%);
}

.profile-radar {
  width: min(100%, 500px);
}

.profile-radar svg {
  display: block;
  width: 100%;
  height: auto;
}

.radar-grid {
  fill: none;
  stroke: rgba(85, 222, 241, 0.16);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}

.radar-value {
  fill: url("#radar-fill");
  stroke: var(--cyan);
  stroke-width: 2;
}

.radar-dot {
  fill: var(--acid);
  stroke: #071016;
  stroke-width: 2;
}

.radar-label {
  fill: rgba(244, 247, 239, 0.8);
  font-size: 11px;
  text-anchor: middle;
}

.radar-number {
  fill: var(--acid);
  font-size: 9px;
  text-anchor: middle;
}

.player-game-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.player-game-stats > div {
  display: flex;
  min-height: 84px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 12, 18, 0.55);
}

.player-game-stats span {
  color: var(--muted);
  font-size: 8px;
}

.player-game-stats b {
  font-size: 20px;
  font-style: italic;
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shop-coins {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffe49a;
  font-size: 16px;
}

.shop-coins i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff1a9, #d4a31b);
  color: #7b5200;
  font-style: normal;
  font-weight: 900;
}

.shop-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 16px;
}

.shop-list {
  display: flex;
  min-height: 0;
  max-height: 610px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.shop-list button {
  display: grid;
  min-height: 66px;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(4, 12, 18, 0.56);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.shop-list button:hover,
.shop-list button.active {
  border-color: rgba(85, 222, 241, 0.38);
  background: rgba(85, 222, 241, 0.07);
  color: var(--ink);
}

.shop-list button.locked {
  opacity: 0.74;
}

.shop-skin-swatch {
  display: grid;
  width: 42px;
  height: 48px;
  place-items: center;
  background: linear-gradient(145deg, var(--skin-primary), var(--skin-accent));
  clip-path: polygon(20% 0, 100% 12%, 88% 100%, 0 86%);
}

.shop-skin-swatch i {
  width: 17px;
  height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  transform: skewX(-20deg);
}

.shop-list button > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.shop-list button b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-list button small {
  color: rgba(141, 154, 161, 0.6);
  font-size: 7px;
}

.shop-list button em {
  color: var(--acid);
  font-size: 7px;
  font-style: normal;
}

.shop-showcase {
  display: grid;
  min-height: 600px;
  grid-template-rows: minmax(380px, 1fr) auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 52% 40%, rgba(85, 222, 241, 0.09), transparent 42%),
    rgba(3, 10, 15, 0.46);
}

.car-skin-preview {
  position: relative;
  min-height: 390px;
  overflow: hidden;
}

.car-skin-preview canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.car-skin-preview canvas:active,
.car-skin-preview.is-dragging canvas {
  cursor: grabbing;
}

.car-skin-preview-name {
  position: absolute;
  top: 18px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.car-skin-preview-name small {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.car-skin-preview-name b {
  font-size: 25px;
  font-style: italic;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

.shop-detail {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shop-detail h2 {
  margin: 3px 0 6px;
  font-size: 27px;
  font-style: italic;
}

.shop-detail small {
  color: var(--cyan);
  font-size: 7px;
}

.shop-detail p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.shop-buy-area {
  display: flex;
  min-width: 165px;
  align-items: center;
  flex-direction: column;
  gap: 7px;
}

.shop-buy-area > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ffe49a;
  font-size: 15px;
}

.shop-buy-area button {
  width: 100%;
  height: 41px;
  border: 0;
  background: var(--acid);
  color: #07100b;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.shop-buy-area button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

@media (max-width: 1100px) {
  .player-hub-screen {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .player-hub-actions {
    left: 190px;
  }

  .player-home-view {
    grid-template-columns: minmax(330px, 1fr) minmax(270px, 0.7fr);
  }

  .player-home-side {
    display: none;
  }

  .shop-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 850px) {
  .player-hub-screen {
    grid-template-columns: 1fr;
    grid-template-rows: 68px auto minmax(0, 1fr);
    overflow-y: auto;
  }

  .player-hub-topbar {
    padding: 0 15px;
  }

  .player-hub-menu {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .player-hub-menu > button {
    min-width: 92px;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.07);
  }

  .player-hub-submenu {
    display: flex;
    margin-top: 0;
  }

  .player-hub-submenu-title {
    min-width: 100px;
  }

  .player-hub-submenu-list {
    flex-direction: row;
    padding-left: 0;
  }

  .player-hub-submenu-list button {
    min-width: 80px;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
  }

  .player-hub-content {
    overflow: visible;
    padding: 18px;
  }

  .player-home-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto 330px auto;
  }

  .player-home-car {
    grid-row: 2;
  }

  .player-home-progress {
    grid-column: 1;
  }

  .player-hub-actions {
    position: fixed;
    left: 0;
  }

  .hub-mode-button {
    width: 31vw;
    height: 55px;
  }

  .player-game-layout,
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .player-radar-wrap {
    min-height: 380px;
  }

  .shop-list {
    max-height: 260px;
  }

  .shop-showcase {
    min-height: 450px;
  }
}

@media (max-width: 560px) {
  .player-hub-identity {
    min-width: 0;
  }

  .player-hub-currency {
    margin-left: auto;
  }

  .player-hub-account button:first-child {
    display: none;
  }

  .player-home-copy h1 {
    font-size: 62px;
  }

  .player-home-summary {
    flex-direction: column;
  }

  .player-hub-actions {
    gap: 5px;
    padding-inline: 8px;
  }

  .hub-mode-button {
    width: 32vw;
  }

  .hub-mode-button b {
    font-size: 13px;
  }

  .shop-detail {
    align-items: stretch;
    flex-direction: column;
  }
}

.shop-carousel-page {
  display: flex;
  height: calc(100% - 80px);
  min-height: 0;
  flex-direction: column;
}

.shop-carousel {
  position: relative;
  min-height: 360px;
  flex: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 50% 45%, rgba(85, 222, 241, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(5, 16, 23, 0.4), rgba(3, 9, 14, 0.72));
}

.shop-carousel .car-skin-preview {
  position: absolute;
  inset: 0;
}

.shop-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 48px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(3, 10, 15, 0.62);
  color: rgba(244, 247, 239, 0.8);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(7px);
}

.shop-arrow:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.shop-arrow.left {
  left: 15px;
}

.shop-arrow.right {
  right: 15px;
}

.shop-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 10px 0 3px;
}

.shop-carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.shop-carousel-dots button.unlocked {
  background: rgba(217, 255, 67, 0.35);
}

.shop-carousel-dots button.active {
  width: 20px;
  border-radius: 5px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(85, 222, 241, 0.45);
}

.shop-carousel-info {
  padding: 8px 4px 10px;
  text-align: center;
}

.shop-carousel-info small {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.shop-carousel-info h2 {
  margin: 4px 0 6px;
  font-size: clamp(25px, 2.3vw, 37px);
  font-style: italic;
}

.shop-carousel-info p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.shop-purchase-bar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 10, 15, 0.72);
}

.shop-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-price b {
  color: #ffe49a;
  font-size: 17px;
}

.shop-purchase-bar > button {
  width: min(230px, 34%);
  height: 43px;
  border: 0;
  background: linear-gradient(105deg, #ebff78, #d9ff43 58%, #72e9db);
  color: #07100b;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.shop-purchase-bar > button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@media (max-width: 700px) {
  .shop-carousel {
    min-height: 310px;
  }

  .shop-arrow {
    width: 38px;
    height: 62px;
  }
}

.player-hub-screen.shop-mode {
  background:
    radial-gradient(circle at 66% 42%, rgba(85, 222, 241, 0.075), transparent 34%),
    linear-gradient(145deg, #07141d, #03080d 72%);
}

.player-hub-screen.shop-mode .player-hub-atmosphere {
  display: none;
}

.player-hub-screen.shop-mode .player-hub-content {
  display: block;
  width: 100%;
  overflow: hidden;
  padding-bottom: 20px;
}

.player-hub-screen.shop-mode .shop-panel {
  display: flex;
  width: 100%;
  max-width: none;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.player-hub-screen.shop-mode .shop-header {
  flex: 0 0 auto;
}

.player-hub-screen.shop-mode .shop-carousel-page {
  display: grid;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  flex: 1;
  grid-template-rows: minmax(260px, 1fr) auto auto;
  overflow: hidden;
}

.player-hub-screen.shop-mode .shop-carousel {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.player-hub-screen.shop-mode .car-skin-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.player-hub-screen.shop-mode .shop-carousel-info {
  padding-top: 4px;
  padding-bottom: 7px;
}

.player-hub-screen.shop-mode .shop-purchase-bar {
  flex: 0 0 58px;
  margin-top: 6px;
}

@media (max-width: 850px) {
  .player-hub-screen.shop-mode .player-hub-content {
    overflow-y: auto;
  }

  .player-hub-screen.shop-mode .shop-panel {
    height: auto;
    min-height: 760px;
    overflow: visible;
  }

  .player-hub-screen.shop-mode .shop-carousel,
  .player-hub-screen.shop-mode .car-skin-preview {
    min-height: 340px;
  }
}

.lobby-avatar img,
.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lobby-avatar {
  overflow: hidden;
}

.auth-card > label.auth-remember {
  align-items: center;
  flex-direction: row;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0;
  cursor: pointer;
}

.auth-card > label.auth-remember input {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--acid);
}

.lobby-primary-action > b {
  grid-row: 1 / 3;
  align-self: center;
  margin-top: 0;
}

.account-dialog {
  max-height: min(88vh, 760px);
  overflow-y: auto;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 16px 0 22px;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.account-identity > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.account-identity > div > b {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-identity > div > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(217, 255, 67, 0.45);
  border-radius: 50%;
  background: linear-gradient(145deg, #193036, #071015);
  color: var(--acid);
  font-size: 21px;
  font-style: italic;
}

.account-section {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.account-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-style: italic;
}

.account-avatar-picker {
  display: inline-flex !important;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(85, 222, 241, 0.35);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
  font-size: 9px !important;
  letter-spacing: 0.06em !important;
  cursor: pointer;
}

.account-avatar-picker input {
  display: none;
}

.account-avatar-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.account-avatar-actions button,
.account-password-save {
  height: 38px;
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.account-avatar-actions button:first-child,
.account-password-save {
  border-color: var(--acid);
  background: var(--acid);
  color: #0a100c;
  font-weight: 700;
}

.account-avatar-actions button:disabled,
.account-password-save:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.account-password-save {
  width: 100%;
  margin-top: 12px;
}

.account-success {
  margin: 13px 0 0;
  color: var(--acid);
  font-size: 9px;
}

.season-menu-list i {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-rank-card-head > b,
.lobby-title-season > b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Final ranked layout overrides: these must stay at the end of the stylesheet. */
.competitive-topbar {
  grid-template-columns: 1fr auto !important;
}

.ranked-stage {
  overflow-y: auto !important;
}

.ranked-hero {
  grid-template-rows: minmax(330px, 1fr) auto auto auto !important;
}

.rank-stage {
  display: flex !important;
  min-height: 320px !important;
  flex-direction: column !important;
  justify-content: stretch !important;
  gap: 8px !important;
}

.rank-emblem-visual {
  position: relative !important;
  width: 100% !important;
  min-height: 250px !important;
  flex: 1 1 250px !important;
}

.rank-emblem-visual .emblem-3d,
.rank-stage .emblem-3d {
  width: 100% !important;
  height: 100% !important;
  min-height: 250px !important;
}

.rank-emblem-visual .emblem-3d canvas,
.rank-stage .emblem-3d canvas {
  width: 100% !important;
  height: 100% !important;
}

.stage-ranked-action {
  width: 100% !important;
  max-width: 410px !important;
  min-height: 52px !important;
  flex: 0 0 52px !important;
  align-self: center !important;
}

.ranked-achievement-strip {
  grid-row: 2 !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: none !important;
}

.ranked-room-panel {
  width: min(560px, 100%) !important;
  grid-row: 3 !important;
  grid-column: 1 / -1 !important;
  margin-bottom: 5px !important;
}

.ranked-bottom-bar {
  grid-row: 4 !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: 1fr !important;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 330px auto auto auto !important;
  }

  .ranked-copy {
    grid-row: 1 !important;
    grid-column: 1 !important;
  }

  .rank-stage {
    grid-row: 2 !important;
    grid-column: 1 !important;
  }

  .ranked-achievement-strip {
    grid-row: 3 !important;
  }

  .ranked-room-panel {
    grid-row: 4 !important;
  }

  .ranked-bottom-bar {
    grid-row: 5 !important;
  }
}

/* Final room/action row layout. */
.ranked-hero {
  grid-template-rows: minmax(330px, 1fr) auto auto !important;
}

.ranked-main-actions {
  display: grid;
  grid-row: 2 !important;
  grid-column: 1 / -1 !important;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  align-items: stretch;
  gap: 12px;
}

.ranked-main-actions .ranked-achievement-strip {
  grid-row: auto !important;
  grid-column: auto !important;
  margin: 0 !important;
}

.ranked-main-actions .stage-ranked-action {
  width: 100% !important;
  max-width: none !important;
  min-height: 104px !important;
  align-self: stretch !important;
  flex: none !important;
  clip-path: polygon(17px 0, 100% 0, 100% calc(100% - 17px), calc(100% - 17px) 100%, 0 100%, 0 17px);
}

.ranked-main-actions .stage-ranked-action b {
  font-size: 20px;
}

.ranked-bottom-bar {
  grid-row: 3 !important;
}

.ranked-room-entry {
  width: fit-content;
  min-width: 165px;
  height: 38px;
  margin-bottom: 12px;
  padding: 0 15px;
  border: 1px solid rgba(85, 222, 241, 0.34);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.ranked-room-entry:hover {
  border-color: var(--cyan);
  background: rgba(85, 222, 241, 0.13);
}

.room-dialog-overlay {
  position: fixed;
  z-index: 150;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 10, 0.68);
  backdrop-filter: blur(8px);
}

.ranked-room-dialog {
  position: relative;
  width: min(460px, 92vw);
  padding: 25px;
  border: 1px solid rgba(85, 222, 241, 0.28);
  border-top: 2px solid var(--cyan);
  background:
    radial-gradient(circle at 50% 0, rgba(85, 222, 241, 0.1), transparent 48%),
    rgba(5, 13, 19, 0.98);
  color: var(--ink);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.7);
}

.ranked-room-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.ranked-room-dialog header small {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.ranked-room-dialog h2 {
  margin: 5px 0 0;
  font-size: 25px;
  font-style: italic;
}

.ranked-room-dialog header > button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.room-dialog-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0;
  border-bottom: 1px solid var(--line);
}

.room-dialog-tabs button {
  height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.room-dialog-tabs button.active {
  border-bottom-color: var(--cyan);
  color: var(--cyan);
}

.room-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.room-dialog-body p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.room-dialog-body label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
}

.room-dialog-body input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.room-dialog-body input:focus {
  border-color: var(--cyan);
}

.room-create-confirm {
  height: 44px;
  border: 0;
  background: linear-gradient(105deg, #ebff78, #d9ff43 58%, #72e9db);
  color: #07100b;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.room-create-confirm:disabled {
  cursor: wait;
  opacity: 0.45;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-rows: auto 330px auto auto !important;
  }

  .ranked-main-actions {
    grid-row: 3 !important;
    grid-template-columns: 1fr;
  }

  .ranked-bottom-bar {
    grid-row: 4 !important;
  }
}

/* Ranked identity and emblem progress layout. */
.ranked-copy {
  justify-content: flex-start !important;
  padding-top: 8px !important;
}

.ranked-season-badge {
  margin-bottom: 12px !important;
  padding: 7px 13px 7px 7px !important;
}

.ranked-season-badge span {
  min-width: 51px !important;
  height: 30px !important;
  font-size: 13px !important;
}

.ranked-season-badge b {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
}

.ranked-room-entry {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.rank-stage {
  min-height: 380px !important;
}

.rank-emblem-visual {
  min-height: 270px !important;
}

.rank-emblem-meta {
  display: flex;
  width: 100%;
  max-width: 430px;
  align-items: center;
  flex-direction: column;
  align-self: center;
  justify-content: center;
  padding: 4px 10px 2px;
  text-align: center;
}

.rank-emblem-name {
  color: var(--acid);
  font-size: clamp(23px, 2.1vw, 32px);
  font-style: italic;
  line-height: 1;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.65);
}

.rank-emblem-progress {
  width: 100%;
  margin: 10px 0 0 !important;
}

.rank-emblem-progress > div:first-child {
  margin-bottom: 6px;
}

.rank-emblem-progress span {
  color: rgba(244, 247, 239, 0.56);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.rank-emblem-progress > div:first-child > b {
  color: var(--ink);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.rank-emblem-progress .rank-progress-track {
  height: 7px;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-rows: auto 410px auto auto !important;
  }

  .ranked-copy {
    padding-top: 0 !important;
  }

  .rank-stage {
    min-height: 400px !important;
  }
}

.room-entry-above-emblem {
  position: absolute !important;
  z-index: 8 !important;
  top: 2px !important;
  left: 2px !important;
  width: auto !important;
  min-width: 156px !important;
  margin: 0 !important;
  background: rgba(3, 10, 15, 0.72) !important;
  backdrop-filter: blur(8px);
}

@media (max-width: 900px) {
  .room-entry-above-emblem {
    top: 4px !important;
    left: 4px !important;
  }
}

.rank-emblem-visual {
  min-height: 300px !important;
}

.rank-emblem-visual .emblem-3d {
  overflow: visible !important;
}

.rank-emblem-visual .emblem-3d canvas,
.rank-stage .emblem-3d canvas {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.rank-stage {
  min-height: 425px !important;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-rows: auto 455px auto auto !important;
  }
}

/* Final ranked column and standalone peak page layout. */
.ranked-hero {
  grid-template-rows: minmax(430px, 1fr) !important;
}

.rank-emblem-meta {
  gap: 0 !important;
  padding-bottom: 0 !important;
}

.rank-emblem-progress {
  margin-top: 7px !important;
}

.ranked-column-action {
  width: min(230px, 100%) !important;
  min-height: 46px !important;
  max-width: 230px !important;
  flex: 0 0 46px !important;
  align-self: center !important;
  margin-top: 8px !important;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.ranked-column-action small {
  display: none;
}

.ranked-column-action b {
  margin: 0;
  font-size: 15px;
}

.rank-stage {
  gap: 3px !important;
}

.ranked-main-actions {
  display: none !important;
}

.peak-page-view {
  display: grid;
  min-height: 520px;
  grid-template-columns: minmax(340px, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 24px;
}

.peak-emblem-stage {
  position: relative;
  display: grid;
  min-height: 460px;
  place-items: center;
  overflow: visible;
}

.peak-emblem-stage .emblem-3d {
  width: 100%;
  height: 440px;
  min-height: 440px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.peak-emblem-stage .emblem-3d canvas {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.peak-emblem-stage.locked {
  opacity: 0.78;
}

.peak-emblem-rings {
  position: absolute;
  inset: 8% 12%;
  border: 1px solid rgba(85, 222, 241, 0.1);
  border-radius: 50%;
  transform: rotate(-10deg) scaleY(0.75);
  pointer-events: none;
}

.peak-emblem-rings::before,
.peak-emblem-rings::after {
  content: "";
  position: absolute;
  border: 1px dashed rgba(85, 222, 241, 0.09);
  border-radius: 50%;
}

.peak-emblem-rings::before { inset: 12%; }
.peak-emblem-rings::after { inset: 25%; }

.peak-emblem-rings i {
  position: absolute;
  top: 50%;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.peak-emblem-rings i:nth-child(2) {
  top: 17%;
  left: auto;
  right: 14%;
  width: 3px;
  height: 3px;
}

.peak-emblem-rings i:nth-child(3) {
  top: auto;
  right: 23%;
  bottom: 7%;
  left: auto;
}

.peak-action-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.peak-score-above-button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 15px;
  border: 1px solid rgba(85, 222, 241, 0.18);
  background: rgba(85, 222, 241, 0.045);
}

.peak-score-above-button span {
  color: var(--muted);
  font-size: 9px;
}

.peak-score-above-button b {
  color: var(--cyan);
  font-size: 27px;
  font-style: italic;
}

.peak-play-button {
  width: 100% !important;
  min-height: 54px !important;
  max-width: none !important;
  border: 0 !important;
  background: linear-gradient(105deg, #ebff78, #d9ff43 58%, #72e9db) !important;
  color: #07100b !important;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.peak-play-button:disabled {
  border: 1px solid rgba(160, 170, 176, 0.2) !important;
  background: rgba(120, 130, 136, 0.12) !important;
  color: #8b959a !important;
  filter: grayscale(1);
  cursor: not-allowed;
}

.peak-play-button b {
  font-size: 16px !important;
}

.peak-history-button {
  height: 40px;
  border: 1px solid rgba(85, 222, 241, 0.22);
  background: rgba(85, 222, 241, 0.045);
  color: var(--cyan);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.ranked-side-nav > button.peak-nav.locked {
  cursor: pointer !important;
  opacity: 0.72;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-rows: auto 455px !important;
  }

  .peak-page-view {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .peak-emblem-stage {
    min-height: 390px;
  }

  .peak-emblem-stage .emblem-3d {
    height: 380px;
    min-height: 380px;
  }

  .peak-action-column {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }
}

/* Final compact ranked composition. */
.ranked-hero {
  grid-template-rows: minmax(430px, 1fr) auto !important;
}

.ranked-main-actions {
  display: contents !important;
}

.ranked-copy .ranked-achievement-strip {
  display: grid !important;
  width: 100% !important;
  max-width: 430px !important;
  grid-row: auto !important;
  grid-column: auto !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin: 10px 0 !important;
}

.ranked-copy .achievement-item {
  min-height: 88px !important;
  padding: 7px 8px !important;
}

.ranked-copy .achievement-rank-icon {
  width: 38px !important;
  height: 43px !important;
}

.ranked-copy .achievement-king-icon {
  width: 43px !important;
  height: 42px !important;
}

.ranked-copy .achievement-skin-icon {
  width: 52px !important;
  height: 30px !important;
}

.compact-ranked-action {
  width: min(270px, 100%) !important;
  min-height: 47px !important;
  max-width: 270px !important;
  align-self: flex-start !important;
  flex: 0 0 47px !important;
  margin-top: 3px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.compact-ranked-action small {
  display: none;
}

.compact-ranked-action b {
  margin: 0;
  font-size: 15px !important;
}

.ranked-bottom-bar {
  grid-row: 2 !important;
  grid-column: 1 / -1 !important;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 455px auto !important;
  }

  .ranked-copy {
    grid-row: 1 !important;
  }

  .rank-stage {
    grid-row: 2 !important;
  }

  .ranked-bottom-bar {
    grid-row: 3 !important;
  }
}

/* Fill the ranked left column with a balanced 2x2 achievement grid. */
.ranked-hero {
  grid-template-rows: minmax(430px, 1fr) !important;
}

.ranked-copy {
  display: flex !important;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  justify-content: flex-start !important;
  gap: 10px;
}

.ranked-copy .ranked-season-badge {
  flex: 0 0 auto;
}

.ranked-copy .ranked-achievement-strip {
  display: grid !important;
  min-height: 260px;
  max-height: none;
  flex: 1 1 auto;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  gap: 9px !important;
  margin: 7px 0 0 !important;
}

.ranked-copy .achievement-item {
  min-height: 0 !important;
  height: auto;
}

@media (max-width: 900px) {
  .ranked-hero {
    grid-template-rows: auto 455px !important;
  }

  .ranked-copy {
    height: auto;
  }

  .ranked-copy .ranked-achievement-strip {
    min-height: 0;
    max-height: none;
    flex: none;
    grid-template-rows: 88px 88px;
  }
}

/* Friend finder: compact search controls at the left, centered empty state. */
@media (min-width: 801px) {
  .friends-panel:not(.friends-room-panel) {
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 52px);
  }

  .friends-sidebar {
    padding-right: clamp(22px, 2.4vw, 36px);
  }

  .friend-search-area {
    width: 100%;
  }

  .friend-search-area .friend-add-row {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 90px;
    align-items: stretch;
    gap: 8px;
  }

  .friend-search-area .friend-add-row input,
  .friend-search-area .friend-add-row button {
    width: 100%;
    height: 44px;
  }

  .friends-content {
    display: grid;
    place-items: stretch;
  }

  .friends-content .friend-empty-state {
    width: 100%;
    min-height: min(560px, 72vh);
  }
}

@media (min-width: 801px) and (max-width: 1000px) {
  .friends-panel:not(.friends-room-panel) {
    grid-template-columns: minmax(285px, 320px) minmax(0, 1fr);
    gap: 18px;
  }

  .friends-sidebar {
    padding-right: 18px;
  }

  .friend-search-area .friend-add-row {
    grid-template-columns: minmax(0, 1fr) 78px;
  }
}

@media (max-width: 800px) {
  .friend-search-area .friend-add-row {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 8px;
  }

  .friend-search-area .friend-add-row input,
  .friend-search-area .friend-add-row button {
    width: 100%;
  }
}

/* Final friend finder alignment: hug the lobby menu and center the empty state. */
.player-hub-screen.friends-mode .player-hub-content {
  padding-right: 18px;
  padding-left: 12px;
}

.friends-panel:not(.friends-room-panel) {
  position: relative;
}

.friends-panel:not(.friends-room-panel) .friends-content.has-empty-state {
  display: grid;
  place-items: center;
  padding-top: clamp(28px, 4vh, 48px);
  overflow: hidden;
}

.friends-panel:not(.friends-room-panel) .friends-content.has-empty-state .friend-empty-state {
  position: relative;
  inset: auto;
  width: auto;
  min-height: 0;
  transform: translateY(clamp(28px, 5vh, 56px));
  pointer-events: none;
}

@media (min-width: 801px) {
  .friends-panel:not(.friends-room-panel) {
    grid-template-columns: minmax(330px, 370px) minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 850px) {
  .player-hub-screen.friends-mode .player-hub-content {
    padding-right: 18px;
    padding-left: 18px;
  }
}

/* Friend search sits flush in the top-left corner of the content area. */
.player-hub-screen.friends-mode .player-hub-content {
  padding-top: 14px;
}

.friends-panel:not(.friends-room-panel) {
  display: flex !important;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.friends-panel:not(.friends-room-panel) .friends-sidebar {
  width: 100%;
  min-height: auto;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
}

.friends-panel:not(.friends-room-panel) .friends-page-header {
  display: none;
}

.friends-panel:not(.friends-room-panel) .friend-search-area {
  width: min(440px, 100%);
  margin: 0;
}

.friends-panel:not(.friends-room-panel) .friend-search-area .friend-add-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}

.friends-panel:not(.friends-room-panel) .friends-content {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  padding-top: 62px;
  overflow-y: auto;
}

.friends-panel:not(.friends-room-panel) > .friend-search-corner {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: min(440px, 100%);
}

/* Match the reference toolbar while keeping search controls on the left. */
.friends-panel:not(.friends-room-panel) .friends-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.friends-panel:not(.friends-room-panel) .friends-page-header h3 {
  margin: 0;
  font-size: 24px;
  font-style: italic;
}

.friends-panel:not(.friends-room-panel) .friends-page-header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.friends-panel:not(.friends-room-panel) > .friend-search-corner {
  position: static;
  width: min(520px, 100%);
  margin: 14px 0 0;
}

.friends-panel:not(.friends-room-panel) .friends-content {
  padding-top: 18px;
}

/* Align the search toolbar with the "个人主页" item in the left lobby menu. */
.player-hub-screen.friends-mode .player-hub-content {
  padding-top: 0;
  padding-right: 18px;
  padding-left: 12px;
}

.friends-panel:not(.friends-room-panel) .friends-page-header {
  display: none !important;
}

.friends-panel:not(.friends-room-panel) > .friend-search-corner {
  position: absolute !important;
  z-index: 5;
  top: 28px;
  left: 0;
  width: min(520px, 100%);
  margin: 0;
}

.friends-panel:not(.friends-room-panel) .friends-content {
  padding-top: 96px;
}

/* Pin the search toolbar to the viewport so inherited layouts cannot center it. */
@media (min-width: 851px) {
  .player-hub-screen.friends-mode
    .friends-panel:not(.friends-room-panel)
    > .friend-search-corner {
    position: fixed !important;
    z-index: 30;
    top: 104px;
    left: 232px;
    width: min(520px, calc(100vw - 250px));
    margin: 0;
  }
}

/* Refined profile settings pages. */
.profile-settings-panel {
  width: min(820px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 22px 8px 36px;
  overflow-y: auto;
}

.profile-settings-panel > header {
  width: min(680px, 100%);
  margin: 0 auto 18px;
  padding: 2px 0 14px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 2px solid var(--acid);
}

.profile-settings-panel h1 {
  margin: 0;
  color: rgba(247, 250, 246, 0.94);
  font-size: clamp(26px, 2.25vw, 32px);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.profile-avatar-editor,
.profile-nickname-editor,
.profile-password-editor {
  position: relative;
  width: min(680px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(85, 222, 241, 0.16);
  background:
    linear-gradient(145deg, rgba(10, 25, 34, 0.88), rgba(3, 10, 15, 0.78)),
    rgba(4, 12, 18, 0.78);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 24px 55px rgba(0, 0, 0, 0.28);
}

.profile-avatar-editor::before,
.profile-nickname-editor::before,
.profile-password-editor::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  width: 76px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 12px rgba(85, 222, 241, 0.35);
}

.profile-avatar-editor {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 16px 28px;
}

.profile-avatar-preview {
  width: 132px;
  height: 132px;
  grid-row: 1 / 3;
  margin: 0;
  justify-self: center;
  border: 1px solid rgba(85, 222, 241, 0.42);
  font-size: 40px;
  box-shadow:
    0 0 0 7px rgba(85, 222, 241, 0.025),
    0 16px 32px rgba(0, 0, 0, 0.26);
}

.profile-file-button {
  width: min(210px, 100%);
  height: 44px;
  justify-self: start;
  font-size: 11px;
}

.profile-setting-actions {
  align-self: start;
  gap: 10px;
  margin: 0;
}

.profile-setting-actions button {
  min-width: 118px;
  height: 44px;
  font-size: 11px;
}

.profile-nickname-editor label,
.profile-password-editor label {
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(190, 207, 213, 0.72);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.profile-nickname-editor input,
.profile-password-editor input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(1, 7, 11, 0.52);
  color: var(--ink);
  font-size: 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.profile-nickname-editor input:focus,
.profile-password-editor input:focus {
  border-color: rgba(85, 222, 241, 0.52);
  background: rgba(3, 12, 18, 0.78);
  box-shadow: 0 0 0 3px rgba(85, 222, 241, 0.055);
}

.profile-nickname-editor input::placeholder,
.profile-password-editor input::placeholder {
  color: rgba(141, 154, 161, 0.36);
}

.profile-nickname-editor button,
.profile-password-editor button {
  width: 210px;
  height: 44px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.profile-password-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.profile-password-editor label {
  margin: 0;
}

.profile-password-editor label:first-child,
.profile-password-editor button {
  grid-column: 1 / -1;
}

.profile-password-editor button {
  justify-self: end;
  margin-top: 2px;
}

.profile-setting-message {
  width: min(680px, 100%);
  margin: 12px auto 0;
  font-size: 10px;
}

@media (max-width: 700px) {
  .profile-settings-panel {
    padding: 14px 4px 28px;
  }

  .profile-avatar-editor,
  .profile-password-editor {
    grid-template-columns: 1fr;
  }

  .profile-avatar-preview {
    grid-row: auto;
  }

  .profile-file-button,
  .profile-setting-actions,
  .profile-password-editor label:first-child,
  .profile-password-editor button {
    grid-column: 1;
  }

  .profile-file-button,
  .profile-nickname-editor button,
  .profile-password-editor button {
    width: 100%;
  }

  .profile-password-editor button {
    justify-self: stretch;
  }
}

@media (min-width: 851px) and (max-width: 1100px) {
  .player-hub-screen.friends-mode
    .friends-panel:not(.friends-room-panel)
    > .friend-search-corner {
    left: 202px;
    width: min(520px, calc(100vw - 220px));
  }
}

@media (max-width: 850px) {
  .player-hub-screen.friends-mode
    .friends-panel:not(.friends-room-panel)
    > .friend-search-corner {
    position: fixed !important;
    z-index: 30;
    top: 128px;
    left: 18px;
    width: calc(100vw - 36px);
    margin: 0;
  }
}

/* Center the empty state in the full friend-results area. */
.friends-panel:not(.friends-room-panel) .friends-content.has-empty-state {
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  overflow: hidden;
}

.friends-panel:not(.friends-room-panel)
  .friends-content.has-empty-state
  .friend-empty-state {
  position: relative;
  inset: auto;
  width: min(280px, 100%);
  min-height: 0;
  margin: 0;
  transform: none;
  text-align: center;
  pointer-events: none;
}

.friends-panel:not(.friends-room-panel) .friend-empty-message {
  margin: 0;
  color: rgba(190, 207, 213, 0.62);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

/* Landscape touch controls and mobile operation settings. */
.mobile-controls {
  --touch-size: clamp(52px, 8vmin, 64px);
  inset: auto 0 max(12px, env(safe-area-inset-bottom));
  z-index: 28;
  align-items: flex-end;
  gap: 18px;
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
}

.mobile-controls button {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-controls .touch-control {
  display: inline-flex;
  width: var(--touch-size);
  height: var(--touch-size);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 1px solid rgba(198, 217, 224, 0.24);
  border-radius: 17px;
  background: rgba(3, 9, 13, 0.72);
  color: rgba(244, 247, 239, 0.84);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.055),
    0 8px 22px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.mobile-controls .touch-control:active {
  border-color: rgba(85, 222, 241, 0.62);
  background: rgba(85, 222, 241, 0.14);
  transform: scale(0.96);
}

.mobile-controls .touch-control svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-controls .touch-control small {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1;
}

.mobile-drive-zone,
.mobile-action-zone {
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.mobile-arrow-pad {
  display: grid;
  grid-template-columns: repeat(3, var(--touch-size));
  grid-template-rows: repeat(3, var(--touch-size));
  gap: 6px;
}

.mobile-arrow-pad .arrow-up {
  grid-column: 2;
  grid-row: 1;
  border-color: rgba(217, 255, 67, 0.36);
  color: var(--acid);
}

.mobile-arrow-pad .arrow-left {
  grid-column: 1;
  grid-row: 2;
}

.mobile-arrow-pad .arrow-right {
  grid-column: 3;
  grid-row: 2;
}

.mobile-arrow-pad .arrow-down {
  grid-column: 2;
  grid-row: 3;
  border-color: rgba(255, 145, 74, 0.4);
  color: #ffb06e;
}

.mobile-wheel-zone {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

.mobile-wheel-zone > small {
  color: rgba(201, 218, 224, 0.58);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.mobile-steering-wheel {
  position: relative;
  display: grid;
  width: clamp(112px, 17vmin, 142px);
  height: clamp(112px, 17vmin, 142px);
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 222, 241, 0.06), rgba(2, 8, 12, 0.64) 63%);
  box-shadow:
    inset 0 0 22px rgba(85, 222, 241, 0.055),
    0 16px 34px rgba(0, 0, 0, 0.28);
  touch-action: none;
}

.mobile-wheel-rim {
  position: absolute;
  inset: 8px;
  border: 5px solid rgba(210, 225, 229, 0.48);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 0 15px rgba(85, 222, 241, 0.08);
  transition: transform 0.08s linear;
}

.wheel-spoke {
  position: absolute;
  background: rgba(199, 217, 223, 0.35);
}

.wheel-spoke-left,
.wheel-spoke-right {
  top: calc(50% - 2px);
  width: 36%;
  height: 4px;
}

.wheel-spoke-left {
  left: 10%;
  transform: rotate(26deg);
}

.wheel-spoke-right {
  right: 10%;
  transform: rotate(-26deg);
}

.wheel-spoke-bottom {
  bottom: 8%;
  left: calc(50% - 2px);
  width: 4px;
  height: 38%;
}

.wheel-hub {
  position: absolute;
  top: calc(50% - 15px);
  left: calc(50% - 15px);
  width: 30px;
  height: 30px;
  border: 2px solid rgba(85, 222, 241, 0.54);
  border-radius: 50%;
  background: rgba(4, 14, 19, 0.92);
  box-shadow: 0 0 14px rgba(85, 222, 241, 0.2);
}

.mobile-action-zone {
  gap: 10px;
}

.mobile-pedal-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-pedal-stack .touch-control {
  height: calc(var(--touch-size) * 1.16);
}

.mobile-forward {
  border-color: rgba(217, 255, 67, 0.42) !important;
  color: var(--acid) !important;
}

.mobile-reverse {
  border-color: rgba(255, 145, 74, 0.42) !important;
  color: #ffb06e !important;
}

.mobile-utility-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.mobile-emergency-brake {
  width: calc(var(--touch-size) * 1.08) !important;
  height: calc(var(--touch-size) * 1.08) !important;
  border-color: rgba(255, 91, 70, 0.56) !important;
  background: rgba(60, 13, 10, 0.72) !important;
  color: #ff8c75 !important;
  box-shadow:
    inset 0 0 18px rgba(255, 69, 43, 0.09),
    0 8px 24px rgba(0, 0, 0, 0.32) !important;
}

.mobile-emergency-brake:active {
  background: rgba(132, 30, 18, 0.82) !important;
}

.mobile-nitro {
  width: calc(var(--touch-size) * 0.82) !important;
  height: calc(var(--touch-size) * 0.82) !important;
  border-color: rgba(85, 222, 241, 0.4) !important;
  color: var(--cyan) !important;
}

.mobile-nitro svg {
  fill: currentColor;
  stroke: none;
}

.mobile-controls .mobile-settings-trigger {
  position: fixed;
  z-index: 31;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: inline-flex;
  width: auto;
  min-width: 66px;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid rgba(85, 222, 241, 0.24);
  border-radius: 18px;
  background: rgba(3, 10, 14, 0.64);
  color: rgba(217, 236, 240, 0.7);
  font-size: 8px;
  transform: translateX(-50%);
  backdrop-filter: blur(9px);
}

.mobile-controls .mobile-settings-trigger svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.mobile-controls .mobile-quick-audio {
  position: fixed;
  z-index: 31;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: none;
  min-width: 72px;
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(85, 222, 241, 0.24);
  border-radius: 16px;
  background: rgba(3, 10, 14, 0.68);
  color: rgba(217, 236, 240, 0.74);
  font-size: 8px;
  transform: translateX(-50%);
  backdrop-filter: blur(9px);
}

.mobile-controls .mobile-quick-audio svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#hud.is-active ~ .mobile-controls .mobile-settings-trigger {
  display: none;
}

#hud.is-active ~ .mobile-controls .mobile-quick-audio {
  display: inline-flex;
}

.mobile-control-settings-layer,
.mobile-landscape-gate {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 5, 8, 0.82);
  backdrop-filter: blur(12px);
}

.mobile-control-settings {
  width: min(650px, 94vw);
  max-height: min(430px, 88vh);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(85, 222, 241, 0.18);
  border-top: 2px solid var(--cyan);
  background:
    linear-gradient(145deg, rgba(8, 24, 32, 0.98), rgba(3, 9, 14, 0.98));
  color: var(--ink);
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.58);
}

.mobile-control-settings header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.mobile-control-settings header span {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.mobile-control-settings h2 {
  margin: 3px 0 0;
  font-size: 28px;
  font-style: italic;
}

.mobile-control-settings header > button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.mobile-control-settings > p {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 10px;
}

.mobile-control-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mobile-control-mode-grid > button {
  display: grid;
  min-height: 145px;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 247, 239, 0.7);
  text-align: left;
}

.mobile-control-mode-grid > button.active {
  border-color: rgba(85, 222, 241, 0.55);
  background: rgba(85, 222, 241, 0.075);
  color: var(--ink);
  box-shadow: inset 0 0 24px rgba(85, 222, 241, 0.05);
}

.mobile-control-mode-grid svg {
  width: 48px;
  height: 48px;
  grid-row: 1 / 3;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-control-mode-grid b {
  align-self: end;
  font-size: 16px;
}

.mobile-control-mode-grid small {
  align-self: start;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.mobile-control-volume {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.mobile-control-volume label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(224, 237, 238, 0.72);
  font-size: 9px;
}

.mobile-control-volume label b {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.mobile-control-volume input {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--cyan);
}

.mobile-control-volume input:disabled {
  opacity: 0.38;
}

.mobile-landscape-gate {
  z-index: 150;
  background:
    radial-gradient(circle at 50% 45%, rgba(85, 222, 241, 0.1), transparent 32%),
    rgba(1, 5, 8, 0.96);
}

.mobile-landscape-hint {
  position: fixed;
  z-index: 119;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  padding: 8px 14px;
  border: 1px solid rgba(85, 222, 241, 0.28);
  background: rgba(3, 13, 19, 0.88);
  color: rgba(220, 237, 239, 0.78);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.mobile-landscape-card {
  width: min(430px, 92vw);
  text-align: center;
}

.rotate-device-icon {
  width: 86px;
  height: 86px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 18px rgba(85, 222, 241, 0.24));
  animation: rotate-device 2.4s ease-in-out infinite;
}

.mobile-landscape-card h2 {
  margin: 16px 0 8px;
  font-size: 30px;
  font-style: italic;
}

.mobile-landscape-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.mobile-landscape-card button {
  min-width: 176px;
  height: 48px;
  border: 1px solid rgba(217, 255, 67, 0.55);
  background: var(--acid);
  color: #07100b;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

@keyframes rotate-device {
  0%,
  20% {
    transform: rotate(0deg);
  }
  55%,
  80% {
    transform: rotate(90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@media (pointer: coarse), (max-width: 1100px) and (orientation: landscape) {
  .mobile-controls {
    display: flex;
  }

  #hud:not(.is-active) ~ .mobile-controls .mobile-drive-zone,
  #hud:not(.is-active) ~ .mobile-controls .mobile-action-zone {
    display: none;
  }

  #hud.is-active #speed-dashboard {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scale(0.64);
    transform-origin: center bottom;
  }
}

@media (max-height: 450px) {
  .mobile-controls {
    --touch-size: 48px;
    bottom: max(7px, env(safe-area-inset-bottom));
  }

  .mobile-arrow-pad {
    gap: 4px;
  }

  .mobile-steering-wheel {
    width: 104px;
    height: 104px;
  }

  .mobile-controls .mobile-settings-trigger {
    top: 6px;
    height: 28px;
  }

  .mobile-control-settings {
    padding: 18px;
  }

  .mobile-control-mode-grid > button {
    min-height: 112px;
    padding: 13px;
  }
}

@media (max-width: 700px) {
  .mobile-control-mode-grid {
    grid-template-columns: 1fr;
  }

  .mobile-control-settings {
    max-height: 88vh;
  }
}

/* Desktop game settings and configurable key bindings. */
.game-settings-trigger {
  position: relative;
  top: auto;
  right: auto;
  display: inline-flex;
  width: 34px;
  flex: 0 0 auto;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(85, 222, 241, 0.22);
  background: rgba(4, 13, 18, 0.64);
  color: rgba(214, 233, 238, 0.72);
  font: inherit;
  font-size: 8px;
  letter-spacing: 0.08em;
  pointer-events: auto;
  backdrop-filter: blur(9px);
  cursor: pointer;
}

.game-settings-trigger:hover {
  border-color: rgba(85, 222, 241, 0.52);
  color: var(--cyan);
}

.game-settings-trigger svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.game-settings-trigger span {
  display: none;
}

.game-settings-layer {
  position: fixed;
  z-index: 135;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 5, 8, 0.82);
  backdrop-filter: blur(12px);
}

.game-settings-panel {
  width: min(650px, 94vw);
  max-height: min(650px, 90vh);
  overflow-y: auto;
  padding: 27px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  border-top: 2px solid var(--cyan);
  background:
    radial-gradient(circle at 85% 0, rgba(85, 222, 241, 0.08), transparent 35%),
    linear-gradient(145deg, rgba(8, 24, 32, 0.99), rgba(3, 9, 14, 0.99));
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.game-settings-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-settings-panel > header span {
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.game-settings-panel > header h2 {
  margin: 3px 0 0;
  font-size: 29px;
  font-style: italic;
}

.game-settings-panel > header > button {
  width: 33px;
  height: 33px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted);
  font-size: 21px;
  cursor: pointer;
}

.game-settings-music {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 21px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.game-settings-music > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-settings-music b {
  font-size: 12px;
}

.game-settings-music small,
.game-settings-section-title small {
  color: var(--muted);
  font-size: 8px;
}

.game-settings-volume {
  display: grid;
  gap: 9px;
  margin: -10px 0 21px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.game-settings-volume label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(224, 237, 238, 0.72);
  font-size: 9px;
}

.game-settings-volume label b {
  color: var(--cyan);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.game-settings-volume input {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.game-settings-volume input:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.game-settings-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.game-settings-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(202, 217, 222, 0.7);
  transition: transform 0.18s, background 0.18s;
}

.game-settings-switch.active {
  border-color: rgba(85, 222, 241, 0.52);
  background: rgba(85, 222, 241, 0.14);
}

.game-settings-switch.active i {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(85, 222, 241, 0.58);
  transform: translateX(22px);
}

.game-settings-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
}

.game-settings-section-title span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.game-keybind-list {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.game-keybind-row {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.game-keybind-row > b {
  color: rgba(215, 229, 233, 0.7);
  font-size: 10px;
  font-weight: 500;
}

.game-keybind-row > div {
  display: flex;
  gap: 7px;
}

.game-keybind-row button {
  display: grid;
  min-width: 52px;
  height: 31px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(209, 224, 228, 0.64);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.game-keybind-row button.active {
  border-color: rgba(85, 222, 241, 0.55);
  background: rgba(85, 222, 241, 0.1);
  color: var(--cyan);
  box-shadow: inset 0 0 12px rgba(85, 222, 241, 0.06);
}

.game-settings-note {
  margin: 16px 0 0;
  color: rgba(172, 190, 196, 0.5);
  font-size: 8px;
  line-height: 1.7;
}

@media (pointer: coarse) {
  .game-settings-trigger {
    display: none;
  }
}

@media (max-width: 1000px) and (pointer: fine) {
  .game-settings-trigger {
    top: auto;
    right: auto;
  }
}

/* Homepage gameplay guide. */
.home-guide-button {
  display: grid;
  width: min(300px, 100%);
  min-height: 54px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 7px 12px 7px 8px;
  border: 1px solid rgba(85, 222, 241, 0.2);
  background:
    linear-gradient(100deg, rgba(85, 222, 241, 0.09), rgba(4, 13, 18, 0.62));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.home-guide-button:hover {
  border-color: rgba(85, 222, 241, 0.52);
  background:
    linear-gradient(100deg, rgba(85, 222, 241, 0.16), rgba(4, 13, 18, 0.78));
}

.home-guide-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.3);
  background: rgba(85, 222, 241, 0.08);
  color: var(--cyan);
}

.home-guide-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-guide-button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.home-guide-button small {
  color: rgba(141, 163, 170, 0.58);
  font-size: 6px;
  letter-spacing: 0.14em;
}

.home-guide-button b {
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.06em;
}

.home-guide-button > i {
  color: var(--cyan);
  font-size: 22px;
  font-style: normal;
}

.gameplay-guide-layer {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 5, 8, 0.82);
  backdrop-filter: blur(13px);
}

.gameplay-guide-dialog {
  width: min(880px, 96vw);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.24);
  border-top: 2px solid var(--cyan);
  background:
    radial-gradient(circle at 48% 0, rgba(85, 222, 241, 0.09), transparent 38%),
    linear-gradient(145deg, rgba(7, 22, 30, 0.99), rgba(2, 8, 12, 0.99));
  color: var(--ink);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.7);
}

.gameplay-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gameplay-guide-header span {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.gameplay-guide-header h2 {
  margin: 4px 0 0;
  font-size: 27px;
  font-style: italic;
}

.gameplay-guide-header > button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.gameplay-guide-carousel {
  position: relative;
  display: grid;
  min-height: 430px;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 8px;
  padding: 18px 15px;
}

.guide-arrow {
  display: grid;
  width: 48px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(202, 220, 225, 0.62);
  cursor: pointer;
}

.guide-arrow:hover {
  border-color: rgba(85, 222, 241, 0.46);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
}

.guide-arrow svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-arrow.left {
  justify-self: start;
}

.guide-arrow.right {
  justify-self: end;
}

.gameplay-guide-page {
  min-height: 390px;
  padding: 23px 27px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 18% 20%, rgba(85, 222, 241, 0.06), transparent 31%),
    rgba(255, 255, 255, 0.018);
}

.guide-page-heading {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-page-icon {
  display: grid;
  width: 80px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.38);
  background:
    radial-gradient(circle, rgba(85, 222, 241, 0.16), transparent 64%),
    rgba(4, 14, 20, 0.82);
  color: var(--cyan);
  font-size: 31px;
  font-style: italic;
  font-weight: 800;
  clip-path: polygon(50% 0, 92% 16%, 100% 57%, 72% 88%, 50% 100%, 28% 88%, 0 57%, 8% 16%);
}

.guide-page-heading small {
  color: var(--acid);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.guide-page-heading h3 {
  margin: 5px 0 8px;
  font-size: clamp(27px, 3vw, 38px);
  font-style: italic;
}

.guide-page-heading p {
  max-width: 590px;
  margin: 0;
  color: rgba(195, 211, 216, 0.67);
  font-size: 10px;
  line-height: 1.75;
}

.guide-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.guide-points li {
  display: flex;
  min-height: 52px;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(207, 222, 226, 0.7);
  font-size: 9px;
  line-height: 1.65;
}

.guide-points li i {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  flex: 0 0 auto;
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.gameplay-guide-footer {
  display: grid;
  min-height: 58px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 24px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-dots {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 9px;
}

.guide-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(180, 201, 207, 0.4);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: width 0.2s, background 0.2s, border-color 0.2s;
}

.guide-dots button.active {
  width: 11px;
  height: 11px;
  border-color: var(--cyan);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 11px rgba(85, 222, 241, 0.55);
}

.gameplay-guide-footer > span {
  grid-column: 3;
  justify-self: end;
  color: rgba(146, 167, 173, 0.55);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.guide-page-enter-active,
.guide-page-leave-active {
  transition: opacity 0.16s ease, transform 0.18s ease;
}

.guide-page-enter-from {
  opacity: 0;
  transform: translateX(14px);
}

.guide-page-leave-to {
  opacity: 0;
  transform: translateX(-14px);
}

.guide-dialog-enter-active,
.guide-dialog-leave-active {
  transition: opacity 0.2s ease;
}

.guide-dialog-enter-active .gameplay-guide-dialog,
.guide-dialog-leave-active .gameplay-guide-dialog {
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.guide-dialog-enter-from,
.guide-dialog-leave-to {
  opacity: 0;
}

.guide-dialog-enter-from .gameplay-guide-dialog,
.guide-dialog-leave-to .gameplay-guide-dialog {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

@media (max-width: 720px) {
  .gameplay-guide-layer {
    padding: 10px;
  }

  .gameplay-guide-dialog {
    max-height: 96vh;
    overflow-y: auto;
  }

  .gameplay-guide-header {
    padding: 15px 16px 12px;
  }

  .gameplay-guide-carousel {
    min-height: 0;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    padding: 10px 7px;
  }

  .guide-arrow {
    width: 32px;
    height: 66px;
  }

  .gameplay-guide-page {
    min-height: 0;
    padding: 17px 14px;
  }

  .guide-page-heading {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
  }

  .guide-page-icon {
    width: 56px;
    height: 62px;
    font-size: 23px;
  }

  .guide-page-heading h3 {
    font-size: 25px;
  }

  .guide-points {
    grid-template-columns: 1fr;
  }

  .gameplay-guide-footer {
    grid-template-columns: 1fr auto 1fr;
    padding-inline: 15px;
  }

  .guide-dots {
    gap: 7px;
  }

  .gameplay-guide-footer > span {
    display: none;
  }
}

/* Compact lobby topbar actions. */
.player-hub-account {
  gap: 6px;
}

.player-hub-account > .home-guide-button {
  display: inline-flex;
  width: auto;
  min-height: 35px;
  height: 35px;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 11, 16, 0.55);
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.player-hub-account > .home-guide-button:hover {
  border-color: rgba(85, 222, 241, 0.4);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
}

.player-hub-account > .home-guide-button > .home-guide-icon {
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
}

.player-hub-account > .home-guide-button > .home-guide-icon svg {
  width: 15px;
  height: 15px;
}

.player-hub-account > .home-guide-button > span:nth-child(2) {
  display: inline;
  color: inherit;
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.player-hub-account > .game-settings-trigger {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: 35px;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(4, 11, 16, 0.55);
  color: var(--muted);
  font-size: 8px;
}

.player-hub-account > .game-settings-trigger:hover {
  border-color: rgba(85, 222, 241, 0.4);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
}

.player-hub-account > .game-settings-trigger svg {
  width: 15px;
  height: 15px;
}

.player-hub-account > .game-settings-trigger span {
  display: inline;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .player-hub-account > .home-guide-button {
    display: inline-flex !important;
  }
}

/* Manual daily login reward. */
.daily-login-reward-layer,
.daily-claim-result-layer {
  position: fixed;
  z-index: 245;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 6, 9, 0.76);
  backdrop-filter: blur(11px);
}

.daily-login-reward-dialog {
  display: grid;
  width: min(500px, 92vw);
  min-height: 124px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 24px;
  padding: 22px 25px;
  border: 1px solid rgba(255, 222, 103, 0.42);
  border-top: 2px solid #ffe37b;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 218, 81, 0.13), transparent 42%),
    linear-gradient(145deg, rgba(8, 24, 30, 0.99), rgba(3, 10, 14, 0.99));
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.66);
}

.daily-login-reward-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.daily-login-coin,
.daily-result-coin {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff3a8, #dca51d);
  box-shadow:
    0 0 0 6px rgba(255, 222, 100, 0.055),
    0 0 24px rgba(255, 210, 62, 0.34);
}

.daily-login-coin::before,
.daily-result-coin::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(101, 64, 0, 0.32);
  border-radius: 50%;
}

.daily-login-coin i,
.daily-result-coin i {
  position: relative;
  z-index: 1;
  color: #684200;
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.daily-login-reward-left > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.daily-login-reward-left small {
  color: rgba(194, 210, 214, 0.58);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.daily-login-reward-left b {
  color: #ffe06a;
  font-size: 31px;
  font-style: italic;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.daily-login-reward-dialog > button {
  min-width: 104px;
  height: 43px;
  border: 1px solid #ffe47b;
  background: linear-gradient(105deg, #fff08d, #f2c83d);
  color: #352300;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.daily-login-reward-dialog > button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.daily-login-reward-dialog > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--orange);
  font-size: 9px;
  text-align: right;
}

.daily-claim-result-layer {
  z-index: 252;
  background: radial-gradient(circle, rgba(3, 10, 13, 0.2), rgba(2, 7, 10, 0.58));
}

.daily-claim-result-card {
  width: min(430px, 92vw);
  padding: 28px 27px 24px;
  border: 1px solid rgba(255, 225, 111, 0.46);
  border-top: 2px solid #ffe37b;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 217, 75, 0.16), transparent 44%),
    linear-gradient(145deg, rgba(8, 23, 29, 0.99), rgba(3, 10, 14, 0.99));
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.66);
  animation: daily-claim-in 0.24s ease-out;
}

.daily-claim-result-card .daily-result-coin {
  width: 58px;
  height: 58px;
  margin: 0 auto 15px;
}

.daily-claim-result-card > small {
  color: rgba(255, 226, 116, 0.58);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.daily-claim-result-card h2 {
  margin: 6px 0 10px;
  color: #fff0a3;
  font-size: 31px;
  font-style: italic;
}

.daily-claim-result-card p {
  margin: 0;
  color: rgba(222, 235, 231, 0.78);
  font-size: 11px;
  line-height: 1.8;
}

.daily-claim-result-card p b {
  margin: 0 5px;
  color: #ffe06b;
  font-size: 21px;
}

.daily-claim-result-card > span:last-child {
  display: inline-block;
  margin-top: 13px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 226, 111, 0.15);
  color: rgba(185, 202, 198, 0.55);
  font-size: 8px;
}

@keyframes daily-claim-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

@media (max-width: 560px) {
  .daily-login-reward-dialog {
    grid-template-columns: 1fr;
    padding: 19px;
  }

  .daily-login-reward-dialog > button {
    width: 100%;
  }
}

@media (pointer: coarse) {
  .controls-hint {
    display: none !important;
  }
}

@media (min-width: 851px) and (pointer: fine) {
  .controls-hint {
    display: flex;
  }
}

@media (max-height: 620px) and (min-width: 851px) and (pointer: fine) {
  .controls-hint {
    bottom: 64px;
    display: flex;
    transform: scale(0.82);
    transform-origin: right bottom;
  }
}

/* Account forms, logout confirmation and login feedback. */
.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field > input {
  width: 100%;
  padding-right: 46px !important;
}

.password-visibility {
  position: absolute !important;
  top: 50% !important;
  right: 7px !important;
  display: grid !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(178, 201, 207, 0.58) !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
  cursor: pointer;
}

.password-visibility:hover,
.password-visibility:focus-visible {
  color: var(--cyan) !important;
  outline: none;
}

.password-visibility svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-error {
  display: block;
  margin-top: -1px;
  color: #ff7085 !important;
  font-size: 9px !important;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.auth-card .auth-field.has-error > input,
.auth-card .auth-field.has-error .password-field > input,
.profile-nickname-editor label.has-error > input,
.profile-password-editor label.has-error .password-field > input {
  border-color: rgba(255, 86, 113, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(255, 61, 92, 0.055);
}

.player-hub-account > .logout-button {
  display: inline-flex;
  min-width: 0;
}

.logout-button .account-action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logout-button:hover {
  border-color: rgba(255, 92, 118, 0.42) !important;
  background: rgba(255, 61, 92, 0.075) !important;
  color: #ff8799 !important;
}

.account-dialog-layer {
  position: fixed;
  z-index: 270;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 5, 8, 0.76);
  backdrop-filter: blur(12px);
}

.account-dialog {
  width: min(430px, 92vw);
  padding: 27px 27px 24px;
  border: 1px solid rgba(85, 222, 241, 0.22);
  border-top: 2px solid var(--cyan);
  background:
    radial-gradient(circle at 50% 0, rgba(85, 222, 241, 0.11), transparent 42%),
    linear-gradient(145deg, rgba(8, 23, 30, 0.99), rgba(3, 10, 14, 0.99));
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.68);
  animation: account-dialog-in 0.22s ease-out;
}

.account-dialog-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid rgba(255, 105, 128, 0.34);
  background: rgba(255, 61, 92, 0.08);
  color: #ff8297;
  transform: rotate(45deg);
}

.account-dialog-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-45deg);
}

.account-dialog > small {
  color: rgba(179, 201, 207, 0.48);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.account-dialog h2 {
  margin: 6px 0 8px;
  font-size: 25px;
  font-style: italic;
}

.account-dialog > p {
  margin: 0;
  color: rgba(190, 208, 213, 0.58);
  font-size: 9px;
}

.account-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.account-dialog-actions button {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(218, 230, 233, 0.72);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.account-dialog-actions button:hover {
  border-color: rgba(85, 222, 241, 0.4);
  color: var(--cyan);
}

.account-dialog-actions button.danger {
  border-color: rgba(255, 102, 125, 0.4);
  background: rgba(255, 61, 92, 0.1);
  color: #ff8b9d;
}

.account-dialog-actions button.danger:hover {
  border-color: rgba(255, 102, 125, 0.72);
  background: rgba(255, 61, 92, 0.16);
  color: #ffc0ca;
}

.login-success-layer {
  position: fixed;
  z-index: 260;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 22px;
  padding-top: max(64px, env(safe-area-inset-top));
  background: transparent;
  pointer-events: none;
}

.login-success-card {
  display: flex;
  width: min(226px, 82vw);
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 15px 9px 10px;
  border: 1px solid rgba(85, 222, 241, 0.3);
  border-top-color: var(--acid);
  background:
    linear-gradient(110deg, rgba(85, 222, 241, 0.1), rgba(5, 17, 23, 0.96) 48%),
    rgba(3, 10, 14, 0.98);
  color: var(--ink);
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.48),
    0 0 26px rgba(85, 222, 241, 0.07);
  animation: login-success-in 0.24s ease-out;
  pointer-events: auto;
  cursor: pointer;
}

.login-success-card > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(217, 255, 67, 0.5);
  border-radius: 50%;
  background: rgba(217, 255, 67, 0.09);
  color: var(--acid);
  box-shadow: 0 0 22px rgba(217, 255, 67, 0.12);
}

.login-success-card svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-success-card > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-success-card small {
  color: rgba(164, 189, 195, 0.5);
  font-size: 6px;
  letter-spacing: 0.18em;
}

.login-success-card b {
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0.05em;
}

.logout-success-card > span {
  border-color: rgba(255, 132, 151, 0.42);
  background: rgba(255, 74, 104, 0.08);
  color: #ff93a4;
  box-shadow: 0 0 18px rgba(255, 74, 104, 0.09);
}

@keyframes account-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
}

@keyframes login-success-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.96);
  }
}

@media (max-width: 560px) {
  .player-hub-account > .logout-button span {
    display: none;
  }

  .player-hub-account > .logout-button {
    width: 35px;
    padding: 0;
    justify-content: center;
  }
}

/* Escalating player-level progress in the lobby topbar. */
.player-hub-identity > div {
  min-width: 0;
}

.player-level-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.player-level-row > small {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.player-level-track {
  position: relative;
  display: block;
  width: clamp(58px, 7vw, 96px);
  height: 5px;
  flex: 0 1 auto;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.22);
  background: rgba(2, 10, 14, 0.8);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.55);
}

.player-level-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2ebf87, #55def1);
  box-shadow: 0 0 8px rgba(85, 222, 241, 0.42);
  transition: width 0.42s ease;
}

.player-level-row > em {
  min-width: 43px;
  color: rgba(190, 211, 216, 0.72);
  font-size: 7px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.player-level-row.complete > small {
  color: var(--acid);
}

.player-level-row.complete .player-level-track {
  border-color: rgba(217, 255, 67, 0.4);
}

.player-level-row.complete .player-level-track > i {
  background: linear-gradient(90deg, #8abf34, var(--acid));
  box-shadow: 0 0 10px rgba(217, 255, 67, 0.5);
}

.player-level-row.complete > em {
  color: var(--acid);
  font-weight: 700;
}

@media (max-width: 560px) {
  .player-level-track {
    width: 48px;
  }

  .player-level-row {
    gap: 5px;
  }

  .player-level-row > em {
    min-width: 37px;
    font-size: 6px;
  }
}

/* Rebuilt driver handbook. */
.guide-v2-dialog {
  display: grid;
  width: min(1080px, 96vw);
  max-height: min(860px, 94vh);
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.24);
  background:
    radial-gradient(circle at 76% -8%, rgba(85, 222, 241, 0.15), transparent 36%),
    linear-gradient(145deg, rgba(7, 21, 28, 0.99), rgba(2, 7, 11, 0.995));
  box-shadow:
    0 38px 130px rgba(0, 0, 0, 0.74),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.guide-v2-header {
  display: grid;
  min-height: 78px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(90deg, rgba(85, 222, 241, 0.055), transparent 45%),
    rgba(2, 8, 12, 0.42);
}

.guide-v2-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.guide-v2-brand > i {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(217, 255, 67, 0.5);
  background:
    linear-gradient(145deg, rgba(217, 255, 67, 0.15), rgba(4, 13, 17, 0.82));
  color: var(--acid);
  font-size: 13px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.04em;
  clip-path: polygon(12% 0, 100% 0, 100% 72%, 76% 100%, 0 100%, 0 24%);
}

.guide-v2-brand > div {
  min-width: 0;
}

.guide-v2-brand small {
  color: rgba(151, 178, 185, 0.52);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.guide-v2-brand h2 {
  margin: 4px 0 0;
  overflow: hidden;
  color: rgba(249, 252, 247, 0.96);
  font-size: 24px;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-v2-header > button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(186, 205, 210, 0.62);
  cursor: pointer;
}

.guide-v2-header > button:hover {
  border-color: rgba(85, 222, 241, 0.45);
  color: var(--cyan);
}

.guide-v2-header > button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.guide-v2-carousel {
  display: grid;
  min-height: 0;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: stretch;
  gap: 9px;
  padding: 12px 13px;
}

.guide-v2-arrow {
  align-self: center;
  display: grid;
  width: 44px;
  height: 108px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(85, 222, 241, 0.035), rgba(255, 255, 255, 0.012));
  color: rgba(177, 198, 204, 0.56);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.guide-v2-arrow:hover {
  border-color: rgba(85, 222, 241, 0.4);
  background: rgba(85, 222, 241, 0.07);
  color: var(--cyan);
}

.guide-v2-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-v2-page {
  position: relative;
  min-height: 0;
  padding: 22px 24px 20px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--guide-accent) 5%, transparent), transparent 34%),
    radial-gradient(circle at 96% 0, color-mix(in srgb, var(--guide-accent) 8%, transparent), transparent 26%),
    rgba(2, 9, 13, 0.48);
  scrollbar-color: rgba(85, 222, 241, 0.3) transparent;
  scrollbar-width: thin;
}

.guide-v2-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 110px;
  height: 2px;
  background: linear-gradient(90deg, var(--guide-accent), transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--guide-accent) 45%, transparent);
}

.guide-v2-page-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.guide-v2-symbol {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 44%, transparent);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--guide-accent) 17%, transparent), transparent 66%),
    rgba(3, 12, 16, 0.82);
  color: var(--guide-accent);
  font-size: 28px;
  font-style: italic;
  font-weight: 900;
  clip-path: polygon(50% 0, 92% 16%, 100% 57%, 72% 88%, 50% 100%, 28% 88%, 0 57%, 8% 16%);
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--guide-accent) 17%, transparent));
}

.guide-v2-heading {
  min-width: 0;
}

.guide-v2-heading > small {
  color: color-mix(in srgb, var(--guide-accent) 74%, #ffffff);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.guide-v2-heading h3 {
  margin: 4px 0 7px;
  color: rgba(249, 252, 247, 0.96);
  font-size: clamp(27px, 3vw, 39px);
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.01em;
}

.guide-v2-heading p {
  max-width: 760px;
  margin: 0;
  color: rgba(205, 220, 223, 0.74);
  font-size: 12px;
  line-height: 1.72;
}

.guide-v2-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.guide-v2-metrics > div {
  position: relative;
  min-width: 0;
  padding: 10px 12px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.022);
}

.guide-v2-metrics > div::after {
  content: "";
  position: absolute;
  right: -15px;
  bottom: -18px;
  width: 52px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 14%, transparent);
  transform: rotate(45deg);
}

.guide-v2-metrics small {
  display: block;
  margin-bottom: 3px;
  color: rgba(164, 188, 194, 0.62);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.guide-v2-metrics b {
  color: var(--guide-accent);
  font-size: 21px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.guide-v2-metrics em {
  margin-left: 4px;
  color: rgba(200, 217, 221, 0.58);
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.guide-v2-key-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.guide-v2-key-grid > div {
  display: flex;
  min-height: 47px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(255, 255, 255, 0.018);
}

.guide-v2-key-grid > div > span {
  display: flex;
  min-width: 0;
  gap: 4px;
}

.guide-v2-key-grid kbd {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 28%, transparent);
  border-bottom-width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.035);
  color: color-mix(in srgb, var(--guide-accent) 80%, #ffffff);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.guide-v2-key-grid b {
  overflow: hidden;
  color: rgba(205, 220, 223, 0.72);
  font-size: 9px;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-v2-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.guide-v2-mode-grid > div {
  position: relative;
  min-height: 88px;
  padding: 12px 14px 11px 49px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(105deg, color-mix(in srgb, var(--guide-accent) 7%, transparent), transparent 54%),
    rgba(255, 255, 255, 0.018);
}

.guide-v2-mode-grid > div > span {
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 32%, transparent);
  color: var(--guide-accent);
  font-size: 8px;
  font-weight: 700;
}

.guide-v2-mode-grid small {
  color: color-mix(in srgb, var(--guide-accent) 72%, #ffffff);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.guide-v2-mode-grid b {
  display: block;
  margin-top: 2px;
  color: rgba(245, 249, 245, 0.9);
  font-size: 15px;
}

.guide-v2-mode-grid p {
  margin: 4px 0 0;
  color: rgba(193, 211, 215, 0.68);
  font-size: 10px;
  line-height: 1.6;
}

.guide-v2-rewards {
  margin-top: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.016);
}

.guide-v2-reward-head,
.guide-v2-reward-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.32fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 30px;
  padding: 5px 11px;
}

.guide-v2-reward-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(153, 177, 183, 0.48);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.guide-v2-reward-row + .guide-v2-reward-row {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.guide-v2-reward-row span {
  color: rgba(217, 229, 231, 0.82);
  font-size: 10px;
}

.guide-v2-reward-row b {
  color: color-mix(in srgb, var(--guide-accent) 82%, #ffffff);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.guide-v2-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.guide-v2-sections > section {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
    rgba(2, 9, 13, 0.28);
}

.guide-v2-sections > section:only-child {
  grid-column: 1 / -1;
}

.guide-v2-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.guide-v2-section-head > span {
  color: color-mix(in srgb, var(--guide-accent) 75%, #ffffff);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.guide-v2-section-head h4 {
  margin: 0;
  color: rgba(238, 245, 242, 0.88);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.035em;
}

.guide-v2-sections ul {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 5px;
  list-style: none;
}

.guide-v2-sections li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: rgba(204, 220, 223, 0.76);
  font-size: 10px;
  line-height: 1.62;
}

.guide-v2-sections li i {
  width: 5px;
  height: 5px;
  margin-top: 4px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 60%, transparent);
  transform: rotate(45deg);
}

.guide-v2-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 11px;
  border-left: 2px solid var(--guide-accent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--guide-accent) 8%, transparent), transparent);
}

.guide-v2-tip b {
  flex: 0 0 auto;
  color: var(--guide-accent);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.guide-v2-tip span {
  color: rgba(211, 226, 228, 0.76);
  font-size: 10px;
  line-height: 1.62;
}

.guide-v2-footer {
  display: grid;
  min-height: 54px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 8px 20px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(2, 8, 12, 0.48);
}

.guide-v2-dots {
  display: flex;
  justify-self: center;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.guide-v2-dots button {
  display: block;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(190, 210, 215, 0.42);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.guide-v2-dots button:hover {
  border-color: rgba(85, 222, 241, 0.4);
  background: rgba(85, 222, 241, 0.2);
}

.guide-v2-dots button.active {
  border-color: var(--acid);
  background: var(--acid);
  box-shadow: 0 0 12px rgba(217, 255, 67, 0.42);
  transform: scale(1.18);
}

.guide-v2-footer > span {
  justify-self: end;
  color: rgba(139, 164, 170, 0.45);
  font-size: 7px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .guide-v2-dialog {
    width: min(94vw, 820px);
  }

  .guide-v2-key-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guide-v2-sections {
    grid-template-columns: 1fr;
  }

  .guide-v2-footer {
    grid-template-columns: 1fr auto;
  }

  .guide-v2-footer > span {
    display: none;
  }
}

@media (max-width: 700px) {
  .guide-v2-dialog {
    width: min(98vw, 680px);
    max-height: 96vh;
  }

  .guide-v2-header {
    min-height: 62px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .guide-v2-brand > i {
    width: 35px;
    height: 35px;
    font-size: 11px;
  }

  .guide-v2-brand small {
    font-size: 6px;
  }

  .guide-v2-brand h2 {
    font-size: 18px;
  }

  .guide-v2-header > button {
    width: 32px;
    height: 32px;
  }

  .guide-v2-carousel {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 5px;
    padding: 7px;
  }

  .guide-v2-arrow {
    width: 28px;
    height: 76px;
  }

  .guide-v2-arrow svg {
    width: 18px;
    height: 18px;
  }

  .guide-v2-page {
    padding: 16px 14px;
  }

  .guide-v2-page-head {
    grid-template-columns: 53px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 13px;
  }

  .guide-v2-symbol {
    width: 50px;
    height: 54px;
    font-size: 20px;
  }

  .guide-v2-heading h3 {
    font-size: 24px;
  }

  .guide-v2-heading p {
    font-size: 10px;
  }

  .guide-v2-metrics {
    gap: 5px;
  }

  .guide-v2-metrics > div {
    padding: 8px;
  }

  .guide-v2-metrics b {
    font-size: 15px;
  }

  .guide-v2-key-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-v2-mode-grid {
    grid-template-columns: 1fr;
  }

  .guide-v2-reward-head,
  .guide-v2-reward-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 8px;
  }

  .guide-v2-reward-row b {
    font-size: 9px;
  }

  .guide-v2-footer {
    min-height: 48px;
    gap: 10px;
    padding: 7px 10px 9px;
  }

  .guide-v2-dots {
    gap: 7px;
    justify-content: center;
  }

  .guide-v2-dots button {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
  }
}

@media (max-width: 430px) {
  .guide-v2-footer {
    display: block;
  }

  .guide-v2-dots {
    justify-content: center;
  }

  .guide-v2-metrics em {
    display: none;
  }

  .guide-v2-key-grid {
    grid-template-columns: 1fr;
  }
}

/* Personal match history scrolling. */
.player-hub-screen.history-view-mode .player-hub-content {
  padding-bottom: 24px;
}

.personal-history-page {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  padding: 2px 8px 24px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(85, 222, 241, 0.36) rgba(255, 255, 255, 0.035);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.personal-history-page::-webkit-scrollbar {
  width: 7px;
}

.personal-history-page::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.025);
}

.personal-history-page::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: rgba(85, 222, 241, 0.34);
}

.personal-history-page .match-history-header {
  position: sticky;
  z-index: 4;
  top: 0;
  flex: 0 0 auto;
  padding-top: 8px;
  background:
    linear-gradient(180deg, rgba(5, 15, 21, 0.98), rgba(5, 15, 21, 0.9) 72%, transparent);
  backdrop-filter: blur(8px);
}

.personal-history-page > .match-history-list {
  flex: 0 0 auto;
  gap: 4px;
}

.personal-history-page .match-history-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.personal-history-page .match-history-header h1 {
  font-size: clamp(30px, 2.8vw, 43px);
}

.personal-history-page .match-history-list li {
  min-height: 49px;
  padding: 6px 11px;
}

.personal-history-page .match-history-mode span {
  padding: 3px 6px;
}

.personal-history-page .match-history-mode b,
.personal-history-page .match-history-main b,
.personal-history-page .match-history-time b {
  font-size: 11px;
}

.personal-history-page .match-history-score > b {
  font-size: 16px;
}

.personal-history-page .match-history-date {
  font-size: 8px;
}

.match-history-no-data {
  display: grid;
  min-height: 320px;
  flex: 1 1 auto;
  place-items: center;
  padding: 24px 0 90px;
}

.match-history-no-data-content {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 17px;
}

.match-history-empty-box {
  position: relative;
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.12);
  background:
    radial-gradient(circle, rgba(85, 222, 241, 0.08), transparent 68%);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  animation: history-empty-float 3.2s ease-in-out infinite;
}

.match-history-empty-box::before,
.match-history-empty-box::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  border-color: rgba(217, 255, 67, 0.44);
  border-style: solid;
}

.match-history-empty-box::before {
  top: 7px;
  left: 7px;
  border-width: 1px 0 0 1px;
}

.match-history-empty-box::after {
  right: 7px;
  bottom: 7px;
  border-width: 0 1px 1px 0;
}

.match-history-empty-box svg {
  width: 84px;
  height: 84px;
  fill: rgba(85, 222, 241, 0.035);
  stroke: rgba(85, 222, 241, 0.6);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(85, 222, 241, 0.13));
}

.match-history-no-data-content > b {
  color: rgba(208, 224, 227, 0.66);
  font-size: 13px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.08em;
}

@keyframes history-empty-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 850px) {
  .player-hub-screen.history-view-mode .player-hub-content {
    padding-bottom: 18px;
  }

  .personal-history-page {
    height: auto;
    padding-right: 0;
    overflow: visible;
    touch-action: auto;
  }

  .match-history-no-data {
    min-height: calc(100vh - 270px);
    padding-bottom: 40px;
  }
}

@media (min-width: 851px) and (max-height: 700px) {
  .personal-history-page .match-history-header {
    margin-bottom: 7px;
    padding-bottom: 6px;
  }

  .personal-history-page .match-history-header h1 {
    font-size: 28px;
  }

  .personal-history-page > .match-history-list {
    gap: 3px;
  }

  .personal-history-page .match-history-list li {
    min-height: 40px;
    padding: 4px 9px;
  }

  .personal-history-page .match-history-mode b,
  .personal-history-page .match-history-main b,
  .personal-history-page .match-history-time b {
    font-size: 10px;
  }

  .personal-history-page .match-history-mode span,
  .personal-history-page .match-history-time span {
    font-size: 7px;
  }

  .personal-history-page .match-history-main small,
  .personal-history-page .match-history-time small,
  .personal-history-page .match-history-score small {
    font-size: 6px;
  }

  .personal-history-page .match-history-date {
    font-size: 7px;
  }

  .personal-history-page .match-history-score > b {
    font-size: 14px;
  }
}

/* Redis-backed global leaderboards. */
.player-hub-screen.leaderboard-mode .player-hub-content {
  padding-bottom: 24px;
  overflow: hidden;
}

.leaderboard-page {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  gap: 13px;
}

.leaderboard-page-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(85, 222, 241, 0.13);
}

.leaderboard-page-header > div {
  min-width: 0;
}

.leaderboard-page-header small {
  color: var(--cyan);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.leaderboard-page-header h1 {
  margin: 3px 0 1px;
  font-size: clamp(34px, 3.2vw, 50px);
  font-style: italic;
  line-height: 1;
}

.leaderboard-page-header p {
  margin: 7px 0 0;
  color: rgba(168, 190, 196, 0.58);
  font-size: 9px;
}

.leaderboard-type-filter {
  display: flex;
  min-width: 190px;
  flex-direction: column;
  gap: 6px;
}

.leaderboard-type-filter > span {
  color: rgba(159, 183, 189, 0.52);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-align: right;
}

.leaderboard-type-filter > div {
  position: relative;
  display: grid;
  height: 42px;
  grid-template-columns: 34px minmax(0, 1fr) 27px;
  align-items: center;
  border: 1px solid rgba(85, 222, 241, 0.25);
  background:
    linear-gradient(90deg, rgba(85, 222, 241, 0.1), rgba(3, 12, 17, 0.7));
}

.leaderboard-type-filter i {
  display: grid;
  width: 26px;
  height: 26px;
  margin-left: 7px;
  place-items: center;
  border: 1px solid rgba(217, 255, 67, 0.34);
  color: var(--acid);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.leaderboard-type-filter select {
  width: 100%;
  height: 100%;
  padding: 0 3px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.leaderboard-type-filter select option {
  background: #071219;
  color: var(--ink);
}

.leaderboard-type-filter svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: rgba(147, 181, 188, 0.66);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

.leaderboard-board {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.13);
  background:
    radial-gradient(circle at 90% 0, rgba(85, 222, 241, 0.08), transparent 30%),
    rgba(3, 11, 16, 0.52);
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.28);
}

.leaderboard-board-head {
  display: flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 19, 27, 0.74);
}

.leaderboard-board-head > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.leaderboard-board-head span {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.leaderboard-board-head span::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 5px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 9px rgba(85, 222, 241, 0.35);
}

.leaderboard-board-head b {
  color: rgba(205, 220, 223, 0.72);
  font-size: 9px;
  font-weight: 600;
}

.leaderboard-board-head small {
  color: rgba(147, 171, 177, 0.46);
  font-size: 8px;
}

.global-leaderboard-list {
  display: flex;
  min-height: 0;
  margin: 0;
  padding: 6px;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: rgba(85, 222, 241, 0.36) rgba(255, 255, 255, 0.025);
  scrollbar-width: thin;
  list-style: none;
}

.global-leaderboard-list::-webkit-scrollbar {
  width: 6px;
}

.global-leaderboard-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(85, 222, 241, 0.34);
}

.global-leaderboard-list > li {
  position: relative;
  display: grid;
  min-height: 58px;
  flex: 0 0 auto;
  grid-template-columns: 58px 46px minmax(150px, 1fr) minmax(140px, auto);
  align-items: center;
  gap: 12px;
  padding: 7px 15px 7px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background:
    linear-gradient(90deg, rgba(19, 65, 85, 0.32), rgba(6, 23, 32, 0.22));
}

.global-leaderboard-list > li::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, 0.025), transparent 85%);
  pointer-events: none;
}

.global-leaderboard-list > li.rank-1 {
  border-color: rgba(255, 221, 113, 0.44);
  background:
    linear-gradient(90deg, rgba(184, 127, 21, 0.48), rgba(29, 48, 54, 0.32) 50%, rgba(6, 24, 32, 0.26));
}

.global-leaderboard-list > li.rank-2 {
  border-color: rgba(147, 215, 233, 0.3);
  background:
    linear-gradient(90deg, rgba(32, 100, 128, 0.42), rgba(7, 28, 38, 0.25));
}

.global-leaderboard-list > li.rank-3 {
  border-color: rgba(222, 126, 88, 0.25);
  background:
    linear-gradient(90deg, rgba(130, 62, 38, 0.34), rgba(7, 27, 36, 0.24));
}

.global-leaderboard-list > li.current {
  box-shadow: inset 2px 0 var(--acid);
}

.leaderboard-rank {
  position: relative;
  display: grid;
  height: 43px;
  place-items: center;
}

.leaderboard-rank span {
  display: grid;
  width: 33px;
  height: 39px;
  place-items: center;
  background: rgba(100, 151, 166, 0.13);
  color: rgba(193, 216, 221, 0.68);
  font-size: 17px;
  font-style: italic;
  font-weight: 800;
  clip-path: polygon(50% 0, 94% 22%, 84% 80%, 50% 100%, 16% 80%, 6% 22%);
}

.rank-1 .leaderboard-rank span {
  width: 39px;
  height: 46px;
  background: linear-gradient(145deg, #ffe47d, #bd7d14);
  color: #4f3000;
  box-shadow: 0 0 22px rgba(255, 211, 77, 0.2);
}

.rank-2 .leaderboard-rank span {
  background: linear-gradient(145deg, #bce8f1, #3c849d);
  color: #073544;
}

.rank-3 .leaderboard-rank span {
  background: linear-gradient(145deg, #e9a47e, #8a4228);
  color: #3b160a;
}

.leaderboard-avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.35);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(145deg, #17333d, #071116);
  color: var(--acid);
  font-size: 14px;
  font-style: italic;
  font-weight: 800;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-avatar > i {
  position: absolute;
  right: -7px;
  bottom: -6px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(217, 255, 67, 0.55);
  border-radius: 50%;
  background: #0b1519;
  color: var(--acid);
  font-size: 6px;
  font-style: normal;
}

.leaderboard-player {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.leaderboard-player > b {
  overflow: hidden;
  color: rgba(247, 250, 246, 0.94);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-player small {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: rgba(171, 194, 199, 0.54);
  font-size: 8px;
}

.leaderboard-player small span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-player em {
  color: rgba(85, 222, 241, 0.48);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-player small .leaderboard-rank-emblem {
  --tier-color: #a5bac0;
  --tier-deep: #53666c;
  position: relative;
  display: grid;
  width: 34px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: visible;
  border: 0;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--tier-color) 55%, #ffffff), transparent 31%),
    linear-gradient(150deg, color-mix(in srgb, var(--tier-color) 88%, #ffffff), var(--tier-deep));
  color: #071116;
  clip-path: polygon(50% 0, 92% 21%, 86% 77%, 50% 100%, 14% 77%, 8% 21%);
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--tier-color) 40%, transparent));
}

.leaderboard-player small .leaderboard-rank-emblem::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, #fffef0, #fff0ad 72%);
  box-shadow:
    0 0 9px color-mix(in srgb, var(--tier-color) 60%, transparent),
    inset 0 0 4px rgba(255, 255, 255, 0.72);
}

.leaderboard-player small .leaderboard-rank-emblem::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  clip-path: inherit;
}

.leaderboard-rank-emblem > b {
  position: relative;
  z-index: 2;
  color: #5a3e12;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.leaderboard-player small > .leaderboard-player-level {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: inherit;
  white-space: nowrap;
}

.leaderboard-player small {
  gap: 4px;
}

.leaderboard-player small > .leaderboard-player-level.tier-rookie {
  --player-level-color: #d08a53;
}

.leaderboard-player small > .leaderboard-player-level.tier-street {
  --player-level-color: #cedbdd;
}

.leaderboard-player small > .leaderboard-player-level.tier-sprinter {
  --player-level-color: #25c6cf;
}

.leaderboard-player small > .leaderboard-player-level.tier-expert {
  --player-level-color: #78c844;
}

.leaderboard-player small > .leaderboard-player-level.tier-elite {
  --player-level-color: #d17442;
}

.leaderboard-player small > .leaderboard-player-level.tier-navigator {
  --player-level-color: #8045ce;
}

.leaderboard-player small > .leaderboard-player-level.tier-king {
  --player-level-color: #d7a127;
}

.leaderboard-player small > .leaderboard-player-level.tier-sovereign {
  --player-level-color: #d22e83;
}

.leaderboard-player small .leaderboard-rank-emblem.tier-rookie {
  --tier-color: #d08a53;
  --tier-deep: #6f3518;
  clip-path: polygon(50% 0, 88% 14%, 92% 67%, 50% 100%, 8% 67%, 12% 14%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-street {
  --tier-color: #cedbdd;
  --tier-deep: #5d7077;
  clip-path: polygon(15% 8%, 50% 0, 85% 8%, 100% 35%, 82% 92%, 50% 100%, 18% 92%, 0 35%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-sprinter {
  --tier-color: #25c6cf;
  --tier-deep: #116671;
  clip-path: polygon(50% 0, 100% 28%, 82% 100%, 18% 100%, 0 28%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-expert {
  --tier-color: #78c844;
  --tier-deep: #33731b;
  clip-path: polygon(50% 0, 86% 12%, 100% 50%, 74% 91%, 50% 100%, 26% 91%, 0 50%, 14% 12%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-elite {
  --tier-color: #d17442;
  --tier-deep: #703019;
  clip-path: polygon(24% 0, 76% 0, 100% 27%, 84% 91%, 50% 100%, 16% 91%, 0 27%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-navigator {
  --tier-color: #8045ce;
  --tier-deep: #3f2175;
  clip-path: polygon(50% 0, 95% 50%, 50% 100%, 5% 50%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-king {
  --tier-color: #d7a127;
  --tier-deep: #754d0d;
  clip-path: polygon(8% 20%, 28% 0, 50% 17%, 72% 0, 92% 20%, 100% 100%, 0 100%);
}

.leaderboard-player small .leaderboard-rank-emblem.tier-sovereign {
  --tier-color: #d22e83;
  --tier-deep: #731545;
  clip-path: polygon(50% 0, 62% 22%, 88% 12%, 80% 40%, 100% 50%, 80% 60%, 88% 88%, 62% 78%, 50% 100%, 38% 78%, 12% 88%, 20% 60%, 0 50%, 20% 40%, 12% 12%, 38% 22%);
}

.leaderboard-score {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.leaderboard-score small {
  color: rgba(158, 181, 186, 0.48);
  font-size: 7px;
}

.leaderboard-score b {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffe581;
  font-size: 16px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
}

.leaderboard-score i {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 222, 102, 0.12);
  color: #ffe581;
  font-size: 7px;
  font-style: normal;
}

.leaderboard-score .leaderboard-peak-score {
  gap: 0;
}

.leaderboard-peak-emblem {
  position: relative;
  display: grid;
  width: 74px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, #ffe889, #ca8b1d 52%, #6f4a0f);
  color: #ffe68a;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  box-shadow:
    inset 0 0 18px rgba(255, 247, 201, 0.26),
    0 0 15px rgba(255, 218, 93, 0.13);
}

.leaderboard-peak-emblem::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(71, 42, 0, 0.34);
  clip-path: inherit;
}

.leaderboard-peak-emblem::after {
  content: "";
  position: absolute;
  top: -12px;
  left: -16px;
  width: 34px;
  height: 58px;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(28deg);
}

.leaderboard-peak-emblem > svg {
  position: absolute;
  right: 5px;
  bottom: 2px;
  width: 42px;
  height: 23px;
  fill: rgba(74, 46, 3, 0.16);
  stroke: rgba(74, 46, 3, 0.14);
  stroke-width: 1;
}

.leaderboard-peak-emblem em {
  position: relative;
  z-index: 1;
  color: #3d2700;
  font-size: 15px;
  font-style: italic;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-shadow: 0 1px rgba(255, 250, 211, 0.42);
}

.leaderboard-state {
  display: flex;
  min-height: 240px;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 0;
  color: rgba(173, 196, 201, 0.58);
  font-size: 10px;
}

.leaderboard-state.error {
  color: var(--orange);
}

.leaderboard-state.empty {
  flex-direction: column;
}

.leaderboard-state.empty span {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid rgba(85, 222, 241, 0.18);
  color: rgba(85, 222, 241, 0.6);
  font-size: 23px;
  font-style: italic;
}

.leaderboard-state.empty b {
  font-size: 10px;
  font-weight: 500;
}

.my-leaderboard-rank {
  display: grid;
  min-height: 55px;
  flex: 0 0 auto;
  grid-template-columns: 64px 34px 42px minmax(130px, 1fr) minmax(130px, auto);
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid rgba(217, 255, 67, 0.24);
  background:
    linear-gradient(90deg, rgba(217, 255, 67, 0.09), rgba(5, 18, 24, 0.72));
}

.my-leaderboard-rank > span {
  color: rgba(193, 210, 214, 0.58);
  font-size: 9px;
}

.my-leaderboard-rank > b {
  color: var(--acid);
  font-size: 22px;
  font-style: italic;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.my-leaderboard-rank .leaderboard-avatar {
  width: 38px;
  height: 38px;
}

.my-leaderboard-rank .leaderboard-player > b {
  font-size: 11px;
}

@media (max-width: 850px) {
  .leaderboard-page {
    min-height: calc(100vh - 180px);
  }

  .leaderboard-page-header h1 {
    font-size: 32px;
  }

  .leaderboard-type-filter {
    min-width: 155px;
  }

  .global-leaderboard-list > li {
    grid-template-columns: 44px 40px minmax(100px, 1fr) auto;
    gap: 8px;
  }

  .leaderboard-avatar {
    width: 37px;
    height: 37px;
  }

  .my-leaderboard-rank {
    grid-template-columns: 50px 28px 37px minmax(90px, 1fr) auto;
    gap: 7px;
    padding-inline: 9px;
  }
}

@media (max-width: 560px) {
  .leaderboard-page-header {
    align-items: flex-start;
  }

  .leaderboard-page-header p,
  .leaderboard-board-head small {
    display: none;
  }

  .leaderboard-type-filter {
    min-width: 132px;
  }

  .leaderboard-type-filter > span {
    display: none;
  }

  .leaderboard-type-filter > div {
    height: 36px;
  }

  .global-leaderboard-list > li {
    min-height: 52px;
    grid-template-columns: 35px 34px minmax(80px, 1fr) auto;
    padding-inline: 5px 8px;
  }

  .leaderboard-rank span {
    width: 28px;
    height: 33px;
    font-size: 14px;
  }

  .leaderboard-avatar {
    width: 32px;
    height: 32px;
  }

  .leaderboard-player > b {
    font-size: 11px;
  }

  .leaderboard-player em,
  .leaderboard-score small {
    display: none;
  }

  .leaderboard-score b {
    font-size: 13px;
  }

  .my-leaderboard-rank {
    grid-template-columns: 34px 26px 32px minmax(70px, 1fr) auto;
  }

  .my-leaderboard-rank > span {
    font-size: 7px;
  }
}

/* Refined ranking page and custom dropdown. */
.leaderboard-page {
  --ranking-accent: var(--cyan);
}

.leaderboard-page-header {
  position: relative;
  align-items: center;
  padding: 2px 2px 15px;
}

.leaderboard-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.leaderboard-title-mark {
  position: relative;
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ranking-accent) 45%, transparent);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ranking-accent) 18%, transparent), transparent 68%),
    linear-gradient(145deg, rgba(8, 27, 35, 0.86), rgba(3, 10, 14, 0.92));
  color: var(--ranking-accent);
  clip-path: polygon(50% 0, 94% 23%, 85% 80%, 50% 100%, 15% 80%, 6% 23%);
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--ranking-accent) 15%, transparent));
}

.leaderboard-title-mark small {
  color: currentColor;
  font-size: 13px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.leaderboard-title-mark i {
  position: absolute;
  bottom: 13px;
  width: 21px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.leaderboard-title-wrap > div {
  min-width: 0;
}

.leaderboard-title-wrap > div > small {
  color: var(--ranking-accent);
}

.leaderboard-page-header h1 {
  margin-top: 4px;
  font-size: clamp(36px, 3.4vw, 54px);
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.leaderboard-page-header p {
  font-size: 10px;
}

.leaderboard-header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(69, 232, 134, 0.2);
  background: rgba(69, 232, 134, 0.05);
  color: rgba(119, 235, 170, 0.74);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.leaderboard-live-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #45e886;
  box-shadow: 0 0 9px rgba(69, 232, 134, 0.7);
  animation: leaderboard-live-pulse 1.8s ease-in-out infinite;
}

.leaderboard-type-filter {
  position: relative;
  width: 208px;
  min-width: 208px;
  gap: 5px;
}

.leaderboard-type-filter > span {
  color: rgba(164, 188, 194, 0.55);
  font-size: 7px;
  text-align: left;
}

.leaderboard-select-trigger {
  display: grid;
  width: 100%;
  height: 44px;
  grid-template-columns: 32px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 7px;
  padding: 0 9px 0 7px;
  border: 1px solid color-mix(in srgb, var(--ranking-accent) 30%, transparent);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--ranking-accent) 11%, transparent), rgba(3, 12, 17, 0.82));
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.leaderboard-select-trigger:hover,
.leaderboard-type-filter.open .leaderboard-select-trigger {
  border-color: color-mix(in srgb, var(--ranking-accent) 62%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--ranking-accent) 8%, transparent);
}

.leaderboard-select-trigger > i {
  display: grid;
  width: 27px;
  height: 27px;
  margin: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ranking-accent) 43%, transparent);
  background: color-mix(in srgb, var(--ranking-accent) 8%, transparent);
  color: var(--ranking-accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.leaderboard-select-trigger > b {
  overflow: hidden;
  color: rgba(246, 249, 246, 0.9);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-select-trigger > svg {
  width: 17px;
  height: 17px;
  justify-self: center;
  fill: none;
  stroke: rgba(184, 205, 210, 0.62);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s, stroke 0.2s;
}

.leaderboard-type-filter.open .leaderboard-select-trigger > svg {
  stroke: var(--ranking-accent);
  transform: rotate(180deg);
}

.leaderboard-type-filter > .leaderboard-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: block;
  width: 254px;
  height: auto;
  max-height: min(360px, 62vh);
  grid-template-columns: none;
  align-items: initial;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--ranking-accent) 26%, transparent);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--ranking-accent) 10%, transparent), transparent 35%),
    rgba(3, 13, 18, 0.985);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px);
}

.leaderboard-select-menu > button {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 31px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(212, 226, 228, 0.72);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.leaderboard-select-menu > button + button {
  margin-top: 3px;
}

.leaderboard-select-menu > button:hover,
.leaderboard-select-menu > button.active {
  border-color: color-mix(in srgb, var(--option-accent) 26%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--option-accent) 10%, transparent), transparent);
  color: var(--ink);
}

.leaderboard-select-menu > button > i {
  display: grid;
  width: 28px;
  height: 28px;
  margin: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--option-accent) 36%, transparent);
  color: var(--option-accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.leaderboard-select-menu > button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-select-menu > button b {
  font-size: 10px;
  white-space: nowrap;
}

.leaderboard-select-menu > button small {
  color: rgba(151, 178, 184, 0.55);
  font-size: 7px;
  white-space: nowrap;
}

.leaderboard-select-menu > button > svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--option-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ranking-menu-enter-active,
.ranking-menu-leave-active {
  transition: opacity 0.16s ease, transform 0.18s ease;
  transform-origin: top right;
}

.ranking-menu-enter-from,
.ranking-menu-leave-to {
  opacity: 0;
  transform: translateY(-5px) scale(0.97);
}

.leaderboard-board {
  border-color: color-mix(in srgb, var(--ranking-accent) 17%, transparent);
  background:
    radial-gradient(circle at 92% 0, color-mix(in srgb, var(--ranking-accent) 9%, transparent), transparent 31%),
    linear-gradient(145deg, rgba(7, 24, 32, 0.62), rgba(2, 9, 13, 0.56));
}

.leaderboard-board-head {
  min-height: 46px;
  padding-inline: 16px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--ranking-accent) 8%, rgba(5, 19, 27, 0.86)), rgba(4, 15, 21, 0.78));
}

.leaderboard-scope {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.leaderboard-scope > button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(156, 181, 187, 0.46);
  font: inherit;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s;
}

.leaderboard-scope > button:hover {
  color: rgba(218, 231, 233, 0.82);
}

.leaderboard-scope > button > i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(142, 168, 174, 0.28);
}

.leaderboard-scope > button > em {
  color: inherit;
  font-size: inherit;
  font-style: normal;
  white-space: nowrap;
}

.leaderboard-scope .active {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--ranking-accent);
  white-space: nowrap;
}

.leaderboard-scope .active i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ranking-accent);
  box-shadow: 0 0 9px color-mix(in srgb, var(--ranking-accent) 68%, transparent);
}

.leaderboard-scope .active em {
  color: currentColor;
  font-size: inherit;
  font-style: normal;
  white-space: nowrap;
}

.leaderboard-board-head .leaderboard-scope .active::after {
  display: none;
}

.leaderboard-column-labels {
  display: grid;
  min-height: 27px;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(141, 167, 173, 0.42);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.leaderboard-column-labels span:last-child {
  text-align: right;
}

.global-leaderboard-list {
  padding: 7px;
  gap: 6px;
}

.global-leaderboard-list > li {
  border-left: 2px solid color-mix(in srgb, var(--ranking-accent) 26%, transparent);
  background:
    linear-gradient(95deg, color-mix(in srgb, var(--ranking-accent) 7%, transparent), rgba(6, 23, 32, 0.24) 58%);
}

.global-leaderboard-list > li.rank-1 {
  border-left-color: #ffe37b;
}

.global-leaderboard-list > li.rank-2 {
  border-left-color: #a5ddec;
}

.global-leaderboard-list > li.rank-3 {
  border-left-color: #dc946f;
}

.global-leaderboard-list > li.current {
  border-color: color-mix(in srgb, var(--ranking-accent) 36%, transparent);
  box-shadow:
    inset 3px 0 var(--ranking-accent),
    inset 0 0 28px color-mix(in srgb, var(--ranking-accent) 4%, transparent);
}

.leaderboard-score b {
  color: color-mix(in srgb, var(--ranking-accent) 78%, #ffffff);
}

.leaderboard-score i {
  background: color-mix(in srgb, var(--ranking-accent) 12%, transparent);
  color: var(--ranking-accent);
}

.my-leaderboard-rank {
  border-color: color-mix(in srgb, var(--ranking-accent) 28%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--ranking-accent) 10%, transparent), rgba(5, 18, 24, 0.78));
}

.my-leaderboard-rank > b,
.my-leaderboard-rank .leaderboard-score b {
  color: var(--ranking-accent);
}

@keyframes leaderboard-live-pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 850px) {
  .leaderboard-header-actions {
    align-items: flex-end;
  }

  .leaderboard-live-status {
    display: none;
  }

  .leaderboard-type-filter {
    width: 178px;
    min-width: 178px;
  }

  .leaderboard-title-mark {
    width: 54px;
    height: 54px;
  }

  .leaderboard-title-mark small {
    font-size: 11px;
  }

  .leaderboard-title-mark i {
    bottom: 10px;
  }
}

@media (max-width: 560px) {
  .leaderboard-page-header {
    align-items: center;
  }

  .leaderboard-title-mark {
    display: none;
  }

  .leaderboard-title-wrap {
    gap: 0;
  }

  .leaderboard-page-header h1 {
    font-size: 30px;
  }

  .leaderboard-type-filter {
    width: 138px;
    min-width: 138px;
  }

  .leaderboard-select-trigger {
    height: 38px;
    grid-template-columns: 27px minmax(0, 1fr) 21px;
    gap: 5px;
    padding-inline: 5px;
  }

  .leaderboard-select-trigger > i {
    width: 23px;
    height: 23px;
    font-size: 8px;
  }

  .leaderboard-select-trigger > b {
    font-size: 10px;
  }

  .leaderboard-type-filter > .leaderboard-select-menu {
    width: 225px;
  }

  .leaderboard-board-head {
    min-height: 39px;
    padding-inline: 11px;
  }

  .leaderboard-column-labels {
    padding-inline: 14px;
  }

  .leaderboard-column-labels span:first-child {
    font-size: 0;
  }

  .leaderboard-column-labels span:first-child::after {
    content: "名次 / 玩家";
    font-size: 7px;
  }
}

/* Touch-device landscape layout: desktop-style navigation with a compact HUD. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .auth-screen {
    padding: 8px;
  }

  .auth-card {
    width: min(560px, calc(100vw - 28px));
    max-height: calc(100vh - 16px);
    padding: 14px 22px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .auth-brand {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .auth-brand b {
    font-size: 9px;
  }

  .auth-card h2 {
    font-size: 27px;
    line-height: 1;
  }

  .auth-tabs {
    margin-bottom: 4px;
  }

  .auth-tabs button {
    height: 32px;
  }

  .auth-card > label {
    gap: 4px;
    margin-top: 7px;
  }

  .auth-card input {
    height: 36px;
    font-size: 11px;
  }

  .auth-card > label.auth-remember {
    gap: 6px;
    margin-top: 6px;
  }

  .auth-submit {
    height: 38px;
    margin-top: 10px;
  }

  .auth-error,
  .auth-success {
    margin-top: 7px;
  }

  .player-hub-screen {
    grid-template-columns: 154px minmax(0, 1fr);
    grid-template-rows: 58px minmax(0, 1fr);
    overflow: hidden;
  }

  .player-hub-topbar {
    min-width: 0;
    gap: 8px;
    padding: 0 10px;
  }

  .player-hub-identity {
    min-width: 174px;
    gap: 7px;
  }

  .player-hub-avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .player-hub-identity b {
    max-width: 100px;
    font-size: 11px;
  }

  .player-level-track {
    width: 48px;
  }

  .player-level-row > em {
    min-width: 34px;
    font-size: 6px;
  }

  .player-hub-currency {
    gap: 5px;
    padding: 4px 7px;
  }

  .player-hub-currency b {
    font-size: 11px;
  }

  .player-hub-account {
    gap: 5px;
  }

  .player-hub-account > .game-settings-trigger {
    display: none !important;
  }

  .player-hub-account > .home-guide-button {
    width: auto;
    min-height: 32px;
    height: 32px;
    padding: 0 8px;
    justify-content: center;
  }

  .player-hub-account > .home-guide-button > span:nth-child(2) {
    display: inline;
  }

  .player-hub-account > .logout-button {
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    justify-content: center;
  }

  .player-hub-account > .logout-button span {
    display: inline;
  }

  .player-hub-menu {
    grid-row: 2;
    grid-column: 1;
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 0;
    padding: 8px 8px 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 0;
    background: linear-gradient(90deg, rgba(3, 9, 14, 0.92), rgba(3, 9, 14, 0.58));
    scrollbar-width: none;
  }

  .player-hub-menu::-webkit-scrollbar {
    display: none;
  }

  .player-hub-menu > button,
  .player-hub-submenu-title {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0 8px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    font-size: 12px;
  }

  .player-hub-menu > button:hover,
  .player-hub-menu > button.active {
    padding-left: 12px;
  }

  .player-hub-submenu {
    display: block;
    width: 100%;
    margin-top: 2px;
  }

  .player-hub-submenu-title {
    min-width: 0;
  }

  .player-hub-submenu-list {
    width: 100%;
    flex-direction: column;
    padding-left: 7px;
  }

  .player-hub-submenu-list button {
    width: 100%;
    min-width: 0;
    min-height: 27px;
    padding: 0 7px;
    font-size: 9px;
  }

  .player-hub-content {
    grid-row: 2;
    grid-column: 2;
    overflow: hidden;
    padding: 10px 12px 67px;
  }

  .player-home-view {
    height: 100%;
    grid-template-columns: minmax(255px, 1.08fr) minmax(235px, 0.82fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 10px;
  }

  .player-home-copy {
    min-width: 0;
    justify-content: center;
  }

  .player-home-season {
    margin-bottom: 8px;
  }

  .player-home-season span {
    width: 36px;
    height: 22px;
    font-size: 8px;
  }

  .player-home-season b {
    font-size: 8px;
  }

  .player-home-copy h1 {
    margin-bottom: 14px;
    font-size: clamp(43px, 7.7vw, 68px);
    line-height: 0.82;
  }

  .player-home-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .player-home-summary > div {
    min-width: 0;
    gap: 3px;
    padding: 7px;
  }

  .player-home-summary small {
    font-size: 6px;
  }

  .player-home-summary b {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-home-car {
    grid-row: 1;
    grid-column: 2;
    min-height: 0;
    height: 100%;
  }

  .player-home-car .car-skin-preview {
    min-height: 0;
    height: 100%;
  }

  .player-hub-actions {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 154px;
    gap: 7px;
    padding: 7px 12px 10px;
    background: linear-gradient(0deg, rgba(3, 8, 13, 0.98), rgba(3, 8, 13, 0.7) 72%, transparent);
  }

  .hub-mode-button {
    width: min(220px, calc((100vw - 184px) / 3));
    height: 48px;
    flex: 1 1 0;
  }

  .hub-mode-button small {
    font-size: 6px;
  }

  .hub-mode-button b {
    margin-top: 1px;
    font-size: 13px;
  }

  #hud.is-active #speed-dashboard {
    right: auto;
    bottom: 1px;
    left: 50%;
    width: 225px;
    transform: translateX(-50%) scale(0.5);
    transform-origin: center bottom;
  }

  #hud.is-active .race-info {
    top: 144px;
    right: auto;
    left: 14px;
    transform: scale(0.7);
    transform-origin: left top;
  }

  #hud.is-active .race-stat {
    min-width: 62px;
    padding: 5px 7px 6px;
  }

  #hud.is-active .race-time {
    min-width: 90px;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
  .player-hub-screen {
    grid-template-rows: 54px minmax(0, 1fr);
  }

  .player-hub-identity {
    min-width: 158px;
  }

  .player-hub-avatar {
    width: 34px;
    height: 34px;
  }

  .player-hub-menu {
    padding-top: 5px;
  }

  .player-hub-menu > button,
  .player-hub-submenu-title {
    min-height: 33px;
    font-size: 11px;
  }

  .player-hub-content {
    padding-top: 7px;
    padding-bottom: 61px;
  }

  .player-home-copy h1 {
    font-size: 46px;
  }

  .hub-mode-button {
    height: 43px;
  }

  .auth-card {
    padding-top: 11px;
    padding-bottom: 12px;
  }

  .auth-card h2 {
    font-size: 24px;
  }

  #hud.is-active .race-info {
    top: 132px;
    transform: scale(0.66);
  }
}

/* Mobile race: remaining-distance decay and camera mode control. */
.track-distance-readout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 10px;
}

.track-distance-readout b {
  justify-self: end;
  transform-origin: right center;
}

.track-distance-decay {
  position: relative;
  grid-column: 1 / -1;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border: 1px solid rgba(85, 222, 241, 0.16);
  background: rgba(1, 7, 10, 0.7);
}

.track-distance-decay > i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #d9ff43, #55def1 65%, #2b8fa8);
  box-shadow: 0 0 10px rgba(85, 222, 241, 0.48);
  transform-origin: left center;
  transition: width 0.12s linear, filter 0.18s;
}

#distance-remaining.distance-decrement {
  color: #ffffff;
  animation: distance-counter-tick 0.19s ease-out;
}

#distance-remaining.distance-decrement + .track-distance-decay > i {
  filter: brightness(1.35);
}

@keyframes distance-counter-tick {
  0% {
    color: var(--acid);
    opacity: 0.55;
    transform: translateY(-2px) scale(0.94);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-controls .mobile-camera {
  width: calc(var(--touch-size) * 0.82) !important;
  height: calc(var(--touch-size) * 0.82) !important;
  border-color: rgba(132, 177, 255, 0.42) !important;
  color: #9dc1ff !important;
}

.mobile-controls .mobile-camera:active {
  background: rgba(75, 119, 190, 0.24) !important;
}

/* Mobile-only direct camera selection. */
.mobile-camera-picker-layer {
  position: fixed;
  z-index: 132;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 5, 8, 0.78);
  backdrop-filter: blur(11px);
}

.mobile-camera-picker {
  width: min(560px, 94vw);
  padding: 20px;
  border: 1px solid rgba(85, 222, 241, 0.24);
  border-top: 2px solid var(--cyan);
  background:
    radial-gradient(circle at 80% 0, rgba(85, 222, 241, 0.1), transparent 36%),
    linear-gradient(145deg, rgba(8, 24, 32, 0.99), rgba(3, 9, 14, 0.99));
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.mobile-camera-picker > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.mobile-camera-picker header span {
  color: var(--cyan);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.mobile-camera-picker h2 {
  margin: 3px 0 0;
  font-size: 25px;
  font-style: italic;
}

.mobile-camera-picker header > button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.mobile-camera-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-camera-options button {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(216, 231, 233, 0.68);
  text-align: left;
  cursor: pointer;
}

.mobile-camera-options button.active {
  border-color: rgba(85, 222, 241, 0.58);
  background: linear-gradient(135deg, rgba(85, 222, 241, 0.14), rgba(217, 255, 67, 0.04));
  color: var(--ink);
}

.mobile-camera-options button > span {
  color: var(--acid);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.mobile-camera-options button > b {
  font-size: 13px;
  font-style: italic;
}

.mobile-camera-options button > small {
  color: rgba(155, 181, 187, 0.5);
  font-size: 7px;
}

.mobile-camera-options button.active > small {
  color: var(--cyan);
}

@media (max-height: 450px) {
  .mobile-camera-picker {
    width: min(620px, 94vw);
    padding: 13px 16px;
  }

  .mobile-camera-picker > header {
    margin-bottom: 8px;
  }

  .mobile-camera-picker h2 {
    font-size: 21px;
  }

  .mobile-camera-options button {
    min-height: 66px;
    padding: 8px;
  }
}

/* Desktop-consistent content layouts on touch landscape screens. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .profile-settings-panel,
  .player-game-panel,
  .shop-panel,
  .leaderboard-page {
    height: 100%;
    min-height: 0;
  }

  .profile-settings-panel,
  .player-game-panel {
    width: 100%;
    padding: 0 4px 8px;
    overflow-y: auto;
  }

  .profile-settings-panel > header,
  .player-game-panel > header,
  .shop-header {
    width: 100%;
    margin: 0 0 10px;
    padding: 2px 0 8px 12px;
  }

  .profile-settings-panel h1,
  .player-game-panel h1,
  .shop-header h1 {
    font-size: 28px;
  }

  .profile-avatar-editor,
  .profile-nickname-editor,
  .profile-password-editor {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 14px;
  }

  .profile-password-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .profile-password-editor label:first-child,
  .profile-password-editor button {
    grid-column: 1 / -1;
  }

  .profile-nickname-editor input,
  .profile-password-editor input {
    height: 38px;
  }

  .profile-nickname-editor button,
  .profile-password-editor button {
    width: 170px;
    height: 36px;
    justify-self: end;
  }

  .player-game-layout {
    grid-template-columns: minmax(270px, 1fr) minmax(210px, 0.62fr);
    align-items: stretch;
    gap: 10px;
  }

  .player-radar-wrap {
    min-height: 0;
    height: 100%;
  }

  .profile-radar {
    width: min(100%, 330px);
  }

  .player-game-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .player-game-stats > div {
    min-height: 66px;
    gap: 3px;
    padding: 8px;
  }

  .player-game-stats b {
    font-size: 16px;
  }

  .player-hub-screen.shop-mode .player-hub-content {
    display: block;
    padding: 10px 12px 12px;
    overflow: hidden;
  }

  .player-hub-screen.shop-mode .shop-panel {
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .player-hub-screen.shop-mode .shop-header {
    flex: 0 0 auto;
    margin-bottom: 7px;
  }

  .player-hub-screen.shop-mode .shop-carousel-page {
    height: calc(100% - 118px);
    min-height: 0;
  }

  .player-hub-screen.shop-mode .shop-carousel,
  .player-hub-screen.shop-mode .car-skin-preview {
    min-height: 0;
  }

  .player-hub-screen.shop-mode .shop-carousel-info {
    padding-block: 4px;
  }

  .player-hub-screen.shop-mode .shop-carousel-info h2 {
    margin-block: 2px 4px;
    font-size: 23px;
  }

  .player-hub-screen.shop-mode .shop-carousel-info p {
    overflow: hidden;
    max-height: 28px;
  }

  .player-hub-screen.shop-mode .shop-purchase-bar {
    min-height: 48px;
    flex: 0 0 48px;
  }

  .personal-history-page {
    height: 100%;
    padding: 0 4px 8px;
  }

  .personal-history-page .match-history-header {
    margin-bottom: 6px;
    padding: 3px 0 6px;
  }

  .personal-history-page .match-history-header h1 {
    font-size: 27px;
  }

  .personal-history-page .match-history-list {
    gap: 3px;
  }

  .personal-history-page .match-history-list li {
    min-height: 39px;
    padding: 4px 8px;
  }

  .player-hub-screen.leaderboard-mode .player-hub-content {
    padding: 10px 12px 12px;
    overflow: hidden;
  }

  .leaderboard-page {
    gap: 8px;
  }

  .leaderboard-page-header {
    padding-bottom: 8px;
  }

  .leaderboard-title-mark {
    width: 46px;
    height: 46px;
  }

  .leaderboard-page-header h1 {
    font-size: 32px;
  }

  .leaderboard-page-header p {
    margin-top: 3px;
    font-size: 8px;
  }

  .leaderboard-type-filter {
    width: 174px;
    min-width: 174px;
  }

  .leaderboard-select-trigger {
    height: 36px;
  }

  .leaderboard-board-head {
    min-height: 38px;
  }

  .leaderboard-column-labels {
    min-height: 23px;
  }

  .global-leaderboard-list {
    padding: 5px;
    gap: 4px;
  }

  .global-leaderboard-list > li {
    min-height: 51px;
  }

  .my-leaderboard-rank {
    min-height: 48px;
  }

  .player-hub-screen.friends-mode .player-hub-content {
    padding: 10px 12px 12px;
  }

  .friends-panel:not(.friends-room-panel) .friend-search-area {
    width: min(430px, 100%);
  }

  .friends-panel:not(.friends-room-panel) .friends-content {
    padding-top: 74px;
  }

  .friend-player-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
  }

  .friend-player-card {
    min-height: 205px;
    padding: 14px 10px 10px;
  }

  .friend-player-card .friend-avatar {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }

  .competitive-hub {
    overflow: hidden;
  }

  .competitive-shell,
  .competitive-shell.has-season-menu {
    height: 100%;
    min-height: 0;
    grid-template-rows: 58px minmax(0, 1fr);
    overflow: hidden;
  }

  .competitive-topbar {
    grid-template-columns: 1fr auto;
    padding: 0 12px;
  }

  .ranked-layout {
    grid-template-columns: 154px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  .ranked-side-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 8px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 0;
  }

  .ranked-side-nav > h2 {
    display: block;
    margin: 0 8px 8px;
    font-size: 15px;
  }

  .ranked-side-nav > button {
    width: 100%;
    min-height: 38px;
    padding: 4px 8px;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    border-left: 1px solid rgba(255, 255, 255, 0.07);
  }

  .ranked-side-nav > button b {
    font-size: 11px;
  }

  .ranked-side-nav > button small {
    font-size: 6px;
  }

  .ranked-side-note {
    display: flex;
    margin-top: 7px;
    padding: 7px;
  }

  .ranked-stage {
    display: block;
    padding: 10px 12px;
    overflow-y: auto;
  }

  .ranked-hero {
    min-height: 0;
    grid-template-columns: minmax(270px, 1fr) minmax(220px, 0.8fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 10px;
  }

  .ranked-copy > h1 {
    font-size: 42px;
  }

  .ranked-lead {
    font-size: 8px;
  }

  .ranked-copy .ranked-achievement-strip {
    max-width: 100% !important;
  }

  .rank-stage {
    min-height: 0;
    height: 100%;
  }

  .rank-stage .emblem-3d {
    min-height: 0;
    height: 100%;
  }

  .ranked-bottom-bar {
    margin-top: 8px;
  }

  .peak-page-view {
    min-height: 0;
    height: 100%;
    grid-template-columns: minmax(270px, 1fr) minmax(220px, 0.72fr);
    gap: 10px;
  }

  .peak-emblem-stage,
  .peak-emblem-stage .emblem-3d {
    min-height: 0;
    height: 100%;
  }

  .archive-layout {
    grid-template-columns: 154px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  .season-menu {
    display: flex;
    padding: 10px 8px;
    overflow-y: auto;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 0;
  }

  .season-menu h3,
  .season-year-label,
  .season-menu-back {
    display: block;
  }

  .season-menu-list {
    flex-direction: column;
    overflow: visible;
  }

  .season-menu-list button {
    min-width: 0;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    border-left: 1px solid rgba(255, 255, 255, 0.07);
  }

  .archive-page {
    padding: 10px 12px;
    overflow-y: auto;
  }

  .season-four-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .season-history-card {
    min-height: 360px;
  }

  .online-room-shell {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 16px);
    gap: 8px;
  }

  .online-room-shell.with-friends .online-card {
    width: auto;
    flex: 1 1 auto;
  }

  .online-room-shell .friends-panel {
    width: 265px;
    max-height: calc(100vh - 16px);
    flex: 0 0 265px;
  }

  .online-card {
    max-height: calc(100vh - 16px);
    padding: 17px 20px;
  }

  .online-card h2 {
    margin-bottom: 10px;
    font-size: 29px;
  }

  .online-card input,
  .online-card select {
    height: 35px;
  }

  .online-divider {
    margin: 12px 0 8px;
  }

  .room-code {
    padding: 8px;
  }

  .room-code b {
    font-size: 25px;
  }
}

/* Four compact season cards in one mobile landscape row. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .competitive-hub .archive-layout .archive-page {
    padding: 8px 10px;
  }

  .season-archive-heading {
    min-height: 36px;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 7px;
  }

  .season-archive-heading h2 {
    font-size: 22px;
  }

  .season-archive-heading > span {
    font-size: 7px;
  }

  .competitive-hub .archive-layout .archive-page .season-four-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  .competitive-hub .archive-layout .archive-page .season-history-card {
    height: 100%;
    min-height: 0 !important;
    padding: 7px 7px 0;
  }

  .season-history-card .archive-card-visual {
    min-height: 126px;
    height: 126px;
    margin-inline: -2px;
  }

  .archive-card-visual .archive-emblem {
    width: 66%;
    max-width: 104px;
  }

  .archive-emblem > span {
    bottom: 14%;
    padding: 2px 5px;
    font-size: 6px;
  }

  .archive-card-visual > small {
    right: 5px;
    bottom: 3px;
    font-size: 5px;
  }

  .season-history-card > h3 {
    overflow: hidden;
    padding: 5px 1px 7px;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .season-card-period {
    overflow: hidden;
    margin: -3px 0 6px;
    font-size: 6px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .season-history-card .season-card-value {
    min-height: 46px;
    gap: 2px;
    margin-inline: -7px;
    padding: 5px 3px;
  }

  .season-card-value small {
    font-size: 5px;
  }

  .season-card-value b,
  .season-history-card .rank-value b {
    font-size: 13px;
  }

  .season-history-card .season-card-foot {
    min-height: 27px;
    gap: 2px;
    margin: auto -7px 0;
    padding: 4px 5px;
    font-size: 5px;
  }

  .season-history-card.current::after {
    top: 5px;
    right: -35px;
    width: 96px;
    padding: 2px 0;
    font-size: 4px;
  }
}

/* Rank guide: five expandable rank banners per row. */
.rank-guide-cards-layout {
  display: block !important;
  min-height: 0;
  padding-top: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rank-guide-card-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.rank-guide-card {
  --rank-guide-accent: #b97842;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 205px;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  padding: 14px 9px 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rank-guide-accent) 40%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rank-guide-accent) 18%, transparent), rgba(6, 16, 24, 0.9)),
    rgba(5, 14, 21, 0.82);
  color: rgba(244, 247, 239, 0.66);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 50% 100%, 0 calc(100% - 22px));
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.rank-guide-card::before {
  content: "";
  position: absolute;
  inset: 5px 5px 18px;
  border: 1px solid color-mix(in srgb, var(--rank-guide-accent) 18%, transparent);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 17px), 50% 100%, 0 calc(100% - 17px));
  pointer-events: none;
}

.rank-guide-card:hover,
.rank-guide-card.active {
  border-color: var(--rank-guide-accent);
  background:
    radial-gradient(circle at 50% 31%, color-mix(in srgb, var(--rank-guide-accent) 27%, transparent), transparent 49%),
    linear-gradient(180deg, color-mix(in srgb, var(--rank-guide-accent) 23%, #08121a), rgba(5, 13, 19, 0.94));
  color: var(--ink);
}

.rank-guide-card.active {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.rank-guide-card.rookie { --rank-guide-accent: #b97842; }
.rank-guide-card.street { --rank-guide-accent: #aeb9be; }
.rank-guide-card.sprinter { --rank-guide-accent: #25aac1; }
.rank-guide-card.expert { --rank-guide-accent: #7da82c; }
.rank-guide-card.elite { --rank-guide-accent: #c45c27; }
.rank-guide-card.navigator { --rank-guide-accent: #6945ad; }
.rank-guide-card.king { --rank-guide-accent: #d89224; }
.rank-guide-card.sovereign { --rank-guide-accent: #e63aa6; }

.rank-guide-card .rank-guide-sigil {
  width: 70px;
  height: 82px;
  margin-bottom: auto;
}

.rank-guide-card > b {
  overflow: hidden;
  max-width: 100%;
  font-size: 13px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-guide-card > small {
  color: color-mix(in srgb, var(--rank-guide-accent) 68%, #ffffff);
  font-size: 7px;
}

.rank-guide-card > em {
  color: rgba(170, 191, 196, 0.48);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.rank-guide-card.active > em {
  color: var(--rank-guide-accent);
}

.rank-guide-expanded-detail {
  position: relative;
  width: 100%;
  min-height: 0;
  margin-top: 12px;
  padding: 17px 20px;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(145deg, rgba(218, 226, 222, 0.96), rgba(135, 151, 155, 0.94)),
    #d3dbd9;
  color: #172128;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.rank-guide-expanded-detail .rank-guide-detail-title {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 15px;
  padding-right: 75px;
}

.rank-guide-expanded-detail .rank-guide-large-sigil {
  width: 78px;
  height: 92px;
}

.rank-guide-expanded-detail .rank-guide-detail-title small {
  color: color-mix(in srgb, var(--rank-guide-accent) 72%, #172128);
}

.rank-guide-expanded-detail .rank-guide-detail-title h3 {
  margin: 3px 0 5px;
  color: #111b21;
  font-size: 25px;
}

.rank-guide-expanded-detail .rank-guide-detail-title p {
  color: rgba(24, 35, 42, 0.72);
  font-size: 9px;
  line-height: 1.65;
}

.rank-guide-expanded-detail .rank-guide-rule {
  margin: 12px 0 8px;
  padding-top: 9px;
  border-top-color: rgba(23, 33, 40, 0.16);
}

.rank-guide-expanded-detail .rank-guide-rule span {
  color: rgba(23, 33, 40, 0.58);
}

.rank-guide-expanded-detail .rank-guide-rule b {
  color: color-mix(in srgb, var(--rank-guide-accent) 74%, #172128);
  font-size: 16px;
}

.rank-guide-expanded-detail .rank-guide-divisions {
  gap: 5px;
}

.rank-guide-expanded-detail .rank-guide-divisions > div,
.rank-guide-expanded-detail .rank-guide-king-rule {
  padding: 8px;
  border-color: rgba(23, 33, 40, 0.13);
  background: rgba(255, 255, 255, 0.2);
}

.rank-guide-expanded-detail .rank-guide-divisions span,
.rank-guide-expanded-detail .rank-guide-king-rule span {
  color: #1b272e;
  font-size: 8px;
}

.rank-guide-expanded-detail .rank-guide-divisions b,
.rank-guide-expanded-detail .rank-guide-king-rule b {
  color: color-mix(in srgb, var(--rank-guide-accent) 75%, #172128);
  font-size: 9px;
}

.rank-guide-detail-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 13px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(23, 33, 40, 0.22);
  background: rgba(255, 255, 255, 0.2);
  color: rgba(23, 33, 40, 0.68);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.rank-guide-detail-close span {
  margin-right: 3px;
}

.rank-detail-enter-active,
.rank-detail-leave-active {
  transition: opacity 0.18s ease, transform 0.2s ease;
}

.rank-detail-enter-from,
.rank-detail-leave-to {
  opacity: 0;
  transform: translateY(-8px);
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-guide {
    padding: 8px 10px 10px;
  }

  .rank-guide-header {
    padding-bottom: 8px;
  }

  .rank-guide-header h2 {
    font-size: 25px;
  }

  .rank-guide-header p {
    margin-top: 2px;
    font-size: 7px;
  }

  .rank-guide-header > button {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .rank-guide-cards-layout {
    padding-top: 7px;
  }

  .rank-guide-card-grid {
    gap: 6px;
  }

  .rank-guide-card {
    min-height: 128px;
    gap: 2px;
    padding: 7px 5px 13px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px));
  }

  .rank-guide-card::before {
    inset: 3px 3px 11px;
  }

  .rank-guide-card .rank-guide-sigil {
    width: 42px;
    height: 50px;
  }

  .rank-guide-sigil::before {
    border-width: 1px;
  }

  .rank-guide-card > b {
    font-size: 10px;
  }

  .rank-guide-card > small {
    font-size: 5px;
  }

  .rank-guide-card > em {
    font-size: 5px;
  }

  .rank-guide-expanded-detail {
    margin-top: 7px;
    padding: 11px 13px;
  }

  .rank-guide-expanded-detail .rank-guide-detail-title {
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 9px;
    padding-right: 65px;
  }

  .rank-guide-expanded-detail .rank-guide-large-sigil {
    width: 50px;
    height: 60px;
  }

  .rank-guide-expanded-detail .rank-guide-detail-title h3 {
    font-size: 18px;
  }

  .rank-guide-expanded-detail .rank-guide-detail-title p {
    font-size: 7px;
  }

  .rank-guide-expanded-detail .rank-guide-rule {
    margin: 7px 0 5px;
    padding-top: 6px;
  }

  .rank-guide-expanded-detail .rank-guide-divisions > div,
  .rank-guide-expanded-detail .rank-guide-king-rule {
    padding: 5px;
  }

  .rank-guide-expanded-detail .rank-guide-divisions span {
    font-size: 6px;
  }

  .rank-guide-expanded-detail .rank-guide-divisions b {
    font-size: 7px;
  }
}

/* Rank guide: eight banners stay on one row with an inline detail drawer. */
.rank-guide-layout.rank-guide-cards-layout {
  display: flex !important;
  min-height: 0;
  flex-direction: row;
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
}

.rank-guide-cards-layout .rank-guide-card-grid {
  display: flex !important;
  min-width: 0;
  flex: 1 1 auto;
  align-items: stretch;
  gap: 7px;
  overflow: hidden;
}

.rank-guide-card-grid .rank-guide-card {
  min-width: 0;
  height: 100%;
  flex: 1 1 0;
}

.rank-guide-cards-layout .rank-guide-expanded-detail {
  height: 100%;
  max-height: 100%;
  flex: 0 0 clamp(300px, 37%, 560px);
  margin-top: 0 !important;
  overflow-y: auto;
}

.rank-guide-cards-layout:not(.has-detail) .rank-guide-card {
  min-height: 220px;
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-guide-layout.rank-guide-cards-layout {
    gap: 6px;
    padding-top: 7px;
  }

  .rank-guide-cards-layout .rank-guide-card-grid {
    gap: 4px;
  }

  .rank-guide-card-grid .rank-guide-card {
    min-width: 58px;
    min-height: 0;
    padding-inline: 2px;
  }

  .rank-guide-card .rank-guide-sigil {
    width: 36px;
    height: 43px;
  }

  .rank-guide-card > b {
    max-width: 100%;
    font-size: 8.5px;
  }

  .rank-guide-card > small {
    font-size: 4px;
  }

  .rank-guide-card > em {
    display: none;
  }

  .rank-guide-cards-layout .rank-guide-expanded-detail {
    flex-basis: clamp(200px, 27vw, 240px);
    padding: 8px 9px;
  }

  .rank-guide-cards-layout:not(.has-detail) .rank-guide-card {
    min-height: 0;
  }
}

/* Large mobile shop preview with permanently visible purchase controls. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.shop-mode .player-hub-content {
    padding: 7px 10px 8px;
  }

  .player-hub-screen.shop-mode .shop-panel {
    position: relative !important;
    display: block !important;
    padding: 0 0 52px !important;
  }

  .player-hub-screen.shop-mode .shop-header {
    display: none !important;
  }

  .player-hub-screen.shop-mode .shop-carousel-page {
    position: absolute !important;
    inset: 0 0 52px !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }

  .player-hub-screen.shop-mode .shop-carousel {
    position: absolute !important;
    inset: 0 0 15px !important;
    height: auto !important;
  }

  .player-hub-screen.shop-mode .shop-arrow {
    top: 50%;
    width: 32px;
    height: 54px;
    font-size: 28px;
  }

  .player-hub-screen.shop-mode .shop-arrow.left {
    left: 5px;
  }

  .player-hub-screen.shop-mode .shop-arrow.right {
    right: 5px;
  }

  .player-hub-screen.shop-mode .car-skin-preview-name {
    z-index: 9;
    top: 9px;
    left: 12px;
    padding: 5px 8px;
    border-left: 2px solid var(--cyan);
    background: linear-gradient(90deg, rgba(3, 12, 17, 0.82), transparent);
    pointer-events: none;
  }

  .player-hub-screen.shop-mode .car-skin-preview-name small {
    font-size: 6px;
  }

  .player-hub-screen.shop-mode .car-skin-preview-name b {
    font-size: 17px;
  }

  .player-hub-screen.shop-mode .shop-carousel-dots {
    position: absolute;
    z-index: 8;
    right: 0;
    bottom: 1px;
    left: 0;
    padding: 3px 0;
    background: linear-gradient(0deg, rgba(3, 9, 13, 0.82), transparent);
  }

  .player-hub-screen.shop-mode .shop-carousel-info {
    position: absolute;
    z-index: 8;
    bottom: 18px;
    left: 12px;
    max-width: min(300px, 58%);
    padding: 4px 8px 5px;
    border-left: 1px solid var(--acid);
    background: linear-gradient(90deg, rgba(3, 11, 15, 0.82), transparent);
    text-align: left;
    pointer-events: none;
  }

  .player-hub-screen.shop-mode .shop-carousel-info small {
    font-size: 6px;
  }

  .player-hub-screen.shop-mode .shop-carousel-info h2 {
    margin: 1px 0 0 !important;
    font-size: 16px !important;
    line-height: 1.1;
  }

  .player-hub-screen.shop-mode .shop-carousel-info p {
    display: none;
  }

  .player-hub-screen.shop-mode .shop-purchase-bar {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    min-height: 48px !important;
    flex: none !important;
    margin: 0 !important;
    padding: 5px 9px !important;
    border-color: rgba(85, 222, 241, 0.2);
    background: rgba(3, 10, 15, 0.96);
  }

  .player-hub-screen.shop-mode .shop-price {
    gap: 6px;
  }

  .player-hub-screen.shop-mode .shop-price b {
    font-size: 13px !important;
  }

  .player-hub-screen.shop-mode .shop-purchase-bar > button {
    width: min(190px, 42%) !important;
    height: 36px;
    font-size: 10px;
  }
}

/* Mobile shop purchase bar and ranked emblem placement. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.shop-mode .player-hub-content {
    height: 100%;
    min-height: 0;
    padding-bottom: 10px;
  }

  .player-hub-screen.shop-mode .shop-panel {
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .player-hub-screen.shop-mode .shop-carousel-page {
    display: grid !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    grid-template-rows: minmax(0, 1fr) auto auto !important;
    overflow: hidden;
  }

  .player-hub-screen.shop-mode .shop-carousel,
  .player-hub-screen.shop-mode .car-skin-preview {
    height: 100%;
    min-height: 0 !important;
  }

  .player-hub-screen.shop-mode .shop-purchase-bar {
    position: relative;
    z-index: 6;
    display: flex !important;
    min-height: 52px !important;
    flex: 0 0 52px !important;
    margin-top: 5px;
    padding: 5px 10px;
    visibility: visible !important;
  }

  .player-hub-screen.shop-mode .shop-price {
    display: flex !important;
    min-width: 120px;
  }

  .player-hub-screen.shop-mode .shop-price b {
    display: block !important;
    font-size: 14px;
  }

  .player-hub-screen.shop-mode .shop-purchase-bar > button {
    display: block !important;
    width: min(210px, 42%);
    height: 38px;
    visibility: visible !important;
  }

  .competitive-hub .ranked-layout .ranked-stage .ranked-hero {
    grid-template-columns: minmax(270px, 1fr) minmax(220px, 0.8fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }

  .competitive-hub .ranked-layout .ranked-stage .ranked-hero > .ranked-copy {
    grid-row: 1 !important;
    grid-column: 1 !important;
  }

  .competitive-hub .ranked-layout .ranked-stage .ranked-hero > .rank-stage {
    grid-row: 1 !important;
    grid-column: 2 !important;
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    align-items: stretch !important;
    flex-direction: column !important;
    padding: 0 !important;
  }

  .rank-stage .rank-emblem-visual {
    min-height: 0 !important;
    height: auto !important;
    flex: 1 1 auto !important;
  }

  .rank-stage .rank-emblem-visual .emblem-3d,
  .rank-stage .rank-emblem-visual .emblem-3d canvas {
    min-height: 0 !important;
    height: 100% !important;
  }

  .rank-stage .rank-emblem-meta {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    gap: 3px !important;
    padding: 0 4px !important;
  }

  .rank-stage .rank-emblem-name {
    font-size: 20px;
  }

  .rank-stage .rank-emblem-progress {
    margin-top: 3px !important;
  }

  .rank-stage .ranked-column-action {
    width: min(210px, 100%) !important;
    min-height: 38px !important;
    margin-top: 5px !important;
    flex-basis: 38px !important;
    align-self: center !important;
  }

  .rank-stage .room-entry-above-emblem {
    top: 2px !important;
    left: 2px !important;
    min-width: 132px !important;
    height: 31px;
    padding-inline: 9px;
    font-size: 8px;
  }
}

.player-hub-account > .mobile-hub-settings-button {
  display: none;
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-account > .mobile-hub-settings-button {
    display: inline-flex;
    width: auto;
    min-width: 0;
    height: 32px;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 11, 16, 0.55);
    color: var(--muted);
    font: inherit;
    font-size: 8px;
    cursor: pointer;
  }

  .player-hub-account > .mobile-hub-settings-button:hover {
    border-color: rgba(85, 222, 241, 0.4);
    background: rgba(85, 222, 241, 0.07);
    color: var(--cyan);
  }

  .player-hub-account > .mobile-hub-settings-button .account-action-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

/* Keep rank banners readable; the single row scrolls instead of shrinking cards. */
.rank-guide-layout.rank-guide-cards-layout {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: scroll !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  padding-bottom: 13px;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #55def1 rgba(255, 255, 255, 0.08);
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.rank-guide-cards-layout::-webkit-scrollbar {
  display: block;
  height: 12px;
}

.rank-guide-cards-layout::-webkit-scrollbar-track {
  border: 1px solid rgba(85, 222, 241, 0.14);
  border-radius: 8px;
  background: rgba(2, 8, 12, 0.74);
}

.rank-guide-cards-layout::-webkit-scrollbar-thumb {
  min-width: 74px;
  border: 2px solid rgba(2, 8, 12, 0.74);
  border-radius: 8px;
  background: linear-gradient(90deg, #45e886, #55def1);
  box-shadow: 0 0 9px rgba(85, 222, 241, 0.34);
}

.rank-guide-cards-layout .rank-guide-card-grid {
  width: max-content;
  min-width: max-content;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  overflow: visible;
}

.rank-guide-card-grid .rank-guide-card {
  width: 112px;
  min-width: 112px;
  flex: 0 0 112px;
}

.rank-guide-cards-layout .rank-guide-expanded-detail {
  width: 520px;
  flex: 0 0 520px;
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-guide-card-grid .rank-guide-card {
    width: 74px;
    min-width: 74px;
    flex-basis: 74px;
  }

  .rank-guide-cards-layout .rank-guide-expanded-detail {
    width: 290px;
    flex-basis: 290px;
  }

  .rank-guide-card > b {
    font-size: 9px;
  }

  .rank-guide-card > small {
    font-size: 5px;
  }

  .rank-guide-layout.rank-guide-cards-layout {
    padding-bottom: 11px;
  }

  .rank-guide-cards-layout::-webkit-scrollbar {
    height: 10px;
  }
}

/* Compact mobile profile submenu so every item remains visible. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-menu {
    overflow-y: auto;
    padding: 5px 7px 7px;
    scrollbar-width: thin;
    scrollbar-color: rgba(85, 222, 241, 0.3) rgba(255, 255, 255, 0.03);
  }

  .player-hub-menu::-webkit-scrollbar {
    display: block;
    width: 4px;
  }

  .player-hub-menu::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(85, 222, 241, 0.3);
  }

  .player-hub-menu > button,
  .player-hub-submenu-title {
    min-height: 32px;
    font-size: 11px;
  }

  .player-hub-submenu {
    margin-top: 1px;
  }

  .player-hub-submenu-title {
    min-height: 31px;
  }

  .player-hub-submenu-list {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding-left: 0;
  }

  .player-hub-submenu-list button {
    width: 100%;
    min-width: 0;
    min-height: 25px;
    padding: 0 5px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    font-size: 8px;
    text-align: center;
  }
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-submenu-list {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 1px;
    padding-left: 7px;
  }

  .player-hub-submenu-list button {
    width: 100%;
    min-height: 23px;
    padding: 0 7px;
    font-size: 8px;
    text-align: left;
  }
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.history-view-mode .player-hub-content {
    padding-top: 14px;
  }

  .personal-history-page {
    padding-top: 0;
  }

  .personal-history-page .match-history-header {
    position: relative;
    top: auto;
    margin: 0 0 9px;
    padding: 0 0 8px;
    background: transparent;
    backdrop-filter: none;
  }

  .personal-history-page .match-history-header h1 {
    margin-top: 0;
    font-size: 25px;
  }
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .personal-history-page {
    scroll-padding-top: 0;
  }

  .personal-history-page .match-history-header {
    position: sticky !important;
    z-index: 8;
    top: 0;
    margin: 0 0 8px;
    padding: 4px 0 8px;
    background:
      linear-gradient(180deg, rgba(4, 13, 19, 0.99), rgba(4, 13, 19, 0.92) 78%, rgba(4, 13, 19, 0.72));
    backdrop-filter: blur(8px);
  }

  .personal-history-page .match-history-header h1 {
    font-size: 24px;
    line-height: 1;
  }

  .personal-history-page .match-history-header span {
    margin-top: 3px;
  }
}

/* Mobile history follows the desktop row composition and typography. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.history-view-mode .player-hub-content {
    padding: 10px 12px 12px;
  }

  .personal-history-page {
    width: 100%;
    height: 100%;
    padding: 2px 7px 12px 0;
  }

  .personal-history-page .match-history-header {
    margin-bottom: 10px;
    padding: 4px 0 8px;
  }

  .personal-history-page .match-history-header h1 {
    font-size: clamp(28px, 3.5vw, 34px);
  }

  .personal-history-page .match-history-header span {
    font-size: 7px;
  }

  .personal-history-page > .match-history-list {
    gap: 4px;
  }

  .personal-history-page .match-history-list li {
    min-height: 49px;
    grid-template-columns: 108px minmax(150px, 1fr) 132px 82px;
    gap: 11px;
    padding: 6px 11px;
  }

  .personal-history-page .match-history-mode span {
    padding: 3px 6px;
    font-size: 8px;
  }

  .personal-history-page .match-history-mode b,
  .personal-history-page .match-history-main b,
  .personal-history-page .match-history-time b {
    font-size: 11px;
  }

  .personal-history-page .match-history-date {
    font-size: 8px;
  }

  .personal-history-page .match-history-time span,
  .personal-history-page .match-history-main small,
  .personal-history-page .match-history-time small,
  .personal-history-page .match-history-score small {
    font-size: 7px;
  }

  .personal-history-page .match-history-score > b {
    font-size: 16px;
  }
}

/* Explicitly separate the mobile topbar row from the history content row. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen {
    grid-template-rows: 58px minmax(0, 1fr) !important;
  }

  .player-hub-screen > .player-hub-topbar {
    grid-row: 1 !important;
    grid-column: 1 / -1 !important;
    position: relative;
    z-index: 20;
    height: 58px;
    align-self: stretch;
    background: linear-gradient(180deg, rgba(3, 9, 14, 0.98), rgba(3, 9, 14, 0.9));
  }

  .player-hub-screen > .player-hub-menu {
    grid-row: 2 !important;
    grid-column: 1 !important;
  }

  .player-hub-screen > .player-hub-content {
    grid-row: 2 !important;
    grid-column: 2 !important;
    min-height: 0;
  }

  .player-hub-screen.history-view-mode > .player-hub-content {
    padding-top: 16px !important;
    overflow: hidden;
  }

  .player-hub-screen.history-view-mode .personal-history-page {
    position: relative;
    top: auto;
    height: 100%;
  }

  .player-hub-screen.history-view-mode .personal-history-page .match-history-header {
    margin-top: 0;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
  .player-hub-screen {
    grid-template-rows: 54px minmax(0, 1fr) !important;
  }

  .player-hub-screen > .player-hub-topbar {
    height: 54px;
  }
}

/* History content is explicitly anchored below the mobile topbar. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.history-view-mode > .player-hub-content {
    position: fixed !important;
    z-index: 7;
    inset: 58px 0 0 154px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px 12px 12px !important;
    overflow: hidden !important;
  }

  .player-hub-screen.history-view-mode
    > .player-hub-content
    > .personal-history-page {
    width: 100%;
    height: 100%;
    padding: 0 4px 0 0;
  }

  .player-hub-screen.history-view-mode
    .personal-history-page
    .match-history-header {
    flex: 0 0 auto;
    margin: 0 0 9px;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
  .player-hub-screen.history-view-mode > .player-hub-content {
    inset: 54px 0 0 154px !important;
    padding-top: 11px !important;
  }
}

/* Keep the mobile track panel above the race-info strip. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  #hud.is-active .hud-brand {
    z-index: 6;
  }

  #hud.is-active .track-distance-readout {
    position: relative;
    z-index: 2;
  }

  #hud.is-active .race-info {
    top: 188px;
    z-index: 5;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
  #hud.is-active .race-info {
    top: 174px;
  }
}

/* Mobile HUD: race info at the top, audio control below the minimap. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  #hud.is-active .race-info {
    top: 8px;
    right: auto;
    left: 50%;
    transform: translateX(-50%) scale(0.66);
    transform-origin: top center;
    z-index: 7;
  }

  #hud.is-active ~ .mobile-controls .mobile-quick-audio {
    top: 166px;
    right: 14px;
    left: auto;
    transform: none;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
  #hud.is-active .race-info {
    top: 5px;
    transform: translateX(-50%) scale(0.63);
  }

  #hud.is-active ~ .mobile-controls .mobile-quick-audio {
    top: 154px;
    right: 10px;
  }
}

/* Mobile audio control integrated into the minimap header. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  #hud.is-active ~ .mobile-controls .mobile-quick-audio {
    top: 22px;
    right: 22px;
    left: auto;
    width: 27px;
    min-width: 27px;
    height: 27px;
    padding: 0;
    border-color: rgba(85, 222, 241, 0.28);
    border-radius: 50%;
    transform: none;
  }

  #hud.is-active ~ .mobile-controls .mobile-quick-audio svg {
    width: 15px;
    height: 15px;
  }

  #hud.is-active ~ .mobile-controls .mobile-quick-audio span {
    display: none;
  }
}

/* Larger mobile home car preview without an overlaying duplicate name. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen:not(.shop-mode) .player-home-view {
    grid-template-columns: minmax(250px, 0.9fr) minmax(285px, 1.1fr);
    gap: 8px;
  }

  .player-hub-screen:not(.shop-mode) .player-home-car {
    min-width: 0;
    overflow: visible;
  }

  .player-hub-screen:not(.shop-mode)
    .player-home-car
    .car-skin-preview-name {
    display: none;
  }

  .player-hub-screen:not(.shop-mode)
    .player-home-car
    .car-skin-preview {
    min-height: 0;
    height: 100%;
  }
}

@media (min-width: 901px) and (pointer: fine) {
  .car-skin-preview-name {
    display: none !important;
  }
}

/* Mobile shop: car name and description follow the desktop layout. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.shop-mode .car-skin-preview-name {
    display: none !important;
  }

  .player-hub-screen.shop-mode .shop-carousel-page {
    position: absolute !important;
    inset: 0 0 52px !important;
    display: grid !important;
    height: auto !important;
    grid-template-rows: minmax(0, 1fr) auto auto !important;
    overflow: hidden;
  }

  .player-hub-screen.shop-mode .shop-carousel {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .player-hub-screen.shop-mode .shop-carousel-dots {
    position: static !important;
    padding: 3px 0 1px;
    background: transparent;
  }

  .player-hub-screen.shop-mode .shop-carousel-info {
    position: static !important;
    z-index: auto;
    width: 100%;
    max-width: none;
    padding: 2px 8px 5px;
    border-left: 0;
    background: transparent;
    text-align: center;
    pointer-events: auto;
  }

  .player-hub-screen.shop-mode .shop-carousel-info small {
    display: block;
    color: var(--cyan);
    font-size: 6px;
    letter-spacing: 0.12em;
  }

  .player-hub-screen.shop-mode .shop-carousel-info h2 {
    margin: 1px 0 2px !important;
    font-size: 16px !important;
    line-height: 1.1;
  }

  .player-hub-screen.shop-mode .shop-carousel-info p {
    display: block;
    overflow: hidden;
    max-width: 620px;
    max-height: 26px;
    margin: 0 auto;
    color: rgba(190, 208, 211, 0.62);
    font-size: 7px;
    line-height: 1.5;
  }
}

/* Full-screen major-rank promotion effect. */
.rank-promotion-layer {
  position: fixed;
  z-index: 280;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--promotion-accent) 18%, transparent), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(5, 15, 22, 0.78), rgba(1, 5, 8, 0.97) 68%);
  cursor: pointer;
}

.rank-promotion-layer::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(118deg, transparent 0 95px, rgba(255, 255, 255, 0.025) 96px 97px),
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--promotion-accent) 5%, transparent), transparent);
  animation: promotion-grid-drift 7s linear infinite;
  pointer-events: none;
}

.rank-promotion-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rank-promotion-backdrop > i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--promotion-accent);
  box-shadow: 0 0 13px var(--promotion-accent);
  transform:
    rotate(var(--particle-angle))
    translateY(calc(var(--particle-distance) * -1));
  animation:
    promotion-particle 2.8s ease-in-out var(--particle-delay) infinite,
    promotion-particle-alpha 1.8s ease-in-out var(--particle-delay) infinite alternate;
}

.rank-promotion-backdrop > i:nth-child(3n) {
  width: 2px;
  height: 2px;
  opacity: 0.55;
}

.rank-promotion-backdrop > i:nth-child(4n) {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  transform:
    rotate(calc(var(--particle-angle) + 45deg))
    translateY(calc(var(--particle-distance) * -1));
}

.rank-promotion-stage {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(980px, 94vw);
  min-height: min(640px, 90vh);
  align-items: center;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 34px 48px 28px;
  border: 1px solid color-mix(in srgb, var(--promotion-accent) 30%, transparent);
  border-top: 2px solid var(--promotion-accent);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--promotion-accent) 8%, transparent), transparent 36%),
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--promotion-accent) 13%, transparent), transparent 33%),
    rgba(2, 9, 13, 0.9);
  box-shadow:
    0 35px 130px rgba(0, 0, 0, 0.75),
    inset 0 0 90px color-mix(in srgb, var(--promotion-accent) 4%, transparent);
  clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px), 0 24px);
  cursor: default;
}

.rank-promotion-stage::before,
.rank-promotion-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.rank-promotion-stage::before {
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--promotion-accent) 12%, transparent);
  clip-path: inherit;
}

.rank-promotion-stage::after {
  top: 0;
  left: 50%;
  width: 38%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, var(--promotion-accent), transparent);
  box-shadow: 0 0 28px var(--promotion-accent);
  transform: translateX(-50%);
}

.rank-promotion-rays {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 660px;
  height: 660px;
  background: repeating-conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--promotion-accent) 14%, transparent) 0deg 2deg,
    transparent 2deg 15deg
  );
  mask-image: radial-gradient(circle, black 0 20%, transparent 68%);
  transform: translate(-50%, -50%);
  animation: promotion-rays 14s linear infinite;
  pointer-events: none;
}

.rank-promotion-shockwave {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 260px;
  height: 260px;
  border: 2px solid color-mix(in srgb, var(--promotion-accent) 72%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: promotion-shockwave 2.5s ease-out infinite;
  pointer-events: none;
}

.rank-promotion-shockwave.wave-two {
  animation-delay: 1.15s;
}

.rank-promotion-stage > header {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: promotion-rise 0.65s 0.12s both;
}

.rank-promotion-stage > header small {
  color: var(--promotion-accent);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3em;
}

.rank-promotion-stage > header h2 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: clamp(34px, 4vw, 57px);
  font-style: italic;
  letter-spacing: 0.05em;
  text-shadow: 0 0 30px color-mix(in srgb, var(--promotion-accent) 30%, transparent);
}

.rank-promotion-route {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(150px, 1fr) 250px minmax(150px, 1fr);
  align-items: center;
  gap: 30px;
  margin: 14px 0 10px;
}

.rank-promotion-old,
.rank-promotion-new {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
}

.rank-promotion-old {
  animation: promotion-old-out 0.8s 0.95s both;
}

.rank-promotion-new {
  animation: promotion-rise 0.7s 1.45s both;
}

.rank-promotion-old small,
.rank-promotion-new small {
  color: rgba(154, 181, 187, 0.52);
  font-size: 7px;
  letter-spacing: 0.17em;
}

.rank-promotion-old b {
  color: rgba(183, 202, 207, 0.46);
  font-size: 17px;
  font-style: italic;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.rank-promotion-new b {
  color: var(--promotion-accent);
  font-size: 19px;
  font-style: italic;
}

.rank-promotion-medal {
  position: relative;
  display: grid;
  width: 190px;
  height: 216px;
  place-items: center;
  margin: 0 auto;
  animation: promotion-medal-in 0.9s 0.6s cubic-bezier(0.18, 0.82, 0.2, 1.18) both;
  filter:
    drop-shadow(0 0 22px color-mix(in srgb, var(--promotion-accent) 48%, transparent))
    drop-shadow(0 24px 30px rgba(0, 0, 0, 0.54));
}

.rank-promotion-medal > i {
  position: absolute;
  width: 150px;
  height: 178px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 18%),
    linear-gradient(154deg, transparent 0 31%, color-mix(in srgb, var(--promotion-accent) 82%, #101820) 31.5% 61%, var(--promotion-accent) 61.5% 69%, var(--promotion-secondary) 69.5%);
  clip-path: polygon(50% 0, 88% 13%, 100% 43%, 82% 79%, 50% 100%, 18% 79%, 0 43%, 12% 13%);
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.62);
}

.rank-promotion-medal > i::before {
  content: "";
  position: absolute;
  inset: 18% 28% 38%;
  background: linear-gradient(145deg, #fffef4, var(--promotion-accent));
  clip-path: polygon(50% 0, 100% 27%, 82% 100%, 50% 76%, 18% 100%, 0 27%);
}

.rank-promotion-medal > b {
  position: relative;
  z-index: 3;
  display: grid;
  width: 64px;
  height: 64px;
  margin-top: -18px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  background: radial-gradient(circle, #fffef0, color-mix(in srgb, var(--promotion-accent) 66%, #fff6cc));
  color: #3b2a0d;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--promotion-accent) 8%, transparent),
    0 0 28px color-mix(in srgb, var(--promotion-accent) 70%, transparent);
}

.medal-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid color-mix(in srgb, var(--promotion-accent) 36%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-13deg) scaleY(0.58);
}

.orbit-one {
  width: 242px;
  height: 242px;
  animation: promotion-orbit 5s linear infinite;
}

.orbit-two {
  width: 286px;
  height: 286px;
  border-style: dashed;
  animation: promotion-orbit 8s linear infinite reverse;
}

.medal-flare {
  position: absolute;
  top: 48%;
  left: 50%;
  width: 330px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, var(--promotion-accent), transparent);
  box-shadow: 0 0 18px var(--promotion-accent);
  transform: translate(-50%, -50%);
  animation: promotion-flare 2.2s ease-in-out infinite;
}

.rank-promotion-title {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: promotion-rise 0.7s 1.7s both;
}

.rank-promotion-title > span {
  color: var(--promotion-accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.rank-promotion-title h3 {
  margin: 4px 0 5px;
  color: #ffffff;
  font-size: 33px;
  font-style: italic;
}

.rank-promotion-title p {
  margin: 0;
  color: rgba(190, 208, 212, 0.62);
  font-size: 9px;
}

.rank-promotion-stage > button {
  position: relative;
  z-index: 3;
  min-width: 180px;
  height: 41px;
  margin-top: 20px;
  border: 1px solid var(--promotion-accent);
  background: color-mix(in srgb, var(--promotion-accent) 12%, rgba(2, 10, 14, 0.82));
  color: var(--promotion-accent);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  animation: promotion-rise 0.55s 2s both;
}

.rank-promotion-stage > button:hover {
  background: var(--promotion-accent);
  color: #07100b;
}

.rank-promotion-enter-active,
.rank-promotion-leave-active {
  transition: opacity 0.3s ease;
}

.rank-promotion-enter-active .rank-promotion-stage,
.rank-promotion-leave-active .rank-promotion-stage {
  transition: transform 0.34s ease, opacity 0.3s ease;
}

.rank-promotion-enter-from,
.rank-promotion-leave-to {
  opacity: 0;
}

.rank-promotion-enter-from .rank-promotion-stage,
.rank-promotion-leave-to .rank-promotion-stage {
  opacity: 0;
  transform: scale(0.92);
}

@keyframes promotion-grid-drift {
  to { transform: translateX(97px); }
}

@keyframes promotion-particle {
  0%,
  100% { opacity: 0.25; }
  50% {
    opacity: 0.9;
    transform:
      rotate(var(--particle-angle))
      translateY(calc(var(--particle-distance) * -0.82));
  }
}

@keyframes promotion-particle-alpha {
  from { filter: brightness(0.8); }
  to { filter: brightness(1.8); }
}

@keyframes promotion-rays {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes promotion-shockwave {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.32);
  }
  28% { opacity: 0.72; }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.25);
  }
}

@keyframes promotion-medal-in {
  0% {
    opacity: 0;
    transform: scale(0.25) rotate(-18deg);
  }
  62% {
    opacity: 1;
    transform: scale(1.12) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes promotion-old-out {
  0% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
  100% {
    opacity: 0.18;
    transform: translateX(-35px) scale(0.86);
    filter: blur(2px);
  }
}

@keyframes promotion-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes promotion-orbit {
  to {
    transform: translate(-50%, -50%) rotate(347deg) scaleY(0.58);
  }
}

@keyframes promotion-flare {
  0%,
  100% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scaleX(0.35);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scaleX(1);
  }
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-promotion-layer {
    padding: 10px;
  }

  .rank-promotion-stage {
    width: min(760px, 96vw);
    min-height: min(340px, 92vh);
    padding: 15px 24px 12px;
  }

  .rank-promotion-stage > header h2 {
    font-size: 30px;
  }

  .rank-promotion-route {
    grid-template-columns: minmax(130px, 1fr) 155px minmax(130px, 1fr);
    gap: 12px;
    margin-block: 3px;
  }

  .rank-promotion-medal {
    width: 142px;
    height: 150px;
  }

  .rank-promotion-medal > i {
    width: 105px;
    height: 125px;
  }

  .rank-promotion-medal > b {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .orbit-one {
    width: 164px;
    height: 164px;
  }

  .orbit-two {
    width: 190px;
    height: 190px;
  }

  .medal-flare {
    width: 230px;
  }

  .rank-promotion-title h3 {
    font-size: 23px;
  }

  .rank-promotion-title p {
    font-size: 7px;
  }

  .rank-promotion-stage > button {
    min-width: 150px;
    height: 34px;
    margin-top: 8px;
  }
}

/* Per-match ranked points and small-division settlement. */
.rank-settlement-layer {
  position: fixed;
  z-index: 275;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--settlement-accent) 12%, transparent), transparent 30%),
    rgba(1, 6, 9, 0.66);
  backdrop-filter: blur(8px);
}

.rank-settlement-card {
  position: relative;
  width: min(510px, 94vw);
  padding: 22px 24px 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--settlement-accent) 30%, transparent);
  border-top: 2px solid var(--settlement-accent);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--settlement-accent) 9%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(8, 23, 30, 0.98), rgba(3, 9, 13, 0.99));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.64),
    inset 0 0 45px color-mix(in srgb, var(--settlement-accent) 3%, transparent);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  animation: rank-settlement-in 0.28s ease-out;
}

.rank-settlement-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 22%;
  width: 100px;
  height: 2px;
  background: var(--settlement-accent);
  box-shadow: 0 0 18px var(--settlement-accent);
}

.rank-settlement-card > button {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
}

.rank-settlement-card > small {
  color: var(--settlement-accent);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.rank-settlement-rank {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 10px 0 12px;
}

.rank-settlement-medal {
  position: relative;
  display: grid;
  width: 64px;
  height: 72px;
  place-items: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--settlement-accent) 82%, #ffffff), color-mix(in srgb, var(--settlement-accent) 48%, #111));
  color: #141c21;
  clip-path: polygon(50% 0, 88% 13%, 100% 43%, 82% 79%, 50% 100%, 18% 79%, 0 43%, 12% 13%);
  filter: drop-shadow(0 8px 13px rgba(0, 0, 0, 0.46));
}

.rank-settlement-medal > i {
  position: absolute;
  width: 31px;
  height: 31px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: color-mix(in srgb, var(--settlement-accent) 30%, #fff8d6);
}

.rank-settlement-medal > b {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.rank-settlement-rank > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.rank-settlement-rank > div small {
  color: rgba(157, 181, 187, 0.52);
  font-size: 7px;
}

.rank-settlement-rank h2 {
  overflow: hidden;
  margin: 0;
  color: rgba(247, 250, 246, 0.96);
  font-size: 24px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-settlement-rank > strong {
  color: #ff7188;
  font-size: 35px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(255, 70, 102, 0.2);
}

.rank-settlement-rank > strong.positive {
  color: var(--acid);
  text-shadow: 0 0 18px rgba(217, 255, 67, 0.22);
}

.rank-settlement-score {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.022);
}

.rank-settlement-score span {
  color: rgba(157, 181, 187, 0.52);
  font-size: 8px;
}

.rank-settlement-score b {
  color: var(--settlement-accent);
  font-size: 24px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
}

.rank-settlement-progress {
  margin-top: 11px;
}

.rank-settlement-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: rgba(159, 184, 190, 0.54);
  font-size: 7px;
}

.rank-settlement-progress > div:first-child b {
  color: rgba(218, 232, 233, 0.72);
  font-variant-numeric: tabular-nums;
}

.rank-settlement-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--settlement-accent) 24%, transparent);
  background: rgba(1, 7, 10, 0.76);
}

.rank-settlement-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--settlement-accent), var(--acid));
  box-shadow: 0 0 13px color-mix(in srgb, var(--settlement-accent) 55%, transparent);
}

.rank-settlement-layer.negative .rank-settlement-track > i {
  background: linear-gradient(90deg, #ff9b62, #ff4869);
  box-shadow: 0 0 13px rgba(255, 72, 105, 0.38);
}

.rank-settlement-card > p {
  margin: 10px 0 0;
  color: rgba(177, 198, 203, 0.55);
  font-size: 8px;
  text-align: right;
}

.rank-settlement-enter-active,
.rank-settlement-leave-active {
  transition: opacity 0.22s ease;
}

.rank-settlement-enter-from,
.rank-settlement-leave-to {
  opacity: 0;
}

@keyframes rank-settlement-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-settlement-layer {
    padding: 8px;
  }

  .rank-settlement-card {
    width: min(540px, 88vw);
    padding: 12px 17px 11px;
  }

  .rank-settlement-rank {
    grid-template-columns: 49px minmax(0, 1fr) auto;
    gap: 10px;
    margin-block: 5px 7px;
  }

  .rank-settlement-medal {
    width: 46px;
    height: 52px;
  }

  .rank-settlement-medal > i {
    width: 23px;
    height: 23px;
  }

  .rank-settlement-medal > b {
    font-size: 10px;
  }

  .rank-settlement-rank h2 {
    font-size: 18px;
  }

  .rank-settlement-rank > strong {
    font-size: 27px;
  }

  .rank-settlement-score {
    padding-block: 5px;
  }

  .rank-settlement-score b {
    font-size: 19px;
  }

  .rank-settlement-progress {
    margin-top: 7px;
  }

  .rank-settlement-card > p {
    margin-top: 6px;
  }
}

/* Star-rank summary and next-tier disclosure. */
.rank-emblem-meta {
  position: relative;
}

.rank-star-overview {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
}

.rank-star-overview-icon {
  display: grid;
  width: 30px;
  height: 34px;
  place-items: center;
  background: linear-gradient(145deg, #fff0a4, #c98712);
  color: #4b2d00;
  clip-path: polygon(50% 0, 91% 14%, 100% 56%, 73% 86%, 50% 100%, 27% 86%, 0 56%, 9% 14%);
  filter: drop-shadow(0 0 9px rgba(255, 217, 90, 0.32));
}

.rank-star-overview-icon.sovereign {
  background: linear-gradient(145deg, #ffd1ef, #c52a82);
  color: #50002d;
  filter: drop-shadow(0 0 9px rgba(255, 79, 168, 0.38));
}

.rank-star-overview-icon svg {
  width: 17px;
  height: 17px;
  fill: rgba(255, 255, 255, 0.72);
  stroke: currentColor;
  stroke-width: 1.3;
}

.rank-star-overview > b {
  color: #ffe58b;
  font-size: 18px;
  font-style: italic;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.rank-star-overview > small {
  color: rgba(199, 216, 219, 0.62);
  font-size: 8px;
}

.rank-next-tier-toggle {
  display: grid;
  width: 25px;
  height: 25px;
  margin-left: 2px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 222, 105, 0.3);
  background: rgba(255, 222, 105, 0.06);
  color: #ffe58b;
  cursor: pointer;
}

.rank-next-tier-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.rank-next-tier-toggle.open svg {
  transform: rotate(90deg);
}

.rank-next-tier-panel {
  position: absolute;
  z-index: 15;
  top: calc(100% + 7px);
  left: 50%;
  width: min(250px, 82vw);
  padding: 11px 12px;
  border: 1px solid rgba(255, 223, 112, 0.38);
  border-top: 2px solid #ffe37b;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 218, 84, 0.12), transparent 38%),
    rgba(3, 11, 16, 0.98);
  box-shadow: 0 15px 42px rgba(0, 0, 0, 0.56);
  transform: translateX(-50%);
}

.rank-next-tier-panel > small {
  display: block;
  color: rgba(167, 188, 193, 0.5);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.rank-next-tier-panel > b {
  display: block;
  margin: 3px 0 9px;
  color: #ffe58b;
  font-size: 16px;
  font-style: italic;
}

.rank-next-tier-panel > p {
  margin: 7px 0 0;
  color: rgba(211, 225, 227, 0.68);
  font-size: 8px;
}

.rank-next-star-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: rgba(174, 195, 200, 0.6);
  font-size: 7px;
}

.rank-next-star-progress b {
  color: #ffe58b;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.rank-next-star-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.rank-next-star-track > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffad25, #ffe37b);
  box-shadow: 0 0 10px rgba(255, 218, 86, 0.45);
  transition: width 0.3s ease;
}

.rank-next-panel-enter-active,
.rank-next-panel-leave-active {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.rank-next-panel-enter-from,
.rank-next-panel-leave-to {
  opacity: 0;
  transform: translateX(-50%) translateY(-5px);
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-star-overview {
    gap: 4px;
    margin-top: 3px;
  }

  .rank-star-overview-icon {
    width: 24px;
    height: 27px;
  }

  .rank-star-overview-icon svg {
    width: 14px;
    height: 14px;
  }

  .rank-star-overview > b {
    font-size: 15px;
  }

  .rank-next-tier-toggle {
    width: 22px;
    height: 22px;
  }

  .rank-next-tier-panel {
    width: 210px;
    padding: 8px 9px;
  }
}

.rank-tier-preview-switch {
  position: fixed;
  z-index: 140;
  top: 9px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 224, 109, 0.28);
  background: rgba(3, 10, 14, 0.9);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.competitive-hub.rank-preview-mode {
  z-index: 95;
}

.rank-tier-preview-switch > span {
  margin-right: 4px;
  color: rgba(187, 205, 209, 0.5);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.rank-tier-preview-switch > button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(204, 219, 222, 0.62);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

.rank-tier-preview-switch > button.active {
  border-color: rgba(255, 224, 109, 0.58);
  background: rgba(255, 224, 109, 0.1);
  color: #ffe58b;
}

@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .rank-tier-preview-switch {
    top: 62px;
  }

  .rank-tier-preview-switch > span {
    display: none;
  }

  .rank-tier-preview-switch > button {
    height: 25px;
    font-size: 7px;
  }
}

/* Keep the mobile friend finder visually aligned with the desktop page. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.friends-mode .player-hub-content {
    padding: 10px 12px 12px;
  }

  .player-hub-screen.friends-mode
    .friends-panel:not(.friends-room-panel)
    > .friend-search-corner {
    position: absolute !important;
    z-index: 5;
    top: 0;
    left: 0;
    width: min(360px, 100%);
    margin: 0;
  }

  .friends-panel:not(.friends-room-panel) .friend-search-area {
    width: 100%;
    margin: 0;
  }

  .friends-panel:not(.friends-room-panel)
    .friend-search-area
    .friend-add-row {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 6px;
  }

  .friends-panel:not(.friends-room-panel)
    .friend-search-area
    .friend-add-row
    input,
  .friends-panel:not(.friends-room-panel)
    .friend-search-area
    .friend-add-row
    button {
    width: 100%;
    height: 36px;
  }

  .friends-panel:not(.friends-room-panel) .friends-content {
    padding-top: 58px;
  }

  .friends-panel:not(.friends-room-panel)
    .friends-content.has-empty-state {
    padding: 0 !important;
  }

  .friends-panel:not(.friends-room-panel)
    .friends-content.has-empty-state
    .friend-empty-state {
    width: min(260px, 100%);
  }
}

/* Keep every profile submenu item visible on short mobile landscape screens. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-menu {
    gap: 0;
    padding: 4px 7px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .player-hub-menu > button,
  .player-hub-submenu-title {
    min-height: clamp(26px, 7.4vh, 30px);
    padding-inline: 7px;
    font-size: clamp(9px, 1.35vw, 11px);
    line-height: 1.1;
  }

  .player-hub-submenu {
    margin-top: 0;
  }

  .player-hub-submenu-title {
    min-height: clamp(25px, 6.8vh, 28px);
  }

  .player-hub-submenu-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 4px;
  }

  .player-hub-submenu-list button {
    min-height: clamp(19px, 5.3vh, 21px);
    padding-inline: 6px;
    font-size: clamp(7.5px, 1vw, 8.5px);
    line-height: 1.1;
  }
}

/* Dedicated touch-scrolling surfaces for mobile history and leaderboards. */
@media (max-width: 900px) and (orientation: landscape),
  (pointer: coarse) and (max-width: 1100px) and (orientation: landscape) {
  .player-hub-screen.history-view-mode > .player-hub-content,
  .player-hub-screen.leaderboard-mode > .player-hub-content {
    position: fixed !important;
    z-index: 7;
    inset: 58px 0 0 154px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 9px 12px 12px !important;
    overflow: hidden !important;
  }

  .personal-history-page,
  .leaderboard-page {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    overscroll-behavior-y: contain;
    scrollbar-color: rgba(85, 222, 241, 0.38) rgba(255, 255, 255, 0.035);
    scrollbar-width: thin;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .personal-history-page {
    padding: 0 7px 14px 0 !important;
  }

  .leaderboard-page {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 5px 14px 0;
  }

  .leaderboard-page-header,
  .my-leaderboard-rank {
    flex: 0 0 auto;
  }

  .leaderboard-board {
    min-height: auto;
    flex: 0 0 auto;
    overflow: visible;
  }

  .global-leaderboard-list {
    min-height: auto;
    flex: 0 0 auto;
    overflow: visible !important;
    touch-action: pan-y;
  }

  .personal-history-page::-webkit-scrollbar,
  .leaderboard-page::-webkit-scrollbar {
    display: block;
    width: 5px;
  }

  .personal-history-page::-webkit-scrollbar-thumb,
  .leaderboard-page::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(85, 222, 241, 0.38);
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
  .player-hub-screen.history-view-mode > .player-hub-content,
  .player-hub-screen.leaderboard-mode > .player-hub-content {
    inset: 54px 0 0 154px !important;
  }
}

