/* Web182 3090: formal-only adjustments for the ported preview stylesheets. The formal base button (style.css: border,
   padding 7px 10px, min-height 38px, inset shadow) is not part of the preview's base, so the ported HUD controls reset
   it here to match the approved preview. The ported preview files stay as they are. */
.game :is(.hunt-zone-experience,.hunt-map-memory button,.hunt-map-regions button){min-height:0;box-shadow:none}
/* Tracker (UI r125 item 25): the approved preview's adventure-book.css differs from the formal one only in the tracker
   width (x14 y94 w282 instead of w240); the formal long-title rules stay. */
.game .quest-glass{width:282px}
/* Bag footer (UI r125 item 5): the formal bag keeps its five actions (使用 檢視 丟棄 保護 移動位置); in the approved 224 px
   right panel they sit in two rows of three cells, 一鍵整理 taking the sixth cell, so no label wraps. */
@layer web182-ui{
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) #original-inventory.m-right-panel .mw-footer{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:28px!important;height:60px!important;min-height:60px!important;flex:0 0 60px!important;padding:3px 0 0!important;gap:4px!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) #original-inventory.m-right-panel .mw-footer .mw-button{white-space:nowrap!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) #original-inventory.m-right-panel .mw-inv-tidy{width:calc((100% - 32px) / 3)!important;right:12px!important;bottom:8px!important}
}
/* Trade (UI item 11): the formal trade adds two notice lines (core result rule, bag capacity) that the preview did not
   have; they take the trade's small detail type so the three columns keep their height. */
@layer web182-ui-trade{
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) #dialog.hunt-player-trade .mw-dlg-trade-notices :is(p,.mw-note){margin:0!important;font:11px/16px 'Microsoft JhengHei',sans-serif!important;color:#c8c2ae!important}
}
/* Market (UI item 10, r102「觸控直向滾動」): the formal listing rows (.world-service-row, 10 per page with 上一頁／下一頁)
   sit directly in the catalog; in the approved full-height panel the catalog scrolls vertically by touch, and the rows take
   the approved row look (the preview's .market-item). Paging, buying, listing and claims stay the formal ones. */
@layer web182-ui{
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) .lm-market .market-catalog{gap:0!important;overflow-y:auto!important;overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch;scrollbar-width:thin!important;scrollbar-color:#a38b54 #101615!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) .lm-market .market-catalog .world-service-row{background:#22251c!important;border:0!important;border-image:none!important;border-bottom:1px solid #a18b5833!important;box-shadow:none!important;touch-action:pan-y!important;flex:none!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) .lm-market .market-catalog .world-service-row.selected{background:linear-gradient(180deg,#73603c,#423821 52%,#65512e)!important;outline:1px solid #dec28a!important;outline-offset:-1px!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) .lm-market .market-catalog .world-service-row{min-height:36px!important;height:auto!important;padding:3px 5px!important;margin:0!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) .lm-market .market-catalog .world-service-row>.market-columns{flex:1!important;min-width:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) 29px 48px!important;padding:0!important;margin:0!important;font-size:11px!important;background:none!important;border:0!important}
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) .lm-market .market-catalog .world-service-row>.market-columns>*{font:inherit!important;font-weight:400!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
}
/* 副本 (UI items 24 / 26): 隊伍管理 in the standalone window's header is a blue top tab like the 冒險誌 tabs (r131). */
.game .hunt-instance-dialog [data-mode=party-manage]{--quest-tab-top:#305779;--quest-tab-bottom:#192f45;--quest-tab-edge:#648bae}
/* 練功／輔助 settings (UI items 14..21): the formal #dialog is shown as a modal, which places it in the top layer outside the
   scaled game stage, so the approved centred box is scaled by the stage scale as well (the preview opened it inside #stage). */
@layer web182-ui{
:is(#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage#stage,.game) #dialog#dialog#dialog.m-settings-max[open]{position:fixed!important;transform:translate(-50%,-50%) scale(calc(var(--settings-enlarge,1) * var(--pc-stage-scale,1)))!important}
}
/* r131 (UI item 24)「上排大標籤統一藍色；只有關閉紅色」: also the 任務 shell shown when the server offers no quest service
   (mobile-locked-features.js, window .mw-quest), same blue as the 冒險誌 top tabs; the selected tab keeps the gold frame. */
@layer web182-ui-run{:is(#stage,.game) .mw-quest .mw-locked-tabs>button{background:linear-gradient(180deg,#305779,#192f45)!important;border-image:none!important;border:1px solid #648bae!important;color:#f2ead7!important;filter:none!important;box-shadow:inset 0 1px #ffffff12!important;text-shadow:0 1px 2px #000!important}
:is(#stage,.game) .mw-quest .mw-locked-tabs>button.selected{border-color:#e2c26c!important;box-shadow:inset 0 0 0 1px #e2c26c,0 0 6px #e2c26c55!important}}
/* The approved clan / social layout gives #dialog display:flex!important without [open]; the formal window keeps its class
   after 關閉, so a closed 血盟 or 好友／封鎖 window stayed on screen. A closed dialog is never shown. */
@layer web182-ui-run{:is(#stage,.game) #dialog:is(.pc-clan-dialog,.pc-social-dialog):not([open]){display:none!important}}
/* 操作說明 (UI item 38): 觸控手勢 opens the formal gesture list; same height as the search box. */
:is(#stage,.game) .player-guide .pg-gestures{flex:none;height:30px;min-height:0;padding:0 12px;font-size:12px;box-shadow:none}

/* The body retains six-pixel side margins from the mobile skin. width:100%
   added those margins outside the dialog and clipped right-hand controls.
   Stretch to the available inner width, keeping header/footer and body scrolling. */
@layer web182-ui-run{
 .game #dialog.m-settings-max #dialogbody{width:auto!important;min-width:0!important;max-width:100%!important;align-self:stretch!important}
}
