/* City Empire — cinematic game interface */
:root {
  --bg: #060c0b;
  --panel: #0d1715;
  --panel2: #101d1a;
  --line: rgba(177, 210, 196, .16);
  --text: #f4f7f3;
  --muted: #8fa49c;
  --gold: #e9bd62;
  --gold-bright: #ffd98a;
  --red: #ef6670;
  --green: #58d799;
  --blue: #62b7d7;
  --ink: #050908;
  --glass: rgba(9, 18, 16, .82);
  --shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(45, 117, 91, .16), transparent 32rem),
    radial-gradient(circle at 88% 28%, rgba(185, 128, 39, .09), transparent 30rem),
    linear-gradient(155deg, #07100e 0%, #050908 48%, #09120f 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.01em;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

body:not(.gameReady) .layout,
body:not(.gameReady) .stats,
body:not(.gameReady) .timeWidget,
body:not(.gameReady) .gameNav {
  display: none !important;
}

::selection {
  background: var(--gold);
  color: #151009;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07100e; }
::-webkit-scrollbar-thumb { border: 2px solid #07100e; border-radius: 999px; background: #344b43; }
::-webkit-scrollbar-thumb:hover { background: #4c6b60; }

.top {
  position: sticky;
  z-index: 80;
  top: 0;
  min-height: 78px;
  padding: 12px clamp(16px, 3vw, 46px);
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(4, 10, 9, .88);
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  backdrop-filter: blur(22px) saturate(140%);
}

.brandLockup { gap: 13px; }
.brandMark {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 220, 142, .55);
  border-radius: 14px 3px 14px 3px;
  background: linear-gradient(145deg, #f2c76f, #8e621c);
  color: #0a0d0b;
  box-shadow: 0 0 0 5px rgba(233,189,98,.08), 0 8px 30px rgba(233,189,98,.16);
  font-size: 14px;
  letter-spacing: .09em;
}
.brandMark::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 14px;
  height: 14px;
  border: 3px solid #08110e;
  border-radius: 50%;
  background: var(--green);
  content: "";
  box-shadow: 0 0 14px rgba(88,215,153,.8);
}
.top h1 { color: #fff; font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.top p { margin-top: 2px; color: #789087; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.auth {
  padding: 6px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
}
.auth input { width: 132px; }
.auth #adminCode { width: 112px; }
.me { gap: 10px; }
.me > span {
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: #dce8e2;
  font-size: 12px;
}

input,
select {
  min-height: 42px;
  border: 1px solid rgba(175,211,196,.2);
  border-radius: 11px;
  background: rgba(4, 10, 9, .72);
  color: var(--text);
  box-shadow: inset 0 1px 8px rgba(0,0,0,.28);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
input::placeholder { color: #657a72; }
input:focus,
select:focus {
  border-color: rgba(98, 183, 215, .72);
  box-shadow: 0 0 0 4px rgba(98, 183, 215, .1), inset 0 1px 8px rgba(0,0,0,.2);
}

button {
  position: relative;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255,225,158,.34);
  border-radius: 11px;
  background: linear-gradient(135deg, #f0cb77 0%, #c89130 100%);
  color: #161008;
  box-shadow: 0 8px 20px rgba(184,125,31,.18), inset 0 1px rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .015em;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, border-color .18s ease;
}
button::after {
  position: absolute;
  top: -80%;
  left: -45%;
  width: 32%;
  height: 260%;
  content: "";
  background: rgba(255,255,255,.25);
  transform: rotate(24deg);
  transition: left .42s ease;
}
button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(184,125,31,.26), inset 0 1px rgba(255,255,255,.58);
}
button:hover:not(:disabled)::after { left: 120%; }
button:active:not(:disabled) { transform: translateY(0) scale(.98); }
button.secondary {
  border-color: rgba(176,207,194,.18);
  background: linear-gradient(145deg, #1d2c27, #111b18);
  color: #dce8e2;
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 8px 18px rgba(0,0,0,.18);
}
button.secondary:hover:not(:disabled) { border-color: rgba(98,183,215,.48); box-shadow: 0 10px 24px rgba(0,0,0,.24); }
button.danger { border-color: rgba(255,160,168,.35); background: linear-gradient(145deg, #ec6974, #a52f3c); color: #fff; }
button:focus-visible,
a:focus-visible { outline: 3px solid rgba(98,183,215,.5); outline-offset: 3px; }

.gameHero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(32px, 7vw, 110px);
  align-items: end;
  min-height: min(630px, calc(100vh - 78px));
  padding: clamp(60px, 9vw, 128px) max(22px, calc((100vw - 1440px) / 2 + 24px)) 84px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background-image: url('/assets/city-empire-hero-v2.png');
  background-position: center center;
  background-size: cover;
}
.gameReady .gameHero { min-height: 440px; padding-top: 72px; padding-bottom: 74px; }
.gameHero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(3,8,8,.94) 0%, rgba(3,8,8,.72) 34%, rgba(3,8,8,.16) 72%),
    linear-gradient(0deg, #06100d 0%, transparent 35%, rgba(2,7,9,.25) 100%);
}
.gameHero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .16;
  background-image: linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.18) 50%, transparent 50.2%);
  background-size: 22vw 100%;
  pointer-events: none;
}
.heroShade {
  position: absolute;
  z-index: -1;
  right: 5%;
  bottom: -180px;
  width: 620px;
  height: 380px;
  border-radius: 50%;
  background: rgba(226,169,67,.14);
  filter: blur(100px);
}
.heroContent { max-width: 760px; animation: heroIn .75s cubic-bezier(.2,.8,.2,1) both; }
.heroContent,
.heroContent > * { min-width: 0; }
.heroEyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 19px;
  color: #a9bbb4;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .2em;
}
.heroEyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(88,215,153,.1), 0 0 16px rgba(88,215,153,.85);
  animation: statusPulse 2s ease-in-out infinite;
}
.gameHero h2 {
  max-width: 850px;
  margin: 0;
  color: #fff;
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 950;
  line-height: .88;
  letter-spacing: -.075em;
  text-shadow: 0 12px 50px rgba(0,0,0,.48);
}
.gameHero h2 em { color: var(--gold-bright); font-style: normal; }
.heroContent > p {
  max-width: 620px;
  margin: 26px 0 0;
  color: #bccbc5;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.65;
  text-shadow: 0 2px 14px #000;
}
.heroActions { display: flex; gap: 10px; margin-top: 29px; }
.heroActions button { min-width: 168px; min-height: 50px; padding: 12px 19px; }
.heroFeatureStrip { display: flex; gap: 26px; margin-top: 35px; }
.heroFeatureStrip span { color: #8fa49c; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.heroFeatureStrip b { display: block; margin-bottom: 3px; color: #f7f5ed; font-size: 20px; letter-spacing: -.03em; }

.heroIntel {
  width: 100%;
  border: 1px solid rgba(210,230,220,.2);
  border-radius: 19px 5px 19px 5px;
  background: rgba(5, 13, 12, .72);
  box-shadow: 0 24px 70px rgba(0,0,0,.44), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(16px) saturate(135%);
  animation: heroIn .75s .14s cubic-bezier(.2,.8,.2,1) both;
}
.heroIntel header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #9eb0a9;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .13em;
}
.heroIntel header i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.heroIntel header b { color: var(--green); font-size: 9px; }
.heroIntelGrid { display: grid; grid-template-columns: 1fr 1fr; }
.heroIntelGrid span { min-width: 0; padding: 18px 15px; border-right: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07); }
.heroIntelGrid span:nth-child(even) { border-right: 0; }
.heroIntelGrid span:nth-child(n+3) { border-bottom: 0; }
.heroIntelGrid small,
.heroIntelGrid b { display: block; }
.heroIntelGrid small { color: #647b72; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.heroIntelGrid b { margin-top: 5px; color: #e7eee9; font-size: 12px; }
.heroIntel footer { display: flex; gap: 9px; align-items: center; padding: 12px 15px; border-top: 1px solid rgba(255,255,255,.08); }
.heroIntel footer span { width: 28px; height: 3px; background: linear-gradient(90deg, var(--gold), transparent); }
.heroIntel footer p { margin: 0; color: #7e938b; font-size: 10px; }

.error { position: fixed; z-index: 100; top: 92px; right: 18px; max-width: 420px; margin: 0; border-radius: 12px; box-shadow: var(--shadow); }

.stats {
  position: relative;
  z-index: 10;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 0;
  width: min(1392px, calc(100% - 48px));
  margin: -42px auto 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(198,221,211,.2);
  border-radius: 18px 6px 18px 6px;
  background: rgba(7,15,13,.9);
  box-shadow: 0 22px 60px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
}
.stats div {
  min-height: 66px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.07);
  border-bottom: 1px solid rgba(255,255,255,.07);
  border-radius: 0;
  background: transparent;
  color: #768b83;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.stats div:nth-child(6n) { border-right: 0; }
.stats div:nth-last-child(-n+6) { border-bottom: 0; }
.stats div:first-child { background: linear-gradient(135deg, rgba(233,189,98,.16), transparent); }
.stats b { margin-top: 6px; color: #eef4f0; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stats div:first-child b { color: var(--gold-bright); }

.timeWidget {
  width: min(1392px, calc(100% - 48px));
  margin: 12px auto 0;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(8,16,14,.68);
  backdrop-filter: blur(12px);
}
.clockFace span { color: #eaf3ef; font-size: 22px; letter-spacing: -.04em; }
.clockFace small { color: #71867e; font-size: 10px; text-transform: uppercase; }
.clockChips span { border: 1px solid rgba(255,255,255,.08); border-radius: 999px; background: rgba(255,255,255,.035); color: #97aaa3; }

.gameNav {
  position: sticky;
  z-index: 60;
  top: 78px;
  display: flex;
  gap: 4px;
  width: min(1392px, calc(100% - 48px));
  margin: 12px auto 0;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  background: rgba(5,12,10,.84);
  box-shadow: 0 15px 35px rgba(0,0,0,.25);
  backdrop-filter: blur(18px);
}
.gameNav a {
  display: flex;
  flex: 1 0 max-content;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #91a59d;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.gameNav a i { color: #51675f; font-size: 8px; font-style: normal; }
.gameNav a:hover { border-color: rgba(233,189,98,.22); background: rgba(233,189,98,.08); color: #f5e4bd; transform: translateY(-1px); }

.layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 24px 80px;
}
.mainGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
section[id] { scroll-margin-top: 150px; }

.panel {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(176,207,194,.14);
  border-radius: 19px 5px 19px 5px;
  background:
    linear-gradient(145deg, rgba(18,31,27,.94), rgba(8,15,13,.96)),
    var(--panel);
  color: var(--text);
  box-shadow: 0 18px 55px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.035);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.panel::before {
  position: absolute;
  top: 0;
  left: 18px;
  width: 72px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--gold), transparent);
  box-shadow: 0 0 18px rgba(233,189,98,.35);
}
.panel:hover { border-color: rgba(176,207,194,.24); box-shadow: 0 24px 70px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.05); }
.panel .head { margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid rgba(255,255,255,.07); }
.panel h2 { color: #f6f8f5; font-size: 18px; font-weight: 900; letter-spacing: -.035em; }
.panel h3 { color: #eef4f0; }
.panel .muted { color: #80958d; }

.bankPanel { background: radial-gradient(circle at 100% 0, rgba(233,189,98,.15), transparent 42%), linear-gradient(145deg, #15231f, #0a1210); }
.bankPanel > input { width: 100%; margin-bottom: 10px; }
.bankPanel .buttons { display: grid; grid-template-columns: repeat(2, 1fr); }
.lifePanel { background: radial-gradient(circle at 100% 0, rgba(88,215,153,.11), transparent 42%), linear-gradient(145deg, #13211d, #09120f); }
.propertyPanel,
.storePanel,
.businessPanel,
.marketPanel,
.casinoHubPanel { grid-column: 1 / -1; }

.lifeCard,
.lifeBlock,
.propertySummary span,
.housingListing,
.propertyListing,
.ownedProperty,
.marketAsset,
.marketDetailStats span,
.businessSummary span,
.storeControlBlock,
.storeEquipment,
.storeProduct,
.storeStaff,
.adminUser {
  border-color: rgba(176,207,194,.13);
  background: rgba(4,11,9,.46);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.lifeCard b,
.propertySummary b,
.businessSummary b,
.storeMetrics b,
.storeProductTop b,
.storeStaff b { color: #f0f5f2; }
.lifeCard i,
.conditionTrack { background: #050a09; }

.businessCard {
  min-height: 260px;
  border: 1px solid rgba(176,207,194,.14);
  border-radius: 16px 4px 16px 4px;
  background: linear-gradient(145deg, rgba(21,35,30,.95), rgba(8,15,13,.97));
  color: var(--text);
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.businessCard:hover { border-color: rgba(233,189,98,.34); transform: translateY(-4px); box-shadow: 0 22px 45px rgba(0,0,0,.3); }
.businessCard.owned { border-top-color: var(--green); background: radial-gradient(circle at 100% 0, rgba(88,215,153,.12), transparent 42%), linear-gradient(145deg, #14251f, #09120f); }
.businessCard > p,
.businessMetrics span { color: #82978f; }
.businessMetrics span { background: rgba(2,8,6,.45); }
.businessMetrics b { color: #eef4f0; }
.businessBadge { border-radius: 13px 3px 13px 3px; background: linear-gradient(145deg,#293b35,#101815); box-shadow: 0 9px 25px rgba(0,0,0,.28); }

.marketAsset {
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18,31,27,.86), rgba(6,13,11,.9));
  transition: transform .2s ease, border-color .2s ease;
}
.marketAsset:hover { border-color: rgba(98,183,215,.35); transform: translateY(-2px); }
.marketChartBox,
.marketDetailChartBox,
.marketTradeList { border-color: rgba(176,207,194,.12); background: rgba(3,9,7,.56); }
.marketDetail { border-color: rgba(176,207,194,.2); border-radius: 20px 6px 20px 6px; background: #0c1714; box-shadow: 0 40px 110px rgba(0,0,0,.68); }

.storefrontPreview { border-color: rgba(255,255,255,.22); border-radius: 16px 4px 8px 8px; box-shadow: 0 24px 50px rgba(0,0,0,.34); }
.storePremises { border-color: rgba(176,207,194,.13); border-radius: 15px 4px 15px 4px; background: rgba(5,12,10,.58); }
.storeScene { border-color: rgba(176,207,194,.16); border-radius: 16px 5px 16px 5px; box-shadow: inset 0 1px rgba(255,255,255,.04), 0 20px 40px rgba(0,0,0,.22); }
.storeTabs button { border-radius: 10px; }

.casinoHubPanel {
  border-color: rgba(233,189,98,.2) !important;
  background: radial-gradient(circle at 85% 0, rgba(137,58,73,.13), transparent 28rem), linear-gradient(145deg, #111b18, #070d0b) !important;
}
.casinoHubPanel::before { width: 130px; background: linear-gradient(90deg, #f0c86e, #b54d5a, transparent); }
.casinoGameGrid { gap: 16px; }
.casinoGameCard {
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(176,207,194,.14);
  border-radius: 17px 4px 17px 4px;
  background: linear-gradient(145deg, rgba(19,31,27,.9), rgba(5,11,9,.94));
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 14px 30px rgba(0,0,0,.21);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.casinoGameCard::before { width: 2px; background: linear-gradient(to bottom, var(--gold), transparent 72%); }
.casinoGameCard:hover { border-color: rgba(233,189,98,.3); transform: translateY(-3px); box-shadow: 0 22px 45px rgba(0,0,0,.32); }
.casinoCardTitle > i { border-radius: 11px 3px 11px 3px; background: linear-gradient(145deg, #30291a, #17140d); box-shadow: 0 7px 20px rgba(0,0,0,.28); }
.casinoControls input,
.casinoControls select,
.lotteryBuyRow input { background: rgba(2,8,6,.72); }
.minesBoard { gap: 8px; }
.mineTile { border-radius: 10px 3px 10px 3px; background: linear-gradient(145deg,#253b33,#14231e); box-shadow: inset 0 -4px rgba(0,0,0,.28), 0 6px 14px rgba(0,0,0,.16); }
.mineTile:hover:not(:disabled) { border-color: var(--gold); background: #304b40; transform: translateY(-2px); }
.mineTile.selected { outline-color: var(--gold-bright); }
.fortuneWheel { box-shadow: 0 18px 45px rgba(0,0,0,.6), 0 0 45px rgba(233,189,98,.12); }
.wheelBox { border: 1px solid rgba(233,189,98,.18); border-radius: 50%; background: radial-gradient(circle, #16231f, #050908 70%); box-shadow: 0 25px 60px rgba(0,0,0,.4); }
.scratchTicket { box-shadow: 0 24px 60px rgba(0,0,0,.5); }

.commandRail { gap: 18px; }
.commandRail > .panel { position: sticky; top: 150px; }
.commandRail > .panel + .panel { position: relative; top: auto; }
.railPanel h2 { display: flex; gap: 9px; align-items: center; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.railPanel h2::before { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); content: ""; box-shadow: 0 0 12px rgba(233,189,98,.6); }
.leaderRow { border-color: rgba(255,255,255,.07); color: #d9e4df; }
.leaderRow:first-child { color: var(--gold-bright); }
#log { max-height: 280px; color: #9fb1aa; line-height: 1.7; }

.cityOverlay { background: rgba(3,8,7,.95); backdrop-filter: blur(14px); }
.cityShell { border: 1px solid rgba(255,255,255,.12); border-radius: 20px 6px 20px 6px; box-shadow: 0 50px 140px rgba(0,0,0,.7); }
.cityTopbar { background: rgba(8,17,14,.94); }
.cityBuilding { border-radius: 14px 3px 14px 3px; transition: transform .2s ease, filter .2s ease, background .2s ease; }
.cityBuilding:hover { transform: translateY(-5px); filter: brightness(1.12); }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes statusPulse {
  50% { opacity: .45; transform: scale(.78); }
}

@media (max-width: 1120px) {
  .gameHero { grid-template-columns: minmax(0,1fr) 330px; }
  .layout { grid-template-columns: 1fr; }
  .commandRail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .commandRail > .panel { position: relative; top: auto; }
}

@media (max-width: 900px) {
  .top { position: relative; align-items: stretch; }
  .auth { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .auth input, .auth #adminCode { width: 100%; }
  .auth #adminCode { grid-column: 1 / -1; }
  .gameHero,
  .gameReady .gameHero { grid-template-columns: minmax(0,1fr); min-height: 660px; padding-top: 78px; background-position: 60% center; }
  .gameHero::before { background: linear-gradient(90deg,rgba(3,8,8,.94),rgba(3,8,8,.58)), linear-gradient(0deg,#06100d,transparent 55%); }
  .gameHero h2 { font-size: clamp(50px,12vw,78px); }
  .heroIntel { max-width: 520px; }
  .stats { grid-template-columns: repeat(3,1fr); }
  .stats div:nth-child(3n) { border-right: 0; }
  .stats div:nth-last-child(-n+6) { border-bottom: 1px solid rgba(255,255,255,.07); }
  .stats div:nth-last-child(-n+3) { border-bottom: 0; }
  .gameNav { top: 8px; }
  .mainGrid { grid-template-columns: 1fr; }
  .propertyPanel, .storePanel, .businessPanel, .marketPanel, .casinoHubPanel { grid-column: auto; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 84px; }
  .top { width: 100%; max-width: 100%; padding: 10px 12px; }
  .brandMark { width: 42px; height: 42px; }
  .auth { grid-template-columns: minmax(0,1fr); min-width: 0; }
  .auth input, .auth button { min-width: 0; }
  .auth #adminCode { grid-column: auto; }
  .me { width: 100%; }
  .me > span { width: 100%; }
  .me button { flex: 1; }
  .gameHero,
  .gameReady .gameHero { width: 100%; max-width: 100%; min-height: 650px; padding: 64px 18px 64px; background-position: 64% center; }
  .heroContent { width: calc(100vw - 36px); max-width: calc(100vw - 36px); }
  .gameHero h2 { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(42px,13vw,54px); line-height: .92; white-space: normal; }
  .heroContent > p { width: 100%; max-width: 100%; overflow-wrap: anywhere; font-size: 14px; }
  .heroActions { align-items: stretch; flex-direction: column; width: 100%; }
  .heroActions button { width: 100%; }
  .heroFeatureStrip { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
  .heroFeatureStrip span { font-size: 8px; }
  .heroFeatureStrip b { font-size: 16px; }
  .heroIntel { display: none; }
  .stats,
  .timeWidget,
  .gameNav { width: calc(100% - 24px); }
  .stats { grid-template-columns: repeat(2,1fr); margin-top: -32px; }
  .stats div:nth-child(3n) { border-right: 1px solid rgba(255,255,255,.07); }
  .stats div:nth-child(2n) { border-right: 0; }
  .stats div:nth-last-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,.07); }
  .stats div:nth-last-child(-n+2) { border-bottom: 0; }
  .timeWidget { align-items: stretch; }
  .gameNav { top: 6px; justify-content: flex-start; }
  .gameNav a { flex: 0 0 auto; }
  .layout { padding: 14px 12px 60px; }
  .panel { padding: 15px; border-radius: 15px 4px 15px 4px; }
  .commandRail { grid-template-columns: 1fr; }
  .businessCatalog, .casinoGameGrid { grid-template-columns: 1fr; }
  .error { right: 12px; left: 12px; max-width: none; }
}

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