/* Final frame integration: one native material under each caption.
   This file owns frame/header/close integration; previous files keep layout. */
/* One continuous native frame: its own header texture, rim, end caps and X.
   The 84px right slice preserves the whole ornament instead of stretching it.
   It paints beneath the content well; the content inset stays 28px on both sides. */
body.desktop-client #window-quests.client-window{position:fixed;transform:none!important;box-sizing:border-box;max-width:calc(100vw - 64px);max-height:var(--floating-available-height,calc(100dvh - 48px));border:solid transparent;border-width:35px 28px 28px;border-image:url('/assets/ui/integrated/npc-services-frame.svg') 35 84 28 28 fill / 35px 84px 28px 28px / 0 stretch;background:none;box-shadow:none;border-radius:0;isolation:isolate}
body.desktop-client #window-quests.client-window .window-header{position:absolute;left:-28px;right:-28px;top:-35px;height:35px;min-height:35px;margin:0;padding:0;border:0;background:none;cursor:grab;pointer-events:auto;touch-action:none;user-select:none;z-index:3}
body.desktop-client #window-quests.client-window .window-header h2{position:absolute;inset:0 84px;display:flex;align-items:center;justify-content:center;min-width:0;width:auto;height:auto;margin:0;padding:0;text-align:center;background:none;color:#f0ddb2;box-shadow:none;font:600 16px/35px var(--font-title);letter-spacing:1px;text-indent:0;text-shadow:0 1px 2px #18130d;white-space:nowrap;pointer-events:none}
body.desktop-client #window-quests.client-window .window-header::before,body.desktop-client #window-quests.client-window .window-header::after{content:none}
body.desktop-client #window-quests.client-window [data-minimize]{display:none}
/* The X is already painted by the native right cap. Its transparent hit area
   is centred on that exact button (19px from the outer right edge). */
body.desktop-client #window-quests.client-window [data-close]{position:absolute;left:auto;right:0;top:0;width:38px;height:35px;min-height:35px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:none;color:transparent;box-shadow:none;font-size:0;line-height:35px;text-shadow:none;z-index:4;cursor:pointer;touch-action:manipulation}
body.desktop-client #window-quests.client-window [data-close]::before,body.desktop-client #window-quests.client-window [data-close]::after{content:none}
body.desktop-client #window-quests.client-window [data-close]:hover{background:none;box-shadow:inset 0 0 0 1px #e7cd8f66}
body.desktop-client #window-quests.client-window [data-close]:focus-visible{outline:1px solid #e7cd8f;outline-offset:-5px}
body.desktop-client #window-quests.client-window .window-header:focus-visible{outline:1px solid #e7cd8f;outline-offset:-3px}
body.desktop-client #window-quests.client-window .window-header.dragging{cursor:grabbing}
body.desktop-client #window-quests.client-window .window-body{flex:1 1 auto;min-height:0;max-height:none;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;contain:paint;box-sizing:border-box;background:none}
body.desktop-client.touch-client #window-quests{width:min(640px,calc(100vw - 64px));height:min(450px,var(--floating-available-height,calc(100dvh - 48px)))}
body.desktop-client.touch-client #window-quests .window-body{height:100%;overflow:hidden;padding:0}
body.desktop-client.touch-client #window-quests :is(.mobile-quest-journal,.mobile-quest-reader,.mobile-quest-detail,.mobile-quest-sidebar){min-height:0;max-height:100%;box-sizing:border-box}
body.desktop-client.touch-client #window-quests :is(.mobile-quest-copy,.mobile-quest-list){overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;contain:paint}

