:root {
  --bg: #0f1720;
  --paper: rgba(255, 247, 237, 0.9);
  --paper-strong: rgba(255, 250, 244, 0.98);
  --ink: #17252d;
  --ink-soft: rgba(23, 37, 45, 0.68);
  --stroke: rgba(255, 255, 255, 0.18);
  --fire: #f05d2b;
  --fire-deep: #a62c16;
  --signal: #ffd05b;
  --ok: #0b8578;
  --shadow: 0 28px 90px rgba(14, 22, 29, 0.22);
  --navy: #173244;
  --ember: #ff9a3d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 154, 61, 0.3), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(240, 93, 43, 0.26), transparent 20%),
    radial-gradient(circle at 72% 86%, rgba(11, 133, 120, 0.18), transparent 28%),
    linear-gradient(135deg, #151f29 0%, #f0dec9 38%, #ead7c1 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  overscroll-behavior: none;
}

body {
  padding: 20px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 82%);
}

button,
input {
  font: inherit;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 14px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.82);
  box-shadow: 0 18px 60px rgba(14, 22, 29, 0.18);
  backdrop-filter: blur(18px);
}

.brand-mark,
.nav-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.nav-links a,
.nav-cta,
.footer-links a,
.game-card a {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 900;
}

.brand-mark span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #17252d, #f05d2b);
  color: white;
  letter-spacing: 0.08em;
}

.brand-mark strong {
  color: var(--ink);
}

.nav-links a,
.nav-cta {
  border-radius: 999px;
  padding: 10px 13px;
  color: var(--ink-soft);
  font-weight: 900;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--fire-deep);
}

.nav-cta {
  color: white;
  background: linear-gradient(135deg, #f05d2b, #f59c2c);
}

.hero,
.game-layout {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.82fr);
  margin-bottom: 22px;
}

.section-panel,
.info-card,
.game-card,
.site-footer {
  background: var(--paper);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.section-panel,
.site-footer {
  border-radius: 30px;
  margin-bottom: 22px;
  padding: 28px;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-bottom: 20px;
}

.section-heading p,
.info-card p,
.game-card p,
.site-footer p {
  color: var(--ink-soft);
  line-height: 1.65;
}

.games-hub {
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 208, 91, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 249, 241, 0.95), rgba(231, 244, 241, 0.86));
}

.game-grid,
.info-grid,
.community-dashboard,
.achievement-grid,
.news-list,
.profile-stats {
  display: grid;
  gap: 16px;
}

.game-grid {
  grid-template-columns: 1.2fr repeat(2, minmax(0, 0.9fr));
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.community-dashboard {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  margin-bottom: 22px;
}

.game-card,
.info-card,
.profile-card,
.account-card,
.season-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 250, 244, 0.84);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.game-card h3 {
  margin: 18px 0 8px;
  font: 900 1.5rem "Chakra Petch", sans-serif;
}

.featured-game {
  color: white;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 208, 91, 0.42), transparent 26%),
    linear-gradient(135deg, #17252d, #a62c16 58%, #f05d2b);
}

.featured-game p {
  color: rgba(255, 250, 244, 0.82);
}

.game-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 11px;
  font: 900 0.78rem "Chakra Petch", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-status.live {
  background: rgba(95, 231, 220, 0.2);
  color: #dcfffb;
}

.game-status.soon {
  background: rgba(240, 93, 43, 0.1);
  color: var(--fire-deep);
}

.profile-card {
  background:
    radial-gradient(circle at 92% 12%, rgba(95, 231, 220, 0.22), transparent 30%),
    rgba(255, 250, 244, 0.88);
}

.account-card {
  background:
    radial-gradient(circle at 12% 12%, rgba(114, 137, 218, 0.22), transparent 30%),
    rgba(255, 250, 244, 0.88);
}

