
:root {
  --bg: #050811;
  --bg-2: #090f21;
  --panel: rgba(9, 14, 30, 0.82);
  --panel-strong: rgba(18, 26, 52, 0.96);
  --text: #eef3ff;
  --muted: #a4b4df;
  --line: rgba(122, 161, 255, 0.17);
  --line-strong: rgba(137, 182, 255, 0.28);
  --time: #6fe7ff;
  --space: #8f86ff;
  --star: #9fd6ff;
  --system: #c5a3ff;
  --galaxy: #b48cff;
  --parallel: #d7c2ff;
  --danger: #fb7185;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(111,231,255,0.16), transparent 24rem),
    radial-gradient(circle at 82% 10%, rgba(143,134,255,0.20), transparent 26rem),
    radial-gradient(circle at 50% 100%, rgba(180,140,255,0.11), transparent 32rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 52%, #05070f 100%);
  overflow-x: hidden;
}
body:before,
body:after { content: ""; position: fixed; inset: 0; pointer-events: none; }
body:before {
  opacity: 0.30;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.34) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(111,231,255,0.22) 0 1px, transparent 1.6px);
  background-size: 92px 92px, 144px 144px;
  background-position: 0 0, 38px 19px;
  animation: driftStars 50s linear infinite;
}
body:after {
  background:
    radial-gradient(circle at center, rgba(111,231,255,0.06), transparent 14rem),
    radial-gradient(circle at center, rgba(143,134,255,0.05), transparent 22rem);
  mix-blend-mode: screen;
  animation: cosmicPulse 12s ease-in-out infinite;
}
img { max-width: 100%; display: block; }
button {
  border: 0;
  border-radius: 18px;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
button:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
button:disabled { cursor: not-allowed; opacity: 0.45; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 44px; }
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13,18,37,0.88), rgba(8,12,26,0.84));
  backdrop-filter: blur(18px);
  border-radius: 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}
.panel:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(111,231,255,0.04), transparent 32%, rgba(143,134,255,0.06));
}
.panel > * { position: relative; z-index: 1; }

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  isolation: isolate;
}
.hero:after {
  content: "";
  position: absolute;
  inset: -10% -8% -10% 32%;
  background: url('emblem.png') center right / 62% no-repeat;
  opacity: 0.10;
  mix-blend-mode: screen;
  filter: saturate(1.15) blur(0.2px);
  z-index: 0;
  animation: heroDrift 16s ease-in-out infinite;
}
.hero:before {
  content: "";
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  right: 8%;
  top: 8%;
  border-radius: 50%;
  border: 1px solid rgba(143,134,255,0.11);
  box-shadow: 0 0 0 38px rgba(111,231,255,0.02), 0 0 0 92px rgba(143,134,255,0.018);
  animation: orbitPulse 10s ease-in-out infinite;
  z-index: 0;
}
.hero-copy { max-width: 760px; }
.eyebrow { margin: 0 0 14px; color: var(--time); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem; font-weight: 900; }
.hero-wordmark {
  width: min(520px, 100%);
  margin: 0 0 4px;
  filter: drop-shadow(0 0 28px rgba(111,231,255,0.14)) drop-shadow(0 0 24px rgba(143,134,255,0.12));
}
.subtitle { max-width: 760px; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; line-height: 1.62; }
.phase-pill {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(111,231,255,0.28);
  border-radius: 999px;
  background: rgba(111,231,255,0.08);
  color: #e7f9ff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 0 18px rgba(111,231,255,0.05), 0 0 20px rgba(111,231,255,0.05);
}
.sigil {
  min-width: 250px;
  min-height: 250px;
  width: 250px;
  height: 250px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(111,231,255,0.12), transparent 52%),
    radial-gradient(circle at center, rgba(143,134,255,0.10), transparent 72%);
}
.sigil:before,
.sigil:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.10);
}
.sigil:before { inset: 10px; animation: slowSpin 28s linear infinite; }
.sigil:after { inset: 36px; border-color: rgba(143,134,255,0.16); animation: reverseSpin 24s linear infinite; }
.sigil-core {
  position: absolute;
  inset: 10px;
  background: url('emblem.png') center / 88% no-repeat;
  opacity: 0.74;
  filter: drop-shadow(0 0 20px rgba(111,231,255,0.14));
  animation: emblemFloat 8s ease-in-out infinite;
}
.sigil-core:before,
.sigil-core:after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(111,231,255,0.14);
}
.sigil-core:before { transform: scale(1.05, 0.68) rotate(14deg); }
.sigil-core:after { transform: scale(1.18, 0.76) rotate(-16deg); border-color: rgba(143,134,255,0.14); }

