:root {
  --bg: #090c13;
  --panel: #10151f;
  --panel-2: #151b27;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f5ef;
  --muted: #9ba3b3;
  --lime: #c9ff63;
  --coral: #ff7764;
  --cyan: #65e8ff;
  --purple: #9d83ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  --radius: 22px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 12px 18px; background: var(--lime); color: #111; border-radius: 10px; font-weight: 800; }
.skip-link:focus { top: 16px; }
.section-wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.ambient { position: fixed; border-radius: 999px; filter: blur(120px); opacity: .1; pointer-events: none; z-index: -1; }
.ambient-one { width: 480px; height: 480px; background: var(--purple); right: -220px; top: 120px; }
.ambient-two { width: 420px; height: 420px; background: var(--lime); left: -260px; top: 820px; }

.site-header {
  width: min(1280px, calc(100% - 48px));
  height: 86px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 900; letter-spacing: -.04em; width: max-content; }
.brand > span:nth-child(2) > span { color: var(--lime); }
.brand > b { margin-left: 3px; padding: 4px 7px; border-radius: 5px; background: var(--coral); color: #18110f; font-size: 9px; letter-spacing: .13em; transform: rotate(-3deg); }
.brand-mark { width: 24px; height: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; transform: rotate(45deg); }
.brand-mark i { display: block; background: var(--lime); border-radius: 2px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--coral); }
.site-header nav { display: flex; gap: 34px; color: var(--muted); font-size: 13px; font-weight: 700; }
.site-header nav a { transition: color .2s ease; }
.site-header nav a:hover { color: var(--text); }
.profile-pill { justify-self: end; display: flex; align-items: center; gap: 9px; background: transparent; border: 0; cursor: pointer; text-align: left; padding: 6px; border-radius: 12px; }
.profile-pill:hover { background: rgba(255,255,255,.04); }
.level-orb { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: #10140c; background: var(--lime); font-size: 14px; font-weight: 950; box-shadow: 0 0 25px rgba(201,255,99,.18); }
.profile-pill small, .profile-pill strong { display: block; }
.profile-pill small { color: var(--muted); font-size: 8px; letter-spacing: .18em; }
.profile-pill strong { font-size: 12px; }

.hero { min-height: 670px; padding: 78px 0 82px; display: grid; grid-template-columns: 1.06fr .94fr; gap: 70px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 20px; display: flex; align-items: center; gap: 10px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .2em; }
.eyebrow span { width: 22px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 25px; max-width: 650px; font-size: clamp(66px, 7.5vw, 108px); line-height: .83; letter-spacing: -.085em; font-weight: 950; }
h1 em { color: var(--lime); font-style: normal; }
.hero-lead { max-width: 600px; margin-bottom: 32px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.button { min-height: 50px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 26px; cursor: pointer; font-size: 12px; font-weight: 850; letter-spacing: .02em; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--lime); color: #10140c; box-shadow: 0 12px 35px rgba(201,255,99,.1); }
.button-primary span, .button-light span { font-size: 18px; }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button-ghost:hover { border-color: rgba(255,255,255,.3); }
.save-note { margin-top: 28px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.save-note strong { color: var(--text); }
.pulse-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(201,255,99,.08); }

.hero-machine { width: min(410px, 100%); height: 480px; justify-self: center; position: relative; padding: 35px 38px 45px; background: linear-gradient(145deg, #212b3b, #121722 70%); border: 1px solid rgba(255,255,255,.13); border-radius: 40px 40px 30px 30px; box-shadow: var(--shadow), inset 3px 3px 0 rgba(255,255,255,.06); transform: perspective(1000px) rotateY(-8deg) rotateX(2deg); }
.hero-machine::before { content: ""; position: absolute; left: 12%; right: 12%; bottom: -22px; height: 35px; background: #06080d; filter: blur(18px); border-radius: 50%; z-index: -1; }
.machine-top { height: 58px; margin: -20px 10px 18px; border-radius: 13px 13px 6px 6px; background: var(--coral); color: #171110; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.machine-top span { font-size: 9px; font-weight: 950; letter-spacing: .32em; }
.machine-top b { font-size: 23px; letter-spacing: .13em; }
.machine-screen { height: 265px; border: 12px solid #070a10; border-radius: 18px; background: #0c1220; position: relative; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 50px rgba(101,232,255,.08); }
.machine-screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px); pointer-events: none; }
.screen-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(101,232,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(101,232,255,.07) 1px, transparent 1px); background-size: 25px 25px; transform: perspective(160px) rotateX(30deg) scale(1.4); opacity: .5; }
.machine-screen p { position: absolute; bottom: 17px; margin: 0; color: var(--lime); font: 800 10px ui-monospace, monospace; letter-spacing: .28em; animation: blink 1.5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.pixel-alien { width: 126px; height: 98px; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; filter: drop-shadow(0 0 18px rgba(201,255,99,.28)); transform: translateY(-12px); }
.pixel-alien i { background: var(--lime); }
.pixel-alien i:nth-child(1), .pixel-alien i:nth-child(5), .pixel-alien i:nth-child(7), .pixel-alien i:nth-child(9), .pixel-alien i:nth-child(11), .pixel-alien i:nth-child(15) { background: transparent; }
.pixel-alien i:nth-child(8) { background: var(--coral); }
.machine-controls { height: 90px; display: flex; align-items: center; gap: 20px; padding: 15px 20px 0; }
.joystick { width: 68px; height: 17px; border-radius: 50%; background: #080a10; position: relative; margin-right: auto; }
.joystick i { position: absolute; width: 12px; height: 52px; border-radius: 8px; background: #a4adbb; left: 28px; bottom: 5px; transform: rotate(5deg); box-shadow: inset 3px 0 2px rgba(255,255,255,.25); }
.joystick i::before { content: ""; position: absolute; width: 34px; height: 34px; background: var(--coral); border-radius: 50%; top: -18px; left: -11px; box-shadow: inset 5px 4px 2px rgba(255,255,255,.14), 0 6px 8px rgba(0,0,0,.35); }
.machine-button { width: 33px; height: 18px; border-radius: 50%; background: var(--coral); box-shadow: 0 7px 0 #7f352d, 0 10px 10px rgba(0,0,0,.4); }
.machine-button.lime { background: var(--lime); box-shadow: 0 7px 0 #668230, 0 10px 10px rgba(0,0,0,.4); }
.machine-shine { position: absolute; inset: 4px 4px auto auto; width: 45%; height: 85%; border-radius: 0 40px 0 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.035)); pointer-events: none; }

.games-section { padding: 92px 0 110px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 38px; }
.section-heading h2, .progress-copy h2 { margin-bottom: 0; font-size: clamp(38px, 5vw, 62px); line-height: .95; letter-spacing: -.055em; }
.section-heading > p { max-width: 420px; margin-bottom: 3px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.game-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.game-card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.game-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.2); box-shadow: 0 24px 55px rgba(0,0,0,.25); }
.game-art { height: 250px; position: relative; overflow: hidden; background: #18211a; }
.game-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.11), transparent 35%), linear-gradient(150deg, transparent 50%, rgba(0,0,0,.25)); }
.merge-card .game-art { background: #211d32; }
.memory-card .game-art { background: #282018; }
.mines-card .game-art { background: #13232a; }
.clicker-card .game-art { background: #24163d; }
.miner-card .game-art { background: #30231a; }
.art-score { position: absolute; top: 18px; right: 18px; z-index: 2; color: rgba(255,255,255,.55); font: 800 8px ui-monospace, monospace; letter-spacing: .12em; }
.art-score b { color: var(--text); }
.snake-path { position: absolute; width: 260px; height: 160px; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); display: grid; grid-template-columns: repeat(5, 42px); grid-template-rows: repeat(3, 42px); gap: 5px; }
.snake-path i { background: var(--lime); border-radius: 8px; box-shadow: inset 4px 4px rgba(255,255,255,.18); }
.snake-path i:nth-child(1), .snake-path i:nth-child(2), .snake-path i:nth-child(3), .snake-path i:nth-child(6), .snake-path i:nth-child(11), .snake-path i:nth-child(12), .snake-path i:nth-child(13) { visibility: hidden; }
.snake-path b { width: 21px; height: 21px; border-radius: 5px; background: var(--coral); position: absolute; left: 3px; top: 67px; box-shadow: 0 0 20px rgba(255,119,100,.4); }
.mini-merge, .mini-mines { width: 204px; height: 204px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(3deg); }
.mini-merge i, .mini-mines i { display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.07); color: var(--text); font: 900 18px ui-monospace, monospace; font-style: normal; }
.mini-merge i:nth-child(1) { background: #645696; }.mini-merge i:nth-child(2) { background: #7865b5; }.mini-merge i:nth-child(3) { background: #8f74d9; }.mini-merge i:nth-child(4) { background: #a885f2; }.mini-merge i:nth-child(6) { background: var(--coral); color: #25100e; }.mini-merge i:nth-child(7) { background: var(--lime); color: #17200a; }.mini-merge i:nth-child(9) { background: var(--cyan); color: #0d2024; }
.mini-memory { width: 235px; height: 178px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-3deg); }
.mini-memory i { display: grid; place-items: center; border-radius: 8px; background: #3b3023; color: #76634e; font: 900 20px ui-monospace, monospace; font-style: normal; border: 1px solid rgba(255,255,255,.09); }
.mini-memory i:nth-child(1), .mini-memory i:nth-child(3), .mini-memory i:nth-child(6), .mini-memory i:nth-child(8) { background: var(--coral); color: #24110e; transform: rotateY(0); }
.mini-mines { transform: translate(-50%, -50%) rotate(-2deg); }
.mini-mines i { color: var(--cyan); background: rgba(101,232,255,.08); border: 1px solid rgba(101,232,255,.1); }
.mini-mines i:nth-child(5) { background: var(--coral); color: #22100e; }.mini-mines i:nth-child(9) { background: var(--lime); color: #142008; }
.clicker-gem { width: 130px; height: 150px; position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(5deg); filter: drop-shadow(0 18px 24px rgba(157,131,255,.32)); animation: gem-float 3s ease-in-out infinite; }
.clicker-gem i { position: absolute; inset: 0; clip-path: polygon(50% 0, 93% 28%, 78% 77%, 50% 100%, 22% 77%, 7% 28%); background: linear-gradient(135deg, #e1d8ff 0 16%, #9d83ff 17% 52%, #6752ad 53% 100%); }
.clicker-gem i:nth-child(2) { inset: 28% 7% 23%; clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%); background: rgba(255,255,255,.18); }
.clicker-gem i:nth-child(3) { inset: 0 50% 0 0; clip-path: polygon(100% 0, 100% 100%, 44% 77%, 14% 28%); background: rgba(101,232,255,.16); }
.clicker-gem i:nth-child(4) { inset: 30% 0 0 48%; clip-path: polygon(0 0, 90% 0, 57% 67%, 0 100%); background: rgba(255,119,100,.17); }
.clicker-gem i:nth-child(5) { width: 24px; height: 38px; inset: 22px auto auto 31px; clip-path: polygon(0 0,100% 0,55% 100%); background: rgba(255,255,255,.5); }
@keyframes gem-float { 50% { transform: translate(-50%, -56%) rotate(-3deg); } }
.gem-rays { position: absolute; inset: 0; left: 50%; top: 50%; width: 1px; height: 1px; }
.gem-rays i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px currentColor; }
.gem-rays i:nth-child(1){transform:translate(-105px,-65px)}.gem-rays i:nth-child(2){transform:translate(97px,-48px);background:var(--lime)}.gem-rays i:nth-child(3){transform:translate(-125px,45px);background:var(--coral)}.gem-rays i:nth-child(4){transform:translate(105px,60px)}.gem-rays i:nth-child(5){transform:translate(-48px,-102px);background:var(--lime)}.gem-rays i:nth-child(6){transform:translate(55px,100px);background:var(--coral)}
.mine-shaft { width: 225px; height: 210px; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); overflow: hidden; border-inline: 10px solid rgba(15,10,7,.48); background: repeating-linear-gradient(0deg,#17100d 0 36px,#3c2a1e 37px 70px); }
.mine-shaft::before,.mine-shaft::after { content:"";position:absolute;top:0;bottom:0;width:9px;background:#8b6340;box-shadow:inset 2px 0 rgba(255,255,255,.12); }.mine-shaft::before{left:36px}.mine-shaft::after{right:36px}
.mine-shaft span { position:absolute;left:0;right:0;height:7px;background:#966b43;box-shadow:0 4px rgba(0,0,0,.25); }.mine-shaft span:nth-child(1){top:26px}.mine-shaft span:nth-child(2){top:76px}.mine-shaft span:nth-child(3){top:126px}.mine-shaft span:nth-child(4){top:176px}
.mine-shaft b { position:absolute;left:87px;bottom:27px;color:var(--cyan);font-size:31px;text-shadow:0 0 18px rgba(101,232,255,.7);transform:rotate(10deg)}
.mine-shaft i { position:absolute;left:50px;bottom:44px;color:var(--coral);font-size:33px;font-style:normal;transform:rotate(-20deg)}
.game-info { padding: 26px 28px 28px; }
.game-meta { display: flex; gap: 9px; margin-bottom: 12px; }
.game-meta span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.game-info h3 { margin-bottom: 8px; font-size: 27px; letter-spacing: -.04em; }
.game-info p { min-height: 48px; margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.play-button { width: 100%; height: 45px; padding: 0; display: flex; justify-content: space-between; align-items: center; border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 12px; font-weight: 850; }
.play-button i { font-style: normal; font-size: 20px; transition: transform .2s ease; }
.game-card:hover .play-button i { transform: translateX(5px); }
.snake-card .play-button i { color: var(--lime); }.merge-card .play-button i { color: var(--purple); }.memory-card .play-button i { color: var(--coral); }.mines-card .play-button i { color: var(--cyan); }
.clicker-card .play-button i { color: var(--purple); }.miner-card .play-button i { color: #dca768; }

.progress-section { margin-bottom: 100px; padding: 60px; display: grid; grid-template-columns: 1fr .95fr; gap: 70px; align-items: center; border-radius: 28px; background: var(--lime); color: #12150d; position: relative; overflow: hidden; }
.progress-section::after { content: ""; position: absolute; width: 360px; height: 360px; border: 70px solid rgba(255,255,255,.14); border-radius: 50%; right: -120px; top: -180px; }
.progress-copy { position: relative; z-index: 1; }
.progress-copy .eyebrow { color: #374322; }
.progress-copy h2 { margin-bottom: 22px; max-width: 520px; }
.progress-copy > p { max-width: 540px; color: #4e5939; font-size: 14px; line-height: 1.75; }
.save-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.button-light { background: #11150c; color: var(--text); }
.button-outline { border-color: rgba(17,21,12,.3); }
.progress-panel { position: relative; z-index: 1; padding: 32px; border-radius: 20px; background: #10140d; color: var(--text); box-shadow: 0 25px 50px rgba(35,50,10,.18); }
.level-display { display: flex; align-items: center; gap: 18px; }
.big-level { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 17px; background: var(--lime); color: #10140c; font-size: 36px; font-weight: 950; }
.level-display small { display: block; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .18em; }
.level-display strong { font-size: 24px; letter-spacing: -.04em; }
.xp-line { height: 7px; margin-top: 25px; background: rgba(255,255,255,.09); border-radius: 99px; overflow: hidden; }
.xp-line span { display: block; height: 100%; width: 0; background: var(--lime); border-radius: inherit; transition: width .4s ease; }
.xp-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 9px; }
.stat-grid { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-grid div { display: flex; flex-direction: column; }
.stat-grid strong { font-size: 22px; }
.stat-grid span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.achievement-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.achievement { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #5a5f55; font-size: 13px; }
.achievement.unlocked { background: rgba(201,255,99,.12); color: var(--lime); border-color: rgba(201,255,99,.28); }

.site-footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-brand { filter: grayscale(1); opacity: .7; }
.site-footer p { margin: 0; }.site-footer p span { color: var(--text); }

.game-dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 24px; background: #0e131c; color: var(--text); box-shadow: 0 35px 100px rgba(0,0,0,.7); overflow: auto; }
.game-dialog::backdrop { background: rgba(3,5,8,.84); backdrop-filter: blur(10px); }
.dialog-shell { padding: 26px; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 2px 0 0; font-size: 30px; letter-spacing: -.05em; }
.dialog-kicker { color: var(--lime); font-size: 8px; font-weight: 900; letter-spacing: .2em; }
.dialog-head-actions { display: flex; align-items: center; gap: 13px; }
.saved-indicator { color: var(--muted); font-size: 9px; transition: color .2s; }
.saved-indicator i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--lime); }
.saved-indicator.flash { color: var(--lime); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); cursor: pointer; font-size: 25px; }
.game-view { padding-top: 22px; }
.game-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.game-toolbar > div { min-width: 85px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.game-toolbar small, .game-toolbar strong { display: block; }.game-toolbar small { color: var(--muted); font-size: 7px; letter-spacing: .13em; }.game-toolbar strong { font: 900 18px ui-monospace, monospace; }
.game-toolbar .small-button { margin-left: auto; }
.small-button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; font-size: 10px; font-weight: 800; }
.small-button:hover, .small-button.active { border-color: rgba(201,255,99,.4); background: rgba(201,255,99,.1); color: var(--lime); }
.canvas-wrap { width: min(520px, 100%); aspect-ratio: 1; margin-inline: auto; position: relative; border: 1px solid rgba(201,255,99,.2); border-radius: 16px; overflow: hidden; background: #070b10; }
#snake-canvas { width: 100%; height: 100%; display: block; }
.canvas-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; background: rgba(5,8,12,.72); color: var(--text); cursor: pointer; backdrop-filter: blur(3px); }
.canvas-overlay[hidden] { display: none; }.canvas-overlay strong { color: var(--lime); font-size: 25px; letter-spacing: .15em; }.canvas-overlay span { color: var(--muted); font-size: 10px; }
.dpad { width: 158px; margin: 18px auto 0; display: grid; grid-template: repeat(2, 45px) / repeat(3, 45px); gap: 7px; }
.dpad button { border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.05); font-weight: 900; cursor: pointer; touch-action: manipulation; }
.dpad button:active { background: var(--lime); color: #111; }.dpad button:nth-child(1) { grid-column: 2; }.dpad button:nth-child(2) { grid-row: 2; grid-column: 1; }.dpad button:nth-child(3) { grid-row: 2; grid-column: 2; }.dpad button:nth-child(4) { grid-row: 2; grid-column: 3; }
.merge-board { width: min(520px, 100%); aspect-ratio: 1; margin-inline: auto; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; border-radius: 17px; background: #202536; touch-action: none; }
.merge-cell { display: grid; place-items: center; min-width: 0; border-radius: 11px; background: rgba(255,255,255,.055); color: var(--text); font: 900 clamp(18px, 6vw, 36px) ui-monospace, monospace; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.merge-cell[data-value="2"] { background:#343a4d}.merge-cell[data-value="4"] {background:#495069}.merge-cell[data-value="8"] {background:#7060a8}.merge-cell[data-value="16"] {background:#8c6bc0}.merge-cell[data-value="32"] {background:#be6877}.merge-cell[data-value="64"] {background:#ff7764;color:#1b0c0a}.merge-cell[data-value="128"] {background:#c9ff63;color:#141a08}.merge-cell[data-value="256"] {background:#9eed67;color:#101c0b}.merge-cell[data-value="512"] {background:#65e8ff;color:#0b1b1e}.merge-cell[data-value="1024"] {background:#f5df68;color:#1e1a08;font-size:clamp(15px,5vw,29px)}.merge-cell[data-value="2048"] {background:#fff1a3;color:#201b07;font-size:clamp(15px,5vw,29px);box-shadow:0 0 30px rgba(255,241,163,.25)}
.inline-help { margin-top: 14px; text-align: center; color: var(--muted); font-size: 9px; }
.merge-dpad { display: none; }
.memory-board { width: min(540px, 100%); margin-inline: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.memory-tile { padding: 0; aspect-ratio: .84; border: 0; border-radius: 12px; background: transparent; perspective: 600px; cursor: pointer; }
.memory-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .35s ease; }
.memory-tile.flipped .memory-inner, .memory-tile.matched .memory-inner { transform: rotateY(180deg); }
.memory-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; }
.memory-back { border: 1px solid rgba(255,255,255,.11); background: linear-gradient(135deg,#2b3346,#171d2a); color: #586176; font-weight: 900; }
.memory-front { transform: rotateY(180deg); background: var(--coral); color: #24110e; font-size: clamp(22px,6vw,38px); font-weight: 900; }
.memory-tile:nth-child(4n+2) .memory-front { background: var(--lime); }.memory-tile:nth-child(4n+3) .memory-front { background: var(--cyan); }.memory-tile:nth-child(4n+4) .memory-front { background: var(--purple); }
.memory-tile.matched { opacity: .55; }
.mines-board { width: min(540px, 100%); aspect-ratio: 1; margin-inline: auto; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; padding: 7px; border-radius: 16px; background: #081017; touch-action: manipulation; }
.mine-cell { min-width: 0; padding: 0; border: 1px solid rgba(101,232,255,.09); border-radius: 6px; background: #162630; color: var(--cyan); cursor: pointer; font: 900 clamp(10px,3vw,18px) ui-monospace, monospace; }
.mine-cell:hover { background: #1d3340; }.mine-cell.revealed { background: #0d171e; border-color: rgba(255,255,255,.035); cursor: default; }.mine-cell.flagged { color: var(--coral); }.mine-cell.mine { background: var(--coral); color: #25100d; }
.mine-cell[data-count="2"] {color:var(--lime)}.mine-cell[data-count="3"] {color:var(--coral)}.mine-cell[data-count="4"],.mine-cell[data-count="5"] {color:var(--purple)}
.mine-controls { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

.idle-view .game-toolbar > div { min-width: 105px; }
.clicker-stage,.miner-stage { height: 265px; margin-bottom: 15px; position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; }
.clicker-stage { background: radial-gradient(circle at 50% 45%,rgba(157,131,255,.2),transparent 42%),linear-gradient(150deg,#141126,#080b12); }
.idle-stars { position:absolute;inset:0}.idle-stars i{position:absolute;width:4px;height:4px;border-radius:50%;background:var(--cyan);box-shadow:0 0 9px currentColor}.idle-stars i:nth-child(1){left:14%;top:22%}.idle-stars i:nth-child(2){left:77%;top:18%;color:var(--lime)}.idle-stars i:nth-child(3){left:86%;top:68%;color:var(--coral)}.idle-stars i:nth-child(4){left:23%;top:78%;color:var(--purple)}.idle-stars i:nth-child(5){left:65%;top:84%}.idle-stars i:nth-child(6){left:37%;top:13%;color:var(--lime)}
.mega-gem { width: 155px; height: 178px; padding:0; position:relative; border:0; background:transparent; cursor:pointer; filter:drop-shadow(0 22px 25px rgba(157,131,255,.28)); touch-action:manipulation; transition:transform .08s ease; }
.mega-gem:hover{transform:scale(1.035)}.mega-gem:active,.mega-gem.pop{transform:scale(.91)}
.mega-gem span { position:absolute;inset:0;clip-path:polygon(50% 0,93% 27%,78% 76%,50% 100%,22% 76%,7% 27%);background:linear-gradient(135deg,#ece6ff 0 12%,#b49eff 13% 34%,#8668e1 35% 62%,#4f3a9a 63%);box-shadow:inset 16px 12px rgba(255,255,255,.1); }
.mega-gem span::after{content:"";position:absolute;inset:28% 8% 23%;clip-path:polygon(0 0,100% 0,77% 100%,23% 100%);background:rgba(255,255,255,.12)}
.mega-gem b { position:absolute;z-index:1;left:0;right:0;bottom:52px;color:#fff;font-size:12px;letter-spacing:.18em;text-shadow:0 2px 6px rgba(0,0,0,.4); }
.float-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}.float-value{position:absolute;left:50%;top:48%;z-index:3;color:var(--lime);font:900 17px ui-monospace,monospace;text-shadow:0 3px 10px rgba(0,0,0,.7);animation:float-value .75s ease-out forwards}.miner-stage .float-value{color:var(--cyan)}
@keyframes float-value{to{opacity:0;transform:translate(var(--float-x,0),-90px) scale(1.25)}}
.idle-upgrades{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.upgrade-row{min-width:0;min-height:76px;padding:11px 12px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.03);color:var(--text);text-align:left;cursor:pointer;transition:border-color .18s,background .18s,transform .18s}.upgrade-row:hover:not(:disabled){transform:translateY(-2px);border-color:rgba(201,255,99,.3);background:rgba(255,255,255,.055)}.upgrade-row:disabled{opacity:.43;cursor:not-allowed}.upgrade-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:rgba(255,119,100,.12);color:var(--coral);font-size:18px}.cyan-upgrade{background:rgba(101,232,255,.1);color:var(--cyan)}.lime-upgrade{background:rgba(201,255,99,.1);color:var(--lime)}.purple-upgrade{background:rgba(157,131,255,.12);color:var(--purple)}
.upgrade-row>span:nth-child(2){min-width:0}.upgrade-row strong,.upgrade-row small{display:block}.upgrade-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.upgrade-row small{margin-top:3px;color:var(--muted);font-size:8px}.upgrade-row small b{color:var(--text)}.upgrade-price{text-align:right;color:var(--lime);font:800 10px ui-monospace,monospace;white-space:nowrap}.miner-view .upgrade-price{color:#dfb171}
.miner-stage{background:linear-gradient(180deg,#192027 0 17%,#302218 18% 48%,#21160f 49% 76%,#120d0a 77%);border-color:rgba(220,167,104,.16)}.miner-stage::before,.miner-stage::after{content:"";position:absolute;top:0;bottom:0;width:20px;background:repeating-linear-gradient(0deg,#593e28 0 35px,#24170f 36px 42px)}.miner-stage::before{left:12%}.miner-stage::after{right:12%}.miner-tunnel{position:absolute;inset:0}.miner-tunnel i{position:absolute;width:7px;height:7px;transform:rotate(45deg);background:#7a5a3d}.miner-tunnel i:nth-child(1){left:6%;top:30%}.miner-tunnel i:nth-child(2){left:25%;top:72%;background:var(--cyan);box-shadow:0 0 8px var(--cyan)}.miner-tunnel i:nth-child(3){left:84%;top:47%}.miner-tunnel i:nth-child(4){left:70%;top:81%;background:var(--purple)}.miner-tunnel i:nth-child(5){left:38%;top:40%;background:var(--lime)}
.ore-rock{width:150px;height:125px;z-index:2;padding:16px 10px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:0;clip-path:polygon(15% 20%,40% 2%,78% 10%,97% 43%,82% 88%,43% 100%,7% 78%,0 40%);background:linear-gradient(145deg,#63513f,#2d241d 67%);color:var(--text);cursor:pointer;filter:drop-shadow(0 16px 16px rgba(0,0,0,.38));transition:transform .08s;touch-action:manipulation}.ore-rock:hover{transform:scale(1.035)}.ore-rock:active,.ore-rock.pop{transform:scale(.92)}.ore-rock span{color:var(--cyan);font-size:31px;text-shadow:0 0 14px rgba(101,232,255,.5)}.ore-rock b{font-size:10px;letter-spacing:.13em}.ore-rock small{color:#b9a68e;font-size:8px}.miner-workers{position:absolute;left:20%;right:20%;bottom:18px;display:flex;justify-content:space-between;align-items:end;z-index:1}.worker-dot{width:26px;height:26px;position:relative;border-radius:50% 50% 40% 40%;background:var(--coral);box-shadow:0 14px 0 -4px #50616d}.worker-dot::after{content:"⛏";position:absolute;left:18px;top:-13px;font-size:20px;transform:rotate(-25deg)}

/* Deepcore Empire */
.game-dialog.empire-dialog{width:min(1180px,calc(100% - 20px))}.empire-dialog .dialog-shell{padding:20px}.empire-dialog .dialog-header{padding:0 4px 16px}.mine-empire{padding-top:14px}
.empire-hud{min-height:64px;padding:10px 14px;display:grid;grid-template-columns:1.4fr 1fr 1fr auto;align-items:center;gap:14px;border:1px solid rgba(255,255,255,.09);border-radius:13px 13px 5px 5px;background:linear-gradient(180deg,#202a35,#151c25);box-shadow:inset 0 1px rgba(255,255,255,.06)}.empire-hud>div{min-width:0}.empire-hud small,.empire-hud strong{display:block}.empire-hud small{color:#82909e;font-size:7px;font-weight:850;letter-spacing:.15em}.empire-hud strong{overflow:hidden;color:#f8df81;font:900 19px ui-monospace,monospace;text-overflow:ellipsis;white-space:nowrap}.empire-balance{display:flex;align-items:center;gap:10px}.coin-orb{width:38px;height:38px;display:grid;place-items:center;border:3px solid #9f722e;border-radius:50%;background:#f2bd4f;color:#4a2f09;font-weight:950;box-shadow:0 0 0 3px #392713,0 5px 12px rgba(0,0,0,.3)}.empire-save{color:#8ca597;font-size:8px;text-align:right}.empire-save i{display:inline-block;width:6px;height:6px;margin-right:4px;border-radius:50%;background:#73eaa5;box-shadow:0 0 8px #73eaa5}.miner-guide{min-height:43px;margin-top:7px;padding:7px 12px;display:flex;align-items:center;gap:9px;border:1px solid rgba(241,195,79,.2);border-radius:5px;background:#201b12}.miner-guide>span{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#e5b546;color:#2d2008;font-size:10px;font-weight:950}.miner-guide p{margin:0}.miner-guide strong,.miner-guide small{display:block}.miner-guide strong{font-size:9px}.miner-guide small{color:#9e9480;font-size:7px}
.empire-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:10px;margin-top:10px;align-items:start}.mine-world{position:relative;overflow:hidden;border:1px solid #382c25;border-radius:7px;background:#17110e;box-shadow:inset 0 0 60px rgba(0,0,0,.45)}
.mine-sky{height:45px;position:relative;overflow:hidden;background:linear-gradient(180deg,#1e3b57,#446477)}.mine-sky::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:20px;background:linear-gradient(150deg,transparent 0 10%,#263a35 11% 26%,transparent 27% 36%,#2c4039 37% 55%,transparent 56% 70%,#263a35 71%);opacity:.75}.mine-sky i{position:absolute;width:2px;height:2px;border-radius:50%;background:#d7efff}.mine-sky i:nth-child(1){left:15%;top:25%}.mine-sky i:nth-child(2){left:45%;top:15%}.mine-sky i:nth-child(3){left:74%;top:31%}.mine-sky span{position:absolute;right:12%;top:9px;width:19px;height:19px;border-radius:50%;background:#f1d784;box-shadow:0 0 22px rgba(241,215,132,.5)}
.surface-line{height:92px;position:relative;display:grid;grid-template-columns:180px 1fr 80px;align-items:end;gap:8px;padding:0 15px 8px;background:linear-gradient(180deg,#395243 0 28%,#30241a 29%);border-bottom:5px solid #160f0b}.warehouse-building{height:69px;position:relative;border:3px solid #191b1d;border-radius:4px 4px 0 0;background:linear-gradient(90deg,#9b5941 0 15%,#bd7453 16% 31%,#9b5941 32% 47%,#bd7453 48% 63%,#9b5941 64% 79%,#bd7453 80%);box-shadow:0 5px 12px rgba(0,0,0,.28)}.warehouse-building::before{content:"";position:absolute;left:-8px;right:-8px;top:-10px;height:12px;background:#27303a;clip-path:polygon(5% 0,95% 0,100% 100%,0 100%)}.warehouse-sign{position:absolute;left:9px;top:7px;padding:3px 6px;border-radius:2px;background:#20262d;color:#f3d77a;font-size:7px;font-weight:900;letter-spacing:.12em}.warehouse-door{position:absolute;width:48px;height:39px;right:13px;bottom:0;background:repeating-linear-gradient(0deg,#363e47 0 7px,#232930 8px 10px);border:3px solid #1c2025}.warehouse-truck{position:absolute;left:13px;bottom:3px;color:#d5a34f;font-size:26px;transform:translateX(calc(var(--warehouse-progress,0) * 85px));transition:transform .2s linear}.component-progress{position:absolute;left:8px;right:8px;bottom:-7px;height:4px;border-radius:9px;background:#101316;overflow:hidden}.component-progress span{display:block;height:100%;width:0;background:#f1c34f;box-shadow:0 0 8px currentColor}
.surface-title{align-self:center;text-align:center}.surface-title small,.surface-title strong{display:block}.surface-title small{color:#9db1a3;font-size:6px;letter-spacing:.16em}.surface-title strong{font-size:19px;letter-spacing:-.04em}.surface-title strong span{color:#f0bf4e}.elevator-house{height:62px;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:3px solid #1d2227;border-bottom:0;border-radius:4px 4px 0 0;background:#48535d;color:#f2c14f}.elevator-house span{font-size:24px;line-height:1}.elevator-house small{color:#d7dee2;font-size:6px;font-weight:900}
.underground{position:relative;min-height:580px;padding:8px 8px 16px 74px;background:repeating-linear-gradient(0deg,rgba(255,255,255,.015) 0 1px,transparent 1px 82px),linear-gradient(90deg,#211710,#322118 42%,#241811)}.underground::before{content:"";position:absolute;inset:0;background-image:radial-gradient(circle at 15% 20%,#604731 0 3px,transparent 4px),radial-gradient(circle at 78% 55%,#4b3729 0 4px,transparent 5px),radial-gradient(circle at 55% 82%,#5b4130 0 2px,transparent 3px);background-size:110px 100px;opacity:.5;pointer-events:none}.elevator-rail{position:absolute;z-index:2;left:19px;top:8px;bottom:16px;width:43px;border-inline:4px solid #7c6752;background:repeating-linear-gradient(0deg,transparent 0 18px,#6b5949 19px 23px);box-shadow:0 0 0 3px rgba(0,0,0,.3)}.elevator-cable{position:absolute;left:50%;top:0;bottom:0;width:2px;background:#27231f}.elevator-cage{position:absolute;left:3px;top:8%;width:29px;height:35px;display:grid;place-items:center;border:3px solid #c79a44;border-radius:3px;background:#313941;color:var(--cyan);box-shadow:0 5px 10px rgba(0,0,0,.4);transition:top .2s linear}.elevator-cage::before{content:"";position:absolute;left:3px;right:3px;top:-7px;height:5px;background:#c79a44;clip-path:polygon(50% 0,100% 100%,0 100%)}.elevator-cage span{font-size:11px}
.shaft-list{position:relative;z-index:1;display:grid;gap:6px}.shaft-row{height:78px;display:grid;grid-template-columns:minmax(180px,1fr) 190px;align-items:center;gap:8px;border:1px solid rgba(255,255,255,.08);border-left:4px solid var(--ore);border-radius:5px;background:linear-gradient(90deg,rgba(0,0,0,.22),rgba(255,255,255,.025));overflow:hidden}.shaft-scene{height:100%;position:relative;overflow:hidden;border-right:1px solid rgba(255,255,255,.07);background:linear-gradient(0deg,#17120f 0 23%,transparent 24%)}.shaft-track{position:absolute;left:0;right:0;bottom:14px;height:3px;background:#67523e}.shaft-track::after{content:"";position:absolute;inset:-3px 0;background:repeating-linear-gradient(90deg,transparent 0 16px,#584534 17px 21px)}.ore-vein{position:absolute;right:20px;top:15px;width:42px;height:34px;filter:drop-shadow(0 0 8px color-mix(in srgb,var(--ore) 55%,transparent))}.ore-vein i{position:absolute;width:15px;height:15px;transform:rotate(45deg);background:var(--ore);clip-path:polygon(50% 0,100% 35%,82% 100%,13% 86%,0 29%)}.ore-vein i:nth-child(2){left:16px;top:11px;transform:rotate(72deg) scale(.75)}.ore-vein i:nth-child(3){left:-8px;top:16px;transform:rotate(20deg) scale(.6)}
.shaft-worker{position:absolute;left:24px;bottom:22px;width:21px;height:24px;border-radius:50% 50% 35% 35%;background:#e4775d;box-shadow:0 12px 0 -3px #4b6875}.shaft-worker::before{content:"";position:absolute;left:-2px;top:-4px;width:25px;height:8px;border-radius:50% 50% 2px 2px;background:#efc34e}.shaft-worker::after{content:"⛏";position:absolute;left:17px;top:-17px;font-size:22px;transform-origin:4px 18px}.shaft-row.running .shaft-worker{animation:worker-walk 2.5s ease-in-out infinite}.shaft-row.running .shaft-worker::after{animation:pick-swing .55s ease-in-out infinite alternate}@keyframes worker-walk{50%{left:calc(100% - 92px)}}@keyframes pick-swing{to{transform:rotate(-55deg)}}
.shaft-progress{position:absolute;left:10px;right:10px;bottom:4px;height:4px;border-radius:9px;background:rgba(0,0,0,.5);overflow:hidden}.shaft-progress span{display:block;height:100%;width:0;background:var(--ore);box-shadow:0 0 8px var(--ore)}.shaft-stock{position:absolute;left:10px;top:7px;padding:3px 6px;border-radius:4px;background:rgba(0,0,0,.45);color:#d2d6d9;font:800 8px ui-monospace,monospace}.shaft-details{padding-right:8px}.shaft-title{display:flex;justify-content:space-between;align-items:center;gap:5px}.shaft-title strong{font-size:11px}.shaft-title span{padding:2px 5px;border-radius:3px;background:color-mix(in srgb,var(--ore) 15%,transparent);color:var(--ore);font-size:7px;font-weight:900}.shaft-yield{margin:4px 0 7px;color:#9299a0;font-size:7px}.shaft-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:3px}.shaft-actions button,.unlock-shaft{height:25px;padding:0 3px;border:1px solid rgba(255,255,255,.1);border-radius:4px;background:#242b31;color:#dce1e4;cursor:pointer;font-size:6px;font-weight:900;white-space:nowrap}.shaft-actions button:hover:not(:disabled),.unlock-shaft:hover:not(:disabled){border-color:var(--ore);color:var(--ore)}.shaft-actions button:disabled,.unlock-shaft:disabled{opacity:.4;cursor:not-allowed}.shaft-actions .shaft-manager.hired{border-color:#4e9d71;background:#173b2a;color:#77e2a5}.shaft-row.locked{height:62px;grid-template-columns:1fr;opacity:.8;border-left-color:#655a51;background:rgba(0,0,0,.28)}.locked-shaft{padding:0 14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.locked-shaft div small,.locked-shaft div strong{display:block}.locked-shaft div small{color:#817a73;font-size:7px}.locked-shaft div strong{font-size:11px}.unlock-shaft{min-width:115px;border-color:#7f6437;background:#392b17;color:#efc866}
.empire-panel{position:sticky;top:0;overflow:hidden;border:1px solid rgba(255,255,255,.09);border-radius:7px;background:#121820}.panel-tabs{height:42px;padding:5px;display:grid;grid-template-columns:1fr 1fr;gap:4px;border-bottom:1px solid rgba(255,255,255,.07);background:#0c1117}.panel-tabs button{border:0;border-radius:4px;background:transparent;color:#687480;cursor:pointer;font-size:8px;font-weight:900;letter-spacing:.1em}.panel-tabs button.active{background:#25303a;color:#f0c258}.miner-tab-content{padding:9px;display:grid;gap:8px}.operation-card{padding:10px;display:grid;grid-template-columns:38px 1fr;gap:8px;border:1px solid rgba(255,255,255,.08);border-radius:6px;background:#182029}.operation-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:6px;background:#293846;color:#66e0ff;font-size:20px}.warehouse-operation .operation-icon{color:#efbf55;background:#3a2e1c}.operation-card small,.operation-card strong,.operation-card span{display:block}.operation-card small{color:#71808d;font-size:6px;letter-spacing:.12em}.operation-card strong{font-size:10px}.operation-card>div:nth-child(2)>span{color:#8c98a2;font-size:7px}.operation-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1.3fr;gap:5px}.operation-actions button,.manager-button{min-height:29px;border:1px solid rgba(255,255,255,.1);border-radius:4px;background:#242f39;color:#dce3e8;cursor:pointer;font-size:7px;font-weight:900}.operation-actions button:disabled,.manager-button:disabled{opacity:.38;cursor:not-allowed}.operation-actions button b{color:#f2c658}.manager-button{grid-column:1/-1;background:#182d24;color:#7ce5ac;border-color:#28553f}.manager-button.hired{background:#173d2b;color:#8aefb8}.flow-card{padding:10px 5px;display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:5px;border:1px solid rgba(255,255,255,.07);border-radius:6px;background:#0e141a}.flow-card>div{text-align:center}.flow-card span,.flow-card small,.flow-card b{display:block}.flow-card span{color:#63def8}.flow-card small{color:#6e7983;font-size:6px}.flow-card b{font:800 8px ui-monospace,monospace}.flow-card>i{color:#48535d;font-style:normal}.panel-title{display:flex;align-items:end;justify-content:space-between;margin-bottom:7px}.panel-title span{font-size:8px;font-weight:900;letter-spacing:.1em}.panel-title small{color:#6e7982;font-size:6px}.mission-card{padding:10px;border:1px solid rgba(255,255,255,.07);border-radius:6px;background:#151c23}.mission-row{margin-top:6px;padding-top:6px;border-top:1px solid rgba(255,255,255,.06)}.mission-row:first-child{margin-top:0}.mission-head{display:flex;justify-content:space-between;gap:8px;font-size:7px}.mission-head span{color:#a7b0b7}.mission-head b{color:#efc45a}.mission-progress{height:4px;margin:5px 0;border-radius:9px;background:#080b0e;overflow:hidden}.mission-progress span{display:block;height:100%;background:#eabf54}.mission-row button{width:100%;height:24px;border:0;border-radius:3px;background:#dba944;color:#2a1c07;font-size:7px;font-weight:950;cursor:pointer}.mission-row button:disabled{background:#252d34;color:#68747e;cursor:not-allowed}
.investor-panel{min-height:500px;align-content:start}.investor-hero{padding:28px 16px;text-align:center;border-radius:7px;background:radial-gradient(circle at 50% 30%,rgba(157,131,255,.22),transparent 45%),#171525}.investor-hero>span{display:grid;place-items:center;width:68px;height:68px;margin:0 auto 13px;border:1px solid rgba(157,131,255,.4);border-radius:50%;background:#251f48;color:#bdaaff;font-size:31px;box-shadow:0 0 30px rgba(157,131,255,.16)}.investor-hero h3{margin-bottom:6px}.investor-hero p{margin:0;color:#8f94a4;font-size:8px;line-height:1.6}.investor-numbers{display:grid;grid-template-columns:1fr 1fr;gap:6px}.investor-numbers div{padding:12px;border:1px solid rgba(255,255,255,.07);border-radius:5px;background:#141b22}.investor-numbers small,.investor-numbers strong{display:block}.investor-numbers small{color:#707b85;font-size:6px}.investor-numbers strong{color:#bdaaff;font:900 12px ui-monospace,monospace}.prestige-button{height:42px;border:1px solid #6857a6;border-radius:5px;background:linear-gradient(180deg,#7e68c7,#4f408b);color:white;cursor:pointer;font-size:8px;font-weight:950;letter-spacing:.08em}.prestige-button:disabled{filter:grayscale(1);opacity:.4;cursor:not-allowed}.prestige-hint{margin:0;color:#858b96;text-align:center;font-size:7px}.empire-stats{display:grid;gap:2px;margin-top:5px}.empire-stats div{padding:8px 2px;display:flex;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.06);font-size:8px}.empire-stats span{color:#7c8790}.empire-stats b{color:#d8dee2}

.toast-region { position: fixed; z-index: 2000; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { width: min(330px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid rgba(201,255,99,.25); border-radius: 11px; background: #151b12; box-shadow: 0 14px 40px rgba(0,0,0,.4); color: var(--text); font-size: 11px; animation: toast-in .3s ease both; }
.toast strong { color: var(--lime); }.toast.error { border-color: rgba(255,119,100,.3); }.toast.error strong { color: var(--coral); }
@keyframes toast-in { from { opacity:0; transform:translateY(10px) } }
.noscript { position: fixed; inset: auto 12px 12px; z-index: 3000; padding: 15px; background: var(--coral); color: #111; border-radius: 10px; text-align: center; font-weight: 800; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }.site-header nav { display:none; }
  .hero { grid-template-columns: 1fr; gap: 35px; padding-top: 60px; }.hero-machine { width: 360px; height: 420px; padding: 31px 34px 40px; }.machine-screen { height: 225px; }
  .progress-section { grid-template-columns: 1fr; gap: 40px; padding: 45px; }
  .game-dialog.empire-dialog{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.empire-layout{grid-template-columns:1fr}.empire-panel{position:relative}.underground{min-height:540px}
}
@media (max-width: 650px) {
  .section-wrap, .site-header { width: min(100% - 28px, 1180px); }
  .site-header { height: 72px; }.brand > b { display:none; }.profile-pill span:last-child { display:none; }
  .hero { min-height:auto; padding: 55px 0 70px; }.hero-lead { font-size:15px; }.save-note span:last-child { display:none; }
  .hero-machine { width: 290px; height: 352px; padding: 27px 27px 32px; transform: rotate(-2deg); }.machine-top { height:47px}.machine-screen { height:185px;border-width:9px}.pixel-alien {width:95px;height:74px}.machine-controls{height:68px}.joystick{transform:scale(.8)}
  .games-section { padding: 70px 0; }.section-heading { display:block; }.section-heading > p { margin-top:18px; }.game-grid { grid-template-columns:1fr; }.game-art{height:210px}.game-info p{min-height:0}
  .progress-section { width:100%; margin-bottom:65px; padding:45px 22px; border-radius:0; }.progress-panel{padding:22px}.save-actions{display:grid}.button{width:100%}.stat-grid strong{font-size:19px}.achievement-row{gap:5px}.achievement{width:27px;height:27px}
  .site-footer { min-height:150px; flex-direction:column; justify-content:center; text-align:center; }.site-footer p:nth-child(2){display:none}
  .game-dialog { width:100%; max-width:none; max-height:100dvh; height:100dvh; border-radius:0; border:0; }.dialog-shell { padding:16px; }.dialog-header{padding-bottom:14px}.dialog-header h2{font-size:24px}.saved-indicator{display:none}.game-view{padding-top:16px}.game-toolbar>div{min-width:70px;padding:8px 10px}.game-toolbar strong{font-size:15px}.small-button{padding:0 10px}
  .merge-board{gap:7px;padding:7px}.merge-dpad{display:grid}.memory-board{gap:7px}.mines-board{gap:3px;padding:4px}.mine-cell{border-radius:4px}
  .idle-view .game-toolbar>div{min-width:0;flex:1}.clicker-stage,.miner-stage{height:230px}.idle-upgrades{grid-template-columns:1fr}.upgrade-row{min-height:68px}.mega-gem{width:135px;height:154px}.miner-workers{left:8%;right:8%}
  .empire-dialog .dialog-shell{padding:10px}.empire-hud{grid-template-columns:1.3fr 1fr 1fr;padding:8px}.empire-hud strong{font-size:14px}.empire-save{display:none}.surface-line{grid-template-columns:135px 1fr 54px;padding-inline:7px}.surface-title{display:none}.warehouse-building{width:135px}.warehouse-truck{font-size:21px}.underground{padding-left:57px;padding-right:4px}.elevator-rail{left:10px;width:37px}.elevator-cage{width:24px}.shaft-row{height:86px;grid-template-columns:minmax(145px,1fr) 125px}.shaft-worker{left:14px}.shaft-row.running .shaft-worker{animation-name:none}.shaft-details{padding-right:4px}.shaft-title strong{font-size:9px}.shaft-actions button{font-size:6px}.locked-shaft{padding-inline:8px}.unlock-shaft{min-width:94px}.empire-panel{margin-bottom:10px}
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; } }