.account-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.login-page {
  min-height: calc(100vh - 40px);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.login-hero,
.login-card {
  border-radius: 30px;
  padding: 30px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 16%, rgba(88, 101, 242, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(255, 249, 241, 0.97), rgba(255, 234, 211, 0.84));
}

.discord-login-button {
  display: inline-flex;
  justify-content: center;
  border-radius: 18px;
  padding: 13px 16px;
  color: white;
  background: linear-gradient(135deg, #5865f2, #3442b8);
  font-weight: 900;
  text-decoration: none;
}

.profile-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.profile-stats span,
.profile-badges,
.achievement-grid article,
.news-list article {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(21, 36, 45, 0.08);
}

.profile-stats strong {
  display: block;
  font: 900 1.6rem "Chakra Petch", sans-serif;
  color: var(--fire-deep);
}

.season-card {
  color: white;
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 208, 91, 0.36), transparent 26%),
    linear-gradient(135deg, #17252d, #335167);
}

.season-card p,
.season-card small {
  color: rgba(255, 250, 244, 0.78);
}

.season-progress {
  height: 14px;
  overflow: hidden;
  margin: 18px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.season-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd05b, #f05d2b);
}

.achievement-section {
  background:
    radial-gradient(circle at 10% 0%, rgba(95, 231, 220, 0.18), transparent 28%),
    rgba(255, 248, 240, 0.9);
}

.achievement-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.achievement-grid article {
  min-height: 112px;
}

.achievement-grid strong,
.news-list h3 {
  display: block;
  margin-bottom: 8px;
  font: 900 1.12rem "Chakra Petch", sans-serif;
}

.achievement-grid span,
.news-list p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.achievement-grid article.unlocked {
  background: linear-gradient(135deg, rgba(255, 208, 91, 0.34), rgba(255, 255, 255, 0.72));
  border-color: rgba(240, 93, 43, 0.22);
}

.discord-card {
  background:
    radial-gradient(circle at 86% 12%, rgba(95, 231, 220, 0.2), transparent 28%),
    rgba(255, 250, 244, 0.86);
}

.news-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-list time {
  color: var(--fire-deep);
  font-weight: 900;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  margin-top: 22px;
}

.footer-links {
  align-items: flex-end;
  flex-direction: column;
  font-weight: 900;
}

.hero-copy,
.hero-card,
.panel,
.status-card,
.hud-card,
.canvas-shell,
.playfield-panel {
  background: var(--paper);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card,
.panel,
.playfield-panel {
  border-radius: 28px;
  padding: 28px;
  backdrop-filter: blur(16px);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 249, 241, 0.97), rgba(255, 234, 211, 0.84)),
    radial-gradient(circle at 96% 12%, rgba(240, 93, 43, 0.2), transparent 26%);
}

.hero-copy::after {
  content: "CODE ROOD";
  position: absolute;
  right: -18px;
  bottom: 6px;
  color: rgba(166, 44, 22, 0.055);
  font: 900 7rem "Chakra Petch", sans-serif;
  letter-spacing: -0.08em;
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.hero-card,
.panel {
  background: rgba(255, 248, 240, 0.9);
}

.eyebrow,
.overlay-kicker,
.hud-label,
.panel-kicker {
  font-family: "Chakra Petch", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow,
.panel-kicker {
  color: var(--fire-deep);
  font-weight: 700;
  margin: 0 0 12px;
}

h1,
h2 {
  margin: 0;
  font-family: "Chakra Petch", sans-serif;
}

h1 {
  font-size: clamp(3rem, 4.3vw, 5.4rem);
  line-height: 0.9;
  margin-bottom: 16px;
  max-width: 12ch;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.hero-text,
.hero-card li,
.panel-text {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
}

.hero-actions,
.touch-actions,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 24px;
}

.loadout-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(21, 36, 45, 0.08);
}

.loadout-panel label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-weight: 900;
  font-size: 0.84rem;
}

.loadout-panel span {
  font-family: "Chakra Petch", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loadout-panel select {
  width: 100%;
  border: 1px solid rgba(21, 36, 45, 0.12);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(255, 250, 244, 0.92);
  color: var(--ink);
  font: 900 0.95rem "Manrope", sans-serif;
}

.hero-tags {
  margin-top: 18px;
}

.hero-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 37, 45, 0.07);
  color: var(--fire-deep);
  font-weight: 800;
  font-size: 0.94rem;
}

.primary-button,
.ghost-button,
.touch-controls button {
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #f05d2b, #f59c2c);
  box-shadow: 0 18px 38px rgba(240, 93, 43, 0.28);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(21, 36, 45, 0.08);
}

.small-button {
  padding: 12px 16px;
}

.primary-button:hover,
.ghost-button:hover,
.touch-controls button:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  filter: none;
}

.game-layout {
  grid-template-columns: minmax(0, 1.68fr) minmax(320px, 0.82fr);
  align-items: start;
}

.stage-column,
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.playfield-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 245, 233, 0.95), rgba(255, 249, 242, 0.86)),
    radial-gradient(circle at top, rgba(255, 189, 120, 0.18), transparent 32%);
}

.top-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.58fr) minmax(240px, 0.8fr);
  gap: 12px;
}

.status-card,
.hud-card {
  border-radius: 22px;
  padding: 16px 18px;
}

.status-card strong,
.hud-card strong {
  display: block;
  margin-top: 8px;
}

.status-card strong {
  font-size: 1.32rem;
}

.hud {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(130px, 0.9fr) minmax(132px, 0.95fr);
  gap: 12px;
}

.hud-label {
  display: block;
  color: rgba(23, 37, 45, 0.78);
  font-size: clamp(0.72rem, 0.92vw, 0.9rem);
  line-height: 1.1;
  white-space: nowrap;
}

.hud-card strong {
  font-size: clamp(1.28rem, 1.7vw, 1.56rem);
  line-height: 1.1;
  white-space: nowrap;
}

