:root {
  color-scheme: dark;
  --bg-top: #1f1633;
  --bg-mid: #2f184f;
  --bg-bottom: #1c274f;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.18);
  --text-main: #fefcff;
  --text-soft: rgba(253, 245, 255, 0.72);
  --text-faint: rgba(253, 245, 255, 0.5);
  --accent-coral: #ff8f96;
  --accent-mint: #8effca;
  --accent-sun: #ffd56f;
  --accent-aqua: #74f1ff;
  --danger: #ff698b;
  --glow-primary: 0 16px 36px rgba(255, 155, 130, 0.34);
  --glow-secondary: 0 14px 28px rgba(157, 124, 255, 0.18);
  --shadow-heavy: 0 30px 80px rgba(9, 4, 30, 0.38);
  --shadow-soft: 0 18px 36px rgba(18, 10, 46, 0.22);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 30px;
  --space-7: 36px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 151, 255, 0.8) rgba(93, 62, 141, 0.3);
  scrollbar-gutter: stable both-edges;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(79, 48, 124, 0.42), rgba(45, 26, 88, 0.34));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 175, 224, 0.95), rgba(182, 126, 255, 0.92) 52%, rgba(110, 201, 255, 0.84));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 18px rgba(169, 129, 255, 0.22);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 192, 232, 0.98), rgba(196, 145, 255, 0.96) 52%, rgba(130, 213, 255, 0.88));
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI Semibold", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(255, 143, 150, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(116, 241, 255, 0.14), transparent 20%),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 45%, var(--bg-bottom));
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 40vmax;
  height: 40vmax;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
}

body::before {
  top: -10vmax;
  left: -8vmax;
  background: rgba(255, 124, 190, 0.24);
}

body::after {
  right: -10vmax;
  bottom: -12vmax;
  background: rgba(96, 211, 255, 0.18);
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    opacity var(--transition);
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px) scale(0.98);
}

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

p {
  margin: 0;
}

.app-shell {
  position: relative;
  width: 100%;
  padding: 14px 0 30px;
}

.hidden {
  display: none !important;
}

.dashboard-frame {
  width: min(1592px, calc(100vw - 36px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.glass {
  background: linear-gradient(180deg, var(--glass-strong), rgba(255, 255, 255, 0.08));
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-heavy),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.premium-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 24px;
  align-items: center;
  padding: 18px 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 187, 139, 0.22), transparent 22%),
    radial-gradient(circle at 78% 24%, rgba(116, 241, 255, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(255, 170, 190, 0.2), rgba(255, 214, 123, 0.12) 55%, rgba(116, 241, 255, 0.12)),
    linear-gradient(180deg, var(--glass-strong), rgba(255, 255, 255, 0.08));
}

.premium-spotlight-copy,
.premium-spotlight-heading {
  display: grid;
  gap: 8px;
}

.premium-spotlight-title,
#premium-spotlight-title {
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.08;
}

.premium-spotlight-body {
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 62ch;
}

.premium-spotlight-perks,
.premium-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}

.premium-spotlight-actions {
  justify-content: flex-end;
}

.premium-spotlight-status {
  background: rgba(36, 20, 67, 0.42);
}

.brand-block,
.ribbon-item,
.panel-section,
.hero-card,
.modal-card,
.daily-preview {
  display: grid;
  gap: var(--space-2);
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.92fr) minmax(520px, auto);
  gap: 22px;
  align-items: center;
  padding: 18px 22px 20px;
  border-radius: var(--radius-xl);
  margin-bottom: 0;
  width: 100%;
}

.brand-logo-wrap {
  display: grid;
  gap: 10px;
  align-items: start;
}

.brand-logo {
  display: block;
  width: clamp(240px, 27vw, 460px);
  max-width: 100%;
  height: auto;
  filter:
    drop-shadow(0 18px 32px rgba(12, 6, 38, 0.32))
    drop-shadow(0 6px 14px rgba(255, 255, 255, 0.1));
}

.brand-logo-wrap.has-logo .brand-copy {
  display: none;
}

.brand-logo.is-missing {
  display: none;
}

.brand-logo-wrap.is-fallback .brand-copy {
  display: grid;
  gap: 10px;
}

.brand-copy {
  display: grid;
  gap: 10px;
}

.brand-block h1,
.brand-block h2,
.panel-heading h2,
.panel-heading h3,
.hero-card h2,
.modal-card h2 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  letter-spacing: 0.01em;
}