.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.stat {
  padding: 18px;
  position: relative;
  background: linear-gradient(180deg, rgba(10,15,31,0.92), rgba(6,9,21,0.9));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(0,0,0,0.28), 0 0 26px rgba(111,231,255,0.05);
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 34%);
}
.stat::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.7), rgba(255,255,255,0.08));
  opacity: 0.72;
}
.stats-grid .stat:nth-child(1)::before { background: linear-gradient(90deg, rgba(111,231,255,0.12), var(--time), rgba(111,231,255,0.12)); }
.stats-grid .stat:nth-child(2)::before { background: linear-gradient(90deg, rgba(143,134,255,0.12), var(--space), rgba(143,134,255,0.12)); }
.stats-grid .stat:nth-child(3)::before { background: linear-gradient(90deg, rgba(159,214,255,0.12), var(--star), rgba(159,214,255,0.12)); }
.stats-grid .stat:nth-child(4)::before { background: linear-gradient(90deg, rgba(197,163,255,0.12), var(--system), rgba(197,163,255,0.12)); }
.stats-grid .stat:nth-child(5)::before { background: linear-gradient(90deg, rgba(180,140,255,0.12), var(--galaxy), rgba(180,140,255,0.12)); }
.stats-grid .stat:nth-child(6)::before { background: linear-gradient(90deg, rgba(215,194,255,0.12), var(--parallel), rgba(215,194,255,0.12)); }
.stat span, .mini-stats span { display: block; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.stat strong { display: block; margin: 6px 0; font-size: clamp(1.5rem, 3.2vw, 2.55rem); letter-spacing: -0.04em; }
.stat em { color: var(--time); font-style: normal; font-weight: 750; }
.stats-grid .stat:nth-child(2) em { color: var(--space); }
.stats-grid .stat:nth-child(3) em { color: var(--star); }
.stats-grid .stat:nth-child(4) em { color: var(--system); }
.stats-grid .stat:nth-child(5) em { color: var(--galaxy); }
.stats-grid .stat:nth-child(6) em { color: var(--parallel); }
.game-grid { display: grid; grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.3fr); gap: 16px; align-items: start; }
.game-grid .panel { padding: 24px; }
h2 { margin: 0 0 12px; font-size: 1.2rem; letter-spacing: -0.03em; }
p { color: var(--muted); line-height: 1.55; }
.primary-btn, .secondary-btn { width: 100%; min-height: 68px; font-size: 1.1rem; margin: 10px 0 14px; }
.primary-btn {
  background: linear-gradient(135deg, #12b5ff, #6f73ff 58%, #9d69ff);
  box-shadow: 0 18px 42px rgba(18, 181, 255, 0.22), inset 0 1px 0 rgba(255,255,255,0.20);
}
.secondary-btn {
  background: linear-gradient(135deg, #5fe8ff, #5d9cff 54%, #a06dff);
  box-shadow: 0 18px 42px rgba(103, 155, 255, 0.18), inset 0 1px 0 rgba(255,255,255,0.20);
}
.ghost-btn, .danger-btn {
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
}
.ghost-btn:hover:not(:disabled), .danger-btn:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(255,255,255,0.05) inset; }
.danger-btn { color: #fecdd3; background: rgba(251, 113, 133, 0.12); }
.mini-stats { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.04); }
.mini-stats strong { font-size: 1.35rem; text-align: right; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.upgrades { grid-row: span 3; }
.upgrade {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 16px;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.036), rgba(255,255,255,0.022)); margin-bottom: 12px;
}
.upgrade.locked { opacity: 0.62; background: rgba(255,255,255,0.022); }
.upgrade h3 { margin: 0 0 5px; font-size: 1rem; }
.upgrade p { margin: 0; font-size: 0.9rem; }
.upgrade button { min-width: 178px; padding: 13px 16px; background: var(--panel-strong); border: 1px solid var(--line-strong); }
.upgrade .owned { color: #c9d7ff; font-weight: 900; }
.upgrade .unlock { display: inline-flex; margin-top: 8px; color: #dbe3ff; font-size: 0.78rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.08em; }
.hint { min-height: 48px; margin-bottom: 0; }
.log-card ol { margin: 0; padding-left: 20px; color: var(--muted); }
.log-card li { margin: 0 0 9px; line-height: 1.4; }
.ladder { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; color: var(--muted); }
.ladder span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.04); font-weight: 850; font-size: 0.86rem; color: #e6edff; }
.ladder b { color: var(--time); }
.hidden { display: none !important; }
.intro-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.intro-card {
  width: min(860px, 100%);
  min-height: 540px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 24px;
  text-align: center;
  padding: 42px;
}
.intro-card:after {
  content: "";
  position: absolute;
  inset: auto;
  width: min(74vw, 560px);
  height: min(74vw, 560px);
  border-radius: 50%;
  border: 1px solid rgba(111,231,255,0.10);
  box-shadow: inset 0 0 70px rgba(111,231,255,0.09), 0 0 90px rgba(143,134,255,0.08);
  z-index: 0;
  animation: orbitPulse 10s ease-in-out infinite;
}
.intro-logo {
  width: min(680px, 100%);
  filter: drop-shadow(0 0 36px rgba(111,231,255,0.16)) drop-shadow(0 0 34px rgba(143,134,255,0.13));
  animation: introFloat 8s ease-in-out infinite;
}
.intro-copy { max-width: 600px; margin: 0; color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
.intro-start { width: min(360px, 100%); min-height: 76px; font-size: 1.2rem; letter-spacing: 0.03em; }

@keyframes driftStars {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-46px, 32px, 0); }
}
@keyframes cosmicPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(1.04); }
}
@keyframes heroDrift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); opacity: 0.09; }
  50% { transform: translate3d(-8px, 6px, 0) scale(1.03); opacity: 0.13; }
}
@keyframes orbitPulse {
  0%, 100% { transform: scale(1); opacity: 0.62; }
  50% { transform: scale(1.03); opacity: 0.9; }
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes reverseSpin {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes emblemFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.72; }
  50% { transform: translateY(-5px) scale(1.02); opacity: 0.84; }
}
@keyframes introFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@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;
  }
}

