:root {
  --cyan-a: #69e1ef;
  --cyan-b: #12b6ef;
  --cyan-c: #078ed0;
  --navy: #064b64;
  --muted-navy: rgba(6, 75, 100, 0.68);
  --pink: #fa267b;
  --pink-soft: #ff5fa0;
  --lime: #d6fb57;
  --yellow: #ffd538;
  --glass: rgba(255, 255, 255, 0.18);
  --glass-strong: rgba(255, 255, 255, 0.3);
  --glass-border: rgba(255, 255, 255, 0.46);
  --panel: rgba(245, 254, 255, 0.92);
  --shadow: 0 24px 55px rgba(0, 112, 156, 0.22);
  --soft-shadow: 0 14px 28px rgba(0, 112, 156, 0.14);
  font-family: ui-rounded, "SF Pro Rounded", "Inter", system-ui, sans-serif;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px 48px;
  width: 100vw;
  margin: 58px calc(50% - 50vw) 0;
  padding: 42px clamp(24px, 4vw, 56px) 28px;
  color: #fff;
  background: #064b64;
  border-block: 1px solid rgba(255, 255, 255, 0.2);
}

.app:not([data-view="home"]) .site-footer {
  display: none;
}

.site-footer__brand img {
  display: block;
  width: clamp(142px, 15vw, 180px);
  height: auto;
}

.site-footer__brand p {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  font-weight: 750;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 14px 28px;
}

.site-footer__links a {
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  text-decoration: none;
  transition: color 140ms ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--lime);
}

.site-footer__rule {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 680px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 42px;
    padding: 34px 26px 24px;
  }

  .site-footer__links {
    justify-content: flex-start;
  }
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: white;
  background:
    radial-gradient(circle at 8% 4%, rgba(178, 255, 242, 0.58), transparent 26rem),
    radial-gradient(circle at 82% 18%, rgba(255, 83, 150, 0.2), transparent 22rem),
    linear-gradient(116deg, var(--cyan-a), var(--cyan-b) 62%, var(--cyan-c));
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  position: relative;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) calc(118px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}

.view {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.lobby > h1 {
  margin: 0 0 24px;
  text-align: center;
  font-size: clamp(36px, 5vw, 62px);
}

.lobby-layout {
  display: grid;
  gap: 18px;
  width: min(900px, 100%);
  margin: 0 auto;
}

.lobby-status-card {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 190px;
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: var(--glass);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.lobby-status-card > img {
  width: 108px;
  height: 96px;
  object-fit: contain;
}

.lobby-status-card small,
.lobby-status-card p,
.lobby-choice span {
  color: rgba(255, 255, 255, 0.78);
}

.lobby-status-card h2 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
}

.lobby-status-card p {
  max-width: 560px;
  margin: 0;
  font-size: 18px;
}

.join-code-display {
  display: grid;
  gap: 2px;
  min-width: 180px;
  padding: 16px 20px;
  border: 2px solid var(--lime);
  border-radius: 18px;
  background: rgba(6, 75, 100, 0.34);
  text-align: center;
}

.join-code-display strong {
  color: var(--lime);
  font-size: 34px;
  letter-spacing: 4px;
}

.join-code-display span {
  font-size: 12px;
}

.private-game-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 18px;
}

.lobby-choice,
.join-code-form {
  min-height: 126px;
  padding: 22px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass);
}

.lobby-choice {
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
}

.lobby-choice strong,
.join-code-form label {
  font-size: 20px;
  font-weight: 800;
}

.join-code-form {
  display: grid;
  align-content: center;
  gap: 12px;
}

.join-code-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.join-code-form input {
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 4px;
}

.lobby-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

[hidden] {
  display: none !important;
}

.growth-nav {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: 230px 1fr auto;
  align-items: center;
  gap: 20px;
  width: min(1180px, 100%);
  margin: 0 auto 34px;
  padding: 10px 12px 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(8, 166, 218, 0.34);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.app:not([data-view="home"]) .growth-nav {
  position: static;
  grid-template-columns: 1fr auto;
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  padding-inline: 0;
}

.app:not([data-view="home"]) .nav-links,
.app:not([data-view="home"]) .nav-cta {
  display: none;
}

.brand-mark {
  display: inline-grid;
  justify-self: start;
  background: transparent;
  padding: 0;
}

.logo {
  width: min(220px, 42vw);
  filter: drop-shadow(0 12px 18px rgba(0, 92, 135, 0.18));
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
}

.nav-links img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-feature span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--navy);
  background: var(--lime);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 18px;
  border: 2px solid var(--glass-border);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 900;
}