.hud-card.accent {
  background: linear-gradient(135deg, rgba(11, 133, 120, 0.2), rgba(255, 250, 244, 0.92));
}

.hud-card.alert {
  background: linear-gradient(135deg, rgba(255, 208, 91, 0.4), rgba(255, 250, 244, 0.92));
}

.hud-card.medal,
.objective-card {
  background: linear-gradient(135deg, rgba(240, 93, 43, 0.15), rgba(255, 250, 244, 0.95));
}

.canvas-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(circle at top, rgba(255, 220, 162, 0.4), transparent 24%),
    linear-gradient(180deg, #dce8ef 0%, #afc1cf 100%);
  border: 1px solid rgba(23, 37, 45, 0.08);
}

.canvas-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    inset 0 -48px 80px rgba(15, 23, 32, 0.08);
  z-index: 1;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1100 / 680;
  touch-action: none;
  user-select: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  background: rgba(14, 23, 29, 0.24);
  transition: opacity 220ms ease;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  width: min(520px, calc(100% - 32px));
  border-radius: 28px;
  padding: 28px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.overlay-card p:last-child {
  color: var(--ink-soft);
  margin-bottom: 0;
}

.overlay-card.highscore {
  animation: highscore-pop 820ms ease both;
  background:
    radial-gradient(circle at 80% 16%, rgba(255, 208, 91, 0.38), transparent 28%),
    var(--paper-strong);
}

.overlay-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.overlay-stats span {
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(240, 93, 43, 0.09);
  color: var(--fire-deep);
  font-weight: 900;
  font-size: 0.9rem;
}

@keyframes highscore-pop {
  0% {
    transform: scale(0.92);
  }

  60% {
    transform: scale(1.035);
  }

  100% {
    transform: scale(1);
  }
}