@media (max-width: 980px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .hero { align-items: flex-start; flex-direction: column; }
  .hero:after { inset: 12% -15% -4% 8%; background-size: 84%; background-position: center; opacity: 0.08; }
  .hero:before { width: 70%; right: 2%; top: 14%; }
  .sigil { min-width: 190px; min-height: 190px; width: 190px; height: 190px; }
  .game-grid { grid-template-columns: 1fr; }
  .upgrades { grid-row: auto; }
}
@media (max-width: 620px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .hero, .game-grid .panel, .intro-card { padding: 20px; border-radius: 22px; }
  .stats-grid { grid-template-columns: 1fr; }
  .upgrade { grid-template-columns: 1fr; }
  .upgrade button { width: 100%; }
  .intro-card { min-height: 420px; gap: 18px; }
  .sigil { min-width: 150px; min-height: 150px; width: 150px; height: 150px; }
}


/* v15 premium/game feel upgrades */
.primary-btn, .secondary-btn, .upgrade button, .ghost-btn, .danger-btn {
  position: relative;
  overflow: hidden;
}
.primary-btn::before, .secondary-btn::before, .upgrade button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.08) 28%, rgba(255,255,255,0.22) 48%, transparent 70%);
  transform: translateX(-140%);
  transition: transform 520ms ease;
  pointer-events: none;
}
.primary-btn:hover::before, .secondary-btn:hover::before, .upgrade button:hover::before {
  transform: translateX(140%);
}
.core-card {
  min-height: 320px;
  background:
    radial-gradient(circle at 78% 18%, rgba(111,231,255,0.10), transparent 18rem),
    radial-gradient(circle at 25% 85%, rgba(143,134,255,0.10), transparent 18rem),
    linear-gradient(180deg, rgba(12,17,34,0.94), rgba(7,11,23,0.92));
}
.core-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -44px;
  top: -44px;
  border-radius: 50%;
  border: 1px solid rgba(111,231,255,0.10);
  box-shadow: 0 0 0 26px rgba(111,231,255,0.03), 0 0 0 64px rgba(143,134,255,0.025);
  animation: orbitPulse 8s ease-in-out infinite;
}
.core-card h2 {
  font-size: 1.35rem;
}
.core-card .primary-btn {
  margin-top: 18px;
  min-height: 78px;
  font-size: 1.18rem;
  letter-spacing: 0.02em;
  box-shadow: 0 20px 46px rgba(18, 181, 255, 0.24), inset 0 1px 0 rgba(255,255,255,0.20), 0 0 0 1px rgba(255,255,255,0.06);
}
.core-card .primary-btn.gather-pulse {
  animation: gatherPulse 320ms ease;
}
.gain-float {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 52%);
  transform: translate(-50%, -50%);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
  color: #effbff;
  background: rgba(8, 14, 29, 0.62);
  border: 1px solid rgba(111,231,255,0.22);
  box-shadow: 0 10px 24px rgba(0,0,0,0.24), 0 0 18px rgba(111,231,255,0.14);
  pointer-events: none;
  animation: gainFloat 1100ms ease forwards;
  z-index: 3;
}
.upgrade {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.upgrade:hover {
  transform: translateY(-2px);
  border-color: rgba(137, 182, 255, 0.34);
  box-shadow: 0 20px 38px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.028));
}
.upgrade button {
  background: linear-gradient(135deg, rgba(17,28,57,0.96), rgba(30,41,82,0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.18);
}
.upgrade button:not(:disabled) {
  border-color: rgba(124, 160, 255, 0.36);
}
.upgrade button:not(:disabled):hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(0,0,0,0.24), 0 0 22px rgba(111,231,255,0.10);
}
.upgrade button:disabled {
  background: linear-gradient(135deg, rgba(18,24,42,0.84), rgba(18,24,42,0.92));
}
.upgrade.purchased {
  animation: purchaseFlash 520ms ease;
}
.upgrade .owned {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(111,231,255,0.07);
  border: 1px solid rgba(111,231,255,0.14);
}
.section-title h2, .prestige-card h2, .ladder-card h2, .log-card h2 {
  text-shadow: 0 0 18px rgba(111,231,255,0.06);
}
@keyframes gainFloat {
  0% { opacity: 0; transform: translate(-50%, -8px) scale(0.92); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(1.04); }
}
@keyframes gatherPulse {
  0% { transform: scale(1); }
  35% { transform: scale(0.985); }
  70% { transform: scale(1.015); }
  100% { transform: scale(1); }
}
@keyframes purchaseFlash {
  0% { box-shadow: 0 0 0 rgba(111,231,255,0); border-color: rgba(137,182,255,0.28); }
  35% { box-shadow: 0 0 0 1px rgba(111,231,255,0.26), 0 0 28px rgba(111,231,255,0.14); border-color: rgba(111,231,255,0.44); }
  100% { box-shadow: 0 20px 38px rgba(0,0,0,0.10); border-color: rgba(137,182,255,0.20); }
}