.nav-account img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-cta,
.primary-action,
.chips button,
.lime-button,
.text-cta,
.quick-picks button,
.format-pills button {
  min-height: 56px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 178px;
  padding: 0 24px;
  color: var(--navy);
  background: var(--lime);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.36), var(--soft-shadow);
}

.button-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

.nav-cta .button-icon,
.lime-button .button-icon {
  filter: brightness(0) saturate(100%) invert(22%) sepia(35%) saturate(1656%) hue-rotate(153deg) brightness(92%) contrast(97%);
}

.growth-page {
  display: grid;
  gap: clamp(34px, 6vw, 76px);
}

.play-config {
  display: grid;
  align-content: start;
}

.config-layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(430px, 1.56fr) minmax(190px, 0.84fr);
  gap: clamp(16px, 2.8vw, 34px);
  align-items: stretch;
}

.side-picker,
.mode-launcher {
  border: 2px solid var(--glass-border);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
}

.side-picker {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.mini-section-title {
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-tile {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 900;
  text-align: left;
}

.side-tile img {
  width: 68px;
  height: 58px;
  object-fit: contain;
}

.side-tile.active,
.side-tile.selected {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 3px var(--lime);
}

.play-config .side-tile.purchase-tile {
  position: relative;
  overflow: hidden;
  color: white;
  border-color: rgba(235, 210, 255, 0.72);
  background: linear-gradient(145deg, #9443f5, #bf7bff);
  box-shadow: 0 14px 28px rgba(93, 31, 158, 0.22);
}

.play-config .side-tile.purchase-tile span {
  line-height: 1.2;
}

.play-config .side-tile.purchase-tile.locked {
  opacity: 1;
}

.play-config .side-tile.purchase-tile.locked::after {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--lime);
  line-height: 1;
}

.side-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.side-split .side-tile {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 112px;
  text-align: center;
}

.side-split .side-tile img {
  width: 100%;
  height: 66px;
}

.mode-launcher {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.mode-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.launch-mode-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: clamp(174px, 18vw, 230px);
  padding: 20px;
  border: 2px solid var(--glass-border);
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
  box-shadow: var(--soft-shadow);
  text-align: center;
}

.launch-mode-tile img {
  width: min(52%, 132px);
  height: 100px;
  object-fit: contain;
}

.launch-mode-tile span {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
}

.launch-mode-tile small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.launch-mode-tile.active {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 4px var(--lime), var(--soft-shadow);
}

.launcher-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

.section-copy p,
.leaderboard-copy p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.42;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 30px;
  border: 2px solid var(--glass-border);
  box-shadow: var(--soft-shadow);
  font-size: clamp(18px, 2vw, 24px);
}

.primary-action.hot {
  color: white;
  background: linear-gradient(90deg, var(--pink-soft), var(--pink));
}

.primary-action.muted {
  color: white;
  background: rgba(255, 255, 255, 0.14);
}

.primary-action.compact {
  width: fit-content;
  min-height: 48px;
  padding: 0 22px;
  color: var(--navy);
  background: var(--lime);
  font-size: 18px;
}

.web-status {
  min-height: 24px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  text-align: center;
}

.web-status:empty {
  display: none;
}

.web-status[data-tone="error"] {
  color: white;
  background: rgba(0, 73, 96, 0.34);
  border-radius: 10px;
  padding: 10px 14px;
}

.shop-card,
.loadout-card,
.leaderboard-card,
.settings-card {
  border: 2px solid var(--glass-border);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.auth-state {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--lime);
  font-size: 14px;
  font-weight: 900;
}

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

.provider-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 16px;
  border: 2px solid rgba(0, 73, 96, 0.12);
  border-radius: 14px;
  color: var(--navy);
  background: white;
  font-weight: 900;
}

.provider-button.facebook {
  color: white;
  background: #1877f2;
}

.provider-button.apple {
  color: white;
  background: #111;
}

.provider-button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.provider-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
}

.google .provider-mark {
  color: #4285f4;
  border: 2px solid #4285f4;
}

.facebook .provider-mark {
  color: #1877f2;
  background: white;
}

.apple-mark {
  color: white;
  font-size: 16px;
}

.auth-notice:empty {
  display: none;
}

.auth-notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 73, 96, 0.08);
}

