/* Original surfaces.pck PC dialogue panels. */
dialog.npc-window,dialog.quest-window,dialog.pc-shop-window{padding:0;border:0;box-shadow:none;border-radius:0;background:transparent url('../assets/ui/bag-frame.png') center/100% 100% no-repeat;color:#fff7dd;overflow:hidden;width:299px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 135px);top:110px}
dialog.quest-window,dialog.pc-shop-window{width:608px;background-image:url('../assets/ui/pc-dialog-medium.png')}
.npc-window .dialog-top,.quest-window .dialog-top,.pc-shop-window .dialog-top{height:50px;padding:0;background:none;border:0;position:relative}.npc-window .dialog-top>div,.quest-window .dialog-top>div,.pc-shop-window .dialog-top>div{position:absolute;left:50px;right:50px;top:10px;text-align:center}.npc-window .dialog-top small,.quest-window .dialog-top small,.pc-shop-window .dialog-top small{display:none}.npc-window .dialog-top h2,.quest-window .dialog-top h2,.pc-shop-window .dialog-top h2{font-size:16px;line-height:26px;font-weight:400;margin:0;color:#624119;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.npc-window .dialog-top>button,.quest-window .dialog-top>button,.pc-shop-window .dialog-top>button{position:absolute;right:6px;top:19px;width:28px;height:28px;border:0;border-radius:0;background:transparent url('../assets/ui/pc-dialog-close.png') center/contain no-repeat;color:transparent;padding:0}
.npc-window #modal-body{padding:0 19px 17px;max-height:calc(100dvh - 185px);overflow:auto}.pc-npc-text,.pc-npc-options,.quest-pc-description,.quest-pc-objective,.quest-pc-rewards,.quest-story-list{background:transparent url('../assets/ui/bag-inset.png') center/100% 100% no-repeat;padding:9px;scrollbar-width:thin;scrollbar-color:#24b8e0 #17687d;overflow:auto}
.pc-npc-text{height:181px;font-size:15px;line-height:1.5}.pc-npc-text p{color:#fff7dd;margin:0 0 8px;font-size:15px}.pc-npc-text h3{color:#ffe393}.pc-npc-options{height:148px;margin-top:2px;padding:8px 6px}.pc-npc-options button{display:block;border:0;background:none;color:#fff9df;text-align:left;font-size:15px;padding:3px 0;box-shadow:none}.pc-npc-options button:before{content:'•';margin-right:5px}.pc-npc-options button:hover{color:#fff59b;background:#c5ab6040}.pc-npc-options .pc-npc-leave:before{content:'※'}
.pc-npc-back{display:block;margin:4px auto 0;padding:4px 8px;border:0;background:transparent url('../assets/ui/pc-dialog-button.png') center/100% 100% no-repeat;color:#fff0a3}
.quest-window #modal-body{padding:10px 30px 23px;overflow:auto;max-height:calc(100dvh - 190px)}.quest-toolbar{margin-bottom:8px}.quest-progress{display:grid;grid-template-columns:207fr 336fr;gap:4px;min-height:285px}.quest-progress[hidden]{display:none}.quest-story-list{max-height:285px}.quest-story-list button{display:flex;flex-direction:column;width:100%;text-align:left;border:0;border-radius:0;background:none;color:#ffdf73;padding:7px 3px;gap:4px}.quest-story-list button.selected{background:#dec87e44}.quest-story-list small{color:#aeff98;font-size:11px}.quest-pc-details{display:grid;grid-template-rows:118px 70px minmax(90px,1fr);gap:2px}.quest-pc-details p{font-size:14px;line-height:1.45;margin:0 0 5px;color:#fff8df}.quest-pc-details h3{font-size:15px;margin:0 0 7px;color:#ffe098}.quest-pc-objective p:last-child{color:#68ff32}
.pc-shop-window #modal-body{padding:5px 30px 25px;max-height:calc(100dvh - 190px);overflow:auto}.pc-shop-window .weapon-row,.pc-shop-window .weapon-preview,.pc-shop-window .shop-filters{border-color:#ba9b57;background:#81612d75;color:#fff3d4}.pc-shop-window .weapon-row small,.pc-shop-window .notice{color:#f7e4b1}.pc-shop-window button{background:linear-gradient(#a4833e,#755221);border-color:#d3b669;color:#fff1b2}.pc-shop-window .weapon-preview canvas{max-width:100%}
@media(max-width:700px){dialog.npc-window,dialog.quest-window,dialog.pc-shop-window{top:110px;right:8px;max-height:calc(100dvh - 125px)}.quest-window #modal-body,.pc-shop-window #modal-body{padding-left:18px;padding-right:18px;max-height:calc(100dvh - 175px)}.quest-progress{grid-template-columns:37% 1fr}.quest-toolbar button{min-width:100px;font-size:11px}.quest-story-list button{font-size:12px}.quest-pc-details p{font-size:12px}.quest-pc-details h3{font-size:13px}}

.pc-npc-options .pc-npc-quest{color:#9faeff}.pc-npc-options .pc-npc-quest:hover{color:#d8ddff}.pc-npc-reward{font-size:13px;color:#ffdf7d;margin:2px 0 8px;line-height:1.5;border-bottom:1px solid #d6bb6966;padding-bottom:5px}

/* Preserve the back button texture on hover; no generic background replacement. */
.npc-window .pc-npc-back,.npc-window .pc-npc-back:hover,.npc-window .pc-npc-back:active{background:transparent url('../assets/ui/pc-dialog-button.png') center/100% 100% no-repeat;border:0;transform:none;box-shadow:none;color:#fff0a3;transition:filter .12s}
.npc-window .pc-npc-back:hover{filter:brightness(1.12)}.npc-window .pc-npc-back:active{filter:brightness(1.06)}
/* The inset texture is a nine-slice border, never stretched across the content. */
.npc-window .pc-npc-text,.npc-window .pc-npc-options{background:rgba(94,70,30,.22);border:1px solid #d0b67988;border-radius:4px;box-shadow:inset 0 0 0 1px #5f471d55;padding:8px 6px}
.npc-window .pc-npc-options{margin-top:5px}
.npc-window{isolation:isolate;background:none}
dialog.npc-window{background:none}
.npc-window:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:transparent url('../assets/ui/bag-frame.png') center/100% 100% no-repeat;opacity:.8}

/* All modal title plates are drag handles, including the backpack. */
#modal .dialog-top{cursor:grab;touch-action:none;user-select:none;pointer-events:auto}
#modal .dialog-top.window-dragging{cursor:grabbing}#modal .dialog-top button{cursor:pointer}
.quest-window .quest-story-list,.quest-window .quest-pc-description,.quest-window .quest-pc-objective,.quest-window .quest-pc-rewards{background:rgba(94,70,30,.22);border:1px solid #d0b67988;border-radius:4px;box-shadow:inset 0 0 0 1px #5f471d55}
dialog.quest-window{isolation:isolate;background:none}
.quest-window:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:transparent url('../assets/ui/pc-dialog-medium.png') center/100% 100% no-repeat;opacity:.8}
