/* Round 15 theme_build (owner 1 Nov 2026 "UI ไหนที่เป็นกรอบข้อความธรรมดา พยายามอ้างอิง UX/UI จาก PC"): the PC SBComponent look for the text
   windows. Paint only: no position/size/z-index/display/margin/padding on any window, so placement, pc-hud.js drag handles (each h2) and the
   round 13 z bands stay as they are. Bitmaps are the PC client's own (/ui/pc/frame/*, provenance in SOURCES.json); 9-slice values from the SWF
   scale grids (research frames.json). border-image is drawn inside the 1px border box (outset 4px = the PC grey halo), never changes layout. */
/* 1. Window frame SBCBg00 (#1E2023 at 90 %, 8px corners, grey halo); popups SBCBGPopup00 (same without the title highlight). */
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.controls-help){border-image:url(/ui/pc/frame/window-frame.png) 20 16 20 16 fill/20px 16px/4px;border-radius:8px;background:none;box-shadow:0 10px 34px #000a;color:#e6dccf;scrollbar-color:#6e5a4f #1c1714}
#gameHud :is(.loot-window,.party-loot,.resurrection-window,.capsule-window,#dungeonWarning,.party-match-role,.party-match-found){border-image:url(/ui/pc/frame/popup-frame.png) 20 16 20 16 fill/20px 16px/4px;border-radius:8px;background:none;box-shadow:0 10px 34px #000a;color:#e6dccf;scrollbar-color:#6e5a4f #1c1714}
#gameHud .merchant-header{background:none;border-bottom-color:#0c0b0a;box-shadow:0 1px #ffffff0d}
/* 2. Title: 14px-class gold #EEBB85 with a 1px black shadow on the frame, faint SBCBgDeco00 band, the window's PC emblem at the top-left. */
#gameHud :is(.game-window,#npcDialog)>h2,#gameHud :is(.travel-menu,.party-window,.arena-window,.capsule-window,.merchant-window,#hotbarEditor)>header h2,#gameHud .loot-heading>h2,#gameHud .resurrection-window>h2,#gameHud .party-loot>h3{color:#eebb85;text-shadow:0 1px 2px #000,0 0 1px #000;font-family:"Microsoft Sans Serif",Tahoma,"Segoe UI",sans-serif;letter-spacing:.4px}
#gameHud .controls-help>b:first-of-type{color:#eebb85;text-shadow:0 1px 2px #000,0 0 1px #000}
#gameHud :is(.game-window,#npcDialog)>h2{background:var(--pc-emblem,none) 10px 50%/auto 40px no-repeat,url(/ui/pc/frame/title-deco.png) 0 0/100% 100% no-repeat;border-bottom-color:#0c0b0a;box-shadow:0 1px #ffffff0f}
#gameHud :is(#skillBook,#inventoryWindow,#characterWindow,#sMatchingWindow,#questLogWindow,#dungeonWarning,.party-match-role,.party-match-found)>h2{padding-left:58px}
#gameHud :is(.travel-menu,.party-window,.arena-window,.capsule-window,#hotbarEditor)>header,#gameHud .loot-heading{background:var(--pc-emblem,none) 0 50%/auto 36px no-repeat}
#gameHud .merchant-header{background:var(--pc-emblem,none) 14px 9px/auto 36px no-repeat}
#gameHud :is(.travel-menu,.party-window,.arena-window,.capsule-window,.merchant-window,#hotbarEditor)>header h2,#gameHud .loot-heading>h2{padding-left:44px}
#gameHud #hotbarEditor>header h2{background:none;border-bottom-color:transparent;box-shadow:none}
#gameHud .controls-help>b:first-of-type{padding-left:34px}
/* Phones: #skillBook / #characterWindow / #hotbarEditor are squeezed to 94vw - 190px (hotbar-editor.css), too narrow for title + emblem
   without a new line, so they keep the plain gold title there (no height change). */
@media(max-width:480px){#gameHud :is(#skillBook,#characterWindow,#hotbarEditor){--pc-emblem:none}#gameHud :is(#skillBook,#characterWindow)>h2{padding-left:18px}#gameHud #hotbarEditor>header h2{padding-left:18px}}
#gameHud .controls-help>b:first-of-type::before{content:"";position:absolute;left:14px;top:9px;width:30px;height:30px;background:var(--pc-emblem,none) 50% 50%/contain no-repeat;pointer-events:none}
#skillBook{--pc-emblem:url(/ui/pc/frame/emblem-skillbuild.png)}#inventoryWindow,#lootWindow{--pc-emblem:url(/ui/pc/frame/emblem-inventory.png)}#characterWindow{--pc-emblem:url(/ui/pc/frame/emblem-character.png)}
#hotbarEditor{--pc-emblem:url(/ui/pc/frame/emblem-skillbook.png)}#questLogWindow{--pc-emblem:url(/ui/pc/frame/emblem-questlist.png)}#sMatchingWindow,.party-match-role,.party-match-found{--pc-emblem:url(/ui/pc/frame/emblem-smartmatching.png)}
.party-window{--pc-emblem:url(/ui/pc/frame/emblem-raid.png)}#travelWindow{--pc-emblem:url(/ui/pc/frame/emblem-worldmap.png)}.arena-window{--pc-emblem:url(/ui/pc/frame/emblem-pvprecord.png)}
.merchant-window{--pc-emblem:url(/ui/pc/frame/emblem-consignment.png)}.capsule-window{--pc-emblem:url(/ui/pc/frame/emblem-cashshop.png)}#dungeonWarning{--pc-emblem:url(/ui/pc/frame/emblem-dungeoninfo.png)}
#actionPreferences{--pc-emblem:url(/ui/pc/frame/emblem-option.png)}#controlsHelp{--pc-emblem:url(/ui/pc/frame/emblem-help.png)}
/* 3. Close SBCloseButton (#587 up / #590 over): the art replaces the × glyph; the button keeps its own size (hit area) and aria-label. */
#gameHud :is(.window-close,#dialogClose,.loot-close,.hotbar-editor-close,.action-settings-close,.travel-menu-close),#gameHud :is(.party-window,.arena-window,.capsule-window)>header>button{border-color:transparent;border-image:none;border-radius:2px;background:url(/ui/pc/frame/close-up.png) 50% 50%/18px 17px no-repeat;box-shadow:none;color:transparent!important;text-shadow:none}
#gameHud :is(.window-close,#dialogClose,.loot-close,.hotbar-editor-close,.action-settings-close,.travel-menu-close):hover,#gameHud :is(.party-window,.arena-window,.capsule-window)>header>button:hover{background:#ffffff0d url(/ui/pc/frame/close-over.png) 50% 50%/18px 17px no-repeat;border-color:transparent}
/* 4. Buttons: SBBtnSmall pill (70x25, caps 15/16) by default, SBButton (98x33, caps 19/20) for footer/primary actions. The art is a border-image
   (fill), so size and padding stay; text 14px-class #E2E4F1, down #AAADC1, disabled grey. Slots, tabs, list rows and close buttons are excluded. */
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.loot-window,.party-loot,.resurrection-window,.capsule-window,#actionPreferences) button:where(:not(.window-close,#dialogClose,.loot-close,.hotbar-editor-close,.action-settings-close,.travel-menu-close,.inventory-slot,.character-slot,.skill-grid-item,.hotbar-editor-cell,.party-match-role-option,.s-matching-tab,.s-matching-group,.skill-branch-tab,.quest-goal)):where(:not(#dialogOptions button,.travel-npcs button,header>button)){border-color:transparent;border-radius:0;border-image-source:var(--pc-up,url(/ui/pc/frame/smallbutton-up.png));border-image-slice:var(--pc-slice,0 16 0 15) fill;border-image-width:var(--pc-cap,0 11px 0 10px);border-image-outset:0;border-image-repeat:stretch;background:none;box-shadow:none;color:#e2e4f1;text-shadow:0 1px 1px #000;opacity:1}
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.loot-window,.party-loot,.resurrection-window,.capsule-window,#actionPreferences) button:where(:not(.window-close,#dialogClose,.loot-close,.hotbar-editor-close,.action-settings-close,.travel-menu-close,.inventory-slot,.character-slot,.skill-grid-item,.hotbar-editor-cell,.party-match-role-option,.s-matching-tab,.s-matching-group,.skill-branch-tab,.quest-goal)):where(:not(#dialogOptions button,.travel-npcs button,header>button)):hover:enabled{border-image-source:var(--pc-over,url(/ui/pc/frame/smallbutton-over.png));background:none;color:#fff}
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.loot-window,.party-loot,.resurrection-window,.capsule-window,#actionPreferences) button:where(:not(.window-close,#dialogClose,.loot-close,.hotbar-editor-close,.action-settings-close,.travel-menu-close,.inventory-slot,.character-slot,.skill-grid-item,.hotbar-editor-cell,.party-match-role-option,.s-matching-tab,.s-matching-group,.skill-branch-tab,.quest-goal)):where(:not(#dialogOptions button,.travel-npcs button,header>button)):active:enabled{border-image-source:var(--pc-down,url(/ui/pc/frame/smallbutton-down.png));color:#aaadc1}
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.loot-window,.party-loot,.resurrection-window,.capsule-window,#actionPreferences) button:where(:not(.window-close,#dialogClose,.loot-close,.hotbar-editor-close,.action-settings-close,.travel-menu-close,.inventory-slot,.character-slot,.skill-grid-item,.hotbar-editor-cell,.party-match-role-option,.s-matching-tab,.s-matching-group,.skill-branch-tab,.quest-goal)):where(:not(#dialogOptions button,.travel-npcs button,header>button)):disabled{border-image-source:var(--pc-off,url(/ui/pc/frame/smallbutton-disabled.png));color:#8c8782;text-shadow:none;opacity:1}
#gameHud :is(.s-matching-footer,.party-match-popup-footer,.arena-actions,.resurrection-actions,.walk-pad-buttons,.inventory-actions,.talent-selector-options,.talent-selector-actions),#gameHud :is(.loot-take-all,.travel-menu-go,.dungeon-settings-submit,.hotbar-editor-reset,.s-matching-arena,.party-window form button,#acceptQuest,#actionResetCamera,#walkPadUseTouch,#mobileLandscapeNow,#purifySoul,#dungeonAccept,#dungeonReject),#gameHud :is(.capsule-window,.resurrection-window)>button{--pc-up:url(/ui/pc/frame/button-up.png);--pc-over:url(/ui/pc/frame/button-over.png);--pc-down:url(/ui/pc/frame/button-down.png);--pc-off:url(/ui/pc/frame/button-disabled.png);--pc-slice:0 20 0 19;--pc-cap:0 14px 0 13px}
#gameHud #acceptQuest{background:none!important;color:#f6e3b4!important}
#gameHud :is(.capsule-window,.resurrection-window)>button,#gameHud .resurrection-accept,#gameHud .loot-take-all{color:#f6e3b4}
#gameHud #questLogWindow .quest-log-yes{color:#ffb7a0}
/* 5. Tabs SBTab (67x25): up #2D2825 / text #B2A8A5, selected #4F453F + gold top line / white, disabled #292929. */
#gameHud .s-matching :is(.s-matching-tab,.s-matching-group),#gameHud .skill-branch-tab{border-color:transparent;border-radius:0;border-image:url(/ui/pc/frame/tab-up.png) 0 7 fill/0 7px;background:none;box-shadow:none;color:#b2a8a5;text-shadow:0 1px 1px #000}
#gameHud .s-matching :is(.s-matching-tab,.s-matching-group):hover:enabled,#gameHud .skill-branch-tab:hover:enabled{border-image-source:url(/ui/pc/frame/tab-up.png);background:none;color:#ece4dc;filter:brightness(1.18)}
#gameHud .s-matching :is(.s-matching-tab,.s-matching-group)[aria-selected="true"],#gameHud .skill-branch-tab[aria-pressed="true"]{border-image-source:url(/ui/pc/frame/tab-selected.png);background:none;color:#fff;filter:none}
#gameHud .s-matching :is(.s-matching-tab,.s-matching-group):disabled{border-image-source:url(/ui/pc/frame/tab-disabled.png);color:#6e655e;opacity:1}
/* 6. Content panel SBCBg01 (#231D1A, edge #100F0F) behind the main list of each window; SBSortBg table header; SBListItemRenderer rows. */
#gameHud :is(.s-matching-scroll,.quest-log-list,.skill-book-list,.hotbar-editor-rows,.travel-menu-list,.loot-list,.merchant-items){background:#231d1a;box-shadow:inset 0 0 0 1px #100f0f,inset 0 1px 0 1px #4c473e33}
#gameHud :is(#equipmentList,#bagList,.character-body,.controls-help dl){background:#231d1a;box-shadow:0 0 0 5px #231d1a,0 0 0 6px #100f0f}
#gameHud .s-matching-table th{background:url(/ui/pc/frame/sort-bar.png) 0 0/100% 100% no-repeat;border-bottom-color:transparent;color:#d9c39b}
#gameHud .s-matching-table td{border-bottom-color:#ffffff0d;color:#b2a8a5}
#gameHud .s-matching-table td.s-col-name{color:#e8ded4}
#gameHud .s-matching-row:hover td,#gameHud .s-matching-row.selected td{background:url(/ui/pc/frame/list-row.png) 0 0/100% 100% no-repeat;color:#fff}
#gameHud :is(#dialogOptions button,.travel-npcs button){border-color:transparent;border-bottom-color:#ffffff12;border-radius:0;background:none;box-shadow:none;color:#d8cec6}
#gameHud :is(#dialogOptions button,.travel-npcs button):hover:enabled{background:url(/ui/pc/frame/list-row.png) 0 0/100% 100% no-repeat;border-color:transparent;color:#fff}
#gameHud :is(.quest-log-row,.travel-menu-row,.loot-row,.merchant-item,.s-matching-emblem,.skill-tree-branch,.skill-tree-choice,.talent-selector,.dungeon-settings){background:#1a1613;border-color:#100f0f;box-shadow:inset 0 1px #ffffff0a}
#gameHud .quest-log-row{border-left-color:#8f7c52}#gameHud .quest-log-row.complete{border-left-color:#7fa86f}#gameHud .quest-log-row.focused{border-color:#b89766;border-left-color:#d8bd7c}
/* 7. Notes / confirm boxes: the PC tooltip box (#2A241E, gold top highlight, #FEFBE0 text). */
#gameHud :is(.quest-log-notice,.quest-log-confirm,.s-matching-info,.s-matching-queue,.inventory-detail,.talent-selector-confirmation){border-color:transparent;border-image:url(/ui/pc/frame/tooltip.png) 6 16 6 16 fill/6px 16px;background:none;box-shadow:none}
#gameHud :is(.quest-log-confirm p,.s-matching-info p,.s-matching-queue p,.inventory-detail p){color:#fefbe0}
/* 8. Text: PC secondary #B2A8A5, values white, headings gold. Inputs dark with a bronze edge. */
#gameHud :is(.skill-book-count,#inventoryStatus,.quest-log-count,.s-matching-self,.s-matching-status:not(.warn),.travel-menu-status,.travel-menu-note,.travel-menu-empty,.travel-menu-requirements,.party-window small,.party-window [role=status],.controls-help dd,#actionPreferences p,#actionPreferences label,.loot-status,.loot-description small,.merchant-note,.merchant-header .merchant-status,.resurrection-status,.arena-note,.party-loot-note,.party-loot-status,.party-match-role-note,.party-match-found-role,.talent-selector-current,.talent-selector-status,.skill-tree-status,.dungeon-settings-current,.dungeon-settings-note,.skill-grid-hint,.hotbar-editor-help,.character-stats dt,.character-stats h3,.skill-book-row p,.quest-log-goal:not(.done)){color:#b8aea7}
#gameHud :is(#dialogText,.character-stats dd,.controls-help dt,.s-matching-emblem p){color:#ece4da}
#gameHud :is(.inventory-heading,.skill-grid-heading,.travel-menu-destination,.s-matching-info b,.s-matching-queue b,.quest-log-row h3,.dungeon-settings-title,.talent-selector-title,.skill-tree-title,#actionPreferences :is(.walk-pad-settings,.mobile-settings)>b){color:#eebb85}
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.loot-window,.party-loot,.resurrection-window,.capsule-window,#actionPreferences) :is(input:not([type=checkbox],[type=range]),select){background:#120f0d;border-color:#4d4038;color:#efe6da}
#gameHud :is(.game-window,#npcDialog,.travel-menu,.party-window,.merchant-window,.arena-window,.loot-window,.party-loot,.resurrection-window,.capsule-window,#actionPreferences) input:is([type=checkbox],[type=range]){accent-color:#c9a26b}
/* PC check box (dark square, bronze edge) only where the box already has an explicit 18px size, so appearance:none cannot resize it. */
#gameHud :is(.s-matching,#actionPreferences,.merchant-filter) input[type=checkbox]{appearance:none;-webkit-appearance:none;padding:0;border:1px solid #7a6656;border-radius:2px;background:#0d0b0a;box-shadow:inset 0 1px 3px #000}
#gameHud :is(.s-matching,#actionPreferences,.merchant-filter) input[type=checkbox]:checked{background:#d8b47a;box-shadow:inset 0 0 0 3px #0d0b0a,inset 0 0 6px 3px #f3dca6}
#gameHud :is(.s-matching-scroll,.quest-log-list,.skill-book-list,.merchant-body,.skill-book-row p,.inventory-detail p){scrollbar-color:#6e5a4f #1c1714}

/* Round 15 review: keep the state cues the theme must not flatten (F1 S.Matching pass/fail/unavailable, F4 learned talents). */
#gameHud .s-matching-table tr td.fail{color:#e3926f}
#gameHud .s-matching-table tr td.pass{color:#a9d3a0}
#gameHud .s-matching-table tr.unavailable td.s-col-name{color:#bdb6a4}
#gameHud .skill-tree-choice.is-learned{border-color:#a28e59;background:#2f2a21}