.brand-block h1 {
  font-size: clamp(2rem, 2.4vw, 3rem);
  line-height: 1;
}

.eyebrow,
.mini-label,
.label {
  margin: 0;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.top-stats,
.top-actions,
.hero-actions,
.feature-row,
.panel-heading,
.score-ribbon,
.daily-card,
.booster-grid,
.game-over-stats,
.mission-heading,
.mission-footer {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.top-stats {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
}

.homescreen-cta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 18px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 167, 174, 0.14), rgba(255, 212, 112, 0.11) 56%, rgba(116, 241, 255, 0.12)),
    rgba(255, 255, 255, 0.06);
}

.homescreen-copy {
  display: grid;
  gap: 6px;
}

.homescreen-copy strong {
  font-size: 1.05rem;
  line-height: 1.16;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}

.homescreen-copy span:last-child {
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 0.92rem;
}

.homescreen-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.action-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.status-cluster {
  margin-right: 4px;
}

.stat-pill,
.tag,
.feature-chip {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.stat-pill {
  min-width: 106px;
  display: grid;
  gap: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
}

.stat-pill strong {
  font-size: 1.25rem;
  line-height: 1;
}

.stat-pill strong,
.ribbon-item strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.ribbon-item-score strong {
  display: inline-block;
  min-width: 5.25ch;
}

.combo-head strong {
  min-width: 4.2ch;
  text-align: right;
}

.tag {
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
}

.feature-chip {
  font-size: 0.84rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.status-indicator,
.premium-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-indicator {
  color: rgba(247, 241, 255, 0.78);
  background: rgba(18, 12, 42, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.status-indicator.is-pending {
  color: rgba(255, 243, 204, 0.9);
  border-color: rgba(255, 213, 111, 0.18);
  background: rgba(63, 39, 75, 0.44);
}

.status-indicator.is-warning {
  color: rgba(255, 222, 236, 0.92);
  border-color: rgba(255, 143, 150, 0.22);
  background: rgba(78, 26, 64, 0.46);
}

.premium-mini-badge {
  color: #321b42;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 220, 124, 0.96), rgba(255, 177, 214, 0.92) 56%, rgba(137, 245, 255, 0.92));
  box-shadow: 0 10px 22px rgba(255, 205, 112, 0.18);
}

.primary-btn,
.ghost-btn,
.booster-btn,
.shop-card button,
.premium-card button {
  min-height: 48px;
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 700;
}

.primary-btn {
  background: linear-gradient(135deg, #ff8a8f, #ffbe70 55%, #9effb6);
  color: #351b39;
  box-shadow: var(--glow-primary);
}

.ghost-btn {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.top-action-btn {
  min-height: 46px;
  padding-inline: 16px;
}

.top-action-primary {
  background:
    linear-gradient(135deg, rgba(255, 167, 174, 0.88), rgba(255, 211, 112, 0.86) 56%, rgba(140, 244, 203, 0.8)),
    rgba(255, 255, 255, 0.08);
  color: #301842;
  border-color: rgba(255, 235, 244, 0.26);
  box-shadow: var(--glow-primary);
}

.top-action-primary.is-ready {
  box-shadow:
    0 0 0 1px rgba(255, 232, 143, 0.32),
    0 18px 36px rgba(255, 190, 110, 0.24);
}

.top-action-secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07)),
    rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: var(--glow-secondary);
}

.top-action-utility {
  color: var(--text-soft);
  background: rgba(21, 15, 44, 0.34);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ghost-btn.is-muted {
  color: var(--text-soft);
  background: rgba(24, 16, 48, 0.32);
  border-color: rgba(255, 177, 214, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.large {
  font-size: 1rem;
  padding: 14px 20px;
}

.layout {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(280px, 302px) minmax(860px, 960px) minmax(272px, 302px);
  gap: 18px;
  justify-content: center;
  align-items: start;
}

.side-panel,
.stage-shell,
.control-row,
.score-ribbon {
  border-radius: var(--radius-xl);
}

.side-panel {
  min-width: 0;
  width: 100%;
  padding: 22px;
  display: grid;
  gap: 24px;
  min-height: calc(100vh - 150px);
}

.panel-section {
  min-width: 0;
  gap: 16px;
}

.panel-heading {
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.panel-heading h2,
.panel-heading h3 {
  line-height: 1.04;
}

.daily-card,
.meta-card,
.premium-card,
.mission-card,
.shop-item,
.collection-item {
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.daily-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
}

.daily-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
  line-height: 1;
}

.reward-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 186px);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px 12px;
  margin: 0 -4px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 209, 248, 0.72) rgba(136, 105, 184, 0.22);
}

.reward-track::-webkit-scrollbar {
  height: 10px;
}

.reward-track::-webkit-scrollbar-track {
  background: linear-gradient(90deg, rgba(142, 112, 197, 0.18), rgba(116, 241, 255, 0.08));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.reward-track::-webkit-scrollbar-thumb {
  background:
    linear-gradient(135deg, rgba(255, 177, 214, 0.95), rgba(255, 224, 123, 0.88) 55%, rgba(124, 243, 255, 0.9));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 18px rgba(255, 173, 224, 0.24);
}

.reward-track::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(135deg, rgba(255, 195, 222, 1), rgba(255, 231, 146, 0.96) 55%, rgba(143, 247, 255, 0.96));
}

.viewport-fitted {
  overflow-x: hidden;
  overflow-y: auto;
}

.reward-day {
  scroll-snap-align: start;
  border-radius: 20px;
  min-height: 170px;
  padding: 16px 16px 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 32px rgba(18, 10, 46, 0.18);
}

.reward-day.active {
  background:
    linear-gradient(180deg, rgba(255, 223, 111, 0.24), rgba(255, 173, 214, 0.12) 54%, rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 223, 111, 0.36);
  box-shadow:
    0 18px 40px rgba(255, 199, 118, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.reward-day.claimed {
  opacity: 0.72;
}

.reward-kicker {
  color: rgba(255, 244, 255, 0.78);
}

.reward-value {
  font-size: 1.45rem;
  line-height: 1.05;
}

.reward-copy {
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.35;
  min-height: 2.4em;
}

.reward-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.perk-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
  color: rgba(255, 251, 255, 0.94);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.mission-list,
.event-feed,
.collection-grid,
.shop-grid,
.shop-sections {
  display: grid;
  gap: 14px;
}

.mission-card {
  display: grid;
  gap: 14px;
}

.mission-card.completed {
  box-shadow:
    inset 0 0 0 1px rgba(142, 255, 202, 0.38),
    var(--shadow-soft);
}

.mission-card.claimed {
  opacity: 0.58;
}

.mission-heading {
  justify-content: space-between;
  align-items: start;
}

.mission-title {
  display: block;
  font-size: 1.18rem;
  line-height: 1.1;
}

.mission-copy {
  color: rgba(255, 248, 255, 0.9);
  line-height: 1.45;
  font-size: 1rem;
}

.progress-rail,
.combo-meter {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill,
.combo-meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7dc2, #ffd56f 55%, #74f1ff);
  transition: width 150ms ease;
}

.mission-footer {
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.mission-progress-text {
  color: var(--text-main);
  font-size: 0.98rem;
  line-height: 1.1;
}

.booster-grid,
.shop-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.booster-btn {
  display: grid;
  align-content: start;
  gap: 6px;
  text-align: left;
  min-height: 92px;
  color: var(--text-main);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
}

.booster-btn span:first-child {
  color: var(--text-soft);
}

.booster-btn strong {
  font-size: 1.35rem;
  line-height: 1;
}

.booster-btn.active {
  box-shadow: inset 0 0 0 1px rgba(116, 241, 255, 0.4), 0 0 32px rgba(116, 241, 255, 0.22);
}

.stage-column {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  min-width: 0;
}

.score-ribbon {
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(255, 154, 203, 0.08), rgba(116, 241, 255, 0.04));
}

.score-ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 207, 128, 0.12), transparent 22%),
    radial-gradient(circle at 76% 22%, rgba(131, 233, 255, 0.12), transparent 24%);
}

.ribbon-item {
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.ribbon-item strong {
  font-size: 1.85rem;
  line-height: 1;
}

.ribbon-item-score strong,
.combo-value {
  text-shadow: 0 8px 24px rgba(255, 179, 214, 0.18);
}

.combo-ribbon {
  flex: 1.35;
  max-width: 390px;
  transition: transform 220ms ease, filter 220ms ease;
}

.combo-ribbon.is-energized {
  animation: comboPulse 420ms ease;
}

.score-value.is-bumping {
  animation: statPop 320ms ease;
}

.combo-value.is-bumping {
  animation: comboPop 360ms ease;
}

.combo-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.stage-shell {
  position: relative;
  padding: 18px 18px 16px;
  overflow: hidden;
  scroll-margin-top: 14px;
  background:
    linear-gradient(180deg, rgba(118, 86, 185, 0.18), rgba(48, 28, 96, 0.1)),
    linear-gradient(180deg, var(--glass-strong), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 32px 84px rgba(9, 4, 30, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.score-ribbon,
.stage-shell,
.control-row {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

#game-canvas {
  display: block;
  width: min(100%, 920px);
  height: auto;
  margin: 0 auto;
  border-radius: 28px;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 20px 42px rgba(11, 4, 34, 0.28));
}

.overlay-screen {
  position: absolute;
  inset: 16px;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 28px;
  background: rgba(12, 10, 28, 0.44);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

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

.overlay-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.hero-card,
.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  padding: 30px;
  border-radius: 30px;
  text-align: center;
}

.hero-copy {
  color: var(--text-soft);
  line-height: 1.6;
  font-size: 1rem;
}

.hero-actions,
.feature-row {
  justify-content: center;
  flex-wrap: wrap;
}

.shop-card {
  width: min(100%, 820px);
  text-align: left;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  max-height: min(calc(100% - 4px), 860px);
  overflow: hidden;
}

.shop-card > .panel-heading:first-child {
  margin-bottom: 0;
}

.shop-item,
.collection-item,
.event-item,
.premium-card,
.meta-card {
  display: grid;
  gap: 10px;
}

.shop-item strong,
.collection-item strong,
.event-item strong {
  line-height: 1.08;
}

.swatch-row {
  display: flex;
  gap: 8px;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.shop-sections {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 151, 255, 0.82) rgba(77, 45, 126, 0.28);
}

.shop-sections section {
  display: grid;
  gap: 14px;
}

.shop-sections::-webkit-scrollbar {
  width: 12px;
}

.shop-sections::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(76, 44, 128, 0.34), rgba(43, 25, 84, 0.3));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.shop-sections::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 170, 227, 0.94), rgba(180, 122, 255, 0.94) 52%, rgba(120, 194, 255, 0.86));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(169, 129, 255, 0.18);
}

.shop-sections::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 190, 234, 0.98), rgba(194, 144, 255, 0.96) 52%, rgba(136, 210, 255, 0.9));
}

