:root {
  --bg: #090b10;
  --panel: #151922;
  --panel-2: #202432;
  --text: #f6ead0;
  --muted: #b6a98e;
  --gold: #f5b83b;
  --ember: #f46f2e;
  --teal: #37f0d2;
  --danger: #de3754;
  --app-max-width: 430px;
  --app-max-height: 820px;
  --app-aspect: 0.524;
  --telegram-chrome-clearance: 14px;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  height: 100%;
}

html.telegram-shell {
  --telegram-chrome-clearance: clamp(64px, 9vh, 86px);
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 18%, rgba(55, 240, 210, 0.17), transparent 27rem),
    radial-gradient(circle at 50% 92%, rgba(244, 111, 46, 0.2), transparent 23rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.52), transparent 34%, transparent 66%, rgba(0, 0, 0, 0.52)),
    var(--bg);
  overflow: hidden;
  touch-action: manipulation;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  height: var(--tg-viewport-height, 100dvh);
  min-height: 0;
  display: grid;
  place-items: center;
  padding: max(env(safe-area-inset-top), 8px) 8px max(env(safe-area-inset-bottom), 8px);
}

.phone-frame {
  position: relative;
  width: min(
    calc(100vw - 14px),
    var(--app-max-width),
    calc((var(--tg-viewport-height, 100dvh) - 16px) * var(--app-aspect))
  );
  height: min(
    calc(var(--tg-viewport-height, 100dvh) - 16px),
    var(--app-max-height),
    calc((100vw - 14px) / var(--app-aspect))
  );
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(246, 234, 208, 0.22);
  border-radius: 24px;
  background: #090b10;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.52),
    0 0 0 6px rgba(7, 16, 18, 0.6),
    inset 0 0 0 8px rgba(255, 255, 255, 0.025),
    inset 0 -34px 80px rgba(244, 111, 46, 0.08);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  min-height: 100%;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(rgba(9, 11, 16, 0.08), rgba(9, 11, 16, 0.88)),
    radial-gradient(circle at 50% 35%, rgba(55, 240, 210, 0.2), transparent 10rem),
    radial-gradient(circle at 50% 100%, rgba(244, 111, 46, 0.18), transparent 12rem),
    linear-gradient(150deg, #101621, #100d14 58%, #23120c);
}

.screen.active {
  display: flex;
  flex-direction: column;
}

.web-closed-screen {
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.web-closed-screen .top-bar {
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
}

.hero-mark.compact {
  min-height: 210px;
}

.web-closed-screen .title-block {
  margin-top: 0;
}

.access-screen,
.select-screen,
.leaderboard-screen,
.items-screen,
.over-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  scrollbar-width: none;
}

.access-screen::-webkit-scrollbar,
.select-screen::-webkit-scrollbar,
.leaderboard-screen::-webkit-scrollbar,
.items-screen::-webkit-scrollbar,
.over-screen::-webkit-scrollbar {
  display: none;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(90deg, transparent 47%, rgba(245, 184, 59, 0.2) 48%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.042) 1px, transparent 1px),
    radial-gradient(circle at 20% 20%, rgba(246, 234, 208, 0.045) 0 1px, transparent 1.5px);
  background-size: 90px 100%, 100% 34px, 34px 34px;
  pointer-events: none;
}

.start-screen::after,
.web-closed-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background: url("./assets/orc-home-reference.png?v=20260601-art6") center / cover no-repeat;
  filter: saturate(1.08) contrast(1.06);
  pointer-events: none;
}

.start-screen::after {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(2, 5, 8, 0.08) 0%, rgba(2, 5, 8, 0.08) 38%, rgba(2, 5, 8, 0.42) 66%, rgba(2, 5, 8, 0.84) 100%),
    url("./assets/home-screen-bg.png?v=20260601-art15") center / cover no-repeat;
  filter: saturate(1.06) contrast(1.04);
}

.start-screen::before {
  opacity: 0.14;
}

.start-screen > *,
.web-closed-screen > * {
  position: relative;
  z-index: 2;
}

.portal-glow {
  position: absolute;
  z-index: 1;
  width: 252px;
  height: 252px;
  left: 50%;
  top: 130px;
  translate: -50% 0;
  border: 12px solid rgba(55, 240, 210, 0.3);
  border-radius: 50%;
  box-shadow:
    0 0 38px rgba(55, 240, 210, 0.38),
    0 0 0 1px rgba(245, 184, 59, 0.13),
    inset 0 0 34px rgba(55, 240, 210, 0.22);
}

.portal-glow::before,
.portal-glow::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  border: 1px dashed rgba(245, 184, 59, 0.18);
}

.portal-glow::after {
  inset: -24px;
  border-color: rgba(55, 240, 210, 0.08);
}

.start-screen .portal-glow {
  display: none;
}

.top-bar,
.select-header,
.hud {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  padding: 8px 12px;
  border: 1px solid rgba(246, 234, 208, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 55%),
    rgba(9, 11, 16, 0.5);
  color: #d3c39b;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22), 0 8px 18px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.telegram-expand-button {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 20;
  display: none;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #37f0d2, #f7c95a);
  color: #10131b;
  box-shadow: 0 12px 30px rgba(55, 240, 210, 0.22);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.telegram-expand-button.visible {
  display: inline-grid;
  place-items: center;
}

.hero-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 190px;
}