.account-data-card {
  display: grid;
  gap: 18px;
}

.account-data-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.account-data-heading small,
.account-data-heading span {
  color: var(--muted-navy);
  font-weight: 800;
}

.account-data-heading h2 {
  margin: 2px 0 0;
}

.profile-name-field {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.profile-name-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 2px solid rgba(0, 73, 96, 0.18);
  border-radius: 12px;
  color: var(--navy);
  background: white;
  font: inherit;
}

.account-rating-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  align-items: baseline;
  padding-top: 16px;
  border-top: 2px solid rgba(0, 73, 96, 0.1);
}

.account-rating-summary strong {
  font-size: 30px;
}

.account-rating-summary small {
  grid-column: 1 / -1;
  color: var(--muted-navy);
}

.match-history {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.match-history li {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.64);
}

.match-history strong[data-result="win"] { color: #148447; }
.match-history strong[data-result="loss"] { color: #b4245c; }
.match-history em { color: var(--muted-navy); }

.section-grid,
.leaderboard-section,
.commerce-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.section-copy h2,
.leaderboard-copy h2,
.shop-card h2,
.loadout-card h2 {
  margin-bottom: 14px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
}

.text-cta {
  margin-top: 22px;
  padding: 0 24px;
  color: var(--navy);
  background: var(--lime);
}

.mode-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.growth-mode-card,
.launch-mode-tile,
.mode-card,
.select-tile,
.color-card {
  border: 2px solid var(--glass-border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--soft-shadow);
}

.growth-mode-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
}

.growth-mode-card img {
  width: min(56%, 150px);
  height: 118px;
  object-fit: contain;
}

.growth-mode-card.active,
.mode-card.active,
.select-tile.active,
.color-card.selected {
  border-color: var(--lime);
  box-shadow: inset 0 0 0 4px var(--lime), var(--soft-shadow);
}

[data-skin].locked,
[data-world].locked {
  opacity: 0.68;
}

[data-skin].locked::after,
[data-world].locked::after {
  content: "Odemknout";
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.commerce-band {
  grid-template-columns: minmax(380px, 0.92fr) minmax(0, 1fr);
}

.shop-card,
.loadout-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(24px, 4vw, 38px);
  color: var(--navy);
  background: var(--panel);
}

.shop-card.featured {
  min-height: 450px;
  background: linear-gradient(145deg, #a64cff, #cba1ff);
  color: white;
}

.shop-card img {
  justify-self: center;
  width: min(76%, 360px);
  height: 170px;
  object-fit: contain;
}

.shop-card p {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.4;
}

.price-badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--lime);
  font-size: 20px;
  font-weight: 900;
}

.loadout-preview {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
  min-height: 210px;
}

.loadout-preview img {
  width: 180px;
  max-height: 148px;
  object-fit: contain;
}

.loadout-preview strong {
  display: block;
  font-size: 42px;
}

.loadout-preview span {
  display: block;
  color: var(--muted-navy);
  font-size: 22px;
  font-weight: 800;
}

.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-picks button {
  padding: 0 24px;
  color: white;
  background: var(--pink);
}

.leaderboard-card {
  overflow: hidden;
  padding: 24px;
  color: var(--navy);
  background: var(--panel);
}

.compact-leaderboard {
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
}

.elo-summary {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.elo-summary img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--lime);
}

.elo-summary span {
  display: block;
  font-size: 20px;
  font-weight: 900;
}

.elo-summary strong {
  font-size: 46px;
  line-height: 1;
}

.elo-summary small {
  display: block;
  margin-top: 6px;
  color: var(--muted-navy);
  font-size: 14px;
}

.format-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.format-pills button {
  min-height: 48px;
  color: var(--pink);
  background: white;
  border: 2px solid rgba(250, 38, 123, 0.7);
}

.format-pills .selected {
  color: white;
  background: var(--pink);
}

.rank-list {
  display: grid;
  gap: 10px;
  max-height: 380px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px 16px;
  border: 2px solid rgba(104, 225, 239, 0.38);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
}

.rank-list .empty-row,
.match-history .empty-row {
  display: block;
  min-height: 0;
  padding: 18px;
  color: var(--muted-navy);
  text-align: center;
}

.rank-list span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  font-size: 22px;
  font-weight: 900;
}

.rank-list .me {
  background: rgba(214, 251, 87, 0.26);
  border-color: var(--lime);
}

.rank-list strong {
  font-size: 24px;
}

