@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@600;700;800;900&family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');
:root{--ink:#07121f;--navy:#10283c;--gold:#c8a469;--pale:#fae5b0;--cyan:#87e9f5;--text:#f5eddf}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#030912;color:var(--text);font-family:"Noto Sans KR",system-ui,sans-serif}
main{width:min(100%,max(360px,56.25dvh));height:100dvh;margin:auto;display:grid;grid-template-rows:auto minmax(0,1fr) auto;background:var(--ink);border-inline:1px solid #695538;user-select:none}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;border:1px solid var(--gold);background:linear-gradient(135deg,#1f3549,#081524);min-height:44px}
button:focus-visible,input:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}
button:active:not(:disabled){filter:brightness(1.2)}
button:disabled{cursor:default}
header{display:flex;gap:5px;align-items:center;padding:calc(8px + env(safe-area-inset-top)) 7px 9px;background:radial-gradient(ellipse at 25% 0,#23465a,transparent 65%),linear-gradient(#101f31,#060d17);border-bottom:1px solid var(--gold);box-shadow:0 2px 0 #192c3d,0 5px 18px #0008;z-index:2;font-size:11px}
header img{width:38px;height:42px;object-fit:cover;border:1px solid var(--gold);box-shadow:0 0 0 2px #07121f,0 0 0 3px #68563c;flex:none}
.identity{display:grid;gap:3px;flex:1;min-width:0}.identity strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.identity b{color:var(--pale);font-size:10px;letter-spacing:.1em}
progress{appearance:none;height:6px;border:0;border-radius:1px;overflow:hidden;background:#192231}
progress::-webkit-progress-bar{background:#192231}progress::-webkit-progress-value{background:linear-gradient(90deg,#266d68,#9cddbb)}progress::-moz-progress-bar{background:#79c9ad}
.identity progress{width:100%}.score{display:grid;gap:4px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.score span{color:#d1dce7;font-size:10px}.score b{color:#ffe2a0;font-size:12px}
header button{flex:none;width:44px;height:44px;padding:0;border-color:#8b754e;border-radius:3px;font-weight:800;font-size:16px;box-shadow:inset 0 0 0 2px #07121b,inset 0 0 0 3px #354354}
#tempo{color:var(--pale)}#sound.muted{color:#8495a6}
#arena{position:relative;overflow:hidden;background:#211f1c;isolation:isolate}
canvas{display:block;width:100%;height:100%}
#combo{position:absolute;top:29px;right:12px;font:italic bold 22px Georgia,serif;color:var(--pale);text-shadow:0 2px 4px #000;pointer-events:none}
#modeBadge{position:absolute;top:9px;left:9px;padding:4px 9px;background:#091625e8;border:1px solid #91784d;font-size:11px;color:#f4dcaa;pointer-events:none}
#bossBar{position:absolute;top:7px;left:22%;width:56%;text-align:center;font-size:12px;font-weight:700;text-shadow:0 2px 3px #000;color:#ffe0ae}
#bossBar progress{display:block;width:100%;height:8px;margin-top:3px;border:1px solid #b39159}
#bossBar progress::-webkit-progress-value{background:linear-gradient(90deg,#752c30,#ef8a66)}#bossBar progress::-moz-progress-bar{background:#d96151}
#banner{position:absolute;top:18%;inset-inline:10%;padding:10px 8px;text-align:center;border-block:1px solid var(--gold);background:linear-gradient(90deg,#07121f00,#091d30f5 14%,#091d30f5 86%,#07121f00);color:#e6faff;font-family:"Noto Serif KR",serif;font-weight:800;font-size:16px;text-shadow:0 0 12px #47c9ed;pointer-events:none}
#controls{position:absolute;inset:auto 13px 15px;display:flex;justify-content:space-between;align-items:end;pointer-events:none}
#stick,.skill{pointer-events:auto;border-radius:50%;box-shadow:0 0 0 2px #09111b,0 0 0 3px #9c8353,0 5px 14px #0009}
#stick{width:80px;height:80px;border:2px solid #d3be82;background:radial-gradient(circle,#19394d 0,#0c1d2b 58%,#203a49 61%,#0b1523 70%);display:grid;place-items:center;touch-action:none}
#knob{width:34px;height:34px;border-radius:50%;background:radial-gradient(at 32% 20%,#dcf9f5,#65b4ce 50%,#173f58);border:1px solid #e4d3a2;box-shadow:0 3px 8px #0009;pointer-events:none}
.skills{display:flex;gap:13px;align-items:end}.skill{display:grid;place-content:center;justify-items:center;gap:0;width:66px;height:66px;border:2px solid #dfc48b;background:radial-gradient(circle,#624b2e,#211c22 73%);font-size:12px;font-weight:800;text-shadow:0 2px 3px #000}
.skill img{width:36px;height:33px;object-fit:contain;filter:drop-shadow(0 0 5px #ffc87c77)}
.skill.blue{width:79px;height:79px;border-color:#bcecf0;background:radial-gradient(circle,#1e5d7d,#09243a 70%);box-shadow:0 0 0 2px #081725,0 0 0 3px #ba9d65,0 0 15px #6cdbe947}
.skill.blue img{width:43px;height:40px}.skill:disabled{background:#182837;color:#d6dfeb;filter:saturate(.45)}
main[data-mode]:not([data-mode="manual"]) #stick{visibility:hidden}
nav{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:8px 7px calc(8px + env(safe-area-inset-bottom));background:radial-gradient(ellipse at 50% 100%,#1d3546,#07101c);border-top:1px solid var(--gold);z-index:2}
nav button{min-width:0;display:grid;place-items:center;gap:2px;min-height:79px;padding:5px 1px;border-radius:2px;background:linear-gradient(140deg,#22374b,#0b1828 55%,#1b2c3b);box-shadow:inset 0 0 0 2px #09131f,inset 0 0 0 3px #485064;font-size:12px;font-weight:700}
nav img{width:29px;height:29px;object-fit:contain;filter:drop-shadow(0 0 5px #7ad9e744)}nav small{font-size:10px;color:#ffdfa4;font-variant-numeric:tabular-nums}
nav button:enabled{border-color:#b7e6e9;box-shadow:inset 0 0 0 2px #09131f,inset 0 0 0 3px #587887,0 0 9px #7ae1ed33}
nav button:disabled{border-color:#675b46;color:#c7d2df}nav button:disabled img{filter:saturate(.5)}nav button:disabled small{color:#b4bdc9}
#overlay{position:absolute;inset:0;z-index:5;background:linear-gradient(#07132112,#06101ddd),url(menu-art.png) center top/cover;display:flex;align-items:end;text-align:left;padding:20px 15px;overflow:auto}
#overlay[hidden]{display:none}
.menu-panel{width:100%;margin-top:auto}
.menu-heading{min-height:125px;padding-top:24px;text-shadow:0 2px 15px #000,0 2px 5px #000}
.menu-heading small{font-size:11px;letter-spacing:.12em;color:#f3d49a}
h1{margin:6px 0 0;font-family:"Noto Serif KR",serif;font-weight:900;font-size:clamp(30px,8vw,43px);letter-spacing:-.065em;color:#fff0cb}
#hint{margin:9px 0 15px;color:#f2e8d6;font-size:12px;line-height:1.7;text-shadow:0 2px 5px #000}
#modes{border:0;padding:0;margin:0;display:grid;gap:8px}
#modes[hidden]{display:none}
#modes legend{padding:0 0 8px;color:#f4dbab;font-size:12px;font-weight:700}
#modes label{position:relative;display:flex;align-items:center;gap:10px;min-height:62px;padding:7px 10px;border:1px solid #9a8154;background:linear-gradient(110deg,#17334aeb,#091524ef);box-shadow:inset 0 0 0 2px #081522,inset 0 0 0 3px #424b55;cursor:pointer}
#modes label:before,#modes label:after{content:"";position:absolute;width:8px;height:8px;border-color:#d4ba82;pointer-events:none}
#modes label:before{left:3px;top:3px;border-left:1px solid;border-top:1px solid}
#modes label:after{right:3px;bottom:3px;border-right:1px solid;border-bottom:1px solid}
#modes label:has(input:checked){border-color:#a9f7ff;box-shadow:inset 0 0 0 2px #103044,0 0 12px #6ae6ed55;background:linear-gradient(110deg,#20536aef,#0b1d2def)}
#modes label img{width:43px;height:43px;object-fit:contain;filter:drop-shadow(0 0 6px #78d6f255)}
#modes label span{flex:1;font-family:"Noto Serif KR",serif;font-size:18px;font-weight:800;color:#ffe7b6}
#modes small{display:block;font-family:"Noto Sans KR",sans-serif;color:#dce8ec;font-size:11px;font-weight:500;margin-top:3px}
#modes input{order:3;width:19px;height:19px;accent-color:#75e8f0;flex:none}
#modeGuide{padding:10px 11px;margin:12px 0;border-block:1px solid #8c79504d;background:#091a2bba;font-size:11px;color:#e0e8ed;line-height:1.65}
#start{display:block;width:100%;min-height:52px;margin-top:12px;border:1px solid #ffe0a1;background:linear-gradient(115deg,#926831,#f1cf82 32%,#b78a40 65%,#edc47b);color:#201709;font-family:"Noto Serif KR",serif;font-size:22px;font-weight:900;box-shadow:inset 0 0 0 3px #6d4b24,inset 0 0 0 4px #ffe4a9,0 4px 15px #0008;text-shadow:0 1px #ffe6ad}
#battleSummary{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:15px 0;padding:14px 8px;border-block:1px solid #b69a65;background:#0a1d2fd9;text-align:center}
#battleSummary[hidden]{display:none}#battleSummary span{font-size:11px;color:#c5d4de}#battleSummary b{display:block;font-size:23px;color:#ffe2a6;margin-top:5px}
#overlay[data-state="pause"],#overlay[data-state="end"]{background:linear-gradient(#06111d5c,#06111de8 38%),url(menu-art.png) center top/cover}
@media(max-height:680px){#overlay{padding:12px}.menu-heading{min-height:74px;padding-top:8px}h1{font-size:30px}#hint{margin:6px 0 9px;font-size:11px}#modes{gap:6px}#modes label{min-height:54px;padding:5px 9px}#modes label img{width:35px;height:35px}#modeGuide{margin:8px 0;padding:6px 9px}nav button{min-height:68px}#start{margin-top:8px;min-height:48px;font-size:20px}}
@media(max-width:350px){header{gap:4px}header img{width:29px;height:34px}.identity strong{font-size:10px}.score b{font-size:10px}.score span{font-size:9px}nav button{font-size:11px}nav small{font-size:9px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
main{position:relative}
#researchOpen{position:absolute;top:9px;left:70px;z-index:3;min-height:36px;padding:3px 10px;border-color:#d1b47c;background:#0c2439ed;font-size:12px;font-weight:800}
#researchOpen b{display:inline-block;margin-left:5px;color:#a7f5ff}
#research{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 20%,#173a50,#071422 68%);padding-top:env(safe-area-inset-top)}
#research[hidden]{display:none}
.research-head{display:flex;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #b99b61}
.research-head button{width:44px;font-size:28px}.research-head h2{flex:1;font-family:"Noto Serif KR",serif;font-size:21px;margin:0}.research-head>b{color:#ffe1a0;font-size:20px}
#schoolTabs{display:grid;grid-template-columns:repeat(4,1fr);padding:10px 12px 0;gap:5px}
#schoolTabs button{font-size:15px;font-weight:800;border-color:#6d735e}
#schoolTabs button[aria-selected="true"]{color:#b8faff;border-color:#a2edf5;box-shadow:0 0 9px #75efff44}
#researchIntro{font-size:12px;color:#dbe8ee;padding:0 13px;margin:10px 0}
.tree-scroll{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:90px;padding:8px 15px 25px}
#treeNodes{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:95px 95px 95px 95px;gap:28px 20px;max-width:370px;margin:auto}
.tree-node{position:relative;display:grid;place-items:center;padding:6px;border-color:#9c895e;background:linear-gradient(135deg,#17374c,#0b1827);font-size:13px;box-shadow:inset 0 0 0 3px #102031}
.tree-node img{width:34px;height:34px;object-fit:contain}.tree-node small{font-size:11px;color:#c6dfdf}
.tree-node.n0,.tree-node.n5{grid-column:1/3;width:60%;justify-self:center}
.tree-node:after{content:"";position:absolute;top:100%;left:50%;height:29px;width:1px;background:#b3975d;pointer-events:none}
.tree-node.n5:after{display:none}
.tree-node.n1:before,.tree-node.n2:before{content:"";position:absolute;bottom:100%;height:14px;width:calc(50% + 11px);border-top:1px solid #b3975d;pointer-events:none}
.tree-node.n1:before{left:50%;border-left:1px solid #b3975d}
.tree-node.n2:before{right:50%;border-right:1px solid #b3975d}
.tree-node.n3:after,.tree-node.n4:after{width:calc(50% + 11px);height:15px;top:100%;border-bottom:1px solid #b3975d;background:none}
.tree-node.n3:after{left:50%;border-left:1px solid #b3975d}
.tree-node.n4:after{left:auto;right:50%;border-right:1px solid #b3975d}
.tree-node[data-state="locked"]{border-color:#455565;color:#b7c6d7}.tree-node[data-state="locked"] img{filter:grayscale(.85);opacity:.6}
.tree-node[data-state="learned"]{border-color:#e2c17c}.tree-node[aria-pressed="true"]{outline:2px solid #a6f2ff;box-shadow:0 0 15px #74e1ff55}
.research-detail{padding:12px 14px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #c6a665;background:linear-gradient(#10283c,#081522);box-shadow:0 -8px 25px #0004}
.research-detail h3{font-family:"Noto Serif KR",serif;font-size:19px;margin:0 0 7px;color:#baf8ff}
.research-detail p{font-size:12px;line-height:1.65;margin:5px 0;color:#f4eee0}
#researchNext{font-size:11px;color:#bdcfdf}
#researchRequires{display:block;color:#e9d4a6;font-size:11px;margin:5px 0}
#learnSkill{width:100%;margin:6px 0;min-height:48px;background:linear-gradient(115deg,#9a743a,#efd08d,#b78a43);color:#251a0b;font-weight:900;font-size:15px;box-shadow:inset 0 0 0 2px #72532d}
#learnSkill:disabled{background:#263746;color:#bdc9d2;border-color:#58616a;box-shadow:none}
.research-help{display:block;font-size:10px;color:#c2cfda;line-height:1.5;text-align:center}
@media(max-height:650px){.research-head{padding-block:6px}.research-detail{padding-block:8px}.research-detail h3{font-size:16px}.research-detail p{font-size:11px}#researchNext{font-size:10px}}
#researchOpen{z-index:6}
#modeBadge{pointer-events:auto;min-height:44px;min-width:86px;top:6px;left:9px;padding:6px 9px;font-size:12px;font-weight:800;z-index:4}
#researchOpen{left:103px;top:6px;min-height:44px}
header{flex-wrap:wrap;row-gap:9px}
.battle-selectors{flex:0 0 100%;display:grid;gap:3px}
.selector-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
header .selector-row button{width:100%;min-height:44px;height:44px;font-size:15px;font-weight:800;color:#e1e9f2;background:linear-gradient(#1c3045,#0b192a);border:1px solid #7b7965;border-radius:3px;box-shadow:inset 0 0 0 2px #0a1825;letter-spacing:.01em}
header .selector-row button[aria-pressed="true"]{color:#171608;background:linear-gradient(120deg,#c9a76b,#f9e4ad,#bd9757);border-color:#ffe9b9;box-shadow:inset 0 0 0 2px #8c6c3b,0 0 9px #d9be7240;text-shadow:0 1px #ffe9b8}
header .selector-row:nth-child(2) button[aria-pressed="true"]{color:#d9fbff;background:linear-gradient(#23546a,#102d42);border-color:#a5eaf0;box-shadow:inset 0 0 0 2px #214659,0 0 8px #68d5ec33;text-shadow:none}
#researchOpen{left:9px}
@media(max-height:680px){header{row-gap:6px}.battle-selectors{gap:3px}header .selector-row button{height:44px;font-size:14px}}
#healthText{font-size:13px;font-weight:800;line-height:1.15;color:#c5ffe0;font-variant-numeric:tabular-nums;letter-spacing:.02em}
#bagOpen{position:absolute;left:103px;top:6px;min-height:44px;min-width:82px;z-index:6;background:#10273bea;border-color:#ddbf86;font-size:12px;font-weight:800}
#bagOpen b{margin-left:5px;color:#ffdc97}
#itemStatus{position:absolute;top:58px;left:10px;right:10px;font-size:11px;font-weight:700;color:#fff0c8;text-shadow:0 2px 3px #000;pointer-events:none}
#lootToast{position:absolute;bottom:110px;left:10px;right:10px;display:grid;gap:3px;justify-items:center;pointer-events:none;z-index:4}
#lootToast span{padding:5px 10px;background:#071524e8;border-inline:1px solid #bda26c;font-size:12px;font-weight:700;text-align:center;text-shadow:0 2px 3px #000}
#bagDialog{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;background:radial-gradient(ellipse at top,#1d3c53,#071421 60%);padding-top:env(safe-area-inset-top)}
#bagDialog[hidden]{display:none}
#bagSummary{font-size:10px;color:#dfcc9f;max-width:110px;text-align:right;line-height:1.6}
.bag-body{flex:1;min-height:0;display:grid;grid-template-rows:auto auto auto minmax(96px,.8fr) minmax(240px,1.5fr);gap:9px;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
#bagSlots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.loadout-slot{min-width:0;display:grid;place-items:center;gap:3px;padding:5px 2px;border-color:#726141;background:linear-gradient(#1c3549,#0d1b2b)}
.loadout-slot small{font-size:10px;color:#d4d0bf}.loadout-slot>span:last-child{font-size:9px;color:#e5d6b7;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.loadout-slot .item-icon{width:32px;height:32px}.empty-slot{font-size:24px;height:32px;color:#879caa}
.item-icon{display:inline-block;width:48px;height:48px;background-image:url(item-atlas.png);background-size:400% 500%;background-position:calc(var(--ix)*100%/3) calc(var(--iy)*100%/4);flex:none;filter:drop-shadow(0 2px 3px #0008)}
#bagTabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#bagTabs button{font-size:13px;font-weight:800;border-color:#6c776e}
#bagTabs button[aria-selected="true"]{color:#c2f6ff;border-color:#a4edf4;background:#164053}
.bag-help{margin:0;font-size:11px;color:#c9d8e4;line-height:1.5}
#bagGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;overflow-y:auto;overscroll-behavior:contain;align-content:start;padding:3px}
.inventory-item{min-width:0;display:grid;place-items:center;gap:3px;padding:6px 2px;border-color:#8f7854;background:linear-gradient(#19344a,#0a1829)}
.inventory-item .item-icon{width:44px;height:44px}
.inventory-item strong{font-size:10px;line-height:1.5;text-align:center;word-break:keep-all}
.inventory-item small{font-size:9px;color:#d3c29a}
.inventory-item[data-owned="false"]{border-color:#455362;color:#bdc8d3}
.inventory-item[data-owned="false"] .item-icon{filter:grayscale(.8);opacity:.65}
.inventory-item[aria-pressed="true"]{outline:2px solid #b5f3ff;outline-offset:-2px;background:linear-gradient(#235267,#112d42)}
.item-detail{position:relative;overflow-y:auto;overscroll-behavior:contain;border:1px solid #b39968;padding:12px 13px 0;background:radial-gradient(ellipse at 50% 0,#1a4560,#0b1c2e 55%);text-align:center;box-shadow:inset 0 0 0 3px #152437}
#itemDetailIcon{float:left;margin-right:10px}.item-detail #itemDetailIcon .item-icon{width:76px;height:76px}
#itemRarity{display:block;color:#efd398;font-size:11px;padding-top:5px}
#itemDetailName{font-family:"Noto Serif KR",serif;font-size:21px;margin:5px 0;color:#fff0c6}
#itemOwned{font-size:10px;color:#a9d5df}
#itemCompare{clear:both;padding-top:8px;margin:5px 0 8px;color:#c0d3df;font-size:11px}
#itemStats{display:grid;gap:6px;padding:8px 0;border-block:1px solid #72838655;font-size:12px}
#itemStats:empty{display:none}
#itemStats>div{display:flex;justify-content:space-between;gap:10px}#itemStats b{font-variant-numeric:tabular-nums}
#itemStats b[data-direction="up"]{color:#a8f2bb}#itemStats b[data-direction="down"]{color:#ffb2aa}
.item-effect-panel{margin-top:10px;text-align:left;padding:10px;border-left:2px solid #7ed4e8;background:#183549aa}
.item-effect-panel h4{font-size:12px;color:#acf2ff;margin:0 0 6px}
#itemEffect{font-size:12px;line-height:1.8;color:#f4ead6;margin:0}
#itemTip{font-size:11px;line-height:1.7;text-align:left;padding-left:10px;border-left:2px solid #bb9d63;color:#e5d5ae}
#equipNote{font-size:10px;line-height:1.6;color:#c4d0dc}
#equipItem{position:sticky;bottom:0;width:100%;margin:6px 0 0;min-height:48px;font-size:16px;font-weight:900;background:linear-gradient(115deg,#a27b3f,#f0d18c,#b98c48);color:#25190a;box-shadow:0 -7px 12px #0c1c2de0,inset 0 0 0 2px #76572e;border:1px solid #f6d69a}
#equipItem:disabled{background:#263b4d;color:#c1cfdb;border-color:#6f7c86;box-shadow:none}
#equipItem[hidden]{display:none}
.bag-visible #researchOpen,.bag-visible #bagOpen{pointer-events:none}
@media(max-height:680px){.bag-body{gap:6px;padding:7px 9px;grid-template-rows:auto auto auto minmax(78px,.7fr) minmax(180px,1.4fr)}.loadout-slot .item-icon{width:25px;height:25px}.loadout-slot{padding-block:3px}.loadout-slot>span:last-child{font-size:8px}.item-detail{padding:8px 10px 0}#itemDetailName{font-size:18px}.item-detail #itemDetailIcon .item-icon{width:58px;height:58px}.inventory-item strong{font-size:9px}#bagSummary{font-size:9px}.item-effect-panel{padding:8px}#itemEffect{font-size:11px}}
#bagGrid{grid-auto-rows:minmax(94px,auto)}
.inventory-item{grid-template-rows:auto 44px auto;align-content:center}
.inventory-item strong{line-height:1.4;min-height:14px}
@media(max-height:680px){#bagGrid{grid-auto-rows:minmax(88px,auto)}}
#bagDialog .research-head{flex-wrap:wrap;row-gap:3px}
#bagSummary{flex-basis:100%;max-width:none;white-space:nowrap;padding-left:56px;text-align:left;font-size:10px}
#bagGrid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(140px,auto)}
.inventory-item{grid-template-rows:auto 44px auto auto auto;gap:4px;padding:8px 3px}
.inventory-item strong{font-size:12px;min-height:32px;display:grid;place-items:center;color:var(--item-color,#eee2cc)}
.inventory-item small{font-size:10px}
.inventory-item .item-quality-line{color:var(--item-color,#e6dcc8)}
.inventory-item[data-owned="true"]{border-color:var(--item-color,#8f7854)}
.inventory-item[data-rarity="5"][data-owned="true"]{box-shadow:inset 0 0 14px #d99a2433}
.loadout-slot{border-color:var(--item-color,#726141)}
.loadout-slot>small:last-child{font-size:8px;white-space:nowrap}
#itemQuality{clear:both;color:#ffe4ac;margin:9px 0;padding:8px 5px;background:#162f46;border-block:1px solid #a2844f;font-size:12px;font-weight:800}
#itemQuality[hidden]{display:none}
#gearOdds{text-align:left;font-size:11px;line-height:1.7;border-top:1px solid #74664b;padding:8px 0;color:#d5e3eb}
#gearOdds[hidden]{display:none}
#gearOdds summary{cursor:pointer;color:#e5d2a7;padding:10px 0;min-height:44px}
#tierOdds,#rarityOdds{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin:6px 0 10px}
.loot-purpose{font-size:12px;color:#ffe0a5;text-shadow:0 2px 4px #000;margin:8px 0 0;line-height:1.5}
#runLootResult{padding:12px;font-size:12px;line-height:1.8;color:#ffe3b1;background:#102a40d9;border-inline:1px solid #a99061}
#runLootResult[hidden]{display:none}
@media(max-width:350px){#bagGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.loadout-slot>small:last-child{white-space:normal;font-size:8px}.inventory-item strong{font-size:11px}.loadout-slot .item-icon{width:24px;height:24px}}
#autoRetryControl{display:flex;gap:9px;align-items:center;min-height:44px;font-size:13px;color:#e7d6b5;margin-top:10px}
#autoRetryControl[hidden]{display:none}
#autoRetryControl input{accent-color:#8de8ef;width:19px;height:19px;margin:0}
#autoRetryStatus{font-size:12px;color:#c3f4ff;margin:5px 0;line-height:1.6}
.retention-rule{flex:0 0 100%;display:flex;flex-wrap:wrap;justify-content:center;gap:2px 7px;padding:5px 3px;border-top:1px solid #766b4c;color:#d2dce5;font-size:10px;line-height:1.5;text-align:center}
.retention-rule b{color:#ffe19e;font-size:11px}
.game-title{line-height:1.15;display:grid;gap:3px;margin:4px 0 8px;font-family:"Noto Serif KR",serif;filter:drop-shadow(0 2px 5px #000)}
.title-hero{font-size:clamp(40px,12vw,56px);font-weight:900;background:linear-gradient(#fff5d7,#e4bc73 70%,#a77e3d);background-clip:text;-webkit-text-fill-color:transparent;letter-spacing:.02em}
.title-colon{font-size:.55em;margin-left:9px;vertical-align:middle}
.title-sub{font-size:clamp(26px,8vw,37px);font-weight:900;letter-spacing:-.07em;color:#ffe4af;text-shadow:0 1px 2px #614721,0 3px 12px #000}
#modeGuide{font-size:12px;font-weight:700;color:#ffe8b9;border-block-color:#b49a6a;background:#091725ed}
.armor-icon{background-image:url(armor-icons.png);background-size:200% 100%;background-position:calc(var(--ix)*100%) 50%}
#bagDialog{background:#071322}
#bagDialog .equipment-header{flex-wrap:wrap;padding:8px 12px;gap:4px 10px;background:radial-gradient(ellipse at top,#213c50,#071420);border-bottom:1px solid #b59b6b}
.equipment-header h2{font-size:27px;color:#ffe7b0;letter-spacing:.04em}
#openEquipmentBag{font-size:12px;width:48px;min-height:44px}
#bagDialog .bag-body{display:block;overflow-y:auto;overscroll-behavior:contain;padding:8px 10px 14px;scrollbar-width:thin;scrollbar-color:#80704e #071322}
.equipment-identity{display:flex;align-items:center;gap:9px;min-height:44px;padding:4px 8px;border:1px solid #9c8d6a;background:linear-gradient(90deg,#15293c,#102030);color:#f5e9cc}
.equipment-identity img{width:34px;height:34px;object-fit:cover;border-right:1px solid #b59b6b}
.equipment-identity strong{flex:1;font-family:"Noto Serif KR",serif;font-size:13px;white-space:nowrap}
.equipment-identity>b{color:#ffe0a0;font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.equipment-stage{height:340px;margin-top:7px;position:relative;isolation:isolate;background:linear-gradient(#0b18242a,#07132200 70%,#071322a0),url(equipment-stage.png) center center/auto 110% no-repeat;border-inline:1px solid #6e725b}
#bagSlots{position:absolute;inset:0;display:block}
#bagSlots .loadout-slot{position:absolute;display:flex;flex-direction:column;justify-content:center;gap:0;width:73px;height:85px;min-height:44px;margin:0;padding:5px 2px 3px;border:1px solid var(--item-color,#a3916c);background:radial-gradient(ellipse,#22394cbb,#071424f2 72%);box-shadow:inset 0 0 0 2px #0a1423,inset 0 0 0 3px #8b7b584f,0 2px 10px #0006;border-radius:1px}
#bagSlots .loadout-slot:before,#bagSlots .loadout-slot:after{content:"";position:absolute;width:8px;height:8px;border-color:var(--item-color,#baa472);pointer-events:none}
#bagSlots .loadout-slot:before{left:3px;top:3px;border-top:1px solid;border-left:1px solid}
#bagSlots .loadout-slot:after{bottom:3px;right:3px;border-bottom:1px solid;border-right:1px solid}
#bagSlots .loadout-slot[aria-pressed="true"]{border-color:#a7f8ff;box-shadow:inset 0 0 0 2px #143146,0 0 11px #87eaf4aa}
#bagSlots .loadout-slot[data-empty="true"] .item-icon{opacity:.35;filter:grayscale(.8)}
#bagSlots .loadout-slot .item-icon{width:44px;height:44px;margin-top:0}
#bagSlots .slot-tier{position:absolute;right:4px;top:3px;font-size:9px;color:var(--item-color,#e5cf9d);line-height:1}
#bagSlots .slot-name{font-size:12px;color:#f2e6cc;max-width:none;white-space:nowrap;overflow:visible}
#bagSlots .slot-power{font-size:8px;color:#e0d6c5;line-height:1.6;white-space:nowrap}
#bagSlots [data-slot="helmet"]{top:10px;left:8px}
#bagSlots [data-slot="weapon"]{top:106px;left:8px}
#bagSlots [data-slot="gloves"]{top:202px;left:8px}
#bagSlots [data-slot="armor"]{top:10px;right:8px}
#bagSlots [data-slot="boots"]{top:106px;right:8px}
#bagSlots [data-slot="necklace"]{top:202px;right:8px}
#bagSlots [data-slot="ring1"]{bottom:8px;left:calc(50% - 76px)}
#bagSlots [data-slot="ring2"]{bottom:8px;right:calc(50% - 76px)}
.stage-caption{display:none}
.equipment-set{display:flex;align-items:center;gap:9px;justify-content:space-between;margin:0 0 7px;padding:9px 10px;border-block:1px solid #bca16a;background:linear-gradient(90deg,#132e43,#071622);font-size:11px;color:#f5e2b6}
.equipment-set strong{font-family:"Noto Serif KR",serif;flex:none;font-size:14px}
.equipment-set strong b{color:#cde997;margin-left:5px}
.equipment-set>span{font-size:10px;text-align:right;color:#a8bacb;line-height:1.6}
.equipment-set>span[data-active="true"]{color:#bcf5df}
.weapon-retention{text-align:center;font-size:10px;color:#c1d0de;line-height:1.5;margin:8px 0 10px}
.weapon-retention b{color:#ffe1a1}
#bagTabs{margin:7px 0}
.inventory-heading{display:flex;gap:8px;align-items:center;margin:8px 0}
.inventory-heading .bag-help{flex:1}
#allGear{padding:3px 9px;font-size:11px;min-height:36px}
#allGear[hidden]{display:none}
#bagDialog #bagGrid{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding:4px 3px 9px;min-height:137px;scroll-snap-type:x proximity;scrollbar-width:thin}
#bagGrid .inventory-item{flex:0 0 104px;min-width:104px;min-height:135px;grid-template-rows:auto 43px auto auto auto;scroll-snap-align:start}
#bagGrid .inventory-item strong{font-size:11px;min-height:28px;line-height:1.4}
#bagGrid .inventory-item small{font-size:9px}
#bagDialog .item-detail{margin-top:8px;overflow:visible;padding:12px;box-shadow:inset 0 0 0 3px #192736;background:radial-gradient(ellipse at 20% 0,#183b55,#081827 70%)}
.item-detail-heading{display:flex;align-items:center;gap:9px;text-align:left;flex-wrap:wrap}
.item-detail-heading>div:nth-child(2){flex:1;min-width:115px}
#itemDetailIcon{float:none;margin:0}
#bagDialog #itemDetailIcon .item-icon{width:75px;height:75px}
#bagDialog #itemDetailName{font-size:22px;line-height:1.4;margin:4px 0}
#itemRarity{padding-top:0;line-height:1.7}
#itemPowerDelta{font-size:12px;margin-left:auto;color:#ffe3a6;padding:5px 8px;border:1px solid #9b9467;background:#0a1723;white-space:nowrap}
#itemPowerDelta[data-direction="up"]{color:#c1ffb2}
#itemPowerDelta[data-direction="down"]{color:#ffb4a1}
#itemPowerDelta[hidden]{display:none}
#itemStats{font-size:12px;padding:9px 0}
#itemStats>div{padding:5px 7px;background:#152d415c}
#itemEffect{font-size:13px;line-height:1.8}
.item-effect-panel{padding:12px;margin-top:13px;border:1px solid #b49a6a;background:radial-gradient(ellipse at 0,#294251,#071927)}
.item-effect-panel h4{font-family:"Noto Serif KR",serif;font-size:15px;color:#f2d69e;margin-bottom:8px}
#equipNote{margin-bottom:0}
.equipment-actions{display:grid;grid-template-columns:1.25fr 1fr;gap:10px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #9d865d;background:#081522;box-shadow:0 -5px 16px #0005}
.equipment-actions[hidden]{display:none}
#equipmentActions #equipItem{position:static;margin:0;min-height:52px;font-family:"Noto Serif KR",serif;font-size:19px;box-shadow:inset 0 0 0 3px #886535,inset 0 0 0 4px #f4d99b}
#optionsCompare{font-family:"Noto Serif KR",serif;font-size:16px;background:linear-gradient(#203a4e,#0c1e30);border:1px solid #c1a773;box-shadow:inset 0 0 0 3px #12253a}
#optionsCompare[aria-pressed="true"]{border-color:#a4f1f8;color:#bcf5ff}
@media(max-width:350px){.equipment-stage{height:320px}#bagSlots .loadout-slot{width:64px;height:80px}#bagSlots .loadout-slot .item-icon{width:39px;height:39px}#bagSlots [data-slot="weapon"],#bagSlots [data-slot="boots"]{top:99px}#bagSlots [data-slot="gloves"],#bagSlots [data-slot="necklace"]{top:188px}#bagSlots [data-slot="ring1"]{left:calc(50% - 67px)}#bagSlots [data-slot="ring2"]{right:calc(50% - 67px)}.equipment-identity>b{font-size:12px}.equipment-identity strong{font-size:12px}.equipment-set{gap:6px;padding-inline:7px}.equipment-set strong{font-size:12px}#bagDialog #itemDetailName{font-size:19px}#bagDialog #itemDetailIcon .item-icon{width:64px;height:64px}#equipmentActions #equipItem{font-size:17px}#optionsCompare{font-size:14px}.retention-rule span{font-size:9px}}
@media(max-height:680px){.game-title{gap:1px}.title-hero{font-size:38px}.title-sub{font-size:26px}.loot-purpose{font-size:10px}#modeGuide{font-size:11px;padding:7px}#overlay .menu-heading{min-height:100px}}
#overlay{align-items:flex-start;padding:54px 15px 12px}
#overlay .menu-panel{margin-block:auto}
#overlay .menu-heading{min-height:0;padding-top:0}
#overlay .game-title{gap:0;margin:3px 0 5px}
#overlay .title-hero{font-size:40px;line-height:1.08;background:none;-webkit-text-fill-color:#ffe6ab;color:#ffe6ab;text-shadow:0 1px 1px #74592e,0 3px 9px #000}
#overlay .title-sub{font-size:29px;line-height:1.25}
#overlay .loot-purpose{font-size:10px;margin:6px 0 0}
#overlay #hint{font-size:11px;margin:9px 0;line-height:1.6}
#overlay #modes{gap:6px}
#overlay #modes label{min-height:49px;padding:5px 9px}
#overlay #modes label img{width:32px;height:32px}
#overlay #modes label span{font-size:16px}
#overlay #modes label small{font-size:10px;margin-top:2px}
#overlay #modes legend{padding-bottom:6px}
#overlay #modeGuide{font-size:11px;padding:8px;margin:9px 0}
#overlay #start{min-height:48px;margin-top:9px;font-size:21px;position:sticky;bottom:0;z-index:2}
@media(max-height:680px){#overlay{padding:52px 12px 10px}#overlay .title-hero{font-size:34px}#overlay .title-sub{font-size:26px}#overlay .loot-purpose{font-size:9px}}
#weaponAffixPanel{clear:both;text-align:left;margin:13px 0;padding:11px;border:1px solid #7a7f76;background:linear-gradient(#142d40,#0a1b2c)}
#weaponAffixPanel[hidden]{display:none}
.affix-heading{display:flex;align-items:center;gap:10px;justify-content:space-between}
.affix-heading h4{font-family:"Noto Serif KR",serif;font-size:16px;margin:0;color:#ffe0a4}
.affix-heading b{color:#b7f3ff;font-size:13px}
#weaponSerial{font-size:10px;line-height:1.6;color:#a9bdcd;margin:7px 0;overflow-wrap:anywhere}
.exact-weapon-power{font-size:13px;color:#f8e5ba;font-weight:800;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.no-affixes{font-size:12px;color:#cedce6;line-height:1.8}
.weapon-affix{margin:10px 0;padding:10px 9px;border-left:2px solid var(--affix-color);background:#1a334577}
.weapon-affix>strong{color:var(--affix-color);font-size:13px}
.weapon-affix>p{font-size:12px;line-height:1.8;color:#f0ebde;margin:6px 0}
.weapon-affix>small{display:block;font-size:10px;line-height:1.7;color:#bfccd8}
#weaponAffixPanel details{font-size:11px;color:#ced9e2;line-height:1.8}
#weaponAffixPanel summary{padding:12px 0;min-height:44px;color:#e4cf9d;cursor:pointer}
#affixOdds{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;color:#c9f5ff;margin:9px 0}
#affixGuide>p{margin:10px 0;line-height:1.8}
#weaponSaveStatus{display:block;color:#ffb29d;font-size:11px;line-height:1.6;width:100%;text-align:center}
#weaponSaveStatus:empty{display:none}
.release-link{min-height:34px;padding:3px 0;border:0;background:transparent;font-size:10px;color:#d9c79f;text-shadow:0 2px 3px #000}
#releaseNotesDialog{position:absolute;inset:0;z-index:50;display:flex;flex-direction:column;background:linear-gradient(#153047,#071422);padding-top:env(safe-area-inset-top)}
#releaseNotesDialog[hidden]{display:none}
#releaseEntries{overflow-y:auto;padding:16px 18px 24px}
#releaseEntries section{margin-bottom:22px;border-bottom:1px solid #b39a6655;padding-bottom:13px}
#releaseEntries h3{color:#ffe0a0;font-size:19px;margin:0 0 5px}
#releaseEntries small{color:#b9cbd9;font-size:11px}
#releaseEntries ul{padding-left:20px;margin-top:10px;font-size:13px;line-height:1.9;color:#e8e5da}
#releaseVersion{font-size:13px;color:#c8f3fb}
