/* The game uses desk drawers, stamped folders and painted metal as its UI materials.
   The native dialog and flowing card layout remain the owners of input and scrolling. */
:root{--game-brass:#D5AB74;--game-paper:#F3E6CF;--game-ink:#13283C;--game-case:#122B42}
.run-modal{background:#030E21CA;backdrop-filter:blur(3px);color-scheme:dark}
.run-modal>:is(.upgrade-panel,.modal-panel),.profile-dialog,.replace-run-dialog,.player-name-dialog{
  position:relative;
  background:radial-gradient(ellipse at 50% 0,#284B65A6,transparent 65%),repeating-linear-gradient(0deg,#FFFFFF02 0 1px,transparent 1px 4px),#0D2136;
  border:2px solid #A7855D;border-top:5px solid var(--game-brass);border-radius:5px;
  box-shadow:0 0 0 3px #071528,0 0 0 4px #D5AB743F,0 12px 0 -6px #030C18,0 24px 75px #0009,inset 0 1px 0 #F5D8AC38;
  color:#FFF1D7;scrollbar-color:#9D805E #0B1B2D;
}
.run-modal>:is(.upgrade-panel,.modal-panel):before,.profile-dialog:before{
  content:'';display:block;height:4px;width:58px;max-width:25%;margin:0 auto 16px;background:#CF985B;border:1px solid #FFDC9B70;box-shadow:0 2px 0 #030B16;pointer-events:none;
}
.run-modal .eyebrow,.replace-run-dialog .eyebrow,.player-name-dialog .eyebrow{color:#F6BD7E;letter-spacing:1.7px;font-size:9px;line-height:1.6}
.run-modal :is(.upgrade-panel,.modal-panel)>h2{color:#FFF1D7;font-weight:800;text-shadow:0 3px 0 #061329;letter-spacing:-.8px}
.run-modal :is(.upgrade-panel,.modal-panel)>p,.run-modal .upgrade-panel>small,.replace-run-dialog p,.player-name-dialog p{color:#BDCFDF;line-height:1.65}
.run-modal .upgrade-panel>p{max-width:720px;margin-left:auto;margin-right:auto}
.run-modal .evolution-hint{color:#EDBE88;line-height:1.6;padding:9px 12px;border:1px dashed #AF8E6755;border-radius:2px;background:#08192B;margin-top:14px}
.run-modal .evolution-hint:empty{display:none}
.run-modal .upgrade-options{gap:14px;padding:5px 2px 7px}
.run-modal .upgrade-card{
  --folder-accent:#6B8C9D;
  display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;
  background:linear-gradient(115deg,#FFFFFF30,transparent 38%),repeating-linear-gradient(0deg,#5E421204 0 1px,transparent 1px 3px),var(--game-paper);
  border:1px solid #D1B790;border-top:5px solid var(--folder-accent);border-radius:3px;padding:18px 16px 16px;
  box-shadow:0 4px 0 #071321,0 6px 0 #07132155,inset 0 0 0 3px #FFF9E533;
  color:var(--game-ink);color-scheme:light;
}
.run-modal .upgrade-card:after{content:'';position:absolute;right:9px;bottom:8px;width:15px;height:2px;background:#9F7E4C66;box-shadow:0 3px 0 #9F7E4C33;pointer-events:none}
.run-modal .upgrade-card:is(:hover,:focus-visible):not(:disabled){background-color:#FFF0D6;border-color:#FFD18C;box-shadow:0 4px 0 #071321,0 0 0 2px #EFB466,inset 0 0 0 3px #FFF9E544}
.run-modal .upgrade-card:active:not(:disabled){background-color:#EAD4B3;box-shadow:0 2px 0 #071321,inset 0 2px 7px #77522426}
.run-modal .upgrade-card:focus-visible{outline:2px solid #FFE1AE;outline-offset:4px}
.run-modal .upgrade-card.tier-1,.run-modal .upgrade-card.boss-skill-card{--folder-accent:#0066FF;border-color:#80A5C4}
.run-modal .upgrade-card.evolved,.run-modal .upgrade-card.tier-2{--folder-accent:#E77337;border-color:#DA9B60;background-color:#F5DEB7}
.run-modal .choice-heading{gap:11px;align-items:center}
.run-modal .choice-heading>canvas{
  width:56px;height:56px;flex:0 0 56px;padding:5px;border:1px solid #7A67504D;border-radius:3px;
  background:radial-gradient(ellipse,#FFFFFFA6,#DCC39A);box-shadow:inset 0 1px 3px #765A2730,0 1px 0 #FFF9EB;
  image-rendering:pixelated;
}
.run-modal .upgrade-card h3{font-size:17px;line-height:1.3;color:#13283C;font-weight:800;letter-spacing:-.4px}
.run-modal .upgrade-card .tag{color:#624F37;line-height:1.5;font-size:8px;letter-spacing:.65px}
.run-modal .upgrade-key{background:#D7C3A1;border:1px solid #A5885B;color:#443D30;border-radius:2px;box-shadow:0 2px 0 #B19A74}
@media(min-width:701px) and (max-width:1050px){
  .run-modal .choice-heading{display:grid;grid-template-columns:1fr auto;gap:8px}
  .run-modal .choice-heading>canvas{grid-column:1;grid-row:1}
  .run-modal .choice-title{grid-column:1/-1;grid-row:2}
  .run-modal .upgrade-key{grid-column:2;grid-row:1;justify-self:end}
}
.run-modal .upgrade-effect{color:#0052B5;font-size:17px;line-height:1.45;padding:10px 0 9px;border-top:1px solid #9F7E4C3B;border-bottom:1px solid #9F7E4C3B;margin:12px 0 10px}
.run-modal .upgrade-card p{color:#3A4C5B;font-size:12px;line-height:1.6}
.run-modal .upgrade-card>small{color:#6A5339;font-size:10px;line-height:1.6}
.run-modal .gear-card .gear-compare{color:#5B503F;border-color:#A1865D55;font-size:11px}
.run-modal .gear-differences .gear-gain,.profile-dialog .gear-differences .gear-gain{color:#16482F;background:#D6E9D3;border:1px solid #8DAF89}
.run-modal .gear-differences .gear-loss,.profile-dialog .gear-differences .gear-loss{color:#8B3020;background:#F3D7C5;border:1px solid #CD9A83}
.run-modal .gear-differences .gear-no-change{color:#60513D}
.run-modal .gear-differences>span{border-radius:2px;line-height:1.6}
.run-modal .defeated-boss{color:#FFBB76;text-transform:uppercase;font-size:12px;letter-spacing:.6px}
.run-modal .next-wave-note{border:1px solid #A7855D70;border-left:4px solid #D98945;background:#071829;color:#D5E1EB!important;border-radius:2px}
.run-modal .start-button,.player-name-dialog .soft-button:not(.name-cancel),.replace-run-dialog .soft-button.primary{
  border:1px solid #FFD397;border-bottom:3px solid #AC5026;border-radius:3px;background:linear-gradient(#FFB567,#F5813E);color:#12283D;box-shadow:0 4px 0 #071321,inset 0 1px 0 #FFE4A8;font-weight:800;text-shadow:0 1px 0 #FFE3BA55;min-height:48px;
}
.run-modal .start-button:hover,.player-name-dialog .soft-button:not(.name-cancel):hover,.replace-run-dialog .soft-button.primary:hover{background:linear-gradient(#FFD18D,#FFA45C);color:#12283D;transform:none}
.run-modal .text-button{color:#C2CFDC;line-height:1.6;min-height:42px;text-decoration-color:#AB8D68;text-underline-offset:4px}
.run-modal .retire-button{color:#E2AE89!important}
.run-modal .result-stamp{color:#FFC287;border:2px solid #C88B50;box-shadow:inset 0 0 0 2px #091A2D,inset 0 0 0 3px #C88B5080;border-radius:2px;padding:8px 13px;letter-spacing:1.3px;background:#713A1C20}
.run-modal .result-stats{border-color:#A7855D66;background:repeating-linear-gradient(0deg,#FFFFFF02 0 1px,transparent 1px 4px),#06172A80;gap:14px}
.run-modal .result-stats b{color:#FFC381;font-size:25px;text-shadow:0 2px 0 #061329}
.run-modal .result-stats span{color:#B3C7DB;line-height:1.6;font-size:9px}
.run-modal .result-progress{border:1px solid #8E795857;border-radius:3px;background:#081C2F}
.run-modal .result-progress p{color:#BFD1E1}
.run-modal .result-progress b,.run-modal .result-progress strong{color:#F7D9AC}
.run-modal .audio-mixer{background:#081B2D;border:1px solid #A7855D66;border-radius:3px;padding:16px;box-shadow:inset 0 2px 4px #030F2066}
.run-modal .audio-mixer label{color:#D8E1EA}
.run-modal input[type="range"]{accent-color:#FFAD69}
.run-modal .gear-position{background:linear-gradient(120deg,#FFFFFF12,transparent),#173349;border-radius:3px;border-color:#8B795A;box-shadow:0 4px 0 #061324;color:#D3DFE9}
.run-modal .gear-position.is-locked{background:#10263C;border-style:dashed;box-shadow:none}
.run-modal .gear-position h3,.run-modal .gear-person>strong{color:#FFF0D5}
.run-modal :is(.gear-person-kicker,.gear-person>small,.gear-slot-label,.gear-rarity-label,.gear-owned-state,.gear-position p,.gear-benefits li){color:#BED0DF}
.run-modal .gear-owned-state{border-color:#B69A6F40}
.run-modal .gear-person canvas{background:linear-gradient(#14304D00,#2D4F5F);border-color:#B78D56}
.run-modal .gear-position.gear-rarity-1{border-color:#6AA3EB}.run-modal .gear-position.gear-rarity-2{border-color:#EBA263}
.run-modal .gear-rarity-1 .gear-rarity-label{color:#9BC8FF}.run-modal .gear-rarity-2 .gear-rarity-label{color:#FFC38C}
.run-modal .gear-rescued-note{background:#203D36;color:#B6E2C5!important;border:1px solid #5D866F;border-radius:2px}
.in-game .power-slot,.in-game .gear-mini{background:linear-gradient(#D5C4A3,#A99979);border-color:#8D734D;border-radius:3px;box-shadow:inset 0 1px 0 #FFEBBD,0 2px 0 #061329}
.in-game .power-slot>span,.in-game .gear-mini>i{color:#071C32}
.in-game .gear-mini.gear-rarity-1{border-color:#6CB2FF}.in-game .gear-mini.gear-rarity-2{border-color:#FFAB68}
.profile-dialog:before{margin:8px auto 0;flex:none}
.profile-dialog-top{border-bottom:1px solid #B99B6B55;padding-top:12px}
.profile-tabs{background:#081C2D70;border-color:#B99B6B55}
.profile-tabs button{border-radius:2px 2px 0 0}
.profile-tabs button.selected{background:#D8B37A14;color:#FFC183;border-color:#EDA766}
.profile-dialog .soft-button,.replace-run-dialog .soft-button,.player-name-dialog .name-cancel{border-radius:3px;border-color:#8B795C;background:linear-gradient(#23445B,#173047);color:#F5DEC0;box-shadow:0 2px 0 #061329}
.profile-dialog .soft-button.primary{background:linear-gradient(#FFB567,#F5813E);color:#12283D;border-color:#D89959}
.profile-content :is(.settings-card,.stash-card,.collection-item,.achievement,.profile-stats>div,.gear-position,.gear-collection-card){border-radius:3px;border-color:#8B795A75;box-shadow:0 3px 0 #07172A80}
.profile-dialog :is(.gear-shared-note,.gear-extraction-note,.empty-state,.progress-note){border-radius:2px;border-color:#8B795A75}
.profile-dialog .gear-position.gear-rarity-1,.profile-dialog .gear-mini.gear-rarity-1{border-color:#6AA3EB}
.profile-dialog .gear-position.gear-rarity-2,.profile-dialog .gear-mini.gear-rarity-2{border-color:#EBA263}
.replace-run-dialog h2,.player-name-dialog h2{color:#FFF1D7;text-shadow:0 3px 0 #061329}
.replace-run-dialog .soft-button:focus-visible,.player-name-dialog .soft-button:focus-visible,.run-modal .start-button:focus-visible{outline:3px solid #FFE2AE;outline-offset:4px}
.player-name-dialog input{border-radius:3px;border-color:#B3976C;background:#091B2C;color:#FFF0D8;box-shadow:inset 0 3px 6px #030D1E70}
.selection-panel{border-color:#A7855DA6;border-top-color:#E8B578;border-radius:3px;background:linear-gradient(135deg,#18344CEE,#0A1D31F5);box-shadow:0 4px 0 #06152B9C,inset 0 0 0 3px #C29B6117,0 12px 30px #0005}
.selection-tabs button{border-radius:3px;border-color:#B49A74;border-bottom-color:#6B674F;box-shadow:0 3px 0 #06152B,inset 0 0 0 2px #C29B611A}
.selection-tabs button[aria-expanded="true"]{background:linear-gradient(#FFD08D,#F6A55D);color:#102039;border-color:#F4C081}
/* The illustrated destinations use the same collectible artwork as the game. */
.destination-buttons button{padding:10px 10px 8px;border-radius:3px;border-color:#A78761;border-top-color:#E9BC80;background:linear-gradient(#254159F5,#0E253AF5);box-shadow:0 4px 0 #06152B9C,inset 0 0 0 3px #C29B6120}
.destination-buttons .destination-art{display:block;width:36px;height:36px;margin:0 auto 5px;padding:4px;border:1px solid #B79B6A;border-radius:3px;background:radial-gradient(#FAECD4,#B9A27D);box-shadow:0 2px 0 #081B30;image-rendering:pixelated}
.destination-buttons strong{font-size:15px}.destination-buttons small{font-size:9px;margin-bottom:6px}
.destination-buttons button.is-approaching{border-color:#FFD293;background:linear-gradient(#445466F5,#17344DF5)}
.destination-buttons button.is-approaching .destination-enter{color:#FFE0AC}
.hub-speech{border:1px solid #B7A17B;border-radius:3px;box-shadow:0 3px 0 #06152B99;background:#F4E4C8;color:#1B3041}
.hub-speech:after{border-top-color:#F4E4C8}
.hub-screen .soft-button{border-color:#A08A67;border-radius:3px;box-shadow:0 3px 0 #06152B66}
.hub-screen .hub-heading .step-title{font-weight:800}
@media(min-height:651px) and (min-aspect-ratio:1/1){.hub-heading{top:70px}}
@media(max-width:700px){
  .run-modal .upgrade-options{gap:12px;padding:4px 2px 6px}
  .run-modal .upgrade-card{padding:14px 13px 13px}
  .run-modal .choice-heading{gap:10px}
  .run-modal .choice-heading>canvas{width:48px;height:48px;flex-basis:48px;padding:4px}
  .run-modal .upgrade-card h3{font-size:16px}
  .run-modal .upgrade-effect{font-size:16px;margin:10px 0 9px;padding:8px 0}
  .run-modal .upgrade-card p{font-size:12px;line-height:1.55}
  .run-modal :is(.upgrade-panel,.modal-panel):before{margin-bottom:12px;height:3px}
  .run-modal .eyebrow{font-size:8px;letter-spacing:1px}
  .run-modal .result-stats{gap:9px}
  .run-modal .result-stats b{font-size:23px}
  .run-modal .result-stats span{font-size:9px}
}
@media(max-width:600px){.destination-buttons button{padding:10px 4px 8px}.destination-buttons strong{font-size:11px}.destination-buttons .destination-art{width:35px;height:35px;margin-bottom:7px;padding:3px}}
@media(max-height:650px) and (min-aspect-ratio:1/1){
  .destination-buttons .destination-art{display:none}
  .run-modal :is(.upgrade-panel,.modal-panel):before{display:none}
}
@media(prefers-reduced-motion:reduce){.run-modal .upgrade-card{transition:none}}