.rank-list em {
  font-style: normal;
  font-size: 28px;
  font-weight: 900;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 9;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  min-width: min(92vw, 420px);
  padding: 12px 22px;
  border: 2px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.app[data-view="home"] .tabbar {
  display: none;
}

.app[data-view="modes"] .tabbar,
.app[data-view="skin"] .tabbar,
.app[data-view="world"] .tabbar {
  display: none;
}

.tabbar button {
  display: inline-flex;
  flex-direction: column;
  place-items: center;
  justify-content: center;
  gap: 3px;
  width: 92px;
  height: 74px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 900;
}

.tab-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.tabbar .active {
  background: var(--lime);
}

.tabbar .active .tab-icon,
.tabbar .avatar-icon,
.tabbar .active .avatar-icon {
  filter: none;
}

.tabbar .avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.picker,
.shop,
.account {
  padding-top: 8px;
}

.picker h1,
.shop h1,
.account h1 {
  margin: 0 0 34px;
  text-align: center;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
}

.mode-grid,
.tile-row,
.store-grid {
  display: grid;
  gap: 18px;
}

.mode-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.mode-card {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 220px;
  padding: 18px;
  text-align: center;
}

.mode-card .mode-icon {
  width: 132px;
  height: 110px;
  object-fit: contain;
}

.mode-card span,
.select-tile span {
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 900;
}

.setup-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px clamp(24px, 5vw, 62px);
  margin: 34px 0 28px;
}

.setup-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 12px;
}

.chips button,
.lime-button {
  padding: 0 22px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid var(--glass-border);
  box-shadow: var(--soft-shadow);
  font-size: 20px;
}

.chips .selected,
.lime-button {
  color: var(--navy);
  background: var(--lime);
}

.lime-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.chips.vertical {
  grid-template-columns: 1fr;
}

.color-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.color-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-height: 150px;
  padding: 12px;
  font-size: 22px;
  font-weight: 900;
}

.color-card img {
  width: 100%;
  height: 86px;
  object-fit: contain;
}

.equipment p {
  margin: 0;
  font-size: 24px;
}

.sticky-actions {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(210px, 1fr);
  gap: 18px;
  width: min(680px, calc(100vw - 34px));
  margin: 0 auto 24px;
}

.tile-row {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.select-tile {
  display: grid;
  justify-items: center;
  min-height: 245px;
  padding: 20px;
}

.select-tile img {
  width: 100%;
  height: 148px;
  object-fit: contain;
}

.select-tile small {
  margin-top: 6px;
  color: var(--lime);
  font-size: 18px;
  font-weight: 900;
}

.select-tile.purchase-tile {
  color: white;
  border-color: rgba(255, 255, 255, 0.42);
  background: linear-gradient(145deg, #8f3df4, #bd75ff);
  box-shadow: 0 16px 32px rgba(93, 31, 158, 0.24);
}

.select-tile.purchase-tile small {
  display: inline-grid;
  place-items: center;
  min-width: 88px;
  min-height: 38px;
  padding: 6px 14px;
  color: var(--navy);
  border-radius: 999px;
  background: var(--lime);
}

.world-row .select-tile {
  background: rgba(255, 255, 255, 0.12);
}

.world-row .select-tile.purchase-tile {
  background: linear-gradient(145deg, #8f3df4, #bd75ff);
}

.world-row .select-tile img {
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 522 / 490;
  object-fit: cover;
  border-radius: 24px;
  clip-path: inset(0 round 24px);
}

.store-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: stretch;
}

.owned-strip {
  display: inline-grid;
  grid-template-columns: 96px auto;
  gap: 16px;
  align-items: center;
  width: fit-content;
  margin-bottom: 22px;
  padding: 12px 22px 12px 14px;
  border: 2px solid var(--glass-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
}

.owned-strip img {
  width: 96px;
  height: 68px;
  object-fit: contain;
}

.owned-strip small,
.owned-strip strong {
  display: block;
}

.owned-strip small {
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.owned-strip strong {
  font-size: 24px;
}

.store-product-card {
  grid-template-rows: auto 170px auto 1fr auto;
  min-height: 500px;
  padding: 28px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.store-product-card .product-category {
  align-self: start;
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.store-product-card img {
  width: 100%;
  height: 170px;
}

.store-product-card h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
}

.store-product-card p {
  align-self: start;
  font-size: 18px;
}

.store-product-card .primary-action {
  width: 100%;
}

.product {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 150px;
  padding: 22px;
  color: var(--navy);
  text-align: left;
  background: var(--panel);
  border-radius: 28px;
}

.product img {
  width: 120px;
  max-height: 96px;
  object-fit: contain;
}

.product strong {
  font-size: 28px;
}

.product span {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--lime);
  font-weight: 900;
}

.settings-stack {
  display: grid;
  gap: 20px;
}

.settings-card {
  display: grid;
  gap: 16px;
  padding: 26px;
  color: var(--navy);
  background: var(--panel);
}

.settings-card h2,
.settings-card p {
  margin: 0;
}

.settings-card input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(0, 73, 96, 0.18);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--navy);
  font-size: 24px;
}

.elo-card strong {
  font-size: 52px;
}

.unity-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 42, 58, 0.82);
  backdrop-filter: blur(10px);
  transition: opacity 120ms ease-out;
}

