.specialist-modal,.merchant-modal{width:min(1050px,96vw);max-height:min(90svh,900px);overflow:auto}
.specialist-nav{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;margin:0 0 12px}.specialist-nav button{color:#e7d7e7;background:#1d1724;border:1px solid #68566d;min-width:0;padding:8px 6px;cursor:pointer}.specialist-nav button.active{border-color:#e9bf78;background:#46324d}.specialist-nav button span,.specialist-nav button small{display:block}.specialist-nav button small{color:#cbbcd2;font-size:.72rem}
.specialist-header{display:flex;justify-content:space-between;gap:16px;align-items:center}.specialist-header h2{margin:4px 0;font-size:clamp(1.4rem,2.5vw,2rem)}.specialist-header p{margin:0 0 8px;color:#d9cbd5}.specialist-scene{height:clamp(140px,27svh,275px);background-position:center 36%;background-size:cover;border:1px solid #695462}.specialist-modal.blacksmith .specialist-scene{background-image:url('assets/shop-blacksmith-v2.png')}.specialist-modal.enchanter .specialist-scene{background-image:linear-gradient(90deg,#031b3566,transparent),url('assets/shop-enchanter-sapphire-v3.png')}.specialist-modal.alchemist .specialist-scene{background-image:linear-gradient(90deg,#0c081066,transparent),url('assets/shop-alchemist-v1.png');background-position:center 38%}
.specialist-services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.specialist-services button{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:10px 12px;background:#211a27;color:#fff;text-align:left;border:1px solid #65566d;cursor:pointer}.specialist-services button:hover:not(:disabled){border-color:#e7b971;background:#362840}.specialist-services button:disabled{opacity:.45;cursor:default}.specialist-services small{display:block;color:#d0becf;font-size:.82rem}.specialist-services b{flex:none;color:#f4c879}.merchant-card-stock h3{margin:4px 0}.merchant-card-stock .specialist-services{margin:5px 0 12px}.conversion-options{display:flex;gap:8px}.conversion-options button{padding:10px 18px;background:#422d4d;color:#fff;border:1px solid #d4ac75}
@media(max-width:780px){.specialist-modal,.merchant-modal{width:98vw;max-height:92svh;padding:10px!important}.specialist-scene{height:110px}.specialist-header h2{font-size:1.25rem}.specialist-services{margin:6px 0;gap:4px}.specialist-services button{padding:5px 7px}.specialist-services small{font-size:.7rem}}
.sanctuary-status{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:55%;color:#ead9b4}.sanctuary-status span{padding:7px 10px;border:1px solid #746078;border-radius:6px;background:#15101dcc;white-space:nowrap}.sanctuary-status b{color:#fff0a8}.sanctuary-scene{position:relative;width:100%;aspect-ratio:1672/941;margin:12px 0;overflow:hidden;border:1px solid #7c6886;border-radius:9px;background:linear-gradient(#04071218,#08071055),url('assets/sanctuary-exterior-v1.png') center/cover no-repeat;box-shadow:inset 0 0 50px #02030a88}.sanctuary-hotspot{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);border:1px solid transparent;border-radius:42%;background:transparent;cursor:pointer;transition:.18s filter,.18s box-shadow,.18s border-color}.sanctuary-hotspot:hover,.sanctuary-hotspot:focus-visible,.sanctuary-hotspot.selected{outline:0;border-color:color-mix(in srgb,var(--light,#ffe5a3) 75%,transparent);box-shadow:inset 0 0 32px color-mix(in srgb,var(--light,#ffe5a3) 38%,transparent),0 0 24px color-mix(in srgb,var(--light,#ffe5a3) 55%,transparent);filter:brightness(1.22)}.sanctuary-hotspot.inn{--light:#f0a14d}.sanctuary-hotspot.merchant{--light:#f5ce68}.sanctuary-hotspot.guild{--light:#719cff}.sanctuary-hotspot.blacksmith{--light:#ff633f}.sanctuary-hotspot.enchanter{--light:#9e65ff}.sanctuary-hotspot.alchemist{--light:#4fe3a4}.sanctuary-hotspot.confessor{--light:#fff1bc}.sanctuary-tooltip{position:absolute;left:50%;bottom:2.4%;transform:translateX(-50%);display:grid;gap:2px;width:min(440px,88%);padding:9px 13px;border:1px solid #8d728f;border-radius:7px;background:#0c0912df;color:#fff;text-align:center;pointer-events:none}.sanctuary-tooltip strong{color:#f3d595}.sanctuary-tooltip span{font-size:.78rem;color:#ddd0e3}
.hub-room-scene{height:clamp(180px,32svh,320px);background:linear-gradient(90deg,#0f0b17aa,#11182755),var(--room-bg) center/cover;position:relative;overflow:hidden;border:1px solid #806b6b}.hub-room-scene img{position:absolute;bottom:-8%;left:3%;height:112%;max-width:48%;object-fit:contain;object-position:bottom}.hub-room.confessor .hub-room-scene{background:radial-gradient(circle at 25% 30%,#805f4944,#100a14bb),url('assets/stage-bg-dimensional-gate-v1.webp') center/cover}.hub-room.guild .hub-room-scene img{left:5%;height:118%}.hub-select{display:flex;flex-wrap:wrap;gap:7px}.hub-select h3{width:100%;margin:8px 0 0}.hub-select button{padding:8px 12px;border:1px solid #b69a74;background:#241c29;color:#fff;cursor:pointer}.hub-quest{display:grid;gap:4px;border:1px solid #83725f;padding:10px}
.inn-room-scene{position:relative;height:clamp(210px,36svh,350px);overflow:hidden;border:1px solid #87694d;background:linear-gradient(90deg,#17100db8,transparent 62%),url('assets/inn-interior-v1.png') center/cover}.inn-room-scene img{position:absolute;left:4%;bottom:-9%;height:116%;max-width:45%;object-fit:cover;object-position:50% 20%;filter:drop-shadow(0 10px 18px #000b)}.inn-services{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0}.inn-services button{min-height:84px;display:flex;justify-content:space-between;gap:7px;padding:9px;border:1px solid #80654f;background:#241a19;color:#fff;text-align:left;cursor:pointer}.inn-services button:hover:not(:disabled){border-color:#f0bf77;background:#3a2721}.inn-services button:disabled{opacity:.42}.inn-services small{display:block;margin-top:3px;color:#d6c1ad}.inn-services b{color:#f0c681;white-space:nowrap}
@media(max-width:780px){.specialist-nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.specialist-nav button{padding:5px 3px}.specialist-nav button small{font-size:.6rem}.specialist-header{align-items:flex-start}.sanctuary-status{max-width:48%;gap:3px}.sanctuary-status span{padding:4px 5px;font-size:.65rem}.sanctuary-scene{margin:6px 0}.sanctuary-tooltip{bottom:1%;padding:5px 7px}.sanctuary-tooltip span{font-size:.62rem}.hub-room-scene{height:170px}.inn-room-scene{height:150px}.inn-services{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.inn-services button{min-height:64px;padding:5px;font-size:.68rem}.inn-services small{font-size:.58rem}}
@media(orientation:landscape) and (max-height:700px){.specialist-modal.hub{width:min(1040px,98vw);padding:7px!important}.specialist-modal.hub .specialist-header h2{font-size:1.1rem}.specialist-modal.hub .specialist-header p{font-size:.65rem}.sanctuary-scene{height:calc(100svh - 152px);min-height:260px;aspect-ratio:auto;background-size:cover}.sanctuary-tooltip{font-size:.7rem}.specialist-modal.hub .merchant-footer{margin-top:5px;padding-top:5px}}
.sanctuary-hotspot{border-radius:18%}.sanctuary-hotspot>span{position:absolute;left:50%;bottom:4%;transform:translateX(-50%);padding:3px 8px;border:1px solid #b89762;border-radius:999px;background:#0b0910dd;color:#f8e4b0;font-size:.7rem;white-space:nowrap;opacity:.84}.sanctuary-hotspot:hover>span,.sanctuary-hotspot:focus-visible>span,.sanctuary-hotspot.selected>span{opacity:1;background:#211726}.facility-intro-scene{height:clamp(250px,48svh,520px);position:relative;overflow:hidden;border:1px solid #806b6b;background:linear-gradient(90deg,#090712aa,#11182744),var(--facility-bg) center/cover no-repeat}.facility-intro-scene img{position:absolute;left:8%;bottom:0;height:96%;max-width:52%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 12px 20px #000c)}.facility-dialogue{display:flex;align-items:center;gap:10px;padding:10px 0}.facility-dialogue p{flex:1;margin:0;color:#eadfe8;font-size:1rem}.facility-intro.guild .facility-intro-scene img,.facility-intro.inn .facility-intro-scene img{left:18%;height:100%}.hub-room.confessor .hub-room-scene{background:linear-gradient(90deg,#0b0812bb,#21182744),url('assets/confessor-chapel-v1.svg') center/cover}.hub-room.guild .hub-room-scene img{left:18%;height:108%;max-width:43%;object-fit:contain}.inn-room-scene img{object-fit:contain;object-position:bottom}.facility-intro.alchemist .facility-intro-scene{box-shadow:inset 0 0 70px #63187855}
@media(max-width:780px){.sanctuary-hotspot>span{font-size:.56rem;padding:2px 5px}.facility-intro-scene{height:220px}.facility-intro-scene img{left:2%;max-width:62%;height:100%}.facility-dialogue{flex-wrap:wrap}.facility-dialogue p{flex-basis:100%;font-size:.78rem}}

/* v1.0.1 Sanctuary visual separation pass: backgrounds and NPCs are independent assets. */
.sanctuary-scene{background-image:linear-gradient(#0407120d,#08071042),url('assets/sanctuary-exterior-v2.png')}
.facility-intro-scene{background-image:linear-gradient(90deg,#090712b8 0,transparent 58%),var(--facility-bg)}
.facility-intro-scene img,.hub-room-scene img,.inn-room-scene img{background:transparent}
.specialist-scene{position:relative;overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat}
.specialist-scene::after,.merchant-scene::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#090712a8 0,transparent 54%);pointer-events:none}
.specialist-scene img,.merchant-scene img{position:absolute;z-index:1;left:5%;bottom:0;height:108%;max-width:52%;object-fit:contain;object-position:left bottom;filter:drop-shadow(0 12px 22px #000d)}
.specialist-modal.blacksmith .specialist-scene{background-image:url('assets/blacksmith-interior-v1.png')}
.specialist-modal.enchanter .specialist-scene{background-image:url('assets/enchanter-interior-v1.png')}
.specialist-modal.alchemist .specialist-scene{background-image:url('assets/alchemist-interior-v1.png');background-position:center}
.merchant-scene{background:linear-gradient(90deg,#100b12b8,transparent 58%),url('assets/merchant-interior-v1.png') center/cover no-repeat!important}
.merchant-scene img{height:112%;max-width:56%}
.hub-room.confessor .hub-room-scene{background:linear-gradient(90deg,#0b0812b8 0,transparent 58%),url('assets/confessor-chapel-v2.png') center/cover}
.hub-room.guild .hub-room-scene{background:linear-gradient(90deg,#0b1020b8 0,transparent 58%),url('assets/guild-hall-v2.png') center/cover}
.hub-room.guild .specialist-services.guild-offer-list{grid-template-columns:1fr;max-height:min(48svh,520px);overflow:auto;padding-right:4px}
.hub-room.guild .specialist-services.guild-offer-list button{width:100%;min-height:64px}
@media(max-width:780px){.specialist-scene img,.merchant-scene img{left:0;height:105%;max-width:66%}.hub-room.guild .specialist-services.guild-offer-list{max-height:44svh}.facility-intro-scene img{max-width:68%}}

/* v1.1.1 staged service workspace: scene left, controls right. */
.service-workspace{display:grid;grid-template-columns:minmax(300px,1.15fr) minmax(320px,1fr);gap:12px;min-height:440px;margin:10px 0}
.service-workspace .specialist-scene{height:auto;min-height:440px;background-image:linear-gradient(90deg,#0907127a,transparent 62%),var(--facility-bg);background-position:center;background-size:cover}
.service-workspace .specialist-scene img{left:3%;height:98%;max-width:64%;object-fit:contain;object-position:left bottom;z-index:1}
.service-controls{min-width:0;overflow:auto;padding-right:2px}.service-controls>h3{margin:5px 0 8px}.service-controls>.specialist-services{grid-template-columns:1fr;margin-top:0}.merchant-product-grid{grid-template-columns:1fr!important;max-height:430px;overflow:auto}
.hub-room-scene{background:linear-gradient(90deg,#0f0b17aa,#11182755),var(--room-bg) center/cover!important}.hub-room-scene img{object-fit:contain;object-position:left bottom}
.hub-room.confessor .hub-room-scene{background:linear-gradient(90deg,#0b0812b8 0,transparent 58%),url('assets/confessor-chapel-v2.png') center/cover!important}
.hub-room.guild .hub-room-scene{background:linear-gradient(90deg,#0b1020b8 0,transparent 58%),url('assets/guild-hall-v2.png') center/cover!important}
.inn-room-scene{background:linear-gradient(90deg,#17100db8,transparent 62%),url('assets/inn-interior-v1.png') center/cover}.inn-room-scene img{object-fit:contain!important;object-position:left bottom!important;bottom:0!important;height:100%!important}
@media(max-width:780px){.service-workspace{display:flex;flex-direction:column;min-height:0}.service-workspace .specialist-scene{min-height:280px;height:40svh}.service-workspace .specialist-scene img{height:100%;max-width:78%}.service-controls{overflow:visible}.specialist-modal,.merchant-modal{overflow:auto;overscroll-behavior:contain}.hub-room-scene{height:220px}.hub-room-scene img{height:100%;bottom:0;max-width:68%}}