/* v16 progression/content polish */
.time-particle {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #6fe7ff 45%, rgba(111,231,255,0) 72%);
  box-shadow: 0 0 16px rgba(111,231,255,0.70);
  pointer-events: none;
  animation: particleBurst 820ms ease-out forwards;
  animation-delay: var(--delay, 0ms);
  z-index: 3;
}
.upgrade h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.upgrade p {
  color: #b7c4e7;
}
.upgrade:not(.locked)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fe7ff;
  box-shadow: 0 0 18px rgba(111,231,255,0.75);
  opacity: 0.75;
}
.upgrade.locked::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(164,180,223,0.38);
}
@keyframes particleBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25); }
}


/* v17 brand integration fixes */
.intro-brand {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.intro-mark,
.hero-mark {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at center, rgba(111,231,255,0.16), transparent 56%),
    radial-gradient(circle at center, rgba(143,134,255,0.14), transparent 74%);
}
.intro-mark::before,
.hero-mark::before,
.sigil-core {
  content: "";
  position: absolute;
  inset: 0;
  background: url('emblem_clean.png') center / contain no-repeat;
  filter: drop-shadow(0 0 16px rgba(111,231,255,0.18));
}
.intro-mark::after,
.hero-mark::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(143,134,255,0.12);
  box-shadow: 0 0 0 14px rgba(111,231,255,0.03), 0 0 0 34px rgba(143,134,255,0.02);
}
.brand-title {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.9rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
  font-weight: 800;
  color: transparent;
  background: linear-gradient(90deg, #9feaff 0%, #d8efff 26%, #b8bcff 52%, #d0a7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 18px rgba(111,231,255,0.06), 0 0 28px rgba(143,134,255,0.05);
}
.intro-title {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}
.brand-line {
  width: min(360px, 72vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(111,231,255,0), rgba(111,231,255,0.88) 30%, rgba(168,174,255,0.92) 52%, rgba(208,167,255,0.88) 72%, rgba(208,167,255,0));
  box-shadow: 0 0 14px rgba(111,231,255,0.16);
}
.brand-tag {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.30em;
  padding-left: 0.30em;
  font-size: 0.76rem;
  font-weight: 800;
  color: #a8bcf1;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.hero-mark {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
}
.hero-title {
  font-size: clamp(2.3rem, 5vw, 4rem);
}
.hero-line {
  width: min(280px, 52vw);
  margin-top: 8px;
}
.hero-tag {
  margin-top: 8px;
}
.hero:after {
  background: url('emblem_clean.png') center right / 44% no-repeat;
  opacity: 0.13;
}
.hero:before {
  width: 42%;
  right: 5%;
  top: 14%;
}
.sigil {
  min-width: 220px;
  min-height: 220px;
  width: 220px;
  height: 220px;
  background:
    radial-gradient(circle at center, rgba(111,231,255,0.10), transparent 52%),
    radial-gradient(circle at center, rgba(143,134,255,0.09), transparent 72%);
  box-shadow: inset 0 0 50px rgba(111,231,255,0.04);
}
.sigil-core {
  inset: 16px;
  opacity: 0.82;
  animation: emblemFloat 8s ease-in-out infinite;
}
.intro-card {
  min-height: 560px;
}
.intro-card::after {
  width: min(70vw, 520px);
  height: min(70vw, 520px);
}
.intro-copy {
  max-width: 640px;
}
@media (max-width: 860px) {
  .hero-brand { align-items: flex-start; }
  .hero-mark { width: 72px; height: 72px; }
  .hero-title { font-size: clamp(2rem, 8vw, 3.3rem); }
  .hero:after { background-size: 64%; opacity: 0.10; }
}
@media (max-width: 620px) {
  .hero-brand { gap: 12px; }
  .hero-mark { width: 58px; height: 58px; }
  .brand-tag { letter-spacing: 0.22em; padding-left: 0.22em; }
  .brand-title { letter-spacing: 0.12em; padding-left: 0.12em; }
}


/* v18 layout tightening */
.game-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.25fr);
  grid-template-areas:
    "core upgrades"
    "prestige upgrades"
    "ladder upgrades"
    "log upgrades";
  column-gap: 16px;
  row-gap: 12px;
  align-items: start;
  grid-auto-rows: min-content;
}
.core-card { grid-area: core; }
.upgrades {
  grid-area: upgrades;
  grid-row: auto;
  align-self: start;
}
.prestige-card { grid-area: prestige; }
.ladder-card { grid-area: ladder; }
.log-card { grid-area: log; }
.core-card,
.prestige-card,
.ladder-card,
.log-card {
  margin: 0;
}
.prestige-card p,
.ladder-card,
.log-card ol,
.core-card p {
  margin-bottom: 0;
}
.log-card ol {
  max-height: none;
}
@media (max-width: 860px) {
  .game-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "core"
      "upgrades"
      "prestige"
      "ladder"
      "log";
    gap: 12px;
  }
  .upgrades { grid-row: auto; }
}