.resume-dialog[hidden] {
  display: none;
}

.resume-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.resume-dialog-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 58, 0.58);
  backdrop-filter: blur(8px);
}

.resume-dialog-card {
  position: relative;
  width: min(460px, 100%);
  display: grid;
  justify-items: stretch;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  background: linear-gradient(145deg, #43d4f7, #06b9f3);
  box-shadow: 0 24px 70px rgba(0, 66, 92, 0.34);
  color: #fff;
  text-align: center;
}

.resume-dialog-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5492, #ff2977);
  font-size: 30px;
}

.resume-dialog-card h2 {
  margin: 0;
  font-size: clamp(26px, 5vw, 36px);
}

.resume-dialog-card p {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.45;
  opacity: 0.86;
}

.resume-dialog-cancel {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.82;
}

.unity-shell.preloading {
  opacity: 0;
  pointer-events: none;
}

.unity-shell iframe {
  grid-area: 1 / 1;
  display: block;
  width: min(80vw, calc((100dvh - 48px) * 16 / 9));
  height: auto;
  max-height: calc(100dvh - 48px);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: #12b6ef;
  box-shadow: 0 28px 80px rgba(0, 30, 44, 0.42);
}

.unity-host-loading {
  position: relative;
  grid-area: 1 / 1;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  width: min(80vw, calc((100dvh - 48px) * 16 / 9));
  max-height: calc(100dvh - 48px);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: #12b6ef;
  color: #fff;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 30, 44, 0.42);
}

.unity-host-loading[hidden] {
  display: none;
}

.unity-host-loading img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  animation: unity-loading-pulse 1.1s ease-in-out infinite alternate;
}

.unity-host-loading strong {
  font-size: clamp(24px, 4vw, 42px);
}

.unity-host-loading span {
  font-size: 17px;
  opacity: 0.82;
}

.unity-host-loading progress {
  width: min(240px, 72%);
  height: 10px;
  accent-color: #06354c;
}

.unity-host-loading[data-status="failed"] img {
  animation: none;
}

.unity-host-loading[data-status="failed"],
.unity-host-loading[data-status="slow"] {
  min-height: min(370px, calc(100dvh - 24px));
  padding: 20px;
  overflow-y: auto;
}

.unity-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.unity-recovery-actions[hidden],
.unity-host-loading progress[hidden] {
  display: none;
}

.unity-recovery-actions button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  background: #fff;
  color: #06354c;
  font: inherit;
  font-weight: 700;
}

.unity-recovery-actions button:focus-visible,
.unity-close:focus-visible {
  outline: 3px solid #06354c;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .unity-host-loading img { animation: none; }
}

@keyframes unity-loading-pulse {
  to { transform: scale(1.06); }
}

.unity-close {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 21;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--navy);
  font-size: 40px;
}

@media (max-width: 900px) {
  .unity-shell {
    padding: 12px;
  }

  .unity-shell iframe,
  .unity-host-loading {
    width: min(96vw, 1180px);
    max-height: calc(100dvh - 24px);
  }
}

