@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root { --ink:#f7e9c4; --night:#241b35; --panel:#332646; --gold:#f6c85f; --green:#72d572; --red:#ed6a5a; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; color:var(--ink); background:radial-gradient(circle at 50% 0,#55436d 0,#241b35 58%,#171121 100%); font-family:"VT323",monospace; }
body:before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.1; background-image:linear-gradient(transparent 50%,#000 50%); background-size:100% 4px; }
.game-shell { width:min(1100px,100%); margin:auto; padding:10px 20px 20px; }
.level-range{position:absolute;z-index:3;left:10px;top:10px;margin:0;padding:7px 10px;background:#171120e8;border:2px solid #7d648e;border-left:4px solid #e7bd67;box-shadow:3px 3px #120d18;color:#fff0bd;letter-spacing:1px;font-size:17px}
.eyebrow { margin:0; color:#c2aad2; letter-spacing:2px; font-size:19px; }
button { font-family:inherit; color:var(--ink); cursor:pointer; }
.round-button,.pace-button { border:2px solid #9178a6; background:#392b4b; box-shadow:inset 0 0 0 2px #20172d,3px 3px #17101f; }
.round-button { width:42px;height:42px;border-radius:4px;font-size:24px; }
.viewport-wrap { position:relative; border:4px solid #151020; outline:2px solid #8e719b; box-shadow:0 12px 30px #130e1bbb; background:#6eb176; overflow:hidden; }
canvas { width:100%; display:block; image-rendering:auto; aspect-ratio:16/9; }
.pace-button { position:absolute;right:10px;top:10px;padding:8px 10px;letter-spacing:1px; }
.map-button{position:absolute;right:1.875%;bottom:3.333%;width:16.458%;height:16.296%;padding:0;border:2px solid transparent;background:transparent;color:transparent;z-index:2}.map-button:hover,.map-button:focus-visible{border-color:#fff2bc;background:#fff2bc12;color:transparent}
.poc-link{position:absolute;z-index:4;left:10px;bottom:10px;padding:7px 10px;border:2px solid #d5b45f;background:#171120e8;color:#fff0bd;font-size:16px;letter-spacing:1px;text-decoration:none;box-shadow:3px 3px #120d18}.poc-link:hover{background:#49354f}
.banner { position:absolute; left:50%;top:19%; transform:translate(-50%,-50%); width:max-content; max-width:90%; text-align:center; padding:12px 18px; border:3px solid #e8c878; background:#271d37eF; box-shadow:0 0 0 3px #533b62; font:11px/1.6 "Press Start 2P"; transition:.2s; }
.banner.hidden { opacity:0; transform:translate(-50%,-65%); pointer-events:none; }
.goal-controls{display:grid;grid-template-columns:auto repeat(3,1fr);gap:6px;align-items:center;margin-top:10px;padding:5px 7px;background:#21182e;border:2px solid #59466b;box-shadow:3px 3px #120d18}.goal-controls>span{padding:0 8px;color:#b9a6c5;letter-spacing:1px}.goal-controls button{min-height:30px;padding:3px 8px;border:1px solid #705985;background:#342741;color:#b9a9c3;font-size:17px;letter-spacing:.5px}.goal-controls button:hover{border-color:#c1a26c;color:#fff0bd}.goal-controls button.active{border-color:#e1bb64;background:#5a3b4b;color:#fff0bd;box-shadow:inset 0 -3px #2a1d31}.goal-controls button:disabled{opacity:.45;cursor:default}
.party-panel { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:6px; }
.battle-panel{height:116px;display:grid;grid-template-columns:minmax(230px,.9fr) 1.6fr;grid-template-rows:18px 72px;gap:3px 14px;align-items:start;margin-top:7px;padding:6px 10px;background:linear-gradient(#261d32,#1c1627);border:2px solid #59466b;box-shadow:3px 3px #120d18;color:#9484a0;overflow:hidden}.battle-panel.active{border-color:#a55c62;color:#f4dfbd}.mob-count{grid-column:1/-1;font-size:17px;line-height:1;color:#e8d8b7}.enemy-roster{height:72px;display:grid;align-content:start;gap:2px;overflow:hidden}.enemy-row{display:grid;grid-template-columns:minmax(78px,auto) 1fr 54px;gap:5px;align-items:center;font-size:14px;line-height:1}.enemy-row.targeted>span{color:#fff0bd}.enemy-row em{font-style:normal;text-align:right;color:#cbb8c8}.enemy-bar{height:9px;background:#301d2b;border:1px solid #120d18}.enemy-bar i{display:block;height:100%;background:linear-gradient(90deg,#a93640,#f36b5e);transition:width .2s}.enemy-more,.quiet-note{color:#897792;font-size:14px}.combat-log{height:72px;overflow:hidden;display:flex;flex-direction:column;font-size:12px;line-height:1}.combat-log p{margin:0;min-height:9px}.combat-log .party{color:#8ee69b}.combat-log .enemy{color:#ff8b79}.combat-log .special{color:#e6c6ff}
.skill-icon{display:inline-block;width:11px;height:11px;margin-right:5px;vertical-align:-1px;position:relative;filter:drop-shadow(0 0 3px #38ff79)}.skill-icon.dagger:before{content:"";position:absolute;width:3px;height:11px;left:5px;top:-1px;background:linear-gradient(#eaffef 0 35%,#39ef76 36% 78%,#166a38 79%);transform:rotate(42deg);box-shadow:1px 0 #0e3d25}.skill-icon.dagger:after{content:"";position:absolute;width:8px;height:2px;left:1px;top:7px;background:#72ff9d;transform:rotate(42deg)}
.skill-icon.fireball:before{content:"●";position:absolute;inset:-4px;color:#bd4dff;font-size:17px;text-shadow:0 0 5px #ff7a2f}.skill-icon.powerstrike:before{content:"✦";position:absolute;inset:-3px;color:#ff4a55;font-size:16px;text-shadow:0 0 4px #fff}.skill-icon.heal:before{content:"✚";position:absolute;inset:-3px;color:#ffe45d;font-size:15px;text-shadow:0 0 4px #fff4a8}
.threat-trivial,.enemy-row.targeted .threat-trivial{color:#918d96}.threat-easy,.enemy-row.targeted .threat-easy{color:#70dc84}.threat-equal,.enemy-row.targeted .threat-equal{color:#f2d36c}.threat-hard,.enemy-row.targeted .threat-hard{color:#ff665e}.enemy-row.targeted .threat-trivial,.enemy-row.targeted .threat-easy,.enemy-row.targeted .threat-equal,.enemy-row.targeted .threat-hard{font-weight:bold}.death-skull{display:inline-block;color:#fff0e2;font-size:14px;line-height:1;text-shadow:0 0 4px #ff3028,1px 1px #4c1119;animation:skull-pulse 1.2s steps(2,end) infinite}@keyframes skull-pulse{50%{color:#ff665e;transform:scale(1.12)}}
.hero-card { display:grid;grid-template-columns:76px 1fr;gap:10px;align-items:center;padding:8px;background:linear-gradient(#3d2e50,#2d223d);border:2px solid #6a547b;box-shadow:3px 3px #17101f; }
.hero-card.is-ghost{border-color:#78b9ca;background:linear-gradient(#304658,#253544)}.hero-card.is-ghost .portrait{filter:saturate(.25) brightness(1.35);opacity:.65}.hero-card.is-ghost .hero-name small{color:#7ee6ff}
.hero-card.is-ghost .portrait{box-shadow:inset 0 0 10px #b8f3ff,0 0 8px #5acbea}.portrait{cursor:pointer;touch-action:manipulation}
.portrait { width:76px;height:76px;display:grid;place-items:center;padding:0;background:#21182d;border:2px solid #9074a2;font-size:26px;overflow:hidden; }
.portrait-wrap{position:relative;width:76px;height:76px}.resurrect-chip{position:absolute;z-index:6;left:2px;right:2px;bottom:2px;min-height:24px;padding:4px 1px;border:2px solid #b8efff;background:#244252f5;color:#d8f8ff;font-size:12px;line-height:1;box-shadow:1px 1px #0b151c;touch-action:manipulation}
.taking-hit .portrait{position:relative;animation:portrait-hit .32s steps(2,end);filter:sepia(.25) saturate(2.8) hue-rotate(320deg) brightness(1.12);box-shadow:inset 0 0 24px #ff1e2d,0 0 14px #ff2838}.taking-hit .portrait:after{content:"";position:absolute;inset:5px;pointer-events:none;background:linear-gradient(132deg,transparent 0 20%,#fff0e5 20% 23%,#d9002f 23% 27%,transparent 27% 38%,#fff0e5 38% 41%,#d9002f 41% 45%,transparent 45% 56%,#fff0e5 56% 59%,#d9002f 59% 63%,transparent 63%);filter:drop-shadow(2px 2px 0 #4d0015);opacity:.95}@keyframes portrait-hit{0%,100%{transform:translateX(0)}33%{transform:translateX(-3px)}66%{transform:translateX(3px)}}
.party-portrait { background-color:#21182d;background-image:url('assets/party-option-g-atlas-v1.png');background-repeat:no-repeat;background-size:400% auto;image-rendering:pixelated;box-shadow:inset 0 0 8px #09060dbb; }
.portrait-0 { background-position:0 0; }
.portrait-1 { background-position:33.333% 0; }
.portrait-2 { background-position:66.667% 0; }
.portrait-3 { background-position:100% 0; }
.hero-name { display:flex;justify-content:space-between;gap:6px;font-size:20px;line-height:1; }.hero-name small{color:#d7ba71;font-size:14px;white-space:nowrap}.hero-action{color:#bba8ca;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hero-info{min-width:0}.stat-row{display:grid;grid-template-columns:18px minmax(28px,1fr) auto;gap:4px;align-items:center;margin-top:3px;font-size:13px;line-height:1}.stat-row>span{color:#dac8e4}.stat-row em{min-width:43px;text-align:right;color:#cdbdd5;font-style:normal}.bar { height:7px;background:#17111f;border:1px solid #0d0911;overflow:hidden}.bar i{display:block;height:100%;transition:width .2s}.hp i{background:linear-gradient(90deg,#b93942,#f36b5e)}.mp i{background:linear-gradient(90deg,#3355b8,#5bb8ff)}.xp i{background:linear-gradient(90deg,#8b55c9,#d18cff)}
.bottom-grid { display:grid;grid-template-columns:1.6fr 1fr;gap:10px;margin-top:10px; }
.journey-card,.loot-card { background:#2c213c;border:2px solid #69527c;padding:12px;box-shadow:4px 4px #17101f; }
.journey-top,.loot-heading {display:flex;justify-content:space-between;align-items:start}.journey-top p:nth-child(2){font-size:22px;margin:4px 0}.supplies{font-size:19px}.supplies span{color:#77df93}
.route-track {height:12px;margin:10px 8px 12px;background:#171120;border:2px solid #8b6f99;position:relative}.route-track div{height:100%;width:0;background:linear-gradient(90deg,#74c878,#e7d56e);transition:width .5s}.route-track span{position:absolute;top:-11px;background:#2c213c}.town-dot{left:-8px}.boss-dot{right:-8px;color:#e78370}
.boss-readiness{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 4px 10px;color:#cdbed1;font-size:17px}.boss-readiness button{flex:0 0 auto;padding:7px 10px;border:2px solid #d2a956;background:#5a3446;color:#fff0bd;box-shadow:2px 2px #17101f;font-size:17px}.boss-readiness button:disabled{cursor:default;filter:grayscale(.7);opacity:.5}
.log {min-height:62px;max-height:62px;overflow:hidden;font-size:18px;color:#d8cce0}.log p{margin:1px 0}.log p:first-child{color:#fff0bd}
.loot-list {display:grid;gap:5px;margin-top:8px}.loot {display:flex;justify-content:space-between;align-items:center;background:#21192e;padding:5px 7px;border-left:3px solid #5b466d;font-size:18px}.upgrade{color:#7ee887;font-weight:bold}.dim{color:#907f9e}.loot-empty{color:#8e7c9c;padding:8px 0}
.map-modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:24px;background:#09070dcf;backdrop-filter:blur(4px)}.map-modal.hidden{display:none}.map-dialog{width:min(1050px,96vw);padding:14px;background:#21192d;border:3px solid #9c7daf;box-shadow:0 20px 80px #000}.map-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.map-title strong{display:block;font:20px "Press Start 2P";color:#fff1bc}.map-title button{font-size:30px;width:44px;height:40px;background:#3b2c4c;border:2px solid #8e719b}.map-dialog canvas{width:100%;border:2px solid #151020;background:#24382e}.map-dialog p{margin:8px 4px 0;color:#cbbbd3;font-size:18px}
.resurrect-modal{position:fixed;inset:0;z-index:30;display:grid;place-items:center;background:#09070dd9}.resurrect-modal.hidden{display:none}.resurrect-dialog{width:min(470px,90vw);padding:24px;text-align:center;background:#2a2037;border:3px solid #b18a69;box-shadow:0 16px 60px #000}.resurrect-dialog strong{font:16px/1.5 "Press Start 2P";color:#fff0bd}.resurrect-dialog p{font-size:24px}.resurrect-dialog>div{display:flex;justify-content:center;gap:12px}.resurrect-dialog button{min-width:90px;padding:9px;background:#3c2d4c;border:2px solid #8f719e;font-size:20px}.resurrect-dialog #confirmResurrect{border-color:#d2b36d;color:#fff0bd}
.character-modal{position:fixed;inset:0;z-index:35;display:grid;place-items:center;padding:6px;background:#09070de6;backdrop-filter:blur(5px)}.character-modal.hidden{display:none}.character-sheet{width:min(1040px,calc(100vw - 12px));max-height:calc(100vh - 12px);overflow:auto;padding:10px;background:linear-gradient(#30233e,#21182d);border:3px solid #b08b66;box-shadow:0 20px 80px #000}.sheet-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.sheet-heading strong{display:block;color:#fff0bd;font:15px/1.35 "Press Start 2P"}.sheet-heading button{width:38px;height:34px;background:#3b2c4c;border:2px solid #8e719b;font-size:25px}.character-sheet-body{display:grid;grid-template-columns:minmax(380px,1fr) 1.25fr;gap:9px}.paper-doll{position:relative;min-height:540px;background:radial-gradient(circle,#6c526b 0,#2a2134 62%,#17121e 100%);border:2px solid #69527c;overflow:hidden}.full-character{position:absolute;left:50%;bottom:25px;width:260px;height:388px;transform:translateX(-50%);background-image:url('assets/party-option-g-atlas-v1.png');background-repeat:no-repeat;background-size:400% auto;background-position-y:100%;image-rendering:auto;filter:drop-shadow(0 12px 10px #0008)}.full-character-0{background-position-x:0}.full-character-1{background-position-x:33.333%}.full-character-2{background-position-x:66.667%}.full-character-3{background-position-x:100%}.equipment-slot{position:absolute;z-index:2;width:122px;min-height:62px;padding:5px;text-align:center;background:#211827ef;border:2px solid #8d7199;box-shadow:2px 2px #100b16}.equipment-slot span{display:block;color:#bfaece;font-size:12px;text-transform:uppercase;letter-spacing:1px}.equipment-slot strong{display:block;overflow:hidden;color:#fff0bd;font-size:15px;line-height:1.05;text-overflow:ellipsis;white-space:nowrap}.equipment-slot em{display:block;margin-top:2px;color:#77df93;font-size:13px;font-style:normal}.equipment-helm{top:10px;left:50%;transform:translateX(-50%)}.equipment-weapon{left:7px;top:105px}.equipment-armor{right:7px;top:105px}.equipment-gloves{left:7px;top:265px}.equipment-cloak{right:7px;top:265px}.equipment-boots{bottom:7px;left:50%;transform:translateX(-50%)}.sheet-right{display:grid;grid-template-rows:auto 1fr;gap:8px}.stat-panel,.growth-panel{padding:9px;background:#21192e;border:2px solid #69527c}.stat-panel h3,.growth-panel h3{margin:0 0 6px;color:#f0cc72;font:12px "Press Start 2P"}.stat-panel dl{display:grid;grid-template-columns:1fr 1fr;margin:0;font-size:16px;line-height:1}.stat-panel dt,.stat-panel dd{margin:0;padding:3px 5px;border-bottom:1px solid #493753}.stat-panel dt{color:#ad9aba}.stat-panel dd{text-align:right;color:#fff0bd}.growth-panel>p{margin:0 0 7px;color:#d9c7df;font-size:15px}.ability-list{display:grid;gap:3px}.ability-row{display:grid;grid-template-columns:45px 1fr auto;gap:5px;align-items:center;padding:5px;background:#2d223a;border-left:3px solid #61506d;font-size:14px;line-height:1}.ability-row.unlocked{border-color:#75d98c;background:#27352f}.ability-row>b{color:#e3c46f}.ability-row span strong,.ability-row span small{display:block}.ability-row span small{color:#aa98b4;font-size:12px}.ability-row em{font-style:normal;color:#82768a;font-size:11px}.ability-row.unlocked em{color:#7de093}
@media(max-width:720px){.game-shell{padding:6px 10px 10px}.level-range{left:7px;top:7px;padding:5px 7px;font-size:14px}.goal-controls{grid-template-columns:1fr 1fr 1fr}.goal-controls>span{display:none}.goal-controls button{font-size:14px}.party-panel{grid-template-columns:repeat(2,1fr)}.bottom-grid{grid-template-columns:1fr}.battle-panel{height:196px;grid-template-columns:1fr;grid-template-rows:18px 68px 88px;gap:3px}.enemy-roster{height:68px}.combat-log{height:88px;font-size:12px}.hero-card{grid-template-columns:58px 1fr}.portrait,.portrait-wrap{width:58px;height:58px}.resurrect-chip{min-height:21px;font-size:10px}.character-modal{padding:2px}.character-sheet{width:calc(100vw - 4px);height:calc(100vh - 4px);max-height:none;overflow:hidden;padding:6px}.sheet-heading{height:40px;margin:0 0 5px}.sheet-heading .eyebrow{font-size:12px}.sheet-heading strong{font-size:10px}.sheet-heading button{width:34px;height:31px}.character-sheet-body{height:calc(100% - 45px);grid-template-columns:minmax(245px,.9fr) minmax(0,1.1fr);gap:5px}.paper-doll{min-height:0;height:100%}.full-character{width:188px;height:280px;bottom:23px}.equipment-slot{width:84px;min-height:48px;padding:3px}.equipment-slot span{font-size:9px}.equipment-slot strong{font-size:11px}.equipment-slot em{font-size:10px}.equipment-helm{top:5px}.equipment-weapon,.equipment-armor{top:82px}.equipment-weapon,.equipment-gloves{left:4px}.equipment-armor,.equipment-cloak{right:4px}.equipment-gloves,.equipment-cloak{top:215px}.equipment-boots{bottom:4px}.sheet-right{gap:4px;min-height:0}.stat-panel,.growth-panel{padding:5px}.stat-panel h3,.growth-panel h3{margin-bottom:4px;font-size:9px}.stat-panel dl{font-size:12px}.stat-panel dt,.stat-panel dd{padding:2px 3px}.growth-panel>p{margin-bottom:4px;font-size:11px}.ability-list{gap:2px}.ability-row{grid-template-columns:35px 1fr auto;gap:3px;padding:3px;font-size:10px}.ability-row span small,.ability-row em{font-size:8px}.log{min-height:48px}.loot-card{min-height:120px}}
@media(max-width:500px){.character-sheet{overflow:auto}.character-sheet-body{height:auto;grid-template-columns:1fr}.paper-doll{min-height:460px}.sheet-right{min-height:430px}}

/* Queued progression is explicit: upgrades never auto-apply. */
.upgrade-heading{display:flex;justify-content:space-between;margin:11px 0 6px;color:#eec875;font-size:19px}
.upgrade-heading span{color:#b9a6c5;font-size:15px}
.upgrade-queue{display:grid;gap:4px;max-height:136px;overflow:auto;overscroll-behavior:contain}
.queue-action{width:100%;text-align:left;padding:5px 8px;background:#42314c;border:1px solid #a98b63;font-size:17px;touch-action:manipulation}
.queue-action:active{background:#71536b}
.upgrade-queue p{margin:3px 0}

/* Milestone 1: always-visible overworld, independent tabbed context, fixed footer. */
.game-shell{display:flex;flex-direction:column;height:100dvh;overflow:hidden;min-height:0}
.viewport-wrap{flex-shrink:0}
.context-panel{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;margin-top:8px}
.tab-page.hidden{display:none}
.main-menu{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:0 0 auto;gap:4px;padding:7px 0 max(5px,env(safe-area-inset-bottom));margin-top:5px;border-top:2px solid #7c6388;background:#251a34}
.main-menu button{padding:8px 2px;min-height:42px;border:1px solid #77638d;background:#332640;color:#c6b0d2;font-size:17px}
.main-menu button.active{background:#5c3d55;border-color:#e6c076;color:#fff0c4;font-weight:bold}
.tab-page-heading{display:flex;justify-content:space-between;align-items:center;margin:4px 0 10px;color:#ffdf90;font-size:25px}
.tab-page-heading span{color:#b8aac8;font-size:17px}
.equipment-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.equipment-card,.achievement-item,.settings-panel{padding:10px;border:2px solid #655079;background:#2b2039}
.equipment-card>strong{display:block;color:#ffe5a5;font-size:19px}
.equipment-card>span{display:block;color:#9ce0b4;font-size:16px}
.equipment-slots{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:7px}
.equipment-slots div{display:flex;flex-direction:column;padding:5px;background:#20172e;min-width:0}
.equipment-slots b{color:#bba6c8;font-size:14px}
.equipment-slots span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px}
.achievement-panel{display:grid;gap:6px}
.achievement-item{display:flex;align-items:center;gap:10px}
.achievement-item.completed{opacity:.55}
.achievement-check{font-size:27px;color:#cfb56f}
.achievement-item strong,.achievement-item small{display:block}
.achievement-item strong{color:#ffdda7;font-size:20px}
.achievement-item small{color:#c7b6d0;font-size:16px}
.settings-panel{font-size:20px}
.settings-panel p{margin:0 0 12px}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;padding:8px;background:#20172e}
.settings-row button{padding:7px 10px;min-width:90px;border:1px solid #d2ab6f;background:#51364e}
.performance-overlay{position:absolute;left:6px;bottom:7px;z-index:6;font:14px VT323,monospace;background:#100f19ed;color:#85f4b6;border:1px solid #85f4b6;padding:4px 6px;pointer-events:none}
.performance-overlay.hidden{display:none}
@media(max-width:600px){
  .game-shell{padding:4px 5px 0}
  .viewport-wrap{border-width:2px}
  .context-panel{margin-top:4px}
  .main-menu{gap:2px;margin-top:3px;padding-top:4px}
  .main-menu button{font-size:15px;min-height:48px}
  .equipment-panel{grid-template-columns:1fr}
  .party-panel{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  .hero-card{grid-template-columns:48px minmax(0,1fr);gap:4px;padding:3px}
  .hero-card .portrait,.hero-card .portrait-wrap{width:48px;height:52px}
  .hero-name{font-size:16px}
  .hero-name small{font-size:12px}
  .hero-action{font-size:13px}
  .stat-row{font-size:11px;margin-top:2px}
  .stat-row em{min-width:35px}
  .battle-panel{margin-top:4px}
  .goal-controls{margin-top:4px}
  .poc-link{font-size:12px;padding:3px}
  .level-range{font-size:13px;padding:3px}
}

.quest-header{display:flex;margin:6px 0}
.quest-header button{flex:1;min-height:32px;padding:4px;background:#45344f;border:1px solid #c5a26e;color:#f6e7bb;font-size:18px}
.quest-picker{position:fixed;inset:0;z-index:32;display:grid;place-items:center;padding:14px;background:#0e0b15dd}
.quest-picker.hidden{display:none}
.quest-dialog{width:min(680px,100%);max-height:82dvh;overflow:auto;background:#21192d;border:3px solid #a48ab1;padding:13px}
.quest-dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.quest-dialog header strong{font-size:25px;color:#f5d68c}
.quest-dialog header button{min-width:42px;min-height:42px;background:#3a2848;border:1px solid #9876ab;font-size:28px}
.quest-cards{display:grid;gap:7px}
.quest-card{display:grid;gap:3px;text-align:left;padding:10px;background:#362840;border:2px solid #8e7199}
.quest-card strong{color:#ffdd91;font-size:22px}
.quest-card span{color:#87d5a1;font-size:18px}
.quest-card small{font-size:17px;color:#d4c4df}
.quest-card em{color:#f5c87f;font-size:18px;font-style:normal}
.quest-card:disabled{opacity:.55;cursor:not-allowed}

.seed-fieldset{min-width:0;border:1px solid #756085;padding:9px;margin:10px 0;background:#1e1729}
.seed-fieldset legend{color:#f4d18b;padding:0 5px}
.seed-fieldset input[type="number"]{max-width:170px;min-height:38px;background:#261c32;border:1px solid #aa8c62;color:#fff0bd;font-size:19px;padding:5px}
.settings-buttons{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.settings-buttons button{border:1px solid #b08d69;padding:8px;background:#433146;font-size:18px}
#seedPreviewCanvas{width:min(100%,360px);height:auto;aspect-ratio:3/2;image-rendering:pixelated;border:2px solid #826c96}
#seedStatus,#saveStatus{color:#c8b5d2;font-size:17px;line-height:1.1}

.party-setup{position:fixed;inset:0;z-index:40;display:grid;place-items:center;background:#0c0917e8;padding:8px}
.party-setup.hidden{display:none}
.party-setup-dialog{width:min(520px,98vw);max-height:94dvh;overflow:auto;padding:14px;background:#29203a;border:2px solid #d6b16c}
.party-setup-dialog header,.party-setup-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.party-setup-dialog header strong{font-size:25px;color:#f2d78f}
.party-setup-dialog p{margin:9px 0;font-size:19px}
.party-setup-dialog label{display:flex;justify-content:space-between;align-items:center;gap:6px;font-size:19px;padding:6px 0}
.party-setup-dialog select,.party-setup-dialog input{background:#1c182c;color:#fff2be;border:1px solid #9b83ab;font:19px VT323;padding:6px;max-width:56%;min-height:39px}
.party-setup-dialog button{border:1px solid #a88c68;background:#4a3654;font:19px VT323;color:#fff2c9;padding:8px;min-height:44px}
.party-setup-dialog footer button:last-child{background:#75503a}

/* First-area interface has only Explore World and manually selected quests. */
.goal-controls{grid-template-columns:auto 1fr 1fr}
.goal-controls #questButton{border-color:#d4ad72;color:#ffe6ab}