.collection-item {
  min-height: 132px;
}

.collection-item.locked {
  opacity: 0.5;
}

.fruit-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fruit-badge > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.fruit-orb {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.18);
}

.event-feed {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 209, 248, 0.48) rgba(255, 255, 255, 0.08);
}

.event-feed::-webkit-scrollbar {
  width: 10px;
}

.event-feed::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.event-feed::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 189, 219, 0.88), rgba(124, 243, 255, 0.78));
}

.event-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.event-item span,
.collection-item span,
.premium-card p,
.meta-card p,
.shop-item p {
  color: var(--text-soft);
  line-height: 1.45;
}

.control-row {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.02);
}

.control-row > div {
  display: grid;
  gap: 8px;
}

.control-row strong {
  line-height: 1.45;
}

.daily-preview {
  justify-items: center;
  gap: 12px;
}

.ad-card {
  width: min(100%, 520px);
}

.ad-meter {
  margin: 16px 0 8px;
}

.right-panel {
  position: sticky;
  top: 12px;
}

.compact-heading {
  justify-content: space-between;
}

.modal-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.account-card,
.profile-card,
.leaderboard-card {
  width: min(100%, 860px);
  text-align: left;
}

.profile-card {
  width: min(100%, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  max-height: min(calc(100% - 4px), 900px);
  overflow: hidden;
}

.auth-grid,
.profile-stats-grid,
.profile-sections {
  display: grid;
  gap: 16px;
}

.auth-mode-row {
  justify-content: flex-start;
  margin: 2px 0 6px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.field-label-wide {
  grid-column: 1 / -1;
}

.field-label input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 13px 14px;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.field-label input::placeholder {
  color: var(--text-faint);
}

.auth-actions-row,
.profile-actions-row,
.compact-actions,
.profile-badges,
.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.auth-copy,
.auth-status-copy {
  max-width: 64ch;
}

.auth-social-row {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.auth-divider {
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.auth-google-btn {
  min-width: min(100%, 320px);
  justify-content: center;
  gap: 12px;
}

.auth-google-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  color: #2d194c;
  background: linear-gradient(135deg, #7cd5ff 0%, #faf2ff 35%, #ff9fd7 68%, #ffd36f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 22px rgba(120, 194, 255, 0.14);
}

.profile-scroll-area {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 151, 255, 0.82) rgba(77, 45, 126, 0.28);
  display: grid;
  gap: 18px;
}

.profile-scroll-area::-webkit-scrollbar {
  width: 12px;
}

.profile-scroll-area::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(76, 44, 128, 0.34), rgba(43, 25, 84, 0.3));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.profile-scroll-area::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 170, 227, 0.94), rgba(180, 122, 255, 0.94) 52%, rgba(120, 194, 255, 0.86));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(169, 129, 255, 0.18);
}