@media (max-width: 980px) {
  .growth-nav {
    grid-template-columns: 1fr auto;
    border-radius: 28px;
  }

  .nav-links {
    display: none;
  }

  .nav-account span {
    display: none;
  }

  .config-layout,
  .section-grid,
  .leaderboard-section,
  .commerce-band {
    grid-template-columns: 1fr;
  }

  .play-config {
    min-height: auto;
  }

  .side-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .side-picker-right {
    grid-template-columns: 1fr;
  }

  .side-picker .mini-section-title {
    grid-column: 1 / -1;
  }

  .side-tile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .side-tile img {
    width: 100%;
  }

  .mode-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 680px) {
  .lobby-status-card {
    grid-template-columns: 76px 1fr;
    gap: 14px;
    min-height: 0;
    padding: 18px;
    border-radius: 20px;
  }

  .lobby-status-card > img {
    width: 76px;
    height: 68px;
  }

  .join-code-display {
    grid-column: 1 / -1;
    width: 100%;
  }

  .private-game-actions,
  .lobby-actions,
  .join-code-form > div {
    grid-template-columns: 1fr;
  }

  .app {
    padding: max(18px, env(safe-area-inset-top)) 16px calc(108px + env(safe-area-inset-bottom));
  }

  .growth-nav {
    top: 8px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 12px;
    background: rgba(8, 166, 218, 0.16);
  }

  .app:not([data-view="home"]) .growth-nav {
    justify-items: start;
  }

  .logo {
    width: min(70vw, 250px);
  }

  .nav-cta {
    width: 100%;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-account {
    flex: 0 0 58px;
    padding: 0;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .account-heading {
    display: grid;
  }

  .account-data-heading,
  .account-rating-summary {
    grid-template-columns: 1fr;
  }

  .match-history li {
    grid-template-columns: 72px 1fr;
  }

  .match-history em {
    grid-column: 2;
  }

  .config-layout {
    gap: 14px;
  }

  .mode-launcher,
  .side-picker {
    border-radius: 28px;
  }

  .mode-launcher-grid,
  .launcher-actions {
    grid-template-columns: 1fr;
  }

  .side-picker {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .side-tile {
    grid-template-columns: 88px 1fr;
    justify-items: start;
    min-height: 86px;
    text-align: left;
  }

  .side-split {
    grid-template-columns: 1fr 1fr;
  }

  .side-split .side-tile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .launch-mode-tile {
    grid-template-columns: 106px 1fr;
    justify-items: start;
    align-content: center;
    min-height: 138px;
    text-align: left;
  }

  .launch-mode-tile img {
    width: 100px;
    height: 86px;
  }

  .mode-showcase,
  .mode-grid,
  .tile-row,
  .store-grid,
  .setup-panel,
  .sticky-actions {
    grid-template-columns: 1fr;
  }

  .growth-mode-card {
    min-height: 166px;
    grid-template-columns: 120px 1fr;
    text-align: left;
  }

  .growth-mode-card img {
    width: 112px;
    height: 96px;
  }

  .shop-card.featured {
    min-height: auto;
  }

  .loadout-preview {
    grid-template-columns: 120px 1fr;
  }

  .loadout-preview img {
    width: 120px;
  }

  .loadout-preview strong {
    font-size: 32px;
  }

  .leaderboard-card {
    padding: 18px;
  }

  .rank-list {
    max-height: none;
  }

  .rank-list li {
    grid-template-columns: 54px 1fr auto;
    padding: 10px;
  }

  .rank-list strong {
    font-size: 18px;
  }

  .rank-list em {
    font-size: 22px;
  }

  .picker h1,
  .shop h1,
  .account h1 {
    margin-bottom: 24px;
    text-align: left;
    font-size: 44px;
  }

  .mode-card {
    min-height: 142px;
    grid-template-columns: 110px 1fr;
    gap: 14px;
    text-align: left;
  }

  .mode-card .mode-icon {
    width: 104px;
    height: 88px;
  }

  .color-cards {
    grid-template-columns: 1fr 1fr;
  }

  .color-card {
    min-height: 138px;
  }

  .color-card img {
    height: 78px;
  }

  .select-tile {
    min-height: 154px;
    grid-template-columns: 140px 1fr;
    align-items: center;
    text-align: left;
  }

  .select-tile img,
  .world-row .select-tile img {
    width: 130px;
    height: 106px;
  }

  .product {
    grid-template-columns: 92px 1fr;
  }

  .product span {
    grid-column: 2;
    justify-self: start;
  }
}

/* Unavailable purchases stay hidden, including before JavaScript loads. */
.store-product-card[hidden], [data-shop-empty][hidden] { display: none !important; }
.shop-empty { max-width: 680px; margin: 24px auto 120px; padding: 24px; border-radius: 24px; background: rgba(255,255,255,.92); color: #00506b; text-align: center; }
.shop-empty p { line-height: 1.5; margin: 0 0 20px; }
