/* Pixel-copy UI skin. Original game rules, artwork coordinates and layout stay intact. */
@font-face{font-family:'Galmuri11';src:url('fonts/Galmuri11.woff2?h=f467d1b10e6b88df') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Galmuri11';src:url('fonts/Galmuri11-Bold.woff2?h=8643094f395aa2db') format('woff2');font-weight:700;font-style:normal;font-display:swap}
:root{--pixel-ink:#091119;--pixel-panel:#101d28;--pixel-panel-hi:#1c303b;--pixel-edge:#627981;--pixel-gold:#edca87;--pixel-ember:#f0a260;--pixel-text:#f0eee0;--pixel-muted:#b9c8c5;--pixel-mint:#8adacb}

/* Text is crisp, with the same Korean bitmap face across menus and the HUD. */
.overlay,.lobby-menu,.hud,.mobile-tools,.touch-actions,.loadout,#inspector,#toast,#tutorialHint,#bossHUD,#comboHUD span,#mechanicHint,#combatBuff,.zone-stamp,header,footer{font-family:'Galmuri11','Noto Sans KR',sans-serif}
.brand{font-family:'Galmuri11','Noto Sans KR',sans-serif;letter-spacing:.04em}
.overlay h2,.overlay h3,.choice-screen h2,.shop-head h2,.library-top h2,.lobby-brand h1{font-family:'Galmuri11','Noto Sans KR',sans-serif;letter-spacing:0;line-height:1.35}
.overlay p,.overlay small,.choice p,.shop-card p,.library-skill p,.relic-vault-card p{line-height:1.6;word-break:keep-all;overflow-wrap:anywhere}
.overlay .eyebrow,.lobby-kicker,.choice em,.shop-card em{font-family:'Galmuri11','Noto Sans KR',sans-serif;letter-spacing:.07em}
.overlay .eyebrow,.lobby-kicker{color:var(--pixel-gold)}
.overlay button,.side-tabs button,.loadout button,.mobile-tools button,.touch-actions button{font-family:'Galmuri11','Noto Sans KR',sans-serif}

/* Stepped stone-and-metal surfaces: flat edges, restrained single-pixel highlights. */
.overlay:not(.lobby-overlay){background:rgba(5,13,21,.87)}
.start-screen:not(.lobby-screen),.choice,.shop-card,.library-skill,.relic-slot,.relic-vault-card,.shop-wallet,.shop-route,#tutorialHint{
 border-radius:0;background:linear-gradient(180deg,rgba(30,49,59,.97),rgba(12,25,35,.97));border:2px solid #738a88a8;
 box-shadow:inset 0 0 0 2px #09151d,inset 0 3px 0 #d6ddc528,4px 4px 0 #03080dbb;
}
.start-screen:not(.lobby-screen){border-color:#bea879aa;box-shadow:inset 0 0 0 2px #09151d,inset 0 4px 0 #d8bd8a24,6px 6px 0 #040a10cc}
.choice:hover:not(:disabled),.shop-card:hover:not(:disabled),.library-skill:hover:not(:disabled),.relic-vault-card:hover:not(:disabled){background:linear-gradient(180deg,#29434b,#182c36);border-color:#e4c58b;box-shadow:inset 0 0 0 2px #0b1c25,inset 0 3px 0 #e4c58b25,4px 4px 0 #03080dbb}
.choice.reward-selected,.shop-card.keyboard-selected,.relic-vault-card.active,.library-skill.equipped{border-color:var(--pixel-gold);background:linear-gradient(180deg,#3b3d32,#1b2c30);box-shadow:inset 0 0 0 2px #0b1c25,inset 0 3px 0 #ffe3a43d,4px 4px 0 #03080dbb}
.choice:disabled,.shop-card:disabled,.library-skill:disabled{filter:saturate(.65)}
.choice b,.shop-card b,.library-skill b,.relic-vault-card b{letter-spacing:0}
.choice small,.shop-card small,.library-skill p,.relic-vault-card p{color:var(--pixel-muted)}
.choice.rarity-epic,.shop-card.rarity-epic{background:linear-gradient(180deg,#193646,#101f2d)}
.choice.rarity-unique,.shop-card.rarity-unique{background:linear-gradient(180deg,#322a47,#151d30)}
.choice.rarity-legendary,.shop-card.rarity-legendary{background:linear-gradient(180deg,#47391e,#1b2530)}
.choice.rarity-relic-masterwork,.shop-card.rarity-relic-masterwork{background:linear-gradient(180deg,#453124,#172631)}
.choice.rarity-relic-masterpiece,.shop-card.rarity-relic-masterpiece{background:linear-gradient(180deg,#482a2c,#17212c)}
.library-top,.shop-head,.guide-scroll section{border-bottom:2px solid #9ca4844d}
.active-section>h3,.passive-section>h3,.relic-loadout>h3,.side-panel .aside-heading{color:var(--pixel-gold)}
.skill-tags{border-radius:0}

/* Keycaps and actions use a visible lower edge, including focus and pressed states. */
.overlay button:not(.choice):not(.shop-card):not(.library-skill):not(.relic-vault-card):not(.relic-slot),.side-tabs button,header nav button,.weapon,.skill,.specials>button,.mobile-tools button{
 border-radius:0;border-width:2px;box-shadow:inset 0 2px 0 #f2efce20,0 3px 0 #050c12;
}
.overlay .primary,.lobby-menu .lobby-start{background:linear-gradient(180deg,#f2d395,#c89956);border-color:#ffe3a7;color:#1e1915;text-shadow:none;box-shadow:inset 0 2px 0 #fff5d859,0 4px 0 #6c482b}
.overlay .primary:hover:not(:disabled),.lobby-menu .lobby-start:hover{background:linear-gradient(180deg,#ffe0a2,#d6a969);box-shadow:inset 0 2px 0 #fff5d859,0 4px 0 #6c482b}
.overlay .secondary,.lobby-menu button:not(.lobby-start),.shop-reroll{background:#1a2c36;border-color:#819994;color:var(--pixel-text)}
.overlay button:not(:disabled):active,.side-tabs button:not(:disabled):active,.mobile-tools button:not(:disabled):active{transform:translateY(2px);box-shadow:inset 0 1px 0 #f2efce1a,0 1px 0 #050c12}
.overlay button:focus-visible,.side-tabs button:focus-visible,.loadout button:focus-visible,.mobile-tools button:focus-visible,.touch-actions button:focus-visible{outline:2px solid var(--pixel-mint);outline-offset:3px}
.overlay .primary:disabled{box-shadow:none}
.reward-controls{border-radius:0;border-top:2px solid #8679566b;box-shadow:none}
.shop-wallet{background:#303b35}.shop-route{border-left:3px solid var(--pixel-mint)}
.side-tabs .selected{background:#b5975b30;border-bottom:3px solid var(--pixel-gold)}

/* Expedition lobby: the pixel stage art remains the center of attention. */
.lobby-screen{background:var(--pixel-ink)}
.lobby-backdrop{filter:saturate(.9) brightness(.76);image-rendering:pixelated}
.lobby-shade{background:linear-gradient(90deg,#06101be8 0,#0813216b 58%,#06101be0),linear-gradient(0deg,#06101bd1,transparent 65%)}
.lobby-kicker{border-bottom:2px solid #c7a56b}
.lobby-brand h1{font-size:clamp(36px,5vw,70px);color:#fff0ce;text-shadow:3px 3px 0 #10222d,5px 5px 0 #071018;margin:18px 0}
.lobby-brand p{color:#d0dad1;line-height:1.65}
.lobby-menu{border-left:2px solid #bb9c6277;gap:10px}
.lobby-menu button{font-size:15px;min-height:48px}
.lobby-menu .lobby-start{font-size:18px}
.lobby-menu .lobby-records{border:0;border-top:2px solid #91a5a166;box-shadow:none}

/* Game chrome; preserve previous positioning and the readable rarity colors. */
.workspace{border-color:#6d807699;box-shadow:0 0 0 2px #071018}
.loadout{background:linear-gradient(180deg,#14242f,#0d1924);border-color:#69817c7a}
.weapon,.skill,.specials>button{background:linear-gradient(180deg,#233640,#0d1a24);border-color:#66817f;color:var(--pixel-text)}
.weapon.active,.skill:not(.locked):hover{border-color:var(--pixel-gold);box-shadow:inset 0 2px 0 #ffe4a538,0 3px 0 #4e3d2a}
.skill .cooldown{background:#08131bd9;color:var(--pixel-gold);font-family:'Galmuri11','Noto Sans KR',sans-serif}
.skill kbd,.specials kbd,.weapons kbd{border-radius:0;border:1px solid #8a9890;background:#263740;color:#f3e0ac}
#inspector{background:#101e29;border-left-color:#75887e8c}
.progress>div{border-bottom:1px solid #72837c66}.progress>div.current{border-left:3px solid var(--pixel-gold);padding-left:6px}
.section-label{color:#d8ca9f}
.player-title{color:#eee8d6;text-shadow:1px 2px #03090d}
.health{border:1px solid #ad7d69;background:#2b1b22;box-shadow:0 0 0 1px #08131b}
.health>i:not(#barrierbar){background:repeating-linear-gradient(90deg,transparent 0 14px,#17232a70 14px 16px),linear-gradient(180deg,#dd8064,#973f40)}
.xp{background:#1b353c;box-shadow:0 1px #071118}
.xp i{background:repeating-linear-gradient(90deg,transparent 0 12px,#1027328c 12px 14px),#8adacb}
.hud .wave-label span,.combat-hud-desktop .hud .wave-label span,.hud .wave-label b,.combat-hud-desktop .hud .wave-label b,
.hud .run-stats,.hud .run-stats>#timer,.hud .run-stats>#threatBadge,.hud .run-stats .kill-stat,.hud .run-stats .ember-stat,.hud .run-stats .kill-stat strong,.hud .run-stats .ember-stat strong{
 font-family:'Galmuri11','Noto Sans KR',sans-serif;letter-spacing:0;font-variant-numeric:tabular-nums;
}
.hud .wave-label span{color:var(--pixel-gold);font-weight:700}
.hud .wave-label b,.hud .run-stats>#threatBadge{color:#d0dad3}
.hud .run-stats>#timer{font-size:20px;line-height:1.25;color:#f6eed6;text-shadow:2px 2px #09131b}
.hud .run-stats .kill-stat,.hud .run-stats .ember-stat{color:#d0dad3!important}
.hud .run-stats .ember-stat{color:var(--pixel-ember)!important}
#bossHUD{color:#f7c3a0;text-shadow:2px 2px #170d0d}
#bossHUD>div{border:1px solid #9e635b;box-shadow:inset 0 1px #e9afa46b}
#toast,#tutorialHint{border-radius:0;font-family:'Galmuri11','Noto Sans KR',sans-serif}
#toast{background:rgba(8,20,30,.75);border:2px solid #b29a6d;box-shadow:3px 3px 0 #030b11ad}
#tutorialHint{background:rgba(12,29,40,.76);border-color:#b59f6f;box-shadow:3px 3px 0 #030b11ad}
.comic-screen .prologue-heading,.prologue-heading{border-bottom:2px solid #bda97877}
.comic-screen .prologue-heading strong,.prologue-heading span,.prologue-number,.prologue-footer,.prologue-panel figcaption{font-family:'Galmuri11','Noto Sans KR',sans-serif}
.prologue-board{border:2px solid #a99974;box-shadow:4px 4px 0 #05090eb8}
.prologue-footer button{font-family:'Galmuri11','Noto Sans KR',sans-serif;border:2px solid #d7b77e;border-radius:0;background:#22323a;box-shadow:inset 0 2px #fff3c626,0 3px #081219}
.comic-landscape-note,#assetLoadingStatus{font-family:'Galmuri11','Noto Sans KR',sans-serif}
.asset-progress-track{height:4px;background:#12212c;border:1px solid #7d8e8a}
.asset-progress-track i{background:repeating-linear-gradient(90deg,transparent 0 14px,#22313d6b 14px 16px),#d5bb80}
#assetRetry,#tutorialExit{font-family:'Galmuri11','Noto Sans KR',sans-serif;border:2px solid #c8ae79;border-radius:0;background:#1b3039;color:#f5e7c7;box-shadow:inset 0 2px #f7e9c62a,0 3px #061018}
.zone-stamp{letter-spacing:.04em}

/* Touch controls use the same keycap treatment as the skill buttons. */
.mobile-tools button{background:rgba(14,34,44,.83);border-color:#9ba89b;box-shadow:inset 0 2px 0 #f5eed92a,0 3px 0 #061118}
.touch-skills button,.touch-specials button{border-radius:5px;border-width:2px;background:linear-gradient(180deg,rgba(34,56,62,.92),rgba(8,22,31,.94));box-shadow:inset 0 2px 0 #c5d6ce3d,inset 0 0 0 2px #0b1721,0 3px 0 #030a10}
.touch-actions button:not(:disabled):not(.cooling){border-color:var(--skill-color,#cdb37e)}
.touch-actions button>span,.touch-actions button>small,.touch-skills button::after,.touch-specials button::after{font-family:'Galmuri11','Noto Sans KR',sans-serif}
.touch-actions button>span{letter-spacing:0;text-shadow:1px 1px #02070a}
.touch-actions button.cooling{filter:saturate(.7);border-color:#6b7d81}
/* Stepped circular rims retain the existing round controls and touch dimensions. */
html[data-graphics="pixel"] .touch-basic :is(#touchAttack,#touchDodge){--pixel-round:polygon(37.5% 0%,62.5% 0%,62.5% 3.125%,71.875% 3.125%,71.875% 6.25%,78.125% 6.25%,78.125% 9.375%,81.25% 9.375%,81.25% 12.5%,87.5% 12.5%,87.5% 15.625%,90.625% 15.625%,90.625% 18.75%,90.625% 18.75%,90.625% 21.875%,93.75% 21.875%,93.75% 25%,96.875% 25%,96.875% 28.125%,96.875% 28.125%,96.875% 31.25%,100% 31.25%,100% 34.375%,100% 34.375%,100% 37.5%,100% 37.5%,100% 40.625%,100% 40.625%,100% 43.75%,100% 43.75%,100% 46.875%,100% 46.875%,100% 50%,100% 50%,100% 53.125%,100% 53.125%,100% 56.25%,100% 56.25%,100% 59.375%,100% 59.375%,100% 62.5%,100% 62.5%,100% 65.625%,100% 65.625%,100% 68.75%,96.875% 68.75%,96.875% 71.875%,96.875% 71.875%,96.875% 75%,93.75% 75%,93.75% 78.125%,90.625% 78.125%,90.625% 81.25%,90.625% 81.25%,90.625% 84.375%,87.5% 84.375%,87.5% 87.5%,81.25% 87.5%,81.25% 90.625%,78.125% 90.625%,78.125% 93.75%,71.875% 93.75%,71.875% 96.875%,62.5% 96.875%,62.5% 100%,37.5% 100%,37.5% 96.875%,28.125% 96.875%,28.125% 93.75%,21.875% 93.75%,21.875% 90.625%,18.75% 90.625%,18.75% 87.5%,12.5% 87.5%,12.5% 84.375%,9.375% 84.375%,9.375% 81.25%,9.375% 81.25%,9.375% 78.125%,6.25% 78.125%,6.25% 75%,3.125% 75%,3.125% 71.875%,3.125% 71.875%,3.125% 68.75%,0% 68.75%,0% 65.625%,0% 65.625%,0% 62.5%,0% 62.5%,0% 59.375%,0% 59.375%,0% 56.25%,0% 56.25%,0% 53.125%,0% 53.125%,0% 50%,0% 50%,0% 46.875%,0% 46.875%,0% 43.75%,0% 43.75%,0% 40.625%,0% 40.625%,0% 37.5%,0% 37.5%,0% 34.375%,0% 34.375%,0% 31.25%,3.125% 31.25%,3.125% 28.125%,3.125% 28.125%,3.125% 25%,6.25% 25%,6.25% 21.875%,9.375% 21.875%,9.375% 18.75%,9.375% 18.75%,9.375% 15.625%,12.5% 15.625%,12.5% 12.5%,18.75% 12.5%,18.75% 9.375%,21.875% 9.375%,21.875% 6.25%,28.125% 6.25%,28.125% 3.125%,37.5% 3.125%,37.5% 0%);--pixel-control-shape:var(--pixel-round);--control-rim:var(--basic-rim);border-radius:50%}
html[data-graphics="pixel"] .touch-basic #touchAttack{--basic-rim:#cdb37e}
html[data-graphics="pixel"] .touch-basic #touchDodge{--basic-rim:#8adacb}
html[data-graphics="pixel"] .touch-basic button{--control-depth:0px;--control-gray:0px;isolation:isolate;border:0!important;clip-path:var(--pixel-control-shape);background:none!important;box-shadow:none!important;overflow:hidden;backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-graphics="pixel"] .touch-basic button::before,html[data-graphics="pixel"] .touch-basic button::after,html[data-graphics="pixel"] .touch-basic button>.pixel-control-rim{content:"";position:absolute;pointer-events:none;clip-path:var(--pixel-control-shape);margin:0;padding:0}
html[data-graphics="pixel"] .touch-basic button::before{inset:0;z-index:-3;background:#08131d}
html[data-graphics="pixel"] .touch-basic button>.pixel-control-rim{display:block;inset:2px;z-index:-2;background:linear-gradient(180deg,var(--control-rim) 0,var(--control-rim) calc(100% - var(--control-gray)),#748087 calc(100% - var(--control-gray)),#748087 100%)}
html[data-graphics="pixel"] .touch-basic button::after{inset:4px 4px calc(4px + var(--control-depth));z-index:-1;background:linear-gradient(180deg,#31484d,#1b3039 22%,#0b1923 85%);box-shadow:inset 0 2px #c5d6ce20}
html[data-graphics="pixel"] .touch-basic button.basic-ready{--control-depth:3px;--control-gray:4px}
html[data-graphics="pixel"] .touch-basic button.pressed{transform:translateY(2px)}
html[data-graphics="pixel"] .touch-basic button.pressed:is(.basic-ready,.art-unlocked):not(.cooling){--control-depth:1px;--control-gray:2px}
html[data-graphics="pixel"] .touch-basic button.cooling,html[data-graphics="pixel"] .touch-basic button:not(.basic-ready){--control-depth:0px;--control-gray:0px;--control-rim:#6b7d81}
html[data-graphics="pixel"] .touch-basic button.cooling::after{background:linear-gradient(180deg,#1a2932,#08161f);box-shadow:none}
html[data-graphics="pixel"] .touch-basic .touch-shade{mask-image:none;-webkit-mask-image:none;clip-path:var(--pixel-control-shape)}
html[data-graphics="pixel"] #touchDodge .touch-art .painted-icon{filter:none}


/* Tight landscapes keep selection text and touch targets on screen. */
@media (pointer:coarse),(max-width:800px),(max-width:1000px) and (max-height:500px){
 .overlay{font-size:14px}.overlay .choice p,.overlay .shop-card p,.overlay .library-skill p{font-size:12px;line-height:1.45}
 .lobby-menu{border-left:0;border-top:2px solid #bb9c6277}
 .lobby-brand h1{font-size:clamp(32px,7vw,52px)}
 .hud .run-stats>#timer{font-size:18px}
 #toast{background:rgba(8,20,30,.56);box-shadow:none}
 .reward-controls{border:0;background:transparent;box-shadow:none}
 .reward-controls button{pointer-events:auto}
}
@media (pointer:coarse) and (orientation:landscape),(max-width:800px) and (orientation:landscape),(max-width:1000px) and (max-height:500px){
 .lobby-menu{border-top:0;border-left:2px solid #bb9c6277}
 .choice-screen .choices,.armory .choices{gap:8px}
 .choice{padding:9px 10px}
 .choice b{font-size:14px}
 .touch-actions button>span{font-size:9px}
}
@media (max-width:560px) and (orientation:portrait){
 .lobby-menu{border-left:0;border-top:2px solid #bb9c6277}
 .overlay .choice p,.overlay .shop-card p{font-size:12px}
}
@media (prefers-reduced-motion:reduce){.overlay button,.touch-actions button{transition:none}}

/* Keep text/edge opacity, lighten only the panel interior. */
@media (pointer:coarse),(max-width:800px),(max-width:1000px) and (max-height:500px){
 html[data-graphics="pixel"] #mechanicHint{padding:2px 5px;font-size:11px;line-height:1.4;background:rgba(11,23,27,.30)}
 html[data-graphics="pixel"] #tutorialHint{padding:6px 9px;background:rgba(12,29,40,.38)}
 html[data-graphics="pixel"] #tutorialHint h3{font-size:14px}
 html[data-graphics="pixel"] #tutorialHint p{font-size:13px}
 html[data-graphics="pixel"] .mobile-tools #mobileWeapon{width:72px;min-width:72px;max-width:72px;padding-inline:4px}
 html[data-graphics="pixel"] #mobileWeapon .mobile-weapon-name{flex:none;overflow:visible;text-overflow:clip}
}

@media (pointer:coarse),(max-width:800px),(max-width:1000px) and (max-height:500px){
 html[data-graphics="pixel"] #toast{font-size:12px;line-height:1.4;padding:5px 9px;background:rgba(8,20,30,.28)}
}

/* Flat while unavailable; the thin gray side appears only when ready. */
html[data-graphics="pixel"] :is(.touch-skills,.touch-specials) button{border-radius:5px;border-width:2px;clip-path:none;background:linear-gradient(180deg,rgba(34,56,62,.92),rgba(8,22,31,.94));box-shadow:inset 0 2px #c5d6ce3d,inset 0 0 0 2px #0b1721}
html[data-graphics="pixel"] :is(.touch-skills,.touch-specials) button.art-unlocked:not(.cooling){box-shadow:inset 0 2px #c5d6ce3d,inset 0 0 0 2px #0b1721,0 2px #748087,0 3px #030a10}
html[data-graphics="pixel"] :is(.touch-skills,.touch-specials) button.cooling{background:#0b151ef5;box-shadow:inset 0 1px #c5d6ce20,inset 0 0 0 2px #0b1721}
html[data-graphics="pixel"] :is(.touch-skills,.touch-specials) .touch-shade{border-radius:2px}

/* Only selectors explicitly using the ordinary Korean/monospace faces. */
html[data-graphics="pixel"] #assetLoading,
html[data-graphics="pixel"] #toast,
html[data-graphics="pixel"] #touchAttack small,
html[data-graphics="pixel"] .aside-heading #cycleBadge,
html[data-graphics="pixel"] .aside-heading span,
html[data-graphics="pixel"] .auto-skill em,
html[data-graphics="pixel"] .brand small,
html[data-graphics="pixel"] .chapter span,
html[data-graphics="pixel"] .combat-hud-desktop .hud .wave-label span,
html[data-graphics="pixel"] .difficulty,
html[data-graphics="pixel"] .equipped-relic-empty,
html[data-graphics="pixel"] .health #barrierbar #barrieramount,
html[data-graphics="pixel"] .health span,
html[data-graphics="pixel"] .hud .run-stats,
html[data-graphics="pixel"] .hud .run-stats .ember-stat,
html[data-graphics="pixel"] .hud .run-stats .ember-stat strong,
html[data-graphics="pixel"] .hud .run-stats .kill-stat,
html[data-graphics="pixel"] .hud .run-stats .kill-stat strong,
html[data-graphics="pixel"] .hud .run-stats .stat-symbol,
html[data-graphics="pixel"] .hud .run-stats>#threatBadge,
html[data-graphics="pixel"] .hud .wave-label,
html[data-graphics="pixel"] .hud .wave-label b,
html[data-graphics="pixel"] .hud .wave-label span,
html[data-graphics="pixel"] .library-top h2 small,
html[data-graphics="pixel"] .loadout .section-label,
html[data-graphics="pixel"] .loadout .weapons>.section-label kbd,
html[data-graphics="pixel"] .relic-loadout-head h3 small,
html[data-graphics="pixel"] .slot-picker .choice .slot-number,
html[data-graphics="pixel"] .specials small,
html[data-graphics="pixel"] .touch-actions button small,
html[data-graphics="pixel"] .touch-actions button:disabled>small,
html[data-graphics="pixel"] .wave-label span,
html[data-graphics="pixel"] .weapon em,
html[data-graphics="pixel"] body{font-family:'Galmuri11',sans-serif!important}