.profile-scroll-area::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 190, 234, 0.98), rgba(194, 144, 255, 0.96) 52%, rgba(136, 210, 255, 0.9));
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.avatar-orb {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.55rem;
  background: linear-gradient(135deg, rgba(255, 152, 202, 0.96), rgba(255, 216, 111, 0.88) 50%, rgba(116, 241, 255, 0.92));
  box-shadow: 0 20px 42px rgba(255, 153, 192, 0.22);
  color: #27133f;
}

.profile-hero-copy {
  display: grid;
  gap: 12px;
}

.inline-field input {
  max-width: 320px;
}

.profile-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-stat-card,
.achievement-card,
.weekly-goal-card,
.collection-summary-card,
.leaderboard-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-soft);
}

.profile-stat-card strong,
.leaderboard-row strong {
  font-size: 1.25rem;
  line-height: 1;
}

.collection-summary-card strong,
.achievement-card strong,
.weekly-goal-card strong {
  line-height: 1.18;
}

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

.profile-sections section {
  display: grid;
  gap: 12px;
}

.stack-list,
.leaderboard-list {
  display: grid;
  gap: 12px;
}

.achievement-card.unlocked,
.weekly-goal-card.completed {
  background: linear-gradient(180deg, rgba(255, 221, 123, 0.14), rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 219, 120, 0.34);
}

