html,body{overscroll-behavior:none;touch-action:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;background:#14141f;width:100%;height:100%;position:fixed;overflow:hidden}#app{pointer-events:auto;flex:1 1 0;width:100%;min-height:0;position:relative}#app canvas{touch-action:none;width:100%;height:100%;display:block}*{box-sizing:border-box;margin:0;padding:0}#hud{pointer-events:none;z-index:20;--hud-bag-cell:min(calc((100vw - 40px) / 10), 38px);--hud-bottom-height:calc(112px + var(--hud-bag-cell) * 5);color:#e8e8f0;flex-direction:column;font-family:Segoe UI,system-ui,sans-serif;display:flex;position:fixed;inset:0}.hud-veil{opacity:0;pointer-events:none;z-index:60;background:#000;position:fixed;inset:0}@keyframes veilFlash{0%{opacity:.55}to{opacity:0}}.hud-veil.flash{animation:.34s forwards veilFlash}.hud-top{pointer-events:none;background:linear-gradient(#0a0a14d9,#0a0a1459);flex-shrink:0;justify-content:space-between;align-items:center;height:44px;padding:0 8px;display:flex;position:static}.hud-stats{align-items:center;gap:2px;display:flex}.hud-btns{z-index:100;pointer-events:auto;align-items:center;gap:8px;display:flex;position:relative}.hud-icon{color:#e8e8f0;cursor:pointer;background:#141423d9;border:1px solid #ffffff2e;border-radius:8px;justify-content:center;align-items:center;width:32px;height:32px;font-size:15px;display:flex}.hud-icon:active{transform:scale(.94)}.stat{flex-direction:column;align-items:center;min-width:40px;display:flex}.stat .label{opacity:.6;letter-spacing:1px;font-size:9px}.stat .value{font-size:15px;font-weight:700}.stat.hp .value{color:#ff6b6b}.stat.armor .value{color:#f6c86b}.stat.san .value{color:#6b9eff}.stat.gold .value{color:#ffd56b}.stat.key .value{color:#c89bff}.stat.floor .value{color:#8effc8}.stat.turn .value{color:#ccc}.hud-emotion{pointer-events:none;z-index:24;flex-shrink:0;align-items:center;max-width:92vw;height:26px;padding:0 10px;display:flex;position:static}.emotion-text{text-align:left;white-space:nowrap;text-overflow:ellipsis;flex:1;font-size:11px;font-weight:600;overflow:hidden}.emotion-buff{color:#b6f5d0;white-space:nowrap;text-overflow:ellipsis;background:#14281ed9;border:1px solid #78dca066;border-radius:10px;flex-shrink:0;max-width:45vw;margin-left:8px;padding:1px 8px;font-size:10px;font-weight:600;display:none;overflow:hidden}.emotion-buff.show{display:inline-block}.hud-emotion.show{border-radius:14px;align-self:center}.hud-emotion.show.good{color:#8fe6ad;background:#3cb46e33;border:1px solid #78e6a066}.hud-emotion.show.mixed{color:#f2cf72;background:#dcaa4633;border:1px solid #f0c86e66}.hud-emotion.show.bad{color:#ff9a9a;background:#dc505033;border:1px solid #ff828273}.hud-relics{flex-shrink:0;align-items:center;gap:4px;min-height:30px;padding:1px 0;display:flex;position:static;transform:translateY(-3px)}.hud-relics.show{pointer-events:auto}.relic-slots{flex-wrap:nowrap;gap:4px;display:flex}.relic-slot{color:#e5d5ff;cursor:default;background:#d2aaff1a;border:1px solid #d2aaff59;border-radius:6px;flex:0 0 28px;place-items:center;width:28px;height:28px;padding:0;display:grid}.relic-slot.active{background:#ffd56b21;border-color:#ffd56bcc}.relic-slot.inactive{opacity:.55}.relic-slot.empty{opacity:.35;border-style:dashed}.relic-glyph{text-shadow:0 1px 3px #0000008c;font-size:15px;font-weight:700;line-height:1}.relic-book{color:#e5d5ff;cursor:pointer;background:#64469652;border:1px solid #d2aaff8c;border-radius:6px;flex:0 0 28px;width:28px;height:28px;margin-right:4px;padding:0;font-size:18px;line-height:1}.relic-book:hover{color:#ffd56b;border-color:#ffd56b}.relic-collection-modal{z-index:55;pointer-events:auto;justify-content:center;align-items:center;padding:18px;display:none;position:fixed;inset:0}.relic-collection-modal.show{display:flex}.relic-modal-backdrop{background:#05050ca8;position:absolute;inset:0}.relic-modal-panel{background:#1c162ef7;border:1px solid #d2aaff7a;border-radius:12px;flex-direction:column;gap:10px;width:min(92vw,440px);max-height:74vh;padding:14px;display:flex;position:relative;box-shadow:0 16px 42px #0000008c}.relic-modal-head{color:#e5d5ff;align-items:center;gap:8px;font-size:15px;font-weight:700;display:flex}.relic-modal-count{opacity:.65;font-size:10px;font-weight:400}.relic-modal-close{color:#ccc;cursor:pointer;background:0 0;border:0;margin-left:auto;font-size:22px;line-height:1}.relic-modal-close:hover{color:#ffd56b}.relic-collection{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:2px;display:grid;overflow-y:auto}.relic-collection-item{color:#e5d5ff;text-align:left;cursor:default;background:#d2aaff0f;border:1px solid #d2aaff47;border-radius:7px;min-width:0;padding:8px;font-size:11px}.relic-collection-item.active{border-color:#ffd56ba6}.relic-collection-item.inactive{opacity:.55}.relic-collection-item.changeable{cursor:pointer}.relic-collection-item.changeable:hover{background:#ffd56b1f;border-color:#ffd56b}.relic-collection-item small{opacity:.68;margin-top:3px;font-size:9px;display:block}.relic-item-name{font-weight:700;display:block}.relic-item-desc{color:#ffffffad;margin-top:5px;font-size:10px;line-height:1.35;display:block}.relic-modal-hint{color:#ffffff8c;font-size:10px}.relic-choice{pointer-events:auto;z-index:20;background:#1e1630f5;border:1px solid #d2aaff80;border-radius:12px;padding:14px;display:none;position:absolute;inset:18% 8% auto;box-shadow:0 12px 34px #00000059}.relic-choice.show{display:block}.relic-choice-title{color:#e5d5ff;text-align:center;margin-bottom:10px;font-size:15px;font-weight:700}.relic-choice-row{justify-content:center;gap:8px;display:flex}.relic-choice-card{color:#fff;cursor:pointer;background:#d2aaff1a;border:1px solid #d2aaff73;border-radius:8px;flex:1;min-height:84px;padding:9px}.relic-choice-card:hover{background:#ffd56b21;border-color:#ffd56b}.relic-choice-card .relic-name,.relic-choice-card .relic-desc{display:block}.relic-choice-card .relic-name{font-size:13px;font-weight:700}.relic-choice-card .relic-desc{color:#ffffffb8;margin-top:6px;font-size:11px;line-height:1.35}.hud-log{pointer-events:auto;z-index:100;background:#0a0a14b3;border:1px solid #ffffff14;border-radius:8px;max-height:32vh;padding:10px;font-size:12px;line-height:1.6;display:none;position:absolute;inset:48px 8px auto;overflow-y:auto}.hud-log.show{display:block}.hud-log .log-head{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.hud-log .log-title{opacity:.8;font-size:12px;font-weight:700}.hud-log .log-send{cursor:pointer;color:#ffd56b;background:#ffd56b26;border:1px solid #ffd56b80;border-radius:6px;padding:4px 10px;font-size:11px}.hud-log .log-send:hover{background:#ffd56b47}.hud-log .log-send:disabled{opacity:.5;cursor:default}.hud-log .log-body{max-height:24vh;overflow-y:auto}.hud-log .log-status{opacity:.75;color:#8effc8;min-height:14px;margin-top:6px;font-size:11px}.hud-log .line{border-bottom:1px solid #ffffff0a;padding:2px 0}.hud-log .line:last-child{border:none}.hud-bottom{pointer-events:none;background:linear-gradient(#0a0a1459,#0a0a14e6);flex-direction:column;flex-shrink:0;gap:6px;padding:8px 10px 10px;display:flex;position:static}.equip-row{pointer-events:none;align-items:center;gap:10px;display:flex}.equip-slot{cursor:pointer;background:#0000004d;border:2px dashed #fff3;border-radius:8px;flex-direction:column;flex:1 1 0;justify-content:center;align-items:center;width:auto;min-width:0;height:50px;padding:4px 6px;transition:border-color .15s,box-shadow .15s,background .15s;display:flex;box-shadow:inset 0 0 0 1px #ffffff14}.equip-slot.filled{background:#28325099;border-style:solid;border-color:#ffffff59}.equip-slot.unavailable{opacity:.42;cursor:not-allowed;background:#191e2d59;border-style:dashed;border-color:#96a0b459}.equip-slot.armed{background:#503c1499;border-color:#ffd56b;box-shadow:0 0 14px #ffd56b80}.equip-slot.target{border-color:#6bff9e;box-shadow:0 0 14px #6bff9e66}.equip-slot .nm{font-size:12px;font-weight:600}.equip-slot .sub{opacity:.7;font-size:9px}.equip-slot .dur{background:#333;border-radius:2px;width:80%;height:4px;margin-top:4px;overflow:hidden}.equip-slot .dur>i{background:#6bff9e;height:100%;display:block}.backpack-panel{width:100%;position:relative}.backpack-head{pointer-events:none;justify-content:flex-start;align-items:center;gap:6px;height:30px;display:flex;overflow:visible}.bag-rotate{pointer-events:auto;color:#e8e8f0;cursor:pointer;background:#282d46e6;border:1px solid #fff3;border-radius:6px;flex:0 0 28px;width:28px;height:28px;margin-left:auto;padding:0;font-size:18px;line-height:1;display:none;transform:translateY(-3px)}.bag-rotate.show{display:block}.bag-rotate:disabled{opacity:.35;cursor:default}.backpack-grid{--bag-cell:var(--hud-bag-cell);grid-template-columns:repeat(10, var(--bag-cell));grid-template-rows:repeat(5, var(--bag-cell));width:100%;height:calc(var(--bag-cell) * 5 + 8px);pointer-events:auto;justify-content:center;gap:2px;display:grid;position:relative}.bag-cell{cursor:crosshair;background:#00000047;border:1px solid #ffffff1f;border-radius:3px;min-width:0;min-height:0}.bag-item{z-index:2;cursor:pointer;border:1px solid #ffffff3d;border-radius:5px;min-width:0;min-height:0;padding:2px;transition:box-shadow .12s,transform .12s;position:relative;overflow:hidden}.bag-item.selected{z-index:4;border-color:#ffd56b;box-shadow:0 0 12px #ffd56ba6}.bag-item.target{border-color:#6bff9e;box-shadow:0 0 10px #6bff9e80}.bag-item.weapon{background:#192846eb}.bag-item.potion{background:#193728eb}.bag-item.item{background:#3c2d19eb}.bag-item.buff{background:#372346eb}.bag-shape{pointer-events:none;gap:1px;display:grid;position:absolute;inset:1px}.bag-shape span{border-radius:2px;min-width:0;min-height:0}.bag-shape .occupied{background:#ffffff14;justify-content:center;align-items:flex-start;display:flex;overflow:hidden}.bag-shape .occupied b{text-align:center;text-overflow:ellipsis;white-space:nowrap;max-width:100%;padding:1px;font-size:8px;line-height:1.05;overflow:hidden}.bag-shape .void{background:0 0}.bag-details{pointer-events:none;position:absolute;bottom:2px;left:3px;right:3px;overflow:hidden}.bag-meta{white-space:nowrap;text-overflow:ellipsis;opacity:.78;font-size:8px;line-height:1.1;overflow:hidden}.bag-dur{background:#333;border-radius:2px;width:100%;height:3px;margin-top:1px;overflow:hidden}.bag-dur>i{background:#6bff9e;height:100%;display:block}.hand-count{z-index:2;opacity:.55;pointer-events:none;font-size:10px;position:absolute;top:0;right:2px}.hand-count.full{opacity:1;color:#ffd56b;font-weight:700}.hand-empty{opacity:.35;color:#aaa;border:1px dashed #ffffff26;border-radius:8px;flex-shrink:0;justify-content:center;align-self:stretch;align-items:center;min-width:76px;font-size:12px;display:flex}.hand-card{cursor:pointer;background:#1e2337d9;border:1px solid #ffffff26;border-radius:8px;flex-direction:column;flex-shrink:0;gap:3px;width:calc(20vw - 9.6px);min-height:76px;padding:4px;transition:transform .12s,box-shadow .12s;display:flex;position:relative}.hand-card.selected{z-index:3;border-color:#ffd56b;transform:scale(1.08);box-shadow:0 0 14px #ffd56b99}.hand-card.weapon{background:#192846d9}.hand-card.potion{background:#193728d9}.hand-card .nm{font-size:11px;font-weight:600}.hand-card .sub{opacity:.75;font-size:9px}.hand-card .tags{opacity:.6;font-size:9px}.hand-card .dur{background:#333;border-radius:2px;width:100%;height:4px;overflow:hidden}.hand-card .dur>i{background:#6bff9e;height:100%;display:block}.card-actions{left:0;right:0;bottom:calc(var(--hud-bottom-height) + 10px);pointer-events:none;z-index:30;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:10px;min-height:42px;padding:0 12px;display:none;position:absolute}.card-actions.show{display:grid}.card-actions button{pointer-events:auto;cursor:pointer;border:none;border-radius:10px;width:100%;min-width:0;padding:10px 8px;font-size:13px;font-weight:700;box-shadow:0 2px 10px #00000080}.card-actions .act-drop{color:#fff;background:#dc4646e6}.card-actions .act-wait{color:#171827;background:#bcbcd2eb;font-size:19px;line-height:1}.card-actions .act-skill{color:#10182e;text-overflow:ellipsis;white-space:nowrap;touch-action:manipulation;user-select:none;background:#6f9afff0;min-width:0;max-width:none;position:static;overflow:hidden;transform:none}.card-actions .act-use{color:#102018;background:#6bff9eeb}.card-actions button:disabled{cursor:default;opacity:0;pointer-events:none}.card-actions .act-drop:active,.card-actions .act-wait:active,.card-actions .act-skill:active,.card-actions .act-use:active{transform:scale(.95)}.skill-picker,.skill-detail{pointer-events:auto;justify-content:center;align-items:center;padding:18px;display:none;position:fixed;inset:0}.skill-picker{z-index:58}.skill-detail{z-index:62}.skill-picker.show,.skill-detail.show{display:flex}.skill-picker-backdrop,.skill-detail-backdrop{background:#05050cad;position:absolute;inset:0}.skill-picker-panel,.skill-detail-panel{background:#161930fa;border:1px solid #82aaff7a;border-radius:12px;width:min(86vw,320px);padding:14px;position:relative;box-shadow:0 16px 42px #00000094}.skill-picker-head,.skill-detail-head{color:#dce6ff;align-items:center;gap:8px;font-size:15px;font-weight:700;display:flex}.skill-picker-close,.skill-detail-close{color:#ccc;cursor:pointer;background:0 0;border:0;margin-left:auto;font-size:22px;line-height:1}.skill-picker-list{flex-wrap:wrap;justify-content:center;gap:12px;margin:18px 4px 10px;display:flex}.skill-picker-item{color:#fff;cursor:pointer;touch-action:manipulation;user-select:none;background:#82aaff1f;border:1px solid #82aaff73;border-radius:10px;width:52px;height:52px;padding:0;position:relative}.skill-picker-item.selected{background:#ffd56b33;border-color:#ffd56b;box-shadow:0 0 12px #ffd56b5c}.skill-picker-item:active{transform:scale(.94)}.skill-picker-icon{font-size:25px;line-height:50px;display:block}.skill-picker-cooldown{color:#2b1010;background:#ff8a75;border-radius:10px;min-width:19px;height:19px;padding:0 4px;font-size:10px;font-weight:800;line-height:19px;position:absolute;bottom:-5px;right:-5px}.skill-picker-hint{color:#ffffff94;text-align:center;font-size:10px}.skill-detail-panel{width:min(86vw,360px)}.skill-detail-icon{font-size:28px;line-height:1}.skill-detail-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.skill-detail-meta{color:#ffd56b;margin-top:12px;font-size:11px}.skill-detail-desc{color:#ffffffc7;margin:8px 0 2px;font-size:12px;line-height:1.55}.hud-banner{color:#e8d4ff;opacity:0;pointer-events:none;z-index:25;background:#28143cd9;border:1px solid #b478dc66;border-radius:6px;padding:6px 18px;font-size:12px;font-weight:600;transition:opacity .4s;position:absolute;top:78px;left:50%;transform:translate(-50%)}.hud-banner.show{opacity:1}.hud-madness{color:#ffd0d0;pointer-events:none;z-index:25;background:#780a14e6;border:1px solid #f56;border-radius:6px;padding:5px 16px;font-size:12px;font-weight:700;animation:1.1s infinite madnessPulse;display:none;position:absolute;top:100px;left:50%;transform:translate(-50%)}.hud-madness.show{display:block}@keyframes madnessPulse{0%,to{box-shadow:0 0 6px #ff505a66}50%{box-shadow:0 0 16px #ff505ae6}}.hud-over{pointer-events:auto;z-index:80;background:#000000b3;flex-direction:column;justify-content:center;align-items:center;gap:18px;display:none;position:absolute;inset:0}.hud-over.show{display:flex}.hud-over h1{font-size:30px}.hud-over.win h1{color:#8effc8}.hud-over.lose h1{color:#ff6b6b}.hud-over p{padding:0 16px;font-size:13px}.hud-over button{cursor:pointer;color:#1a1a2e;background:#ffd56b;border:none;border-radius:8px;padding:9px 22px;font-size:14px;font-weight:700}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.equip-slot,.bag-item,.bag-rotate,.hand-card,.hand-card button,.hud-log,.hud-over,.hud-settings,.hud-rest button,.hud-rest .reward-card,.hud-rest .shop-cell{pointer-events:auto}.backpack-grid{pointer-events:auto;touch-action:manipulation}.hud-settings{z-index:35;background:#141423eb;border:1px solid #ffffff26;border-radius:10px;min-width:180px;padding:12px 14px;display:none;position:absolute;top:48px;right:6px}.hud-settings.show{display:block}.settings-row{color:#e8e8f0;cursor:pointer;align-items:center;gap:8px;font-size:13px;display:flex}.settings-row input{accent-color:#6b9eff;cursor:pointer;width:16px;height:16px}@media (width<=380px){.stat{min-width:34px}.stat .value{font-size:13px}.hud-icon{width:28px}.equip-slot .nm{font-size:11px}}.hand-card.target{border-color:#6bff9e;box-shadow:0 0 10px #6bff9e80}.hud-rest{top:70px;left:0;right:0;bottom:var(--hud-bottom-height);pointer-events:none;z-index:40;background:0 0;border:none;flex-direction:column;align-items:center;padding:10px 14px 4px;display:none;position:absolute;overflow:hidden}.hud-rest.show{display:flex}.rest-title{color:#ffd56b;letter-spacing:2px;text-shadow:0 1px 4px #000000e6;text-align:center;flex-shrink:0;margin-bottom:10px;font-size:15px;font-weight:700}.rest-reward{flex-direction:column;align-items:center;width:100%;display:flex}.rest-reward-row{flex:1;justify-content:center;gap:10px;width:100%;min-height:0;display:flex}.reward-card{cursor:pointer;color:#e8e8f0;background:#14182ab8;border:1.5px solid #ffffff38;border-radius:12px;flex-direction:column;flex:1 1 0;justify-content:center;align-items:center;gap:6px;min-width:0;max-width:220px;padding:10px 8px;transition:transform .12s,box-shadow .12s;display:flex}.reward-card:active{transform:scale(.97)}.reward-card:hover{box-shadow:0 0 16px #ffd56b59}.reward-card .tag{letter-spacing:2px;color:#cfe0ff;background:#ffffff1f;border-radius:10px;padding:2px 10px;font-size:10px;font-weight:700}.reward-card .nm{text-align:center;font-size:15px;font-weight:700}.reward-card .desc{opacity:.75;text-align:center;font-size:11px}.reward-card.disabled{opacity:.45;cursor:default}.reward-card.disabled:hover{box-shadow:none}.reward-card.gold .tag{color:#ffd56b;background:#ffd56b38}.reward-card.gold{border-color:#ffd56b80}.reward-card.weapon .tag{color:#8fc0ff;background:#6b9eff38}.reward-card.weapon{border-color:#6b9eff80}.reward-card.potion .tag{color:#8fe6ad;background:#6bff9e2e}.reward-card.potion{border-color:#6bff9e73}.reward-card.item .tag{color:#9fdcec;background:#78dcff2e}.reward-card.item{border-color:#78dcff73}.reward-card.buff .tag{color:#d0a9ff;background:#c89bff38}.reward-card.buff{border-color:#c89bff80}.reward-card.relic .tag{color:#ffd56b;background:#ffd56b38}.reward-card.relic{border-color:#ffd56ba6}.reward-card.repair .tag{color:#ffb37a;background:#ffaa5a38}.reward-card.repair{border-color:#ffaa5a80}.reward-card.san .tag{color:#9fbfff;background:#6b9eff38}.reward-card.san{border-color:#6b9eff80}.reward-card.hp .tag{color:#ff9a9a;background:#ff6b6b33}.reward-card.hp{border-color:#ff6b6b80}.rest-shop{flex-direction:column;flex:1;width:100%;min-height:0;display:none}.rest-grid{flex:1;grid-template-columns:repeat(4,1fr);align-content:center;gap:8px;min-height:0;display:grid}.shop-cell{cursor:pointer;color:#e8e8f0;background:#14182ab8;border:1.5px solid #ffffff38;border-radius:10px;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:0;padding:6px 4px;transition:transform .12s,box-shadow .12s;display:flex}.shop-cell:active{transform:scale(.96)}.shop-cell:hover{box-shadow:0 0 12px #ffd56b59}.shop-cell .nm{text-align:center;font-size:12px;font-weight:600;line-height:1.2}.shop-cell .price{color:#ffd56b;font-size:11px;font-weight:700}.shop-cell.sold{opacity:.4;cursor:default}.shop-cell.sold:hover{box-shadow:none}.shop-cell.sold .price{color:#999}.shop-cell.weapon{border-color:#6b9eff80}.shop-cell.potion{border-color:#6bff9e73}.shop-cell.item{border-color:#78dcff73}.shop-cell.buff{border-color:#c89bff80}.shop-cell.relic{border-color:#ffd56ba6}.rest-ops{flex-shrink:0;align-items:center;gap:8px;margin-top:10px;display:flex}.rest-ops button{cursor:pointer;color:#e8e8f0;background:#ffffff1a;border:1.5px solid #ffffff4d;border-radius:8px;padding:7px 18px;font-size:13px;font-weight:600}.rest-ops button.active{color:#ffd56b;background:#ffd56b38;border-color:#ffd56b;box-shadow:0 0 10px #ffd56b59}.rest-ops .rest-hint{opacity:.8;flex:1;font-size:11px}.rest-ops .rest-gold{opacity:.9;font-size:12px}.rest-ops .rest-gold b{color:#ffd56b;font-size:14px}.rest-confirm{background:#14182acc;border:1px solid #ffd56b66;border-radius:8px;flex-shrink:0;align-items:center;gap:10px;margin-top:8px;padding:8px 12px;display:none}.rest-confirm.show{display:flex}.confirm-text{text-align:left;flex:1;font-size:12px;line-height:1.4}.confirm-btns{flex-shrink:0;gap:8px;display:flex}.confirm-btns button{cursor:pointer;border-radius:8px;padding:6px 16px;font-size:12px;font-weight:600}.confirm-btns .ghost{color:#ccc;background:0 0;border:1px solid #ffffff40}.confirm-btns .primary{color:#1a1a2e;background:#ffd56b;border:none}.rest-next{flex-shrink:0;margin-top:auto;padding-top:8px}.rest-next button{cursor:pointer;color:#102018;background:#8effc8;border:none;border-radius:10px;padding:10px 34px;font-size:14px;font-weight:700}.rest-next button:disabled{color:#ffffff59;cursor:default;background:#ffffff1f}