/* v19 left column gap fix */
.game-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(340px, 1.25fr);
  gap: 16px;
  align-items: start;
}
.left-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}
.left-stack > .panel,
.upgrades {
  margin: 0;
}
.upgrades {
  grid-row: auto;
  align-self: start;
  height: fit-content;
}
.core-card,
.prestige-card,
.ladder-card,
.log-card {
  min-height: 0;
}
.prestige-card .secondary-btn,
.core-card .primary-btn {
  margin-bottom: 12px;
}
@media (max-width: 860px) {
  .game-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .left-stack {
    gap: 12px;
  }
}


/* v20 left stack visibility/layout hard fix */
.game-grid {
  display: grid !important;
  grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1.25fr) !important;
  gap: 16px !important;
  align-items: start !important;
}
.left-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  align-items: stretch !important;
  min-width: 0;
}
.left-stack > .panel {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  grid-area: auto !important;
  min-height: 0 !important;
}
.left-stack > .core-card,
.left-stack > .prestige-card,
.left-stack > .ladder-card,
.left-stack > .log-card {
  position: relative;
}
.upgrades {
  grid-area: auto !important;
  grid-row: auto !important;
  align-self: start !important;
  height: auto !important;
}
@media (max-width: 860px) {
  .game-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .left-stack {
    gap: 12px !important;
  }
}