.hero-orc {
  --skin: #c39237;
  --aura: rgba(245, 184, 59, 0.34);
  position: relative;
  width: 146px;
  height: 184px;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.5));
}

.start-screen .hero-orc {
  width: min(238px, 62vw);
  height: auto;
  aspect-ratio: 220 / 153;
  margin: -2px 0 -6px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(8, 10, 15, 0.08), rgba(8, 10, 15, 0.28)),
    url("./assets/orc-player-reference.png?v=20260601-art6") center / cover no-repeat;
  box-shadow:
    0 0 42px rgba(55, 240, 210, 0.18),
    0 24px 34px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.start-screen .hero-mark {
  flex: 1;
  min-height: 260px;
  visibility: hidden;
  pointer-events: none;
}

.start-screen .hero-orc > * {
  display: none;
}

.start-screen .hero-orc::before,
.start-screen .hero-orc::after {
  display: none;
}

.hero-orc .orc-aura {
  position: absolute;
  inset: 4px 0 auto;
  height: 150px;
  border-radius: 48%;
  background:
    radial-gradient(circle, var(--aura), transparent 64%),
    radial-gradient(circle at 50% 72%, rgba(55, 240, 210, 0.2), transparent 54%);
  transform: scale(1.38);
}

.orc-head {
  position: absolute;
  z-index: 2;
  left: 26px;
  top: 6px;
  width: 94px;
  height: 84px;
  border-radius: 34% 34% 42% 42%;
  background:
    linear-gradient(#fff4 0 16%, transparent 16%),
    radial-gradient(circle at 50% 85%, rgba(0, 0, 0, 0.18), transparent 36%),
    var(--skin);
  box-shadow:
    inset 0 -13px 0 rgba(0, 0, 0, 0.18),
    0 0 26px color-mix(in srgb, var(--skin) 34%, transparent);
}

.orc-head::before,
.orc-head::after {
  content: "";
  position: absolute;
  top: 27px;
  width: 38px;
  height: 24px;
  background: var(--skin);
  clip-path: polygon(0 50%, 100% 0, 84% 100%);
}

.orc-head::before {
  left: -26px;
}

.orc-head::after {
  right: -26px;
  scale: -1 1;
}

.orc-body {
  position: absolute;
  z-index: 1;
  left: 14px;
  bottom: 4px;
  width: 118px;
  height: 112px;
  border-radius: 34px 34px 18px 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(245, 184, 59, 0.55) 0 14px, transparent 15px),
    linear-gradient(115deg, rgba(245, 184, 59, 0.18), transparent 28%),
    linear-gradient(90deg, #202634, #3b4151);
  border: 2px solid rgba(246, 234, 208, 0.2);
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, 0.15);
}

.orc-body::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 46px;
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 184, 59, 0.42);
  rotate: 28deg;
}