/* Timber records: world, nearby, journal, settings, codex, market, guild,
   trade, tradebag, loot and interactions retain their existing rope frame.
   Only the root paints the timber. Header and title are transparent ink. */
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests){border-image:url('/assets/ui/native-detail-frame.png') 7 / 1 / 0 stretch;background:linear-gradient(#211e14a8,#11180fe8),url('/assets/ui/native-detail-wood.png') 0 0 repeat;background-origin:padding-box;background-clip:padding-box;border-radius:0;box-shadow:none;isolation:isolate}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-header{position:relative;inset:auto;flex:0 0 auto;min-height:34px;height:auto;margin:0;padding:0 4px 0 10px;border:0;border-image:none;background:none;box-shadow:none}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-header h2{min-width:0;margin:0;padding:0;background:none;border:0;box-shadow:none;color:#f0ddb2;font:600 13px/1.5 var(--font-title);text-shadow:0 1px 2px #18130d}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-header::before,body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-header::after{content:none}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-header :is([data-close],[data-minimize]){position:static;display:grid;place-items:center;flex:none;width:28px;height:28px;min-height:28px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:transparent url('/assets/ui/native-round-bezel.png') center/26px 26px no-repeat;box-shadow:none;color:#f0ddb2;font:20px/1 var(--font);text-shadow:0 1px 2px #000}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body{flex:1 1 auto;min-height:0;background:none;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;contain:paint}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests).minimized{height:auto;min-height:0;max-height:none}
body.desktop-client .client-window:not(.source-window):not(.combat-party):not(#window-quests).minimized .window-body{display:none}

/* NPC dialogue and services are two independent native silhouettes. The
   outer layout never paints a rectangular backing behind their corners. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc]{background:none;border:0;border-image:none;box-shadow:none;filter:none}
body.desktop-client #panel[data-native-panel=npc] .native-npc-board{background-image:url('/assets/ui/integrated/npc-dialogue-frame.svg'),linear-gradient(#111710,#111710)}
body.desktop-client #panel[data-native-panel=npc] .native-npc-board::before{content:none}
body.desktop-client #panel[data-native-panel=npc] .native-npc-title{background:none;border:0;box-shadow:none}
/* The source keeps its native header, round close socket and metal rim. Its
   cleared inner well is also the border-image fill, so the wide ornament slice,
   scroll area and stationary footer all paint the same continuous material. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service]{display:flex;flex-direction:column;box-sizing:border-box;border:solid transparent;border-width:35px 28px 28px;border-image:url('/assets/ui/integrated/npc-services-frame.svg') 35 84 28 28 fill / 35px 84px 28px 28px / 0 stretch;background:none;border-radius:0;box-shadow:none;padding:0;isolation:isolate;min-height:0}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service]::before,body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service]::after{content:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] [data-npc-service] .native-npc-service-title{left:0;right:56px;top:-35px;width:auto;height:35px;display:flex;align-items:center;justify-content:center;margin:0;padding:0;background:none;border:0;box-shadow:none;font:600 12px/35px var(--font-title);white-space:nowrap;text-overflow:ellipsis;color:#f0ddb2}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] [data-npc-service] .native-npc-services{flex:1 1 0;min-height:0;height:0;max-height:none;min-width:0;margin:0;padding:10px 0;border:0;border-image:none;border-radius:0;background:none;box-shadow:none;clip-path:inset(0);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;contain:paint;scrollbar-gutter:stable both-edges}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc]:has(.native-npc-layout) .dialog-head{left:auto;right:0;top:0;width:0;height:0;min-height:0;padding:0;border:0;background:none;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc]:has(.native-npc-layout) .dialog-head #close-panel{position:absolute;left:auto;right:-2px;top:-6px;width:44px;height:44px;min-height:44px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:none;box-shadow:none;color:transparent;font-size:0;text-shadow:none;transform:none;filter:none;touch-action:manipulation}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc]:has(.native-npc-layout) #close-panel::before,body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc]:has(.native-npc-layout) #close-panel::after{content:none}

/* Merchant list/menu/quantity retain their own already-cleared whole PNGs.
   Align the single live close glyph with the scaled menu's native round socket. */
body.desktop-client #panel[data-native-panel=shop]{background:none;box-shadow:none}
body.desktop-client #panel[data-native-panel=shop] .native-shop-layout :is(.native-merchant-title,.merchant-menu-title,.merchant-count-title){background:none;border:0;box-shadow:none}
body.desktop-client #panel[data-native-panel=shop] .dialog-head{left:0;right:auto;top:0;width:0;height:0;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none}
body.desktop-client #panel[data-native-panel=shop] .dialog-head #close-panel{position:absolute;left:calc(var(--merchant-width,349px) + var(--merchant-menu-left,0px) + 329px * var(--merchant-detail-scale,.84) - 14px);right:auto;top:calc(15px * var(--merchant-detail-scale,.84) - 14px);width:28px;height:28px;min-height:28px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:none;box-shadow:none;color:#f0ddb2;font:16px/28px var(--font);text-shadow:0 1px 2px #000}

/* Other dialogs (enchant, celestial upgrades, portal chooser, confirmation,
   revival and transport) keep the original plain NPC metal frame and dark
   interior. The title is ink in that well, with no pasted merchant fragment. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]){box-sizing:border-box;border:solid transparent;border-width:12px 12px 24px;border-image:url('/assets/ui/npc-dialog-9-0.png') 12 12 24 12 fill / 12px 12px 24px 12px / 0 stretch;background:none;border-radius:0;box-shadow:none;filter:none;padding:0;overflow:visible}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[open]:not([data-native-panel=npc]):not([data-native-panel=shop]){display:flex;flex-direction:column}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) .dialog-head{position:relative;inset:auto;flex:none;min-height:30px;margin:0;padding:3px 36px 5px 5px;background:none;border:0;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) .dialog-head h2{background:none;border:0;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #close-panel{position:absolute;right:0;top:0;width:28px;height:28px;min-height:28px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:transparent url('/assets/ui/native-round-bezel.png') center/26px 26px no-repeat;box-shadow:none;color:#f0ddb2;font:20px/28px var(--font);text-shadow:0 1px 2px #000}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #panel-body{flex:1 1 auto;min-height:0;background:none;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;contain:paint}

/* Bound ledgers: preserve the special boards, portrait crowns, chains and
   native upper-right fasteners. Put just one X into each existing fastener. */
body.desktop-client #client-windows .source-window{background:none;border:0;border-image:none;box-shadow:none}
body.desktop-client #client-windows .source-window .window-header{background:none;border:0;border-image:none;box-shadow:none}
body.desktop-client #client-windows :is(.native-character-title,.native-inventory-title,.native-skills-title){background:none;border:0;box-shadow:none}
body.desktop-client #client-windows .source-window .window-header [data-close]{position:absolute;right:auto;width:28px;height:28px;min-height:28px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:none;box-shadow:none;color:#f0ddb2;font:18px/28px var(--font);text-shadow:0 1px 2px #000}
body.desktop-client #client-windows #window-character .window-header [data-close]{left:calc(339px * var(--native-board-scale,1) - 14px);top:calc(37px * var(--native-board-scale,1) - 14px)}
body.desktop-client #client-windows #window-bag .window-header [data-close]{left:calc(410px * var(--native-board-scale,1) - 14px);top:calc(37px * var(--native-board-scale,1) - 14px)}
body.desktop-client.touch-client #client-windows #window-bag .window-header [data-close]{left:calc(354px * var(--native-board-scale,1) - 14px);top:calc(23px * var(--native-board-scale,1) - 14px)}
body.desktop-client #client-windows #window-skills .window-header [data-close]{left:calc(377px * var(--native-board-scale,1) - 14px);top:calc(37px * var(--native-board-scale,1) - 14px)}
body.desktop-client #client-windows #window-titles .window-header [data-close]{left:calc(283px * var(--native-board-scale,1) - 14px);top:calc(31px * var(--native-board-scale,1) - 14px)}

/* Context/skill and party management content is reparented into an inner
   scroll well. The header shares the root texture and stays outside scrolling. */
body.desktop-client #client-windows .single-native-window :is(.native-context-popover,.native-skill-popover){box-sizing:border-box;overflow:hidden;border-image-repeat:stretch;border-radius:0;background:linear-gradient(#292215c9,#11180feb),url('/assets/ui/native-detail-wood.png') 0 0 repeat;background-origin:padding-box;background-clip:padding-box;box-shadow:none}
body.desktop-client #client-windows .single-native-window :is(.native-context-popover,.native-skill-popover):not([hidden]){display:flex;flex-direction:column}
body.desktop-client #client-windows .single-native-window :is(.native-context-popover,.native-skill-popover) .native-popover-header{position:relative;inset:auto;flex:none;min-height:28px;background:none;border:0;box-shadow:none}
body.desktop-client #client-windows .single-native-window :is(.native-context-popover,.native-skill-popover) [data-detail-close]{flex:none;width:26px;height:26px;min-height:26px;margin:0;padding:0;border:0;border-image:none;border-radius:50%;background:transparent url('/assets/ui/native-round-bezel.png') center/24px 24px no-repeat;box-shadow:none;color:#f0ddb2;font:18px/26px var(--font)}
body.desktop-client .native-frame-body{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;contain:paint}
body.desktop-client:not(.touch-client) .native-skill-popover>.native-frame-body>p{margin:6px 0}
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-management{background:linear-gradient(#292215c9,#11180feb),url('/assets/ui/native-detail-wood.png') 0 0 repeat;background-origin:padding-box;background-clip:padding-box;border-image-width:1;border-image-repeat:stretch;border-radius:0;box-shadow:none;overflow:hidden}
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-management:not([hidden]){display:flex;flex-direction:column}
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-menu-heading{flex:none;position:relative;inset:auto;background:none;border:0;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-menu-heading button{width:26px;height:26px;min-height:26px;margin:0;padding:0;border:0;border-radius:50%;background:transparent url('/assets/ui/native-round-bezel.png') center/24px 24px no-repeat;box-shadow:none;color:#f0ddb2;font:18px/26px var(--font)}

/* Chat and small menus keep their native timber families. No second framed
   rectangle inside the header, and no background through transparent corners. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #chat-box.chat-box{background:linear-gradient(#292215c9,#11180feb),url('/assets/ui/native-detail-wood.png') 0 0 repeat;background-origin:padding-box;background-clip:padding-box;border-image-width:1;border-image-repeat:stretch;border-radius:0;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #chat-box.chat-box .chat-header{background:none;border:0;border-image:none;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #chat-box.chat-box .chat-header::before{content:none}
body.desktop-client .player-action-menu,body.desktop-client:is(.touch-client,:not(.touch-client)) #emote-picker.emote-picker{background:linear-gradient(#292215c9,#11180feb),url('/assets/ui/native-detail-wood.png') 0 0 repeat;background-origin:padding-box;background-clip:padding-box;border-image-width:1;border-image-repeat:stretch;border-radius:0;box-shadow:none}
body.desktop-client :is(.player-action-menu,.emote-picker)>header{background:none;border:0;box-shadow:none}

/* Entry boards use their complete native silhouette. Only old caption pixels
   are cleared in the SVG; no CSS label patch, new plaque or header texture. */
body.desktop-client #welcome .native-login-board{background-image:url('/assets/ui/integrated/login-frame.svg')}
body.desktop-client #welcome #account-register{background-image:url('/assets/ui/integrated/register-frame.svg')}
body.desktop-client #welcome .login-board-title,body.desktop-client #welcome #account-register h2{background:none;border:0;box-shadow:none}
body.desktop-client #welcome .login-board-title::before,body.desktop-client #welcome .login-board-title::after{content:none}
body.desktop-client #welcome #account-register h2{left:47px;top:8px;width:171px;text-align:center}

/* Actions are shallow wells in the parent material, with no image plaque. The footer
   itself is transparent and remains inside the frame's content box. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] button,
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #panel-body button,
body.desktop-client #client-windows .window-body :is(form button:not([type=button]),button[type=submit],.quest-confirmation button,.npc-actions>button),
body.desktop-client #client-windows :is(#window-trade,#window-market,#window-guild,#window-party) :is([data-trade-confirm],[data-market-confirm-buy],[data-trade-respond],[data-guild-respond],[data-party-respond]){
 box-sizing:border-box;min-width:0;max-width:100%;min-height:32px;padding:5px 12px;
 border:1px solid #93826642;border-image:none;border-radius:3px;
 background:#0b100b45;
 color:#e1d3b1;font:600 12px/1.4 var(--font);text-shadow:0 1px #080d0880;
 box-shadow:inset 0 1px 2px #05080555,inset 0 -1px #cab58f0f;
 filter:none;
 white-space:normal;overflow-wrap:anywhere;touch-action:manipulation;
}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] button:disabled,
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #panel-body button:disabled,
body.desktop-client #client-windows .window-body :is(form button:not([type=button]),button[type=submit],.quest-confirmation button,.npc-actions>button):disabled,
body.desktop-client #client-windows :is(#window-trade,#window-market,#window-guild,#window-party) :is([data-trade-confirm],[data-market-confirm-buy],[data-trade-respond],[data-guild-respond],[data-party-respond]):disabled{opacity:.5;filter:none;cursor:default}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] button:hover:not(:disabled),
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #panel-body button:hover:not(:disabled),
body.desktop-client #client-windows .window-body :is(form button:not([type=button]),button[type=submit],.quest-confirmation button,.npc-actions>button):hover:not(:disabled),
body.desktop-client #client-windows :is(#window-trade,#window-market,#window-guild,#window-party) :is([data-trade-confirm],[data-market-confirm-buy],[data-trade-respond],[data-guild-respond],[data-party-respond]):hover:not(:disabled){background:#b49a5b12;border-color:#aa956967;filter:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] button:active:not(:disabled),
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #panel-body button:active:not(:disabled),
body.desktop-client #client-windows .window-body :is(form button:not([type=button]),button[type=submit],.quest-confirmation button,.npc-actions>button):active:not(:disabled),
body.desktop-client #client-windows :is(#window-trade,#window-market,#window-guild,#window-party) :is([data-trade-confirm],[data-market-confirm-buy],[data-trade-respond],[data-guild-respond],[data-party-respond]):active:not(:disabled){background:#03060366;border-color:#aa95695c;box-shadow:inset 0 2px 3px #03050370;filter:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] button:focus-visible,
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel:not([data-native-panel=npc]):not([data-native-panel=shop]) #panel-body button:focus-visible,
body.desktop-client #client-windows .window-body :is(form button:not([type=button]),button[type=submit],.quest-confirmation button,.npc-actions>button):focus-visible,
body.desktop-client #client-windows :is(#window-trade,#window-market,#window-guild,#window-party) :is([data-trade-confirm],[data-market-confirm-buy],[data-trade-respond],[data-guild-respond],[data-party-respond]):focus-visible{outline:1px solid #d2b775;outline-offset:-3px}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] .native-npc-footer{
 position:relative;inset:auto;display:flex;align-items:center;justify-content:center;gap:8px;
 flex:0 0 auto;box-sizing:border-box;min-width:0;min-height:0;max-width:100%;width:100%;
 margin:0;padding:5px 0 2px;border:0;background:none;box-shadow:none;contain:paint;
}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] .native-npc-footer>button{
 flex:0 1 auto;position:static;transform:none;width:auto;min-width:0;max-width:160px;min-height:32px;height:auto;margin:0;padding:5px 18px;
}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] .native-npc-footer>p{flex:1 1 0;min-width:0;margin:0;overflow-wrap:anywhere}
body.desktop-client #panel .npc-interaction-options{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;max-width:320px;margin:18px auto}
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] .npc-interaction-options>button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;text-align:left}
body.desktop-client #panel .npc-interaction-options>button>span{font-size:11px;font-weight:400}
body.desktop-client #panel .npc-menu-intro{margin:8px 0;text-align:center}
/* The native metal surrounds the choice well. Its centre stays dark and the
   perimeter uses CSS bevels rather than a second pasted bitmap. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #panel[data-native-panel=npc] .native-npc-service-pane[data-npc-service] .npc-interaction-options>button{
 border:2px solid #857b63;border-radius:3px;background:linear-gradient(#444333,#252c22);
 box-shadow:inset 0 1px #c0b39477,inset 0 -1px #070c09,0 1px #03070366;
 min-height:44px;color:#eddfba;
}
body.desktop-client #panel .npc-mode-navigation{display:flex;justify-content:flex-start;margin:0 0 10px}
body.desktop-client #panel .quest-confirmation{box-sizing:border-box;min-width:0;max-width:100%;padding:8px 0;border:0;background:none}
body.desktop-client #panel .quest-confirmation .npc-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
/* Merchant quantity, entry and parchment actions keep their own original
   control silhouettes; prevent long confirmation text exceeding their wells. */
body.desktop-client #panel[data-native-panel=shop] [data-native-trade],
body.desktop-client #welcome button[type=submit],
body.desktop-client #client-windows .native-sidecar .item-detail button{box-sizing:border-box;max-width:100%;overflow-wrap:anywhere}

/* Stat wells share this recess tint without changing either the full-size
   allocation controls or the native 21x14 ledger plus sockets. */
body.desktop-client #client-windows #window-character [data-allocate-stat]{background:#0b100b45;border-color:#93826642;color:#e1d3b1;box-shadow:inset 0 1px 2px #05080555,inset 0 -1px #cab58f0f;text-shadow:0 1px #080d0880;filter:none}
body.desktop-client #client-windows #window-character [data-allocate-stat]:hover:not(:disabled){background:#b49a5b12;border-color:#aa956967;filter:none}
body.desktop-client #client-windows #window-character [data-allocate-stat]:active:not(:disabled){background:#03060366;box-shadow:inset 0 2px 3px #03050370;filter:none}

/* Text actions in the timber family share the same shallow control well.
   Keep sprite slots, inventory cells and the native parchment ledgers intact. */
body.desktop-client #client-windows :is(.native-frame-body,.client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body) button:not([data-trade-bag-item]):not(.resident):not(.codex-card){
 border:1px solid #93826666;border-image:none;border-radius:3px;
 background:#0b100b45;color:#e1d3b1;text-shadow:0 1px #080d0880;
 box-shadow:inset 0 1px 2px #05080555,inset 0 -1px #cab58f0f;
 min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;touch-action:manipulation;
}
body.desktop-client #client-windows :is(.native-frame-body,.client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body) button:not([data-trade-bag-item]):not(.resident):not(.codex-card):hover:not(:disabled){background:#b49a5b20;border-color:#aa9569;filter:none}
body.desktop-client #client-windows :is(.native-frame-body,.client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body) button:not([data-trade-bag-item]):not(.resident):not(.codex-card):active:not(:disabled){background:#03060366;box-shadow:inset 0 2px 3px #03050370;filter:none}
body.desktop-client #client-windows :is(.native-frame-body,.client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body) button:focus-visible{outline:1px solid #d2b775;outline-offset:-3px}
body.desktop-client #client-windows :is(.native-frame-body,.client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body) button:disabled{opacity:.5;filter:none}
/* Selected modes retain a visible state after removing their bitmap plaques. */
body.desktop-client #client-windows .client-window:not(.source-window):not(.combat-party):not(#window-quests) .window-body :is(button.active,button[aria-pressed=true],button[aria-selected=true]){background:#ad90532e;border-color:#b49a65;color:#fff0c8}
body.desktop-client #client-windows :is(#window-trade,#window-guild) :is(input,select){border:1px solid #93826666;border-image:none;box-shadow:inset 0 1px 2px #05080555}
/* Summary and confirmation sections use the window material, not a second
   framed card. Their separators retain the existing content grouping. */
body.desktop-client #client-windows :is(.guild-summary,.guild-treasury,.guild-place,.guild-invite,.trade-invite,.market-purchase){background:none;box-shadow:none;border:0;border-bottom:1px solid #93826642}
body.desktop-client #client-windows #window-trade .trade-actions{position:static;background:none;box-shadow:none}
/* A live exchange has three production siblings: items, fee note and actions.
   Only the item columns scroll; confirmation stays visible inside the timber. */
body.desktop-client #client-windows #window-trade .window-body:has(>.trade-columns){display:grid;grid-template-rows:minmax(0,1fr) auto auto;min-height:0;max-height:none;overflow:hidden}
body.desktop-client #client-windows #window-trade .window-body>.trade-columns{min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;contain:paint}
body.desktop-client #client-windows #window-trade .window-body>.trade-note{margin:7px 0 0}
body.desktop-client #client-windows #window-trade .window-body>.trade-actions{margin-top:5px;padding:5px 0 0;border-top:1px solid #93826642;min-width:0}
/* Party controls keep their roster's own artwork. The footer is a sibling of
   the inner scroll body, created by mountNativeFrameBody without cloning it. */
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-management>.party-menu-footer{flex:0 0 auto;min-width:0;margin:0;padding:6px 0 0;border-top:1px solid #93826642;background:none;box-shadow:none}
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-management>.party-menu-footer button{box-sizing:border-box;width:100%;max-width:100%;min-height:32px;margin:0;border:1px solid #93826666;border-image:none;border-radius:3px;background:#0b100b45;box-shadow:inset 0 1px 2px #05080555;color:#e1d3b1}
body.desktop-client:is(.touch-client,:not(.touch-client)) #window-party.combat-party .party-management :is(.party-follow-list,.party-support-card,.party-empty,.party-nearby-player,.party-invite){background:none;box-shadow:none;border:0;border-bottom:1px solid #93826642;border-radius:0}
/* Parchment actions stay on the parchment, with legible brown ink. */
body.desktop-client.touch-client #window-quests .mobile-quest-footer{background:none;box-shadow:none}
body.desktop-client.touch-client #window-quests .mobile-quest-detail .mobile-quest-actions button{border:1px solid #8c704e77;border-image:none;border-radius:3px;background:#61461e18;color:#493521;box-shadow:inset 0 1px 2px #6b492222;text-shadow:none}
body.desktop-client.touch-client #window-quests .mobile-quest-detail .mobile-quest-actions button:hover:not(:disabled){background:#61461e2e;color:#342212}
body.desktop-client.touch-client #window-quests .mobile-quest-sidebar :is(.mobile-quest-tabs button,.mobile-quest-row){border:1px solid #93826666;border-radius:3px;background:#0b100b45;box-shadow:inset 0 1px 2px #05080555}
body.desktop-client.touch-client #window-quests .mobile-quest-sidebar :is(button[aria-pressed=true],button[aria-selected=true]){background:#ad90532e;border-color:#b49a65;color:#fff0c8;box-shadow:inset 2px 0 #d2b775}
/* Bank keeps its original money board. Stack the adjacent form when the
   service well is too narrow for two usable columns. */
body.desktop-client #panel[data-native-panel=npc] .native-bank .bank-treasury{grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));align-items:start}
body.desktop-client #panel[data-native-panel=npc] .native-bank [data-bank-items]{border:0;border-bottom:1px solid #93826642;background:none;box-shadow:none;padding:10px 0}
