/* Source panels keep their geometry; common controls use original ink, wood,
   and circular buttons. No full-image stretching or duplicated close glyph. */
body.desktop-client{--native-hud-width:min(717px,calc(100vw - 170px));--native-hud-left:calc((100vw - var(--native-hud-width)) / 2)}
.desktop-client #welcome #character-slots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:1fr;align-items:end}
.desktop-client #welcome[data-mode=select] .character-slot::before{animation:selection-floor-light 5s ease-in-out infinite}
@keyframes selection-floor-light{0%,100%{filter:brightness(.93)}50%{filter:brightness(1.16)}}
@media(prefers-reduced-motion:reduce){.desktop-client #welcome[data-mode=select] .character-slot::before{animation:none}}
.desktop-client.touch-client .map-card{left:max(5px,env(safe-area-inset-left,0px))}
.desktop-client .client-window:not(.source-window):not(.combat-party){box-sizing:border-box;transform:none;width:min(560px,100%);min-width:0;max-width:100%;max-height:100%;border:7px solid transparent;border-image:url('/assets/ui/native-detail-frame.png') 7 / 7px / 0 stretch;background:linear-gradient(#161c16ed,#161c16ed),url('/assets/ui/native-detail-wood.png');box-shadow:0 4px 12px #0007;color:#e4d5b5;font-size:12px}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-header{position:relative;inset:auto;flex:none;box-sizing:border-box;min-height:32px;padding:0 3px 0 10px;border:0;background:url('/assets/ui/native-detail-wood.png') repeat;color:#f0dbad;gap:5px}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-header h2{font:600 13px/1.5 var(--font);letter-spacing:.5px;color:#f0dbad;text-shadow:0 1px 2px #171109}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:10px 12px;font:12px/1.65 var(--font);scrollbar-color:#8e7852 #111710}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body :is(h3,p,label,div,article){box-sizing:border-box;min-width:0;overflow-wrap:anywhere}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body h3{font:600 13px/1.5 var(--font);color:#e6c98f;margin:12px 0 6px}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body p{font-size:12px;line-height:1.65;margin:6px 0}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body button{box-sizing:border-box;min-height:30px;max-width:100%;padding:4px 8px 4px 25px;border:0;border-image:none;background:transparent url('/assets/ui/script-button-12-0.png') 3px center/17px 17px no-repeat;box-shadow:none;font:12px/1.5 var(--font);color:#e7d5ad;text-shadow:0 1px #000;white-space:normal;text-align:left}
.desktop-client .client-window .window-body button:disabled{opacity:.35;cursor:default}
.desktop-client .client-window .window-body button:focus-visible{outline:1px solid #d8b875;outline-offset:-1px}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body button:hover:not(:disabled){background-color:#ac8c3c20;color:#fff1cf}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body :is(input,select){box-sizing:border-box;min-width:0;max-width:100%;height:32px;padding:4px 8px;border:1px solid #8e7950;border-radius:3px;background:#0b110d;color:#eadcba;font:13px/1.5 var(--font)}
.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body input[type=checkbox]{width:16px;height:16px;accent-color:#a99054}
.desktop-client .client-window .window-header [data-close],.desktop-client .native-context-popover [data-detail-close]{display:grid;place-items:center;box-sizing:border-box;flex:none;width:28px;height:28px;min-height:28px;padding:0;margin:0;border:0;background:url('/assets/ui/native-round-bezel.png') center/contain no-repeat;border-image:none;color:#eddfba;font:20px/1 var(--font);text-shadow:0 1px 2px #000}
.desktop-client .single-native-window .window-header [data-close]{margin:0;position:absolute;right:0;top:0}
.desktop-client .client-window:not(.source-window) .window-header [data-close]{width:28px;height:28px;min-height:28px;display:grid;place-items:center;background:url('/assets/ui/native-round-bezel.png') center/contain no-repeat;font-size:20px}
.desktop-client #window-character .native-context-popover{height:auto;min-height:0;max-height:min(340px,calc(100dvh - 24px));padding:8px 10px 10px;font-size:11px;line-height:1.5;background:linear-gradient(#3a2d20cc,#3a2d20cc),url('/assets/ui/native-detail-wood.png');box-shadow:0 3px 8px #0008}
.desktop-client #window-character .native-context-popover .native-popover-header{position:sticky;top:-8px;min-height:28px;margin:0 0 6px;padding:0;background:url('/assets/ui/native-detail-wood.png');font-size:12px}
.desktop-client #window-character .native-context-popover .character-extras{padding:3px 0 6px;line-height:1.5;border-bottom:1px solid #aa8a5866}
.desktop-client #window-character .native-context-popover .npc-actions{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin:5px 0}
.desktop-client #window-character .native-context-popover button:not([data-detail-close]){min-height:30px;margin:0;padding:3px 2px 3px 20px;background-size:15px 15px;font-size:11px}
.desktop-client #window-character .native-context-popover .stat-allocation{border-top:1px solid #aa8a5866;padding-top:6px}
.desktop-client #window-character .native-context-popover .stat-allocation label{min-height:27px;margin:0;line-height:1.5}
.desktop-client #window-character .native-context-popover .stat-allocation button{min-height:25px}
.desktop-client #window-character .native-context-popover p{margin:6px 0;line-height:1.5}
.desktop-client #window-character .native-character-title{background:none;color:#efdfbb;text-shadow:0 1px 2px #000}
.desktop-client #window-character .character-face{image-rendering:auto}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.world-location{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:0 0 7px;border-bottom:1px solid #9b82564a;font-size:11px}
.world-location strong{font-size:13px;color:#ebd2a0}
.world-location span{font-size:10px;color:#bbae91}
.world-categories{display:flex;gap:5px;padding:6px 0}
.desktop-client #window-world .world-categories button{flex:1;text-align:center;padding:4px 7px;background:none;border-bottom:2px solid transparent;color:#bbae91}
.desktop-client #window-world .world-categories button[aria-pressed=true]{border-bottom-color:#ba9b5a;color:#f1d497;background:#97783712}
.world-tools{display:grid;grid-template-columns:minmax(0,1fr) 60px auto;gap:8px;align-items:center;margin-bottom:5px}
.world-tools label{margin:0}
.world-tools input{width:100%}
.world-tools>span{font-size:10px;color:#b8aa8b}
.world-map-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}
.desktop-client #window-world .map-route{display:flex;align-items:center;gap:6px;min-width:0;padding:6px 0;margin:0;border:0;border-bottom:1px solid #8a765036;background:none}
.desktop-client #window-world .map-route>div{flex:1;min-width:0}
.desktop-client #window-world .map-route b{display:block;font-size:12px;line-height:1.5;color:#e5d1ab;white-space:normal}
.desktop-client #window-world .map-route small{display:block;font-size:10px;line-height:1.5;color:#a99e83}
.desktop-client #window-world .map-route button{flex:none;min-height:30px;padding-right:2px;font-size:11px}
.world-pages{display:flex;justify-content:space-between;align-items:center;gap:6px;padding-top:5px}
.world-pages span{font-size:10px;color:#c8b993}
.world-connections{border-top:1px solid #9b82564a;margin-top:7px;padding-top:6px}
.world-connections summary{cursor:pointer;color:#cfb889}
.world-connections .npc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
.desktop-client .client-window .bag-tools{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0}
.desktop-client .client-window .settings-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,55%);gap:6px;padding:6px 0;border-color:#8a765036}
.desktop-client .client-window .settings-row select{width:100%;max-width:100%}
/* GroupMan original seven sockets fit a combat roster, paged for larger parties. */
.desktop-client #window-party.combat-party{position:fixed;width:161px;height:161px;min-width:0;max-width:161px;max-height:161px;margin:0;padding:0;border:0;border-image:none;background:none;box-shadow:none;transform:none!important;overflow:visible;pointer-events:auto}
.desktop-client #window-party.combat-party .window-header{position:absolute;inset:0;min-height:0;height:0;display:block;background:none;border:0;pointer-events:none;padding:0}
.desktop-client #window-party.combat-party .window-header h2,.desktop-client #window-party.combat-party [data-minimize]{display:none}
.desktop-client #window-party.combat-party .window-header [data-close]{position:absolute;left:14px;top:6px;width:25px;height:25px;min-height:25px;font-size:17px;pointer-events:auto;z-index:2}
.desktop-client #window-party.combat-party .window-body{height:161px;max-height:none;overflow:visible;padding:0;margin:0;position:relative}
.native-party-roster{position:relative;width:161px;height:161px;background:url('/assets/ui/native-party.png') center/161px 161px no-repeat}
.desktop-client #window-party.combat-party .party-member{position:absolute;width:52px;height:15px;min-height:15px;padding:0;margin:0;border:0;border-image:none;border-radius:8px;background:none;box-shadow:none;overflow:hidden;text-align:center;color:#f5e4bb;font-size:8px;line-height:15px}
.desktop-client #window-party.combat-party .party-member.selected{box-shadow:inset 0 0 0 1px #ffe29a;background:#b1924630}
.desktop-client #window-party.combat-party .party-member b{position:absolute;inset:0;display:block;font:8px/15px var(--font);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px #000}
.desktop-client #window-party.combat-party .party-meter{position:absolute;left:2px;right:2px;bottom:1px;height:4px;margin:0;background:#101812a0}
.desktop-client #window-party.combat-party .party-meter i{background:linear-gradient(#c77b63,#98463b)}
.desktop-client #window-party.combat-party .party-member.fallen{filter:grayscale(1);color:#baa992}
.desktop-client #window-party.combat-party .party-manage-toggle{position:absolute;left:93px;top:3px;width:28px;height:28px;min-height:28px;padding:0;margin:0;background:none;border:0}
.desktop-client #window-party.combat-party .party-page-prev,.desktop-client #window-party.combat-party .party-page-next{position:absolute;top:136px;width:24px;height:23px;min-height:23px;padding:0;background:transparent url('/assets/ui/script-button-11-0.png') center/15px 15px no-repeat;border:0}
.desktop-client #window-party.combat-party .party-page-prev{left:37px}
.desktop-client #window-party.combat-party .party-page-next{right:37px;background-image:url('/assets/ui/script-button-12-0.png')}
.party-page-number{position:absolute;left:64px;top:139px;width:32px;text-align:center;font:9px/16px var(--font);color:#ead6ac;text-shadow:0 1px #000}
.desktop-client #window-party.combat-party .party-management{position:absolute;top:10px;left:164px;width:min(245px,calc(100vw - 195px));max-height:calc(100dvh - 65px);box-sizing:border-box;overflow:auto;padding:8px 10px;border:5px solid transparent;border-image:url('/assets/ui/native-detail-frame.png') 5 / 5px / 0 stretch;background:linear-gradient(#272018ed,#272018ed),url('/assets/ui/native-detail-wood.png');color:#e4d2ae;font:11px/1.5 var(--font);z-index:5}
.party-management header{display:flex;justify-content:space-between;align-items:center}
.desktop-client #window-party.combat-party .party-management button{min-height:30px;padding:3px 5px;border:0;border-image:none;background:none;color:#e4d2ae;font-size:11px}
.desktop-client #window-party.combat-party .party-management p{font-size:11px;margin:6px 0;line-height:1.5}
.desktop-client #window-party.combat-party .party-tools{display:flex;flex-wrap:wrap;gap:3px;margin:4px 0}
.desktop-client:has(.combat-party):not(:has(.client-window:not(.combat-party))) :is(.action-group,.touch-joystick){opacity:1;pointer-events:auto}
@media(max-width:650px){.world-map-list{grid-template-columns:1fr}.world-location{display:block}.world-location span{display:block}.desktop-client #window-party.combat-party .party-management{left:0;top:32px;width:220px}.desktop-client .client-window:not(.source-window):not(.combat-party) .window-body{padding:8px}}
/* 2026-10-29 地圖視窗「世界首領」分頁：單欄列表，右側顯示未擊殺／已擊殺＋重生倒數 */
.world-boss-list{display:grid;grid-template-columns:minmax(0,1fr)}
#window-world .boss-route>div{flex:1;min-width:0}
#window-world .boss-route .boss-state{flex:0 0 auto;min-width:64px;text-align:right;font-size:12px;line-height:1.35}
#window-world .boss-route.alive .boss-state{color:#a9d48f}
#window-world .boss-route.dead .boss-state{color:#d39a83}
#window-world .boss-route .boss-state i{display:block;font-style:normal;font-size:11px;color:#c7b995;font-variant-numeric:tabular-nums}
#window-world .boss-route b small{font-weight:normal;color:#c7b995}
/* 2026-10-30 世界首領分頁的副本首領區 */
#window-world .world-boss-heading{margin:10px 0 2px;padding-top:6px;border-top:1px solid #8a765055;font-size:12px;color:#e2c98d;letter-spacing:.04em}
#window-world .boss-route.fighting .boss-state{color:#e8c46a}
#window-world .boss-route>div small+small{opacity:.8}
/* 2026-10-30（使用者：按鈕文字請置中）：世界地圖「前往／找入口／城鎮嚮導」按鈕文字置中，按鈕不再貼出視窗右緣 */
.desktop-client #window-world .map-route button{min-width:64px;padding:4px 10px;text-align:center;justify-content:center;margin-right:2px;box-sizing:border-box}
#window-world .boss-route .boss-state{margin-right:4px}