.touch-controls {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.touch-hint {
  display: none;
  margin: 0;
  color: var(--ink-soft);
  font: 900 0.78rem "Chakra Petch", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.move-pad {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.move-row {
  display: flex;
  gap: 10px;
}

.touch-controls button {
  min-width: 78px;
  min-height: 56px;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(23, 37, 45, 0.14);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.install-button:not([hidden]) {
  display: inline-flex;
}

.spray-button {
  background: linear-gradient(135deg, #006b62, #0ea08f) !important;
  color: white !important;
}

.boost-button {
  background: linear-gradient(135deg, #ffc03b, #ff7f59) !important;
  color: #3d1b0f !important;
}

.save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 18px 0 16px;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(21, 36, 45, 0.08);
}

.leaderboard-tab {
  border: none;
  border-radius: 14px;
  padding: 10px 8px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 900;
  cursor: pointer;
}

.leaderboard-tab.active {
  background: linear-gradient(135deg, #f05d2b, #f59c2c);
  color: white;
  box-shadow: 0 12px 24px rgba(240, 93, 43, 0.18);
}

.badge-preview {
  min-height: 46px;
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(11, 133, 120, 0.1);
  border: 1px solid rgba(11, 133, 120, 0.16);
  color: var(--ink-soft);
  font-weight: 800;
}

.rank-preview {
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(240, 93, 43, 0.09);
  border: 1px solid rgba(240, 93, 43, 0.14);
  color: var(--ink-soft);
  font-weight: 800;
}

.name-input {
  width: 100%;
  border: 1px solid rgba(21, 36, 45, 0.12);
  border-radius: 18px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

.share-card-button {
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 13px 16px;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #17252d, #335167);
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(23, 37, 45, 0.22);
}

.share-card-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
}

.score-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 32, 0.58);
  backdrop-filter: blur(10px);
}

.score-modal.hidden {
  display: none;
}

.score-modal-card {
  width: min(960px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 32px;
  padding: 24px;
  background: var(--paper-strong);
  box-shadow: 0 36px 120px rgba(10, 16, 22, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.score-modal-head,
.score-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.score-modal canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(23, 37, 45, 0.18);
}

.score-modal-actions {
  margin: 18px 0 0;
}

.leaderboard-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaderboard-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(21, 36, 45, 0.08);
}

.leaderboard-rank {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  color: var(--fire-deep);
}

.leaderboard-name {
  font-weight: 800;
}

.leaderboard-score {
  color: var(--ink-soft);
  font-weight: 700;
}

.leaderboard-badge {
  grid-column: 2 / -1;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 208, 91, 0.24);
  color: #7a5204;
  font-size: 0.82rem;
  font-weight: 900;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  margin: 4px 6px 0 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--fire-deep);
  border: 1px solid rgba(166, 44, 22, 0.12);
}

.compact-panel {
  background: linear-gradient(180deg, rgba(255, 237, 220, 0.94), rgba(255, 248, 242, 0.92));
}

.alt-panel {
  background: linear-gradient(180deg, rgba(230, 244, 241, 0.96), rgba(249, 252, 251, 0.92));
}

.role-panel {
  background:
    linear-gradient(180deg, rgba(238, 246, 249, 0.96), rgba(255, 248, 242, 0.9)),
    radial-gradient(circle at top right, rgba(79, 209, 255, 0.2), transparent 30%);
}

.role-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.role-step {
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink-soft);
  text-align: center;
  font: 900 0.95rem "Chakra Petch", sans-serif;
}

.role-step.active {
  background: linear-gradient(135deg, #17252d, #335167);
  color: white;
}

.tips-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.6;
}

@media (max-width: 1160px) {
  body {
    padding: 18px;
  }

  .hero,
  .game-layout,
  .game-grid,
  .info-grid,
  .community-dashboard,
  .achievement-grid,
  .news-list,
  .login-shell,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .playfield-panel,
  .section-panel,
  .profile-card,
  .account-card,
  .season-card,
  .site-footer {
    padding: 24px;
  }

  .hud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .hero-copy,
  .hero-card,
  .panel,
  .playfield-panel,
  .section-panel,
  .info-card,
  .game-card,
  .profile-card,
  .account-card,
  .season-card,
  .site-footer {
    padding: 16px;
    border-radius: 22px;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: static;
    align-items: stretch;
    border-radius: 24px;
    flex-direction: column;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links a,
  .nav-cta {
    text-align: center;
    background: rgba(255, 255, 255, 0.56);
  }

  .hero {
    gap: 12px;
    margin-bottom: 14px;
  }

  .section-panel,
  .info-grid,
  .community-dashboard {
    margin-bottom: 14px;
  }

  .hero-card {
    display: none;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
    max-width: 10ch;
  }

  .hero-text {
    font-size: 0.95rem;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 16px;
  }

  .loadout-panel {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .ghost-button,
  .touch-controls button {
    padding: 12px 15px;
  }

  .hero-tags {
    gap: 8px;
    margin-top: 12px;
  }

  .hero-tags span {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .top-strip,
  .save-row {
    grid-template-columns: 1fr;
  }

  .top-strip {
    gap: 8px;
  }

  .status-card {
    padding: 12px 14px;
  }

  .status-card.objective-card {
    display: none;
  }

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

  .hud-card {
    padding: 11px 12px;
    border-radius: 16px;
  }

  .hud-card.medal {
    display: none;
  }

  .canvas-shell {
    border-radius: 22px;
  }

  .overlay-card {
    padding: 20px;
    border-radius: 22px;
  }

  .score-modal-head,
  .score-modal-actions,
  .overlay-stats {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .touch-controls {
    display: flex;
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 8;
    padding: 10px;
    border-radius: 24px;
    background: rgba(255, 248, 240, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 18px 50px rgba(13, 24, 32, 0.22);
    backdrop-filter: blur(16px);
  }

  .touch-hint {
    display: block;
    max-width: 92px;
  }

  .touch-controls button {
    min-width: 58px;
    min-height: 52px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1;
  }

  .touch-actions {
    flex-direction: column;
    gap: 8px;
  }

  .spray-button {
    min-width: 86px !important;
    min-height: 112px !important;
    font-size: 0.88rem !important;
  }
}

@media (pointer: coarse) {
  .touch-controls {
    display: flex;
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 8;
    padding: 10px;
    border-radius: 24px;
    background: rgba(255, 248, 240, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: 0 18px 50px rgba(13, 24, 32, 0.22);
    backdrop-filter: blur(16px);
  }

  .touch-hint {
    display: block;
    max-width: 96px;
  }

  .touch-controls button {
    min-width: 58px;
    min-height: 52px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1;
  }

  .touch-actions {
    flex-direction: column;
    gap: 8px;
  }

  .spray-button {
    min-width: 88px !important;
    min-height: 112px !important;
    font-size: 0.88rem !important;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  body {
    padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
  }

  .hero {
    display: none;
  }

  .site-nav,
  .games-hub,
  .info-grid,
  .community-dashboard,
  .achievement-section,
  .news-section,
  .site-footer {
    display: none;
  }

  .game-layout,
  .stage-column {
    gap: 8px;
  }

  .playfield-panel {
    padding: 10px;
  }

  .top-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hud {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .sidebar {
    display: none;
  }

  .touch-controls {
    position: fixed;
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .touch-hint {
    max-width: none;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .hero {
    display: none;
  }

  .site-nav,
  .games-hub,
  .info-grid,
  .community-dashboard,
  .achievement-section,
  .news-section,
  .site-footer {
    display: none;
  }

  .game-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stage-column {
    gap: 8px;
  }

  .playfield-panel {
    padding: 10px;
  }

  .sidebar {
    display: none;
  }

  .touch-controls {
    position: fixed;
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