.hero-orc::before,
.hero-orc::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 58px;
  top: 40px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--eye, #11151c);
  box-shadow:
    28px 0 var(--eye, #11151c),
    0 0 10px color-mix(in srgb, var(--eye, #11151c) 34%, transparent),
    28px 0 10px color-mix(in srgb, var(--eye, #11151c) 34%, transparent);
}

.hero-orc::after {
  left: 62px;
  top: 65px;
  width: 24px;
  height: 10px;
  border-radius: 0 0 12px 12px;
  background: #171018;
  box-shadow: none;
}

.hero-orc.golden::after,
.selected-orc .hero-orc::after {
  box-shadow: -8px -1px 0 -4px #f6ead0, 8px -1px 0 -4px #f6ead0;
}

.title-block {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 18px;
}

.start-screen .title-block {
  width: 100%;
  margin: 0 auto 14px;
  padding: 10px 10px 9px;
  isolation: isolate;
}

.start-screen .title-block::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: min(330px, 88%);
  height: 4px;
  translate: -50% 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(55, 240, 210, 0.7), rgba(247, 201, 90, 0.78), transparent);
  box-shadow:
    0 0 20px rgba(55, 240, 210, 0.36),
    0 0 18px rgba(247, 201, 90, 0.2);
}

.start-screen .title-block::after {
  content: "";
  position: absolute;
  inset: 0 2px 0;
  z-index: 0;
  border: 1px solid rgba(246, 234, 208, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(55, 240, 210, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(8, 10, 13, 0.76), rgba(9, 7, 9, 0.58) 48%, rgba(8, 5, 5, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(247, 201, 90, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(2px);
}

.start-screen .title-block > * {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.92;
  color: var(--cream);
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.42),
    0 0 26px rgba(245, 184, 59, 0.18),
    0 1px 0 rgba(247, 201, 90, 0.32);
}

h1 {
  font-size: clamp(42px, 12.8vw, 56px);
}

h2 {
  font-size: 30px;
}

.start-screen h1 {
  white-space: nowrap;
  font-size: clamp(31px, 8.4vw, 40px);
  color: transparent;
  background:
    linear-gradient(180deg, #fff8df 0 30%, #f7c95a 31% 55%, #e9792f 56% 78%, #37f0d2 79% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1px rgba(22, 12, 5, 0.76);
  text-shadow:
    0 2px 0 rgba(111, 55, 19, 0.75),
    0 5px 0 rgba(0, 0, 0, 0.62),
    0 12px 24px rgba(0, 0, 0, 0.58),
    0 0 22px rgba(55, 240, 210, 0.18);
}

.subtitle {
  width: min(310px, 100%);
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.34;
}

.start-screen .subtitle {
  width: max-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(246, 234, 208, 0.14);
  border-radius: 999px;
  background: rgba(4, 7, 10, 0.52);
  color: #f1dfb8;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.primary-button,
.secondary-button {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}

.primary-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(135deg, #f7c95a, #f07832);
  color: #221006;
  border: 1px solid rgba(255, 235, 170, 0.36);
  box-shadow:
    0 12px 24px rgba(244, 111, 46, 0.26),
    inset 0 -4px 0 rgba(119, 53, 24, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.primary-button:disabled {
  cursor: not-allowed;
  color: rgba(246, 234, 208, 0.52);
  background: rgba(246, 234, 208, 0.1);
  box-shadow: none;
}

.secondary-button {
  margin-top: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(246, 234, 208, 0.08);
  border: 1px solid rgba(246, 234, 208, 0.22);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.identity-check-button {
  min-height: 28px;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.identity-status {
  display: block;
  min-height: 28px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}

.telegram-login-panel {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 10px;
  border: 1px solid rgba(55, 240, 210, 0.24);
  border-radius: 14px;
  background: rgba(55, 240, 210, 0.06);
}

.telegram-login-panel[hidden] {
  display: none;
}

.telegram-login-panel > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.telegram-login-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.telegram-login-ready strong {
  min-width: 0;
  overflow: hidden;
  color: var(--cream);
  text-overflow: ellipsis;
}

.telegram-login-ready button {
  border: 1px solid rgba(247, 201, 90, 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  font-weight: 900;
}

.start-login-panel {
  position: relative;
  z-index: 2;
  display: grid;
  width: 184px;
  height: 38px;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  place-items: center start;
}

.start-login-panel > span {
  display: none;
}

.start-login-panel #telegramLoginWidget {
  display: grid;
  width: 184px;
  min-height: 38px;
  overflow: hidden;
  place-items: center start;
}

.start-login-panel iframe {
  opacity: 0.9;
  filter: saturate(0.82) brightness(0.94);
  transform-origin: left center;
  transform: scale(0.94);
}

.start-login-panel .telegram-login-ready {
  height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(246, 234, 208, 0.15);
  border-radius: 999px;
  background: rgba(9, 11, 16, 0.42);
}

.start-login-panel .telegram-login-ready strong {
  max-width: 86px;
  color: var(--cream);
  font-size: 11px;
  font-weight: 900;
}

.start-login-panel .telegram-login-ready button {
  min-height: 24px;
  padding: 0 8px;
  border-color: rgba(55, 240, 210, 0.28);
  background: rgba(55, 240, 210, 0.12);
  color: var(--teal);
  font-size: 9px;
  line-height: 1;
}

.icon-button,
.nav-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 50%),
    rgba(246, 234, 208, 0.09);
  border: 1px solid rgba(246, 234, 208, 0.2);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
  font-size: 34px;
  line-height: 1;
}

.select-screen {
  gap: 10px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.select-screen #startGame {
  flex: 0 0 auto;
  min-height: 48px;
  margin-top: -2px;
  box-shadow: 0 12px 28px rgba(244, 111, 46, 0.3);
}

.wallet-strip {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 52%),
    rgba(9, 11, 16, 0.56);
  border: 1px solid rgba(246, 234, 208, 0.18);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 8px 18px rgba(0, 0, 0, 0.16);
}

.wallet-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.wallet-strip strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.wallet-strip button {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 38px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 46%),
    linear-gradient(135deg, #37f0d2, #f7c95a);
  color: #10131b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 950;
}

.wallet-strip button:disabled {
  color: #10131b;
  opacity: 0.68;
}

.wallet-strip.connected {
  border-color: rgba(55, 240, 210, 0.28);
}

.play-window-status {
  position: relative;
  z-index: 2;
  display: block;
  margin: -4px 4px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.bonus-window-button {
  position: relative;
  z-index: 2;
  display: none;
  width: 100%;
  min-height: 42px;
  margin: 0 0 10px;
  border: 1px solid rgba(55, 240, 210, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(55, 240, 210, 0.18), rgba(55, 240, 210, 0.08)),
    rgba(9, 11, 16, 0.55);
  color: var(--accent);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.bonus-window-button.visible {
  display: block;
}

.access-screen {
  gap: 9px;
}

.access-card {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(246, 234, 208, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(55, 240, 210, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(32, 36, 50, 0.86), rgba(11, 13, 19, 0.76));
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 24px rgba(0, 0, 0, 0.22);
  overflow: visible;
}

.access-orb {
  position: absolute;
  right: -28px;
  top: -28px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 10px solid rgba(55, 240, 210, 0.2);
  box-shadow: 0 0 36px rgba(55, 240, 210, 0.22);
}

.access-card h3 {
  position: relative;
  margin: 0;
  font-size: 26px;
  line-height: 1;
}

.access-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
}

.access-card small {
  position: relative;
  color: var(--muted);
  font-size: 11px;
}

.access-wallet {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding: 9px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 48%),
    rgba(9, 11, 16, 0.54);
  border: 1px solid rgba(246, 234, 208, 0.16);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.access-wallet span,
.access-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.access-wallet strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
}

.access-wallet .primary-button {
  width: auto;
  min-width: 138px;
  min-height: 40px;
  padding: 0 12px;
  font-size: 12px;
}

.access-summary {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(55, 240, 210, 0.14), rgba(55, 240, 210, 0.055)),
    rgba(9, 11, 16, 0.48);
  border: 1px solid rgba(55, 240, 210, 0.28);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.24);
}

.access-summary strong {
  color: var(--teal);
  font-size: 24px;
  line-height: 1;
}

.unlocked-teams {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 12px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 60%),
    rgba(9, 11, 16, 0.44);
  border: 1px solid rgba(246, 234, 208, 0.14);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.access-list {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: grid;
  gap: 6px;
  min-height: 0;
  max-height: 148px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.access-list::-webkit-scrollbar {
  display: none;
}

.collection-link {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 10px;
  border: 0;
  color: #10131b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 50%),
    linear-gradient(135deg, #37f0d2, #f7c95a);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  box-shadow:
    0 10px 20px rgba(55, 240, 210, 0.16),
    inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}

.collection-link.compact {
  min-height: 46px;
  background: linear-gradient(135deg, #f7c95a, #f07832);
  border: 1px solid rgba(245, 184, 59, 0.46);
  color: #211006;
  box-shadow: 0 10px 22px rgba(244, 111, 46, 0.22);
}

.leaderboard-screen {
  gap: 14px;
}

.items-screen {
  gap: 14px;
}

.leaderboard-tabs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.leaderboard-tabs button {
  min-height: 42px;
  border-radius: 14px;
  background: rgba(246, 234, 208, 0.08);
  border: 1px solid rgba(246, 234, 208, 0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.leaderboard-tabs button.active {
  background: linear-gradient(135deg, #37f0d2, #f7c95a);
  border-color: transparent;
  color: #10131b;
}

.leaderboard-mode-tabs button {
  min-height: 38px;
}

.leaderboard-race-filter {
  position: relative;
  z-index: 2;
  display: none;
  gap: 6px;
  min-height: 42px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.leaderboard-race-filter::-webkit-scrollbar {
  display: none;
}

.leaderboard-race-filter button {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(246, 234, 208, 0.08);
  border: 1px solid rgba(246, 234, 208, 0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.leaderboard-race-filter button.active {
  background: rgba(55, 240, 210, 0.18);
  border-color: rgba(55, 240, 210, 0.42);
  color: var(--paper);
}

.leaderboard-race-filter button:only-child {
  min-width: 128px;
  pointer-events: none;
}

.leaderboard-player {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(55, 240, 210, 0.1);
  border: 1px solid rgba(55, 240, 210, 0.26);
}

.leaderboard-player span,
.leaderboard-player small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-player strong {
  grid-row: span 2;
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
}

.leaderboard-note {
  position: relative;
  z-index: 2;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(9, 11, 16, 0.42);
  border: 1px solid rgba(246, 234, 208, 0.1);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.leaderboard-note[hidden] {
  display: none;
}

.leaderboard-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.leaderboard-list::-webkit-scrollbar {
  display: none;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(9, 11, 16, 0.48);
  border: 1px solid rgba(246, 234, 208, 0.12);
}

.leaderboard-row.player-run {
  background: rgba(55, 240, 210, 0.12);
  border-color: rgba(55, 240, 210, 0.34);
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #10131b;
  background: var(--gold);
  font-size: 13px;
  font-weight: 950;
}

.leaderboard-row strong,
.leaderboard-row b {
  display: block;
}

.leaderboard-row span,
.leaderboard-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.leaderboard-row em {
  color: var(--rarity-color);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.leaderboard-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}

.leaderboard-source {
  display: inline-grid;
  min-height: 18px;
  padding: 2px 7px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(246, 234, 208, 0.18);
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.leaderboard-source.verified {
  border-color: rgba(55, 240, 210, 0.35);
  color: #37f0d2;
}

.leaderboard-source.local {
  border-color: rgba(247, 201, 90, 0.34);
  color: var(--gold);
}

.items-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.items-list::-webkit-scrollbar {
  display: none;
}

.items-group {
  display: grid;
  gap: 10px;
}

.items-group h3 {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.item-tile {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-height: 132px;
  padding: 12px 7px 10px;
  border: 1px solid rgba(246, 234, 208, 0.13);
  border-radius: 14px;
  background: rgba(246, 234, 208, 0.07);
  text-align: center;
}

.item-tile.good {
  border-color: rgba(55, 240, 210, 0.24);
}

.item-tile.bad {
  border-color: rgba(255, 75, 116, 0.28);
}

.item-tile.special {
  border-color: rgba(245, 184, 59, 0.32);
}

.item-tile img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.item-tile strong {
  max-width: 100%;
  color: var(--paper);
  font-size: 11px;
  line-height: 1.05;
}

.item-tile span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.access-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(9, 11, 16, 0.42);
  border: 1px solid rgba(246, 234, 208, 0.1);
  color: inherit;
  text-align: left;
}

button.access-row {
  cursor: pointer;
}

.access-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--race-color);
  box-shadow: 0 0 16px var(--race-color);
}

.access-row strong {
  display: block;
  font-size: 12px;
}

.access-row span,
.access-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.access-row.unlocked {
  border-color: rgba(55, 240, 210, 0.28);
  background: rgba(55, 240, 210, 0.08);
}

.access-row.unlocked:active {
  transform: translateY(1px);
}

.access-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(246, 234, 208, 0.08);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.access-rarity {
  display: inline-block;
  margin-top: 2px;
  color: var(--rarity-color);
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.access-row.unlocked .access-badge {
  color: #10131b;
  background: var(--teal);
}

.race-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  min-height: 268px;
  padding: 12px;
  border: 1px solid rgba(246, 234, 208, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(circle at 50% 20%, rgba(55, 240, 210, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(32, 36, 50, 0.86), rgba(11, 13, 19, 0.78));
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 28px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.race-card::before {
  content: "";
  position: absolute;
  inset: 12px 18px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 184, 59, 0.35), transparent);
  opacity: 0.8;
}

.race-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42px;
  width: 190px;
  height: 190px;
  translate: -50% 0;
  border: 10px solid rgba(55, 240, 210, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(55, 240, 210, 0.16);
}

.selected-orc {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 112px auto auto minmax(34px, auto);
  justify-items: center;
  align-items: center;
  gap: 6px;
}

.selected-orc .hero-orc {
  scale: 0.62;
  margin: -34px 0 -46px;
}

.race-name {
  font-size: 29px;
  font-weight: 950;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.4),
    0 0 18px color-mix(in srgb, var(--race-color, #f7c95a) 24%, transparent);
}

.rarity-badge {
  min-width: 94px;
  padding: 6px 10px;
  border-radius: 10px;
  color: #10131b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 46%),
    var(--rarity-color, var(--gold));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.race-trait {
  min-height: 34px;
  max-width: 200px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 58%),
    rgba(9, 11, 16, 0.5);
  border: 1px solid rgba(246, 234, 208, 0.14);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
}

.team-status {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 60%),
    rgba(9, 11, 16, 0.52);
  border: 1px solid rgba(246, 234, 208, 0.16);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}

.team-status span,
.team-status small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.team-status strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
}

.team-status.locked {
  border-color: rgba(222, 55, 84, 0.28);
}

.team-status.unlocked {
  border-color: rgba(55, 240, 210, 0.28);
}

.stats-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 55%),
    rgba(9, 11, 16, 0.52);
  border: 1px solid rgba(246, 234, 208, 0.16);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22);
}

.stat-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 234, 208, 0.12);
}

.bar i {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

.race-grid {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  min-height: 72px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 5px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.race-grid::-webkit-scrollbar {
  display: none;
}

.access-race-grid {
  flex: 0 0 auto;
  min-height: 78px;
  padding: 3px 2px 6px;
}

.race-token {
  position: relative;
  display: grid;
  grid-template-rows: 34px 13px 13px;
  place-items: center;
  flex: 0 0 70px;
  min-width: 0;
  min-height: 68px;
  padding: 6px 5px 5px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 56%),
    rgba(9, 11, 16, 0.54);
  border: 1px solid rgba(222, 55, 84, 0.58);
  color: var(--muted);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(246, 234, 208, 0.04);
  scroll-snap-align: start;
}

.access-race-grid .race-token {
  flex-basis: 74px;
  min-height: 72px;
}

.race-token-orc {
  position: relative;
  width: 42px;
  height: 30px;
  border-radius: 17px 17px 13px 13px;
  background: var(--skin);
  box-shadow: 0 0 16px color-mix(in srgb, var(--skin) 54%, transparent);
}

.race-token-orc::before,
.race-token-orc::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 16px;
  height: 10px;
  background: var(--skin);
}

.race-token-orc::before {
  left: -11px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.race-token-orc::after {
  right: -11px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.race-token strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--cream);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.race-token small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.race-token.unlocked,
.race-token.neutral {
  border-color: rgba(72, 223, 139, 0.78);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(72, 223, 139, 0.12),
    0 0 16px rgba(72, 223, 139, 0.12);
}

.race-token.active {
  border-color: var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 52%),
    rgba(245, 184, 59, 0.16);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(245, 184, 59, 0.22),
    0 0 18px rgba(245, 184, 59, 0.18);
}

.race-token.active small {
  color: var(--cream);
}

.game-screen {
  position: relative;
  grid-template-rows: 60px minmax(0, 1fr);
  gap: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(55, 240, 210, 0.12), transparent 18rem),
    radial-gradient(circle at 50% 102%, rgba(244, 111, 46, 0.16), transparent 12rem),
    #090b10;
  touch-action: none;
}

.game-screen.active {
  display: grid;
}

.hud {
  height: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hud div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(44, 44, 48, 0.92), rgba(17, 17, 22, 0.92));
  border: 1px solid rgba(246, 234, 208, 0.17);
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.hud span {
  color: #d3c39b;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.hud strong {
  margin-top: 2px;
  font-size: 20px;
  color: var(--cream);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), 0 0 12px rgba(245, 184, 59, 0.16);
}

.hud .speed-up {
  animation: speedPulse 0.55s ease-out;
}

@keyframes speedPulse {
  0% {
    background: rgba(245, 184, 59, 0.42);
    box-shadow: 0 0 0 0 rgba(245, 184, 59, 0.34);
  }

  100% {
    background: rgba(246, 234, 208, 0.08);
    box-shadow: 0 0 0 14px rgba(245, 184, 59, 0);
  }
}

#gameCanvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  background: #10131b;
  border: 1px solid rgba(246, 234, 208, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 -34px 60px rgba(244, 111, 46, 0.07),
    0 12px 30px rgba(0, 0, 0, 0.28);
  touch-action: none;
}

.dev-panel {
  position: absolute;
  right: 22px;
  top: 88px;
  z-index: 5;
  display: none;
}

.dev-panel.active {
  display: block;
}

.game-screen.active .dev-panel.active {
  display: block;
}

.dev-tools {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 150px;
  margin-top: 5px;
  padding: 7px;
  border-radius: 12px;
  background: rgba(9, 11, 16, 0.68);
  border: 1px solid rgba(55, 240, 210, 0.22);
  backdrop-filter: blur(10px);
}

.dev-panel.open .dev-tools {
  display: grid;
}

.dev-panel #devSmoke,
.dev-panel #devPreflight {
  grid-column: 1 / -1;
}

.dev-panel small {
  grid-column: 1 / -1;
  min-height: 14px;
  color: rgba(246, 234, 208, 0.72);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.dev-panel button {
  min-height: 30px;
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(55, 240, 210, 0.12);
  border: 1px solid rgba(55, 240, 210, 0.26);
  color: var(--paper);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.dev-toggle {
  width: 48px;
  min-width: 48px;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(9, 11, 16, 0.64);
  backdrop-filter: blur(10px);
}

.dev-panel button:active {
  transform: translateY(1px);
  background: rgba(245, 184, 59, 0.24);
}

.touch-zones {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: clamp(210px, 36%, 320px);
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  height: clamp(112px, 24%, 176px);
  pointer-events: none;
  touch-action: none;
}

.pause-button {
  position: absolute;
  left: 50%;
  bottom: 68px;
  z-index: 4;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(9, 11, 16, 0.72);
  border: 1px solid rgba(246, 234, 208, 0.18);
  color: rgba(246, 234, 208, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
  font-size: 12px;
  font-weight: 950;
  pointer-events: auto;
  transform: translateX(-50%);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.pause-button:active {
  color: var(--accent);
  border-color: rgba(55, 240, 210, 0.42);
  background: rgba(55, 240, 210, 0.14);
  transform: translateX(-50%) scale(0.94);
}

.touch-zones > button:not(.pause-button) {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  font-weight: 900;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.touch-zones > button:not(.pause-button)::before {
  content: "";
  position: absolute;
  width: clamp(82px, 22vw, 104px);
  height: clamp(82px, 22vw, 104px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.34), transparent 17%),
    radial-gradient(circle at 52% 54%, rgba(55, 240, 210, 0.22), rgba(55, 240, 210, 0.1) 52%, rgba(55, 240, 210, 0.03) 70%, transparent 72%);
  border: 1px solid rgba(55, 240, 210, 0.28);
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(55, 240, 210, 0.14);
  transform: scale(1);
  transition:
    transform 90ms ease,
    background 90ms ease,
    border-color 90ms ease,
    box-shadow 90ms ease;
}

.touch-zones > button:not(.pause-button)::after {
  content: "";
  position: absolute;
  width: clamp(38px, 10vw, 48px);
  height: clamp(38px, 10vw, 48px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
  filter: blur(1px);
  translate: -18px -18px;
}

.touch-zones > button:not(.pause-button):active::before,
.touch-zones > button:not(.pause-button).pressed::before {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.48), transparent 19%),
    radial-gradient(circle at 52% 54%, rgba(55, 240, 210, 0.36), rgba(55, 240, 210, 0.18) 54%, rgba(55, 240, 210, 0.05) 72%, transparent 74%);
  border-color: rgba(55, 240, 210, 0.48);
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.12),
    0 0 26px rgba(55, 240, 210, 0.26);
  transform: scale(0.86);
}

.touch-zones > button:not(.pause-button):active,
.touch-zones > button:not(.pause-button).pressed {
  color: transparent;
}

.pause-overlay {
  position: absolute;
  inset: 14px;
  z-index: 8;
  display: none;
  place-items: center;
  border-radius: 22px;
  background: rgba(4, 6, 10, 0.62);
  backdrop-filter: blur(8px);
}

.pause-overlay.reduced-effects {
  backdrop-filter: none;
}

.pause-overlay.active {
  display: grid;
}

.pause-menu {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(290px, 86%);
  padding: 22px;
  border-radius: 20px;
  background: rgba(9, 11, 16, 0.92);
  border: 1px solid rgba(246, 234, 208, 0.16);
  text-align: center;
}

.pause-menu.hidden,
.settings-menu {
  display: none;
}

.settings-menu.active {
  display: grid;
}

.pause-menu h2 {
  margin: 0 0 4px;
  font-size: 34px;
}

.pause-menu .primary-button,
.pause-menu .secondary-button {
  min-height: 48px;
}

.window-confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(10px);
}

.window-confirm-overlay.active {
  display: grid;
}

.window-confirm {
  display: grid;
  gap: 12px;
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid rgba(246, 234, 208, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 34, 46, 0.98), rgba(9, 11, 18, 0.98));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
}

.window-confirm h2 {
  margin: 0;
  font-size: 30px;
}

.window-confirm p,
.window-confirm small {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.window-confirm .primary-button,
.window-confirm .secondary-button {
  min-height: 48px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(246, 234, 208, 0.08);
  border: 1px solid rgba(246, 234, 208, 0.12);
  text-align: left;
}

.settings-row strong {
  display: block;
  font-size: 14px;
}

.settings-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.toggle-button {
  min-width: 58px;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(246, 234, 208, 0.1);
  border: 1px solid rgba(246, 234, 208, 0.16);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.toggle-button.active {
  background: linear-gradient(135deg, #37f0d2, #f7c95a);
  border-color: transparent;
  color: #10131b;
}

.danger-button {
  min-height: 44px;
  border-radius: 14px;
  background: rgba(222, 55, 84, 0.12);
  border: 1px solid rgba(222, 55, 84, 0.26);
  color: #ff8b9d;
  font-size: 12px;
  font-weight: 950;
}

.danger-button.armed {
  background: rgba(222, 55, 84, 0.24);
  border-color: rgba(222, 55, 84, 0.58);
  color: #ffe6ea;
}

.version-panel {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(9, 11, 16, 0.44);
  border: 1px solid rgba(246, 234, 208, 0.1);
  text-align: left;
}

.version-panel span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.version-panel strong {
  color: var(--accent);
  font-size: 16px;
}

.version-panel small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.over-screen {
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 7px;
}

.over-screen h2 {
  margin: 0;
  font-size: clamp(28px, 8.2vw, 34px);
  line-height: 0.95;
}

.result-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  background: rgba(9, 11, 16, 0.58);
  border: 1px solid rgba(246, 234, 208, 0.14);
}

.result-card span,
.result-card small {
  color: var(--muted);
  font-weight: 800;
}

.result-card strong {
  font-size: 40px;
  line-height: 1;
}

.result-card b {
  justify-self: center;
  min-width: 94px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #10131b;
  background: var(--rarity-color, var(--gold));
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.result-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: 100%;
}

.result-grid div {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(9, 11, 16, 0.48);
  border: 1px solid rgba(246, 234, 208, 0.12);
}

.result-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.result-grid strong {
  font-size: 20px;
}

.breakdown-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px 8px;
  width: 100%;
  padding: 9px;
  border-radius: 16px;
  background: rgba(9, 11, 16, 0.42);
  border: 1px solid rgba(246, 234, 208, 0.12);
}

.breakdown-panel > span {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.breakdown-panel div {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.breakdown-panel small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.breakdown-panel strong {
  color: var(--paper);
  font-size: 15px;
}

.result-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.result-actions .primary-button {
  grid-column: 1 / -1;
  min-height: 46px;
}

.result-actions .secondary-button {
  min-height: 40px;
  margin-top: 0;
  border-radius: 12px;
  font-size: 11px;
}

.result-actions #changeOrc {
  grid-column: auto;
}

.submit-status {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(9, 11, 16, 0.42);
  border: 1px solid rgba(246, 234, 208, 0.1);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.submit-status.sending {
  color: var(--paper);
  border-color: rgba(245, 184, 59, 0.34);
  background: rgba(245, 184, 59, 0.12);
}

.submit-status.success {
  color: #d7fff6;
  border-color: rgba(55, 240, 210, 0.38);
  background: rgba(55, 240, 210, 0.13);
}

.submit-status.error {
  color: #ffd7df;
  border-color: rgba(222, 55, 84, 0.38);
  background: rgba(222, 55, 84, 0.13);
}

.start-screen .hero-mark {
  flex: 1 1 auto;
  min-height: clamp(230px, 41%, 340px);
  visibility: hidden;
  pointer-events: none;
}

@media (max-height: 700px) {
  .phone-frame {
    min-height: 0;
  }

  .start-screen {
    padding: 13px 20px 14px;
  }

  .start-screen .portal-glow {
    top: 104px;
    width: 198px;
    height: 198px;
    border-width: 10px;
  }

  .start-screen .top-bar {
    margin-bottom: 4px;
  }

  .start-screen .pill {
    padding: 7px 10px;
    font-size: 11px;
  }

  .hero-mark {
    flex: 0 0 auto;
    min-height: 96px;
  }

  .hero-orc {
    scale: 0.84;
  }

  .start-screen .hero-orc {
    scale: 0.52;
    margin: -48px 0 -48px;
  }

  h1 {
    font-size: 31px;
  }

  h2 {
    font-size: 30px;
  }

  .start-screen .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .start-screen .title-block {
    margin-bottom: 12px;
    padding: 8px 9px 8px;
  }

  .subtitle {
    width: min(260px, 100%);
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.22;
  }

  .start-screen h1 {
    font-size: clamp(27px, 8vw, 34px);
  }

  .start-screen .primary-button,
  .start-screen .secondary-button {
    min-height: 39px;
    border-radius: 11px;
    font-size: 13px;
  }

  .start-screen .secondary-button {
    margin-top: 6px;
  }

  .race-card {
    min-height: 270px;
  }

  .selected-orc {
    grid-template-rows: 108px auto auto minmax(42px, auto);
  }

  .selected-orc .hero-orc {
    scale: 0.58;
    margin: -36px 0 -46px;
  }

  .race-name {
    font-size: 27px;
  }

  .race-trait {
    max-width: 180px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .stats-panel {
    padding: 12px;
  }

  .access-card {
    gap: 8px;
    padding: 13px;
  }

  .access-card h3 {
    font-size: 25px;
  }

  .access-card p {
    font-size: 12px;
    line-height: 1.3;
  }

  .access-wallet {
    padding: 9px;
  }

  .access-wallet .primary-button {
    min-width: 118px;
    min-height: 38px;
    padding: 0 10px;
  }

  .access-row {
    padding: 8px 10px;
  }
}

@media (max-width: 430px), (max-height: 860px) {
  .phone-frame {
    border-radius: 24px;
  }

  .screen {
    padding: 14px;
  }

  .start-screen {
    padding: 16px 22px 20px;
  }

  .start-screen .portal-glow {
    top: 130px;
    width: 252px;
    height: 252px;
    border-width: 12px;
  }

  .start-screen .hero-mark {
    min-height: 190px;
  }

  .start-screen .hero-orc {
    scale: 0.78;
    margin: -14px 0 -26px;
  }

  .title-block {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(42px, 12.8vw, 54px);
  }

  .start-screen h1 {
    font-size: clamp(30px, 8.1vw, 38px);
  }

  h2 {
    font-size: 30px;
  }

  .subtitle {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.34;
  }

  .primary-button,
  .secondary-button {
    min-height: 52px;
  }

  .select-screen {
    gap: 8px;
  }

  .select-header {
    gap: 10px;
  }

  .icon-button,
  .nav-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 12px;
    font-size: 30px;
  }

  .wallet-strip {
    min-height: 50px;
    padding: 8px 10px;
  }

  .wallet-strip strong {
    font-size: 13px;
  }

  .wallet-strip button {
    min-width: 88px;
    min-height: 34px;
    font-size: 11px;
  }

  .play-window-status {
    margin: -3px 4px 6px;
    font-size: 10px;
  }

  .race-card {
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
    min-height: 232px;
    padding: 10px;
    border-radius: 18px;
  }

  .selected-orc {
    grid-template-rows: 82px auto auto minmax(30px, auto);
    gap: 5px;
  }

  .selected-orc .hero-orc {
    scale: 0.5;
    margin: -50px 0 -58px;
  }

  .race-name {
    font-size: 27px;
  }

  .rarity-badge {
    min-width: 84px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .race-trait {
    min-height: 30px;
    max-width: 190px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .team-status {
    min-height: 48px;
    padding: 9px 12px;
  }

  .team-status strong {
    font-size: 14px;
  }

  .team-status span,
  .team-status small {
    font-size: 10px;
  }

  .bonus-window-button {
    min-height: 38px;
    margin-bottom: 6px;
  }

  .stats-panel {
    gap: 6px;
    padding: 9px 12px;
    border-radius: 14px;
  }

  .stat-row {
    grid-template-columns: 52px 1fr;
    font-size: 11px;
  }

  .select-screen #startGame {
    min-height: 48px;
  }

  .game-screen {
    padding: 10px;
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .hud {
    height: 52px;
    gap: 6px;
  }

  .hud div {
    padding: 6px;
    border-radius: 12px;
  }

  .hud strong {
    font-size: 18px;
  }

  #gameCanvas {
    border-radius: 16px;
  }
}

.access-screen,
.select-screen,
.leaderboard-screen,
.items-screen {
  padding-top: var(--telegram-chrome-clearance);
}

html.telegram-shell .screen {
  padding-top: var(--telegram-chrome-clearance);
}

html.telegram-shell .game-screen {
  grid-template-rows: 52px minmax(0, 1fr);
}