/* v21 semantic resource labeling */
.stat strong {
  white-space: nowrap;
}
.core-card #corePower {
  white-space: nowrap;
}
.upgrade button {
  line-height: 1.18;
}


/* v23 stable construct rendering fixes */
.upgrades .unlock.hidden {
  display: none !important;
}
.upgrade {
  will-change: auto;
}
.upgrade button {
  min-height: 46px;
}


/* v24 remove unintended construct status dot */
.upgrade:not(.locked)::after,
.upgrade.locked::after {
  display: none !important;
  content: none !important;
}


/* v25 changelog link and page */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.site-footer a {
  pointer-events: auto;
  color: #c9d7ff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(137, 182, 255, 0.22);
  background: rgba(5, 8, 17, 0.70);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.04);
}
.site-footer a:hover {
  color: #ffffff;
  border-color: rgba(111,231,255,0.38);
  box-shadow: 0 12px 30px rgba(0,0,0,0.28), 0 0 24px rgba(111,231,255,0.10);
}
.changelog-shell {
  padding-bottom: 84px;
}
.changelog-hero {
  margin-bottom: 16px;
}
.back-link {
  display: inline-flex;
  margin-top: 20px;
  color: #e7f9ff;
  text-decoration: none;
  font-weight: 900;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(111,231,255,0.25);
  background: rgba(111,231,255,0.07);
}
.back-link:hover {
  border-color: rgba(111,231,255,0.44);
  background: rgba(111,231,255,0.11);
}
.changelog-list {
  display: grid;
  gap: 12px;
}
.changelog-entry {
  padding: 22px 24px;
}
.changelog-entry ul {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.55;
}
.changelog-entry li {
  margin-bottom: 7px;
}
.changelog-version {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.changelog-version span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #e7f9ff;
  background: rgba(111,231,255,0.08);
  border: 1px solid rgba(111,231,255,0.20);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.changelog-version h2 {
  margin: 0;
}
@media (max-width: 520px) {
  .site-footer {
    bottom: 6px;
  }
  .site-footer a {
    font-size: 0.68rem;
    padding: 8px 12px;
  }
  .changelog-entry {
    padding: 18px;
  }
}


/* v26 intro image clipping fix */
.intro-view {
  min-height: 100vh;
  min-height: 100svh;
  overflow-y: auto;
  padding: clamp(18px, 4vh, 42px) 24px 72px;
}
.intro-card {
  width: min(920px, calc(100vw - 32px));
  min-height: auto;
  overflow: visible !important;
  padding: clamp(28px, 5vw, 54px);
  margin: auto;
}
.intro-card.panel::before {
  border-radius: inherit;
}
.intro-card::after {
  pointer-events: none;
  width: min(68vw, 500px);
  height: min(68vw, 500px);
}
.intro-brand {
  padding-top: 18px;
  padding-bottom: 4px;
}
.intro-mark {
  width: clamp(112px, 18vw, 148px);
  height: clamp(112px, 18vw, 148px);
  margin-bottom: 4px;
}
.intro-mark::after {
  inset: -12px;
}
.intro-title {
  font-size: clamp(2.35rem, 6.2vw, 5rem);
  max-width: 100%;
  overflow: visible;
}
.intro-copy {
  max-width: 680px;
}
@media (max-height: 720px) {
  .intro-view {
    align-items: start;
  }
  .intro-card {
    margin-top: 0;
  }
  .intro-mark {
    width: 104px;
    height: 104px;
  }
  .intro-title {
    font-size: clamp(2.1rem, 5.5vw, 4.2rem);
  }
}
@media (max-width: 520px) {
  .intro-view {
    padding-left: 14px;
    padding-right: 14px;
  }
  .intro-card {
    width: min(100%, calc(100vw - 20px));
    padding: 24px 18px 28px;
  }
  .intro-mark {
    width: 96px;
    height: 96px;
  }
}


/* v27 move intro version label to bottom */
.intro-version-label {
  position: fixed;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  z-index: 25;
  margin: 0;
  color: var(--time);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.70rem;
  font-weight: 900;
  opacity: 0.82;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 520px) {
  .intro-version-label {
    bottom: 48px;
    font-size: 0.62rem;
  }
}


/* v28 remove in-game version label */
.hero-copy > .hero-brand:first-child {
  margin-top: 0;
}


/* v1.29 version naming */
.intro-version-label {
  letter-spacing: 0.10em;
}


/* v1.30 phase indicator status-label treatment */
.phase-pill {
  display: none !important;
}
.phase-status {
  display: inline-grid;
  gap: 5px;
  margin-top: 18px;
  padding: 11px 14px;
  border-left: 3px solid rgba(111,231,255,0.76);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(111,231,255,0.085), rgba(143,134,255,0.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
  cursor: default;
  user-select: none;
}
.phase-status span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}
.phase-status strong {
  color: #e7f9ff;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.phase-status:hover {
  transform: none;
  filter: none;
}
@media (max-width: 520px) {
  .phase-status {
    width: 100%;
  }
}


/* v1.31 calmer hover behavior */
button,
.upgrade,
.stat {
  transition: filter 120ms ease, opacity 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease !important;
}

button:hover:not(:disabled),
.upgrade:hover,
.stat:hover {
  transform: none !important;
}

button:active:not(:disabled) {
  transform: none !important;
}

.primary-btn::before,
.secondary-btn::before,
.upgrade button::before {
  display: none !important;
  content: none !important;
  animation: none !important;
  transition: none !important;
}

.upgrade:hover {
  border-color: rgba(137, 182, 255, 0.28) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.upgrade button:not(:disabled):hover,
.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled) {
  filter: brightness(1.04) !important;
  box-shadow: 0 14px 32px rgba(18, 181, 255, 0.16), inset 0 1px 0 rgba(255,255,255,0.14) !important;
}

.stat:hover {
  box-shadow: 0 16px 34px rgba(0,0,0,0.22), 0 0 18px rgba(111,231,255,0.035) !important;
}


/* v1.32 remove hover effects entirely */
button,
button::before,
button::after,
.upgrade,
.upgrade::before,
.upgrade::after,
.stat,
.stat::before,
.stat::after,
.site-footer a,
.back-link {
  transition: none !important;
}

.primary-btn::before,
.secondary-btn::before,
.upgrade button::before,
.primary-btn::after,
.secondary-btn::after,
.upgrade button::after {
  display: none !important;
  content: none !important;
  animation: none !important;
}

button:hover:not(:disabled),
button:active:not(:disabled),
.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled),
.ghost-btn:hover:not(:disabled),
.danger-btn:hover:not(:disabled),
.upgrade:hover,
.upgrade button:hover,
.upgrade button:not(:disabled):hover,
.stat:hover,
.site-footer a:hover,
.back-link:hover {
  transform: none !important;
  filter: none !important;
}