.progress-rail.secondary {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill.secondary {
  background: linear-gradient(90deg, rgba(124, 243, 255, 0.9), rgba(255, 213, 111, 0.92), rgba(255, 125, 194, 0.94));
}

.tab-btn {
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 143, 150, 0.92), rgba(255, 213, 111, 0.88) 54%, rgba(116, 241, 255, 0.84));
  color: #27133f;
}

.leaderboard-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
}

.rank-pill {
  min-width: 52px;
  text-align: center;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.leaderboard-row .mini-label {
  margin-top: 4px;
}

.empty-state {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  text-align: center;
}

.reward-action-btn,
#claim-daily-inline-btn,
#daily-claim-btn {
  box-shadow:
    0 14px 30px rgba(255, 180, 117, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.reward-action-btn:hover,
#claim-daily-inline-btn:hover,
#daily-claim-btn:hover {
  box-shadow:
    0 18px 34px rgba(255, 186, 124, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.daily-modal-actions {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.daily-modal-actions .primary-btn,
.daily-modal-actions .ghost-btn {
  width: 100%;
}

@keyframes statPop {
  0% {
    transform: scale(1);
  }

  35% {
    transform: scale(1.08);
  }

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

@keyframes comboPop {
  0% {
    transform: scale(1);
    filter: saturate(1);
  }

  40% {
    transform: scale(1.12);
    filter: saturate(1.16);
  }

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

@keyframes comboPulse {
  0% {
    transform: scale(1);
    filter: saturate(1);
  }

  38% {
    transform: scale(1.02);
    filter: saturate(1.18);
  }

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

body.mobile-performance::before,
body.mobile-performance::after {
  opacity: 0.18;
  filter: blur(54px);
}

body.mobile-performance .glass {
  backdrop-filter: blur(10px);
}

body.mobile-performance .side-panel,
body.mobile-performance .stage-shell,
body.mobile-performance .control-row,
body.mobile-performance .score-ribbon,
body.mobile-performance .daily-card,
body.mobile-performance .meta-card,
body.mobile-performance .premium-card,
body.mobile-performance .mission-card,
body.mobile-performance .shop-item,
body.mobile-performance .collection-item,
body.mobile-performance .profile-stat-card,
body.mobile-performance .achievement-card,
body.mobile-performance .weekly-goal-card,
body.mobile-performance .collection-summary-card,
body.mobile-performance .leaderboard-row {
  box-shadow:
    0 14px 30px rgba(18, 10, 46, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.mobile-performance #game-canvas {
  filter: drop-shadow(0 14px 28px rgba(11, 4, 34, 0.22));
}

@media (min-width: 981px) {
  .homescreen-cta {
    display: none !important;
  }
}

@media (min-width: 1201px) {
  .app-shell {
    min-height: 100dvh;
    padding: 10px 0 12px;
  }

  .dashboard-frame {
    min-height: calc(100dvh - 22px);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
  }

  .top-bar {
    padding: 16px 20px;
  }

  .layout {
    min-height: 0;
    height: 100%;
    align-items: stretch;
  }

  .side-panel {
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 209, 248, 0.48) rgba(255, 255, 255, 0.08);
  }

  .side-panel::-webkit-scrollbar {
    width: 10px;
  }

  .side-panel::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
  }

  .side-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 189, 219, 0.88), rgba(124, 243, 255, 0.78));
  }

  .stage-column {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .stage-shell {
    min-height: 0;
    max-height: var(--stage-shell-max-height, none);
    padding: 14px;
    display: grid;
    align-items: center;
  }

  .score-ribbon {
    padding: 16px 18px;
  }

  #game-canvas {
    width: auto;
    max-width: min(100%, 920px);
    max-height: var(--board-fit-height, 100%);
  }
}

@media (min-width: 1850px) {
  .dashboard-frame {
    width: min(1580px, calc(100vw - 120px));
  }

  .layout {
    grid-template-columns: minmax(280px, 298px) minmax(900px, 952px) minmax(272px, 298px);
    gap: 18px;
  }

  .stage-column,
  .score-ribbon,
  .stage-shell,
  .control-row {
    max-width: 952px;
  }
}

@media (max-width: 1500px) {
  .layout {
    grid-template-columns: minmax(320px, 364px) minmax(0, 1fr);
  }

  .stage-column,
  .score-ribbon,
  .stage-shell,
  .control-row {
    max-width: none;
  }

  .right-panel {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-height: 1000px) and (min-width: 1201px) {
  .top-bar {
    padding: 14px 18px;
  }

  .dashboard-frame {
    gap: 14px;
  }

  .side-panel {
    padding: 18px;
    gap: 18px;
  }

  .score-ribbon {
    padding: 14px 18px;
  }

  .control-row {
    display: none;
  }
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .right-panel {
    min-height: auto;
    position: static;
  }

  .stage-column {
    order: -1;
  }

  #game-canvas {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .dashboard-frame {
    width: min(100vw - 16px, 980px);
  }

  .top-bar {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 16px;
    padding: 18px;
  }

  .brand-block,
  .brand-logo-wrap,
  .brand-copy {
    width: 100%;
    justify-items: center;
    text-align: center;
  }

  .brand-logo-wrap {
    align-items: center;
  }

  .brand-logo {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  .top-stats,
  .top-actions {
    justify-content: flex-start;
  }

  .premium-spotlight {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .premium-spotlight-actions {
    justify-content: flex-start;
  }

  .homescreen-cta {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .homescreen-actions {
    justify-content: stretch;
  }

  .status-cluster {
    margin-right: 0;
  }

  .score-ribbon {
    flex-direction: column;
    align-items: stretch;
  }

  .combo-ribbon {
    max-width: none;
  }

  .reward-track {
    grid-auto-columns: minmax(178px, 220px);
  }

  .overlay-screen {
    padding: 16px;
  }

  .hero-card,
  .modal-card {
    padding: 24px;
  }

  .auth-grid,
  .profile-sections,
  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .side-panel,
  .stage-shell {
    padding: 18px;
  }

  .daily-card {
    grid-template-columns: 1fr;
  }

  .mission-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .booster-grid,
  .shop-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .reward-track {
    grid-auto-columns: minmax(180px, 72vw);
  }

  .control-row {
    padding: 16px 18px;
  }

  .auth-grid,
  .profile-sections,
  .profile-stats-grid,
  .leaderboard-row {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  #game-canvas {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .dashboard-frame {
    width: calc(100vw - 10px);
  }

  .brand-logo {
    width: min(100%, 320px);
  }

  .top-bar,
  .side-panel,
  .score-ribbon,
  .stage-shell {
    border-radius: 28px;
  }

  .top-actions {
    width: 100%;
  }

  .action-cluster,
  .top-actions button,
  .hero-actions button,
  .premium-spotlight-actions button,
  .homescreen-actions button {
    width: 100%;
  }

  .status-indicator,
  .premium-mini-badge,
  .premium-spotlight-status {
    width: 100%;
    justify-content: center;
  }

  .daily-card strong,
  .ribbon-item strong {
    font-size: 1.55rem;
  }

  .hero-card,
  .modal-card {
    padding: 22px 18px;
  }

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

  .reward-day {
    min-height: 162px;
  }
}

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

