:root{
  --ink:#202833;
  --muted:#647180;
  --paper:#f4f6f8;
  --panel:#ffffff;
  --line:#e1e5e9;
  --green:#0866d9;
  --green-dark:#0753b1;
  --sage:#eaf2ff;
  --coral:#d95757;
  --yellow:#b87513;
  --shadow:0 1px 3px #1525360a,0 8px 24px #15253608;
  --ui-radius:14px;
}
*{box-sizing:border-box}
body{background:var(--paper);color:var(--ink);font-family:Figtree,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.45}
button{font-family:inherit}
button:focus-visible,a:focus-visible{outline:3px solid #1683ff;outline-offset:2px}
.app-shell{max-width:1480px}
.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);padding:0 clamp(18px,4vw,56px);box-shadow:0 1px 2px #17263708}
.brand{letter-spacing:.08em;color:var(--ink);font-size:11px;font-weight:750}
.brand small{font-size:8px;letter-spacing:.18em;color:#768290}
.brand-mark{width:34px;height:34px;border-radius:10px;background:#0866d9;color:white;box-shadow:none;transform:none;font:750 20px Figtree,Inter,sans-serif}
.top-stats{gap:14px}
.stat{gap:8px;padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.stat-icon{height:28px;width:28px;border-radius:8px;font-size:14px}
.coin{background:#fff5df;color:#9a6500}.star{background:#edf4ff;color:#0866d9}
.stat small{font-size:8px;letter-spacing:.06em;color:#758191}
.stat strong{font:700 14px Figtree,Inter,sans-serif;color:var(--ink)}
.icon-btn{width:34px;height:34px;border-radius:9px;border:1px solid var(--line);background:#fff;color:#3c4855;font-size:15px}
.icon-btn:hover{background:#f2f6fb;border-color:#cbd6e2}
main{max-width:1360px;margin:auto;padding:32px clamp(18px,4vw,56px) 22px}
.eyebrow{font-size:10px;letter-spacing:.09em;color:#6c7886;font-weight:650}
.welcome-row{margin-bottom:20px}
.welcome-row h1{font-size:clamp(25px,3vw,32px);font-weight:700;letter-spacing:-.035em}
.welcome-row h1 span{color:#0866d9}
.subhead{font-size:13px;color:#667382}
.panel,.business-card,.directory-card{background:#fff;border:1px solid var(--line);border-radius:var(--ui-radius);box-shadow:var(--shadow)}
.panel-heading{padding:18px 20px 14px}
.panel-heading h2,.section-heading h2{font-size:18px;font-weight:650;letter-spacing:-.02em;color:var(--ink)}
.text-btn,.subtle-btn{color:#0866d9;font-size:12px;font-weight:600}
.city-panel{overflow:hidden}
.city-scene{height:276px;background:linear-gradient(180deg,#e9f4fc 0%,#f1f6ef 72%,#e5eee2 100%)}
.sun{width:52px;height:52px;background:#ffd985;box-shadow:0 0 0 10px #ffd98533}
.skyline{opacity:.26}.skyline span{border-color:#8192a2;background:repeating-linear-gradient(90deg,transparent 0 12px,#61788a22 13px 15px),repeating-linear-gradient(0deg,#fff8 0 12px,transparent 13px 19px)}
.city-road{background:#d8dee3;border-top-color:#fff;border-bottom-color:#fff}.city-road:after{border-color:#fff}
.district-grid{gap:10px}
.district-tile,.district-tile:nth-child(n){min-height:104px;border:1px solid #dce3e9;border-radius:12px;background:#fff;box-shadow:0 3px 10px #2838480d;padding:10px;transition:transform .16s,border-color .16s,box-shadow .16s}
.district-tile:nth-child(2){min-height:128px}.district-tile:nth-child(3){min-height:112px}.district-tile:nth-child(4){min-height:120px}
.district-tile:hover{transform:translateY(-3px);border-color:#a9c9ef;box-shadow:0 6px 15px #28384812}
.district-tile.selected{outline:2px solid #0866d9;outline-offset:1px}
.district-tile:nth-child(1) .district-emoji{color:#b36b13}.district-tile:nth-child(2) .district-emoji{color:#6862b2}.district-tile:nth-child(3) .district-emoji{color:#178795}.district-tile:nth-child(4) .district-emoji{color:#468854}
.district-pill{background:#edf4ff;color:#0757b7;border:0;border-radius:6px;font-size:8px}
.district-name{font-size:11px;font-weight:650;color:#25313d}.district-meta{font-size:9px;color:#6e7a87}
.city-caption{height:36px;background:#ffffffed;color:#687684;letter-spacing:.07em}.city-caption span:last-child{color:#075dbf}
.live-dot{background:#25946a;box-shadow:0 0 0 3px #25946a1c}
.district-strip{background:#fff;border-top:1px solid var(--line);padding:12px 18px}
.district-strip span{font-size:10px;color:#657281}.district-strip b{font-size:10px;color:#344150}
.objective-panel,.pulse-panel{padding:17px 18px}
.objective-icon{width:32px;height:32px;border-radius:9px;background:#edf4ff;color:#0866d9;font-size:18px}
.objective-text,.pulse-panel>p{font-size:12px;color:#657281}
.objective-reward{border-color:#e8ebee}.objective-reward b{color:#0866d9}
.weather-icon{color:#a9761d}
.pulse-action{border-color:#e8ebee;color:#0866d9;font-size:12px;font-weight:600}
.workbench{margin-top:27px}
.section-heading{margin-bottom:12px}
.business-grid{gap:12px}
.business-card{min-height:142px;padding:15px;border-radius:13px;transition:transform .16s,border-color .16s,box-shadow .16s}
.business-card:hover{transform:translateY(-2px);border-color:#c5d6e6;box-shadow:0 5px 16px #15253612}
.business-card:after{width:88px;height:88px;background:#edf4ff;opacity:.55}
.business-icon{width:38px;height:38px;border-radius:10px;font-size:19px;background:#f0f4f7;color:#334252}
.business-card:nth-child(2) .business-icon{background:#edf5f0}.business-card:nth-child(3) .business-icon{background:#f6f0ed}
.business-head h3{font-size:13px!important;font-weight:650}.business-head p{font-size:10px;color:#6a7785}
.business-stats{color:#74808d}.business-stats b{color:#26323e}
.business-action{color:#0866d9;font-size:11px;font-weight:650}
.business-card.empty{background:#fbfcfd;border:1px dashed #b9c5d0}
.business-card.empty button{border:1px solid #c8d6e3;border-radius:8px;background:#fff;color:#075dbf;padding:8px 12px;font-weight:600}
.finance-card{border:1px solid var(--line);border-radius:13px;background:#fff!important;box-shadow:var(--shadow);padding:13px 16px}
.finance-card:nth-child(2),.finance-card:nth-child(3){background:#fff!important}
.finance-card>span{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#edf4ff;color:#0866d9;font-size:19px}
.finance-card:nth-child(2)>span{background:#eaf5ef;color:#218052}.finance-card:nth-child(3)>span{background:#f3efff;color:#6d57b7}
.finance-card small{font-size:9px;color:#718090;letter-spacing:.06em}.finance-card strong{font-size:20px;color:#202a35}
.directory-heading h1{font-size:30px;font-weight:700;letter-spacing:-.035em}
.directory-cash{background:#fff;border:1px solid var(--line);border-radius:11px;padding:11px 15px}.directory-cash b{color:#202a35}
.directory-location{background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px 15px}
.directory-location>span{font-size:9px;letter-spacing:.08em;color:#687684}
.directory-location-btn{border:1px solid #dce2e8;background:#fff;border-radius:8px;color:#3f4b57;padding:7px 10px;font-size:11px}
.directory-location-btn.active{background:#eaf2fc;color:#075dbf;border-color:#b5cdea}
.directory-count{font-size:11px;color:#667482}
#marketDirectory{grid-auto-rows:minmax(174px,auto);gap:12px}
#marketDirectory .map-tile{border:1px solid #e0e5e9;border-radius:13px;box-shadow:var(--shadow);transition:transform .16s,border-color .16s,box-shadow .16s}
#marketDirectory .map-tile:hover{transform:translateY(-2px);filter:none;border-color:#c2d3e3;box-shadow:0 5px 16px #15253612}
#marketDirectory .map-tile .directory-desc{font-size:11px;color:#52606e;line-height:1.5}
#marketDirectory .map-tile .directory-meta{border-color:#ffffff99;color:#66717e;font-size:9px}
#marketDirectory .map-tile .directory-meta b{color:#26313d}
#marketDirectory .map-tile .business-icon{width:36px;height:36px;font-size:19px;border-radius:9px;background:#ffffffb8}
#marketDirectory .map-bakery{background:#fff5e8}#marketDirectory .map-cafe{background:#edf7f3}#marketDirectory .map-mill{background:#eff3ff}#marketDirectory .map-workshop{background:#fff1ea}#marketDirectory .map-greenhouse{background:#eff7ec}#marketDirectory .map-studio{background:#f4efff}#marketDirectory .map-grocery{background:#fff0f4}#marketDirectory .map-florist{background:#edf7fa}#marketDirectory .map-bookstore{background:#fff7e8}#marketDirectory .map-tailor{background:#f8eff6}#marketDirectory .map-bike_shop{background:#eff1ff}#marketDirectory .map-tech_repair{background:#edf8fa}#marketDirectory .map-clinic{background:#fff1ed}#marketDirectory .map-credit_union{background:#f3f0fa}#marketDirectory .map-solar_shop{background:#fff8e4}#marketDirectory .map-realty{background:#f0f7ee}#marketDirectory .map-media{background:#fbf0f6}#marketDirectory .map-utility{background:#eff5fc}
.directory-card .primary-btn,.primary-btn{background:#0866d9;color:#fff;border:1px solid #0866d9;border-radius:8px;box-shadow:none;font-size:11px;font-weight:600;transition:background .15s,border-color .15s}
.directory-card .primary-btn:hover,.primary-btn:hover{background:#0753b1;border-color:#0753b1}
.primary-btn:disabled{background:#edf0f3;border-color:#e1e5e9;color:#8b96a2;opacity:1}
.secondary-btn{background:#fff;border:1px solid #d7dee5;border-radius:8px;color:#334150;font-size:11px;font-weight:600}
.secondary-btn:hover{background:#f6f8fa;border-color:#bbc7d2}
.order-tag{background:#eef4fb;color:#245a91;border-radius:7px;font-size:9px;letter-spacing:.04em}
.order-panel,.ledger-panel{padding:18px;border:1px solid var(--line);border-radius:14px}
.order-card{border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:none;padding:14px}
.order-card .order-art{width:42px;height:42px;border-radius:10px;background:#f0f4f7;font-size:23px}
.order-card .order-details h3{font-size:13px!important;font-weight:650;color:#26313d}
.order-card .order-details p{font-size:11px!important;color:#687684}
.order-card [data-order-time]{color:#586674}.order-card [data-order-time]::before{content:'Next day in '}
.order-progress{border:0;background:#e9edf1;box-shadow:none;height:6px}.order-progress span{background:#1675df;transition:width .8s linear}
.auto-tag{border:1px solid #cfe5d9;border-radius:7px;background:#edf7f1;color:#22724c;box-shadow:none;font-size:9px;padding:6px 9px}
.feed-item{color:#657281}.feed-icon{width:27px;height:27px;border-radius:8px;background:#eff3f7;color:#46576a}.feed-item b{font-weight:650;color:#2a3642}
.goals-page .milestones-panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
.goals-hero .goals-trophy{width:88px;height:88px;border:1px solid #e6e0cb;border-radius:22px;background:#fff8e7;box-shadow:none;transform:none;font-size:48px}
.goals-hero h1{font-size:34px;font-weight:700;color:#202833}
.goals-hero .eyebrow{color:#687684}
.goals-page .milestone-card{border:1px solid var(--line);border-radius:12px;background:#fff;box-shadow:none}
.goals-page .milestone-card h3{font-size:15px;font-weight:650;color:#26313d}
.goals-page .milestone-card .primary-btn,.goals-page .milestone-card .secondary-btn{border-radius:8px}
.bottom-grid{gap:12px;margin-top:22px}
.toast{background:#202a35;border:1px solid #344353;border-radius:9px;box-shadow:0 8px 28px #12203325}
dialog::backdrop{background:#1c28365c;backdrop-filter:blur(3px)}
.modal-card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 18px 54px #12203326;padding:24px}
.modal-close{color:#647180}.modal-card h2{font-weight:650}
.option{border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px}
.option:hover{border-color:#b9d0e8;background:#f8fbff}
.option b{font-size:12px;font-weight:650}.option small{color:#657281}.option strong{color:#0866d9}
.notice{background:#f2f6fb;color:#536475;border-radius:9px}
.choice-btn{background:#f2f4f6;border-radius:8px}.choice-btn.active{border-color:#9fc0e2;background:#eef5fc;color:#075dbf}
.store-income{border:1px solid #cfe5d9;border-radius:12px;background:#f1f8f4;box-shadow:none}.store-income span{color:#557365}.store-income strong{color:#176b48}
.focus-card{outline:3px solid #1683ff;outline-offset:2px}
@media(max-width:620px){.topbar{height:62px}.top-stats{gap:6px}.stat{padding:4px 6px}.finance-strip{gap:8px}.finance-card{padding:11px 13px}.finance-card strong{font-size:18px}#marketDirectory .map-tile{box-shadow:var(--shadow)}.goals-page .milestones-panel{padding:17px}}

/* Brickhaven's updated deep-plum game palette */
:root{--ink:#EFE3FF;--muted:#C69EFF;--paper:#0F0817;--line:#472C7A;--accent:#B07DFF;--accent-dark:#8553D6;--shadow:0 8px 24px #0F081766}
body{background:#0F0817;color:#EFE3FF}
.topbar,main,.panel,.directory-view,.directory-location,.directory-cash,.directory-card,.milestone-card,.modal-card{background-color:#1A0F2E;color:#EFE3FF}
.topbar{border-color:#36215E}.brand,.brand b,.stat strong,h1,h2,h3,.directory-heading h1,.directory-cash b,.directory-card h3{color:#EFE3FF}
.brand-mark{background:#7044B8;color:#fff}.eyebrow,.stat small,.finance-card small,.directory-location>span,.directory-count,.directory-meta,.directory-meta span,.directory-card p,.subhead,.modal-copy,.option small{color:#C69EFF}
.icon-btn,.text-btn,.subtle-btn,.secondary-btn,.directory-location-btn{background:#271745;border-color:#5B3799;color:#EFE3FF}
.icon-btn:hover,.secondary-btn:hover,.directory-location-btn.active{background:#36215E;border-color:#9B66ED;color:#fff}
.primary-btn,.directory-card .primary-btn{background:#7044B8;border-color:#9B66ED;color:white}.primary-btn:hover,.directory-card .primary-btn:hover{background:#8553D6;border-color:#B07DFF}
.finance-card,.order-panel,.ledger-panel,.objective-panel,.pulse-panel,.city-panel,.workbench .business-card{background:#271745!important;border-color:#472C7A;color:#EFE3FF}
.finance-card:nth-child(2)>span{background:#36215E;color:#F06595}.finance-card:nth-child(3)>span{background:#36215E;color:#38BDF8}.finance-card>span{background:#36215E;color:#B07DFF}.finance-card strong,.objective-reward b{color:#EFE3FF}
.city-scene{background:linear-gradient(160deg,#271745,#36215E 54%,#472C7A)}.city-road{background:#1A0F2E}.district-tile{background:#36215E;color:#EFE3FF;border-color:#7044B8}.district-tile.selected{outline-color:#D946EF}.district-meta,.district-shops{color:#DBC2FF}
.business-card,.order-card,.option,.directory-empty{background:#271745!important;border-color:#5B3799;color:#EFE3FF}.business-card h3,.order-card h3,.option b{color:#EFE3FF}.business-card p,.order-card p{color:#C69EFF}.business-icon{background:#36215E;color:#DBC2FF}
.order-card .order-art{background:#36215E}.order-tag,.auto-tag{background:#36215E;border-color:#5B3799;color:#DBC2FF}.order-progress{background:#36215E}.order-progress span{background:#9B66ED}
.feed-item{color:#C69EFF}.feed-item b{color:#EFE3FF}.feed-icon{background:#36215E;color:#C69EFF}.notice{background:#36215E;color:#DBC2FF}
.goals-page .milestones-panel{background:#1A0F2E;border-color:#472C7A}.goals-page .milestone-card{background:#271745;border-color:#5B3799}.goals-page .milestone-card h3{color:#EFE3FF}.goals-hero .goals-trophy{background:#36215E;border-color:#7044B8}
.directory-card .directory-meta{border-color:#5B3799}.directory-location-btn.active{background:#472C7A;color:#fff;border-color:#9B66ED}.directory-count{background:#271745;border-color:#472C7A}.directory-card .business-icon{background:#36215E}
.stat-icon.star{background:#36215E;color:#FACC15}.stat-icon.coin{background:#36215E;color:#C69EFF}.business-action:focus-visible,.icon-btn:focus-visible,.primary-btn:focus-visible,.secondary-btn:focus-visible{outline:3px solid #6366F1;outline-offset:2px}.primary-btn:disabled,.secondary-btn:disabled{background:#271745;border-color:#7E748F;color:#C69EFF}
#marketDirectory{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:296px;gap:14px}
#marketDirectory .map-tile{height:296px;min-height:296px;box-sizing:border-box;grid-row:auto!important;grid-column:auto!important;display:flex;flex-direction:column;justify-content:flex-start;gap:14px;padding:17px;background:#271745;border:2px solid #472C7A;border-radius:16px;box-shadow:0 6px 0 #0F0817}
#marketDirectory .map-tile .directory-card-head{min-height:72px;align-items:center;gap:13px}
#marketDirectory .map-tile .business-icon{width:64px;height:64px;min-width:64px;font-size:38px;border-radius:15px;background:#36215E}

/* Four clickable neighborhood blocks arranged like a compact city map. */
.city-scene{height:430px;background:linear-gradient(145deg,#182d31 0%,#23523f 48%,#35533b 100%);isolation:isolate}
.city-scene .sun,.city-scene .cloud,.city-scene .skyline{display:none}
.city-scene:before,.city-scene:after{content:"";position:absolute;z-index:-1;background:#1A0F2E;border:3px solid #7044B8;box-shadow:0 0 0 2px #0F0817}
.city-scene:before{left:0;right:0;top:50%;height:36px;transform:translateY(-50%);border-left:0;border-right:0}
.city-scene:after{top:0;bottom:0;left:50%;width:36px;transform:translateX(-50%);border-top:0;border-bottom:0}
.city-road{display:none}
.district-grid{inset:20px 5% 48px;z-index:1;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:46px 52px;align-items:stretch}
.district-tile,.district-tile:nth-child(n){min-height:0;border:3px solid #9B66ED;border-radius:18px;background:linear-gradient(145deg,#472C7A,#36215E);box-shadow:0 7px 0 #0F0817,0 0 0 2px #0F0817;justify-content:center;gap:5px;padding:12px 15px}
.district-tile:nth-child(2){min-height:0;background:linear-gradient(145deg,#593966,#36215E)}
.district-tile:nth-child(3){min-height:0;background:linear-gradient(145deg,#164d60,#271745)}
.district-tile:nth-child(4){min-height:0;background:linear-gradient(145deg,#285542,#271745)}
.district-tile:hover{transform:translateY(-3px);border-color:#D946EF;box-shadow:0 10px 0 #0F0817,0 0 0 2px #0F0817}
.district-tile.selected{outline:3px solid #FACC15;outline-offset:2px}
.district-emoji{font-size:32px;line-height:1.1}
.district-name{font-size:15px;font-weight:900;letter-spacing:.01em;color:#fff}
.district-meta{font-size:10px;color:#DBC2FF}
.district-shops{font-size:12px;color:#FACC15}
.district-pill{font-size:9px;color:#fff;background:#7044B8;border:1px solid #B07DFF;padding:4px 7px;border-radius:99px}
.city-caption{z-index:2;background:#1A0F2E;color:#EFE3FF;border-color:#7044B8}
.district-strip{background:#1A0F2E;border-color:#472C7A}
.district-strip span,.district-strip b{color:#C69EFF}
@media(max-width:620px){.city-scene{height:370px}.district-grid{inset:16px 4% 46px;gap:36px 38px}.district-tile,.district-tile:nth-child(n){padding:8px 5px;border-width:2px;border-radius:13px}.district-emoji{font-size:25px}.district-name{font-size:11px}.district-meta{font-size:8px}.district-shops{font-size:10px}.district-pill{font-size:7px;padding:3px 5px}.city-scene:before{height:28px}.city-scene:after{width:28px}}

/* Keep product names readable on the light map cards. */
.light-theme #marketDirectory .map-tile .directory-desc,.light-theme .major-project-grid .directory-desc,.light-theme .owned-directory .directory-desc{color:#36215E!important}

/* Small game-like motion: reward money, reveal districts and cards, and pop alerts. */
@keyframes city-card-in{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes money-pop{0%{transform:scale(1);text-shadow:none}45%{transform:scale(1.1);text-shadow:0 0 14px #FACC1580}100%{transform:scale(1);text-shadow:none}}
@keyframes modal-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes alert-in{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:translateX(0)}}
@keyframes toast-in{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes city-art-in{from{opacity:0;transform:translateY(12px) rotate(-4deg)}to{opacity:1;transform:translateY(0) rotate(-4deg)}}
.district-tile{animation:city-card-in .42s cubic-bezier(.2,.75,.25,1) both}
.district-tile:nth-child(2){animation-delay:.06s}.district-tile:nth-child(3){animation-delay:.12s}.district-tile:nth-child(4){animation-delay:.18s}
.business-card,.directory-card{animation:city-card-in .32s ease-out both}
.business-card:nth-child(2),.directory-card:nth-child(2){animation-delay:.04s}.business-card:nth-child(3),.directory-card:nth-child(3){animation-delay:.08s}.business-card:nth-child(4),.directory-card:nth-child(4){animation-delay:.12s}
.district-tile,.business-card,.directory-card,.primary-btn,.secondary-btn,.business-action{transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease}
button:active:not(:disabled){transform:translateY(1px) scale(.98)}
.modal-card{animation:modal-in .22s ease-out both}
.store-alerts:not([hidden]){animation:alert-in .28s ease-out both}
.money-pop{animation:money-pop .42s ease-out}
.toast.show{animation:toast-in .2s ease-out both}
.game-start .start-brand{animation:city-card-in .55s ease-out both}.game-start .start-city-art{animation:city-art-in .7s .12s ease-out both}
body.reduced-motion *,body.reduced-motion *:before,body.reduced-motion *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
#marketDirectory .map-tile .directory-desc{min-height:84px;max-height:84px;overflow:hidden;line-height:1.65;color:#DBC2FF;font-size:11px}
#marketDirectory .map-tile .directory-meta{margin-top:auto;border-color:#5B3799;color:#C69EFF}
#marketDirectory .map-bakery,#marketDirectory .map-cafe,#marketDirectory .map-mill,#marketDirectory .map-workshop,#marketDirectory .map-greenhouse,#marketDirectory .map-studio,#marketDirectory .map-grocery,#marketDirectory .map-florist,#marketDirectory .map-bookstore,#marketDirectory .map-tailor,#marketDirectory .map-bike_shop,#marketDirectory .map-tech_repair,#marketDirectory .map-clinic,#marketDirectory .map-credit_union,#marketDirectory .map-solar_shop,#marketDirectory .map-realty,#marketDirectory .map-media,#marketDirectory .map-utility{background:#271745}
#marketDirectory .map-aerospace{background:#36215E}#marketDirectory .map-bulldozers{background:#472C7A}#marketDirectory .map-chemicals{background:#271745}#marketDirectory .map-software{background:#36215E}#marketDirectory .map-defense{background:#1A0F2E}#marketDirectory .map-zoo{background:#271745}#marketDirectory .map-waterpark{background:#36215E}#marketDirectory .map-cinema{background:#472C7A}#marketDirectory .map-taxis{background:#271745}#marketDirectory .map-logistics{background:#36215E}#marketDirectory .map-shipyard{background:#472C7A}
.store-alerts{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;margin:-8px 0 20px;background:#36215E;border:1px solid #D946EF;border-radius:13px;color:#EFE3FF}.store-alerts[hidden]{display:none}.store-alerts>div:first-child{display:grid;gap:4px}.store-alerts>div:first-child strong{color:#F06595}.store-alerts>div:first-child span,.store-alert-list>span{color:#DBC2FF;font-size:12px}.store-alert-list{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.store-alert-list .secondary-btn{white-space:nowrap;border-color:#8553D6}
.reward-badge:not([hidden]){display:inline-block;width:8px;height:8px;margin-left:3px;border-radius:50%;background:#F06595;vertical-align:top}.option .primary-btn,.option .secondary-btn{white-space:nowrap}.brand{cursor:pointer}.brand:hover .brand-mark{background:#8553D6}
dialog::backdrop{background:#0F0817cc}.toast{background:#36215E;border-color:#7044B8;color:#EFE3FF}
@media(max-width:900px){#marketDirectory{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:296px}}
@media(max-width:620px){#marketDirectory{grid-template-columns:1fr;grid-auto-rows:296px}#marketDirectory .map-tile{height:296px;min-height:296px}.store-alerts{align-items:flex-start;flex-direction:column}.topbar{overflow-x:auto}.top-stats{flex-shrink:0}}

/* Extra-large map cards keep product lines and buy buttons inside their tiles. */
.finance-strip{grid-template-columns:repeat(4,minmax(0,1fr))}
.finance-card{min-height:88px;border:2px solid #7044B8!important;border-radius:15px;box-shadow:0 5px 0 #0F0817!important;background:#36215E!important}
.finance-card:nth-child(2){background:#472C7A!important;border-color:#B07DFF!important}.finance-card:nth-child(3){background:#271745!important;border-color:#38BDF8!important}.finance-card:nth-child(4){background:#36215E!important;border-color:#D946EF!important}
.finance-card>span{width:42px;height:42px;border:1px solid #9B66ED;background:#271745!important;font-size:25px!important}.finance-card:nth-child(2)>span{color:#F06595}.finance-card:nth-child(3)>span{color:#38BDF8}.finance-card:nth-child(4)>span{color:#D946EF}.finance-card small{color:#DBC2FF!important;font-size:10px!important}.finance-card strong{color:#fff!important;font-size:22px!important;font-weight:900!important}
.business-head .business-icon,#ownedDirectory .business-icon{width:64px;height:64px;min-width:64px;font-size:36px;border:2px solid #7044B8;border-radius:15px}.district-emoji{font-size:46px!important}.order-card .order-art{width:58px;height:58px;font-size:31px;border:2px solid #5B3799}.feed-icon{width:36px;height:36px;font-size:18px}.weather-icon,.objective-icon{width:46px;height:46px;font-size:28px}
#marketDirectory,.major-project-grid{grid-auto-rows:340px;gap:14px}
#marketDirectory .map-tile,.major-project-grid .major-project-card{height:340px;min-height:340px;box-sizing:border-box;grid-row:auto!important;grid-column:auto!important;display:flex;flex-direction:column;justify-content:flex-start;gap:9px;padding:16px;overflow:hidden}
#marketDirectory .map-tile .directory-card-head,.major-project-grid .directory-card-head{height:64px;min-height:64px;flex:none;align-items:center;gap:12px}
#marketDirectory .map-tile .business-icon,.major-project-grid .business-icon{width:60px;height:60px;min-width:60px;font-size:34px}
#marketDirectory .map-tile .directory-desc,.major-project-grid .directory-desc{height:75px;min-height:75px;max-height:75px;flex:none;overflow:hidden;margin:0;line-height:1.55}
#marketDirectory .map-tile .directory-meta,.major-project-grid .directory-meta{flex:none;margin: auto 0 0;padding-top:8px}
#marketDirectory .map-tile .primary-btn,.major-project-grid .primary-btn{flex:none;height:44px;min-height:44px;margin:9px 0 0;padding:7px 8px;white-space:nowrap;font-size:11px}
.major-project-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.project-unlock{display:grid;grid-template-columns:1.2fr 1fr;align-items:center;gap:20px;margin:22px 0;padding:20px 22px;border:2px solid #8553D6;border-radius:16px;background:linear-gradient(120deg,#271745,#36215E);box-shadow:0 6px 0 #0F0817}.project-unlock h2{margin:0 0 6px;color:#EFE3FF}.project-unlock p{margin:0;color:#C69EFF}.project-progress>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px;color:#DBC2FF;font-size:10px;font-weight:800}.project-progress b{color:#EFE3FF}.asset-progress{height:14px;overflow:hidden;border:1px solid #7044B8;border-radius:99px;background:#0F0817}.asset-progress span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7044B8,#D946EF,#F06595);transition:width .4s ease}.project-unlock.unlocked{border-color:#F06595;background:linear-gradient(120deg,#36215E,#472C7A)}.major-project-section{margin-top:28px}.major-project-card{border:2px solid #8553D6!important;background:linear-gradient(145deg,#271745,#36215E)!important}
.ending-screen[hidden]{display:none}.ending-screen{min-height:calc(100vh - 100px);padding:45px 22px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#EFE3FF}.ending-crown{display:grid;place-items:center;width:112px;height:112px;margin-bottom:18px;border:3px solid #FACC15;border-radius:30px;background:linear-gradient(145deg,#472C7A,#7044B8);font-size:62px;box-shadow:0 8px 0 #0F0817}.ending-screen h1{max-width:760px;margin:8px 0;font-size:clamp(34px,6vw,62px);line-height:1.04;color:#EFE3FF}.ending-copy{max-width:560px;color:#DBC2FF}.ending-score{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;margin:22px 0}.ending-score>div{min-width:200px;padding:17px 22px;border:2px solid #8553D6;border-radius:14px;background:#271745}.ending-score small,.ending-score strong{display:block}.ending-score small{color:#C69EFF;font-size:10px;font-weight:800}.ending-score strong{margin-top:6px;color:#fff;font-size:26px}.ending-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.ending-actions .primary-btn,.ending-actions .secondary-btn{min-height:46px;padding:12px 18px}.ending-actions a{display:inline-flex;align-items:center;text-decoration:none}.ending-note{color:#7E748F;font-size:11px}.game-completed .app-shell>.topbar,.game-completed main>section:not(#endingScreen),.game-completed main>footer,.game-completed main>footer{display:none!important}.game-completed #endingScreen{display:flex!important}

@media(max-width:900px){.finance-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.major-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#marketDirectory,.major-project-grid{grid-auto-rows:340px}}
@media(max-width:620px){.finance-strip{grid-template-columns:1fr}.project-unlock{grid-template-columns:1fr;padding:16px}.major-project-grid{grid-template-columns:1fr}#marketDirectory,.major-project-grid{grid-auto-rows:340px}#marketDirectory .map-tile,.major-project-grid .major-project-card{height:340px;min-height:340px}.ending-score>div{width:100%}}

/* Optional light theme keeps the same purple palette on bright surfaces. */
body.light-theme{--ink:#1A0F2E;--muted:#7E748F;--paper:#EFE3FF;--line:#C69EFF;--shadow:0 8px 24px #2717451a;background:#EFE3FF;color:#1A0F2E}
.light-theme .topbar,.light-theme main,.light-theme .panel,.light-theme .directory-view,.light-theme .directory-location,.light-theme .directory-cash,.light-theme .directory-card,.light-theme .milestone-card,.light-theme .modal-card{background-color:#EFE3FF;color:#1A0F2E}
.light-theme .topbar,.light-theme .panel,.light-theme .directory-card,.light-theme .milestone-card{border-color:#C69EFF}.light-theme h1,.light-theme h2,.light-theme h3,.light-theme .brand,.light-theme .brand b,.light-theme .stat strong,.light-theme .directory-heading h1,.light-theme .directory-cash b,.light-theme .directory-card h3,.light-theme .finance-card strong{color:#1A0F2E!important}
.light-theme .eyebrow,.light-theme .stat small,.light-theme .directory-count,.light-theme .directory-meta,.light-theme .directory-card p,.light-theme .subhead,.light-theme .modal-copy,.light-theme .option small{color:#7E748F}.light-theme .icon-btn,.light-theme .text-btn,.light-theme .subtle-btn,.light-theme .secondary-btn,.light-theme .directory-location-btn{background:#DBC2FF;border-color:#9B66ED;color:#271745}.light-theme .business-card,.light-theme .order-card,.light-theme .option,.light-theme .directory-empty{background:#fff!important;border-color:#C69EFF;color:#1A0F2E}.light-theme .business-card h3,.light-theme .order-card h3,.light-theme .option b{color:#1A0F2E}.light-theme .business-card p,.light-theme .order-card p,.light-theme .feed-item{color:#7E748F}.light-theme .feed-item b{color:#1A0F2E}.light-theme .feed-icon,.light-theme .business-icon,.light-theme .order-card .order-art{background:#DBC2FF;color:#472C7A}.light-theme .finance-card{background:#DBC2FF!important}.light-theme .finance-card:nth-child(2){background:#C69EFF!important}.light-theme .finance-card:nth-child(3){background:#EFE3FF!important}.light-theme .finance-card:nth-child(4){background:#DBC2FF!important}.light-theme .finance-card small{color:#472C7A!important}.light-theme #marketDirectory .map-tile,.light-theme .major-project-grid .major-project-card{background:#EFE3FF!important;border-color:#9B66ED!important}.light-theme .project-unlock{background:linear-gradient(120deg,#DBC2FF,#EFE3FF)}.light-theme .project-unlock h2,.light-theme .project-progress b{color:#1A0F2E}.light-theme .project-unlock p,.light-theme .project-progress>div:first-child{color:#472C7A}.light-theme .ending-screen h1{color:#1A0F2E}.light-theme .ending-score>div{background:#EFE3FF}.light-theme .ending-score strong{color:#1A0F2E}
@media(max-width:900px){.major-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.major-project-grid{grid-template-columns:1fr}}

/* Opening page and larger Cornerstone wordmark */
.brand{letter-spacing:0!important;font-size:16px!important}.brand b{display:block;font-size:16px!important;line-height:1.05;font-weight:900;letter-spacing:-.02em}.brand small{display:block;margin-top:3px;font-size:10px!important;letter-spacing:.12em!important;font-weight:800}
.start-page{display:none;min-height:100vh;box-sizing:border-box;grid-template-columns:minmax(0,1fr) minmax(280px,.9fr);align-items:center;gap:40px;padding:clamp(28px,7vw,96px);overflow:hidden;background:radial-gradient(ellipse at 78% 42%,#36215E 0,#1A0F2E 48%,#0F0817 100%);color:#EFE3FF}
.game-start .start-page{display:grid}.game-start .app-shell{display:none!important}.start-brand{max-width:680px;margin:0 auto}.start-brand .eyebrow{color:#C69EFF;font-size:12px;font-weight:900;letter-spacing:.16em}.start-mark{display:grid;place-items:center;width:78px;height:78px;margin-bottom:25px;border:2px solid #9B66ED;border-radius:22px;background:#472C7A;color:#fff;font-size:50px;font-weight:900;box-shadow:0 7px 0 #0F0817}.start-brand h1{margin:0;color:#fff;font-size:clamp(54px,8vw,96px);font-weight:950;line-height:.92;letter-spacing:-.065em}.start-brand h1 span{color:#B07DFF}.start-subtitle{margin:17px 0 0;color:#F06595;font-size:clamp(21px,3vw,30px);font-weight:850;letter-spacing:.01em}.start-description{max-width:460px;margin:14px 0 25px;color:#DBC2FF;font-size:16px;line-height:1.6}.start-button{min-width:220px;min-height:58px;border:2px solid #C69EFF!important;border-radius:13px!important;background:linear-gradient(120deg,#7044B8,#9B66ED)!important;box-shadow:0 6px 0 #271745;font-size:17px!important;font-weight:900!important}.start-save-note{margin-top:13px;color:#7E748F;font-size:11px}.start-city-art{position:relative;min-height:390px;display:grid;grid-template-columns:repeat(2,1fr);align-items:center;justify-items:center;gap:12px;transform:rotate(-4deg)}.start-city-art span{display:grid;place-items:center;width:min(100%,190px);aspect-ratio:1;border:2px solid #7044B8;border-radius:36px;background:linear-gradient(145deg,#36215E,#271745);font-size:clamp(55px,8vw,92px);box-shadow:0 10px 0 #0F0817}.start-city-art span:nth-child(2n){transform:translateY(30px);border-color:#D946EF}.start-city-art span:nth-child(3n){background:linear-gradient(145deg,#472C7A,#36215E);border-color:#38BDF8}
.light-theme .start-page{background:radial-gradient(ellipse at 78% 42%,#DBC2FF 0,#EFE3FF 55%,#C69EFF 100%);color:#1A0F2E}.light-theme .start-brand h1{color:#1A0F2E}.light-theme .start-description{color:#472C7A}.light-theme .start-save-note{color:#7E748F}
@media(max-width:780px){.start-page{grid-template-columns:1fr;gap:15px;text-align:center;padding:34px 20px}.start-brand{display:flex;flex-direction:column;align-items:center}.start-mark{margin-bottom:16px}.start-city-art{min-height:230px;max-width:500px;width:100%;margin:0 auto}.start-city-art span{width:min(100%,130px);border-radius:25px}.brand b{font-size:14px!important}.brand small{font-size:9px!important}}