.upgrade:hover {
  border-color: var(--line) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.036), rgba(255,255,255,0.022)) !important;
  box-shadow: none !important;
}

.stat:hover {
  transform: none !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled),
.upgrade button:not(:disabled):hover {
  filter: none !important;
}

.site-footer a:hover,
.back-link:hover {
  color: inherit !important;
  border-color: rgba(137, 182, 255, 0.22) !important;
  background: rgba(5, 8, 17, 0.70) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}


/* v1.33 reliable purchase buttons */
.upgrade button {
  pointer-events: auto !important;
  user-select: none;
}
.upgrade button.unavailable {
  cursor: not-allowed;
  opacity: 0.48;
}
.upgrade button:not(.unavailable) {
  cursor: pointer;
  opacity: 1;
}
button:disabled {
  pointer-events: auto !important;
}


/* v1.34 author footer */
.site-footer span {
  pointer-events: auto;
  color: #c9d7ff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(137, 182, 255, 0.22);
  background: rgba(5, 8, 17, 0.70);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.04);
}
.site-footer span a {
  color: #e7f9ff;
  text-decoration: none;
}
.site-footer span a:hover {
  text-decoration: underline;
}
.site-footer > a {
  display: none;
}
@media (max-width: 620px) {
  .site-footer span {
    max-width: calc(100vw - 20px);
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    font-size: 0.68rem;
  }
}


/* v1.35 balance/stability additions */
.upgrades .unlock.hidden {
  display: none !important;
}
.upgrade button {
  pointer-events: auto !important;
  user-select: none;
}
.upgrade button.unavailable {
  cursor: not-allowed;
  opacity: 0.48;
}
.upgrade button:not(.unavailable) {
  cursor: pointer;
  opacity: 1;
}
.upgrade:not(.locked)::after,
.upgrade.locked::after {
  display: none !important;
  content: none !important;
}


/* v1.36 Buy Max buttons */
.upgrade-actions {
  display: grid;
  gap: 8px;
  min-width: 190px;
}
.upgrade-actions button {
  width: 100%;
}
.buy-max-btn {
  min-height: 40px !important;
  padding: 10px 14px !important;
  font-size: 0.88rem;
  background: rgba(111,231,255,0.07) !important;
  border: 1px solid rgba(111,231,255,0.18) !important;
}
.buy-max-btn.unavailable {
  background: rgba(255,255,255,0.035) !important;
}
@media (max-width: 520px) {
  .upgrade-actions {
    min-width: 0;
  }
}
