/* Desktop sizing: no mobile input mode or changes to the game renderer. */
/* Match the mission dialog backdrop; keep the HUD and canvas behind it.
   Above administrative HUD tools (155), below alerts and confirmations. */
body.web-equipment-ui #pveStoreModal,
body.web-equipment-ui #pveInventoryModal {
    z-index:160;
    background:rgba(1,6,14,.76);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}
body.web-equipment-ui #pveInventoryModal .pve-modal-shell { width:min(1600px,100%); height:min(940px,100%); animation:none; }
body.web-equipment-ui #pveInventoryModal .pve-touch-sections { grid-template-rows:repeat(4,auto); }
body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group { overflow:visible; }
body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-label { overflow-wrap:anywhere; }
body.web-equipment-ui #pveInventoryModal button:focus-visible,
body.web-equipment-ui #pveStoreModal button:focus-visible { outline:2px solid #b4f1ff; outline-offset:2px; }
body.web-equipment-ui #pveInventoryModal .pve-touch-detail-drawer .pve-touch-hint { font-size:12px; line-height:1.5; }
@media (min-width:901px) and (min-height:501px) {
    body.web-equipment-ui #pveInventoryModal { padding:16px; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-header { min-height:65px; padding:12px 17px; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-title strong { font-size:clamp(16px,1.3vw,22px); }
    body.web-equipment-ui #pveInventoryModal .pve-configuration-tabs,
    body.web-equipment-ui #pveInventoryModal .pve-loadout-tabs { min-height:53px; padding:7px; }
    body.web-equipment-ui #pveInventoryModal .pve-configuration-tab,
    body.web-equipment-ui #pveInventoryModal .pve-loadout-tab { min-height:38px; font-size:12px; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-body { padding:10px; gap:10px; }
    body.web-equipment-ui #pveInventoryModal #pveShipInventoryPanel { padding:8px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-sections { --pve-slot-size:clamp(48px,calc((100cqh - 65px) / 6),78px); gap:8px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group { padding:8px; gap:9px; grid-template-columns:clamp(150px,11vw,180px) minmax(0,1fr); }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-label { font-size:12px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-grid { gap:5px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-name { font-size:10px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-icon { height:calc(var(--pve-slot-size) - 22px); }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-vector-icon { width:calc(var(--pve-slot-size) - 22px); height:calc(var(--pve-slot-size) - 22px); }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-elite { font-size:7px; }
    body.web-equipment-ui #pveInventoryModal #pveOwnedItems { grid-template-columns:repeat(auto-fill,minmax(105px,1fr)); gap:8px; }
    body.web-equipment-ui #pveInventoryModal .pve-inventory-dropzone { padding:10px; }
    body.web-equipment-ui #pveInventoryModal .pve-category-tab { font-size:10px; min-height:37px; }
    body.web-equipment-ui #pveInventoryModal #pveOwnedCount { font-size:11px; white-space:normal; }
    body.web-equipment-ui #pveInventoryModal #pveInventoryUpgradeButton { font-size:10px; min-height:33px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-detail-drawer { left:8px; right:8px; bottom:8px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-detail-drawer .pve-stats-strip { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:12px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-detail-drawer .pve-selection { padding:12px; }
}
@media (max-width:1100px) and (min-width:901px) {
    body.web-equipment-ui #pveInventoryModal .pve-inventory-toolbar .pve-panel-heading { flex-wrap:wrap; }
    body.web-equipment-ui #pveInventoryModal .pve-category-tab { font-size:8px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group { grid-template-columns:125px minmax(0,1fr); }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-label { font-size:10px; }
}

/* Shared station/inventory scrollbars, including the ships service body. */
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal),
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) * {
    scrollbar-width:thin;
    scrollbar-color:#219db4 #071923;
}
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) ::-webkit-scrollbar { width:8px; height:8px; }
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) ::-webkit-scrollbar-track { background:#071923; border-radius:8px; }
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) ::-webkit-scrollbar-thumb {
    background:#219db4; border:2px solid #071923; border-radius:8px;
}
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) ::-webkit-scrollbar-thumb:hover { background:#54ddf0; }
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) ::-webkit-scrollbar-corner { background:#071923; }
body.web-equipment-ui :is(#pveStoreModal,#pveInventoryModal) ::-webkit-scrollbar-button { display:none; }

/* Desktop windows: fixed reading scale and visible world around the panels.
   Touch devices and small viewports retain their existing layouts/targets. */
@media (min-width:1000px) and (min-height:600px) and (hover:hover) and (pointer:fine) {
    body.web-equipment-ui #pveStoreModal,
    body.web-equipment-ui #pveInventoryModal {
        padding:0;
    }
    body.web-equipment-ui #pveStoreModal { --store-scale:1px; }
    body.web-equipment-ui #pveStoreModal .pve-store-shell {
        box-sizing:border-box;
        width:min(1080px,84vw);
        height:min(720px,84vh);
        max-width:calc(100vw - 64px);
        max-height:calc(100vh - 64px);
        border-radius:14px;
        background:linear-gradient(150deg,rgba(5,20,32,.98),rgba(2,10,19,.98));
        box-shadow:0 12px 36px rgba(0,0,0,.42),0 0 0 1px rgba(46,168,199,.12);
    }
    body.web-equipment-ui #pveInventoryModal .pve-modal-shell {
        box-sizing:border-box;
        width:min(1140px,86vw);
        height:min(750px,86vh);
        max-width:calc(100vw - 64px);
        max-height:calc(100vh - 64px);
        border-radius:14px;
        box-shadow:0 12px 36px rgba(0,0,0,.42),0 0 0 1px rgba(46,168,199,.12);
    }
    body.web-equipment-ui #pveStoreModal .pve-modal-header {
        min-height:54px; padding:9px 13px; gap:12px;
    }
    body.web-equipment-ui #pveStoreModal .store-atlas-mark { width:36px; height:36px; }
    body.web-equipment-ui #pveStoreModal .pve-modal-title { min-width:0; }
    body.web-equipment-ui #pveStoreModal .pve-modal-title strong { font-size:16px; letter-spacing:2px; }
    body.web-equipment-ui #pveStoreModal .pve-modal-title span { font-size:11px; letter-spacing:.5px; }
    body.web-equipment-ui #pveStoreModal #pveStoreBalance { font-size:13px; }
    body.web-equipment-ui #pveStoreModal .pve-header-balance > span { font-size:9px; }
    body.web-equipment-ui #pveStoreModal .pve-store-tabs { gap:6px; padding:7px 9px; }
    body.web-equipment-ui #pveStoreModal .pve-store-tab { min-height:33px; padding:6px; gap:8px; font-size:10px; }
    body.web-equipment-ui #pveStoreModal .pve-store-tab .store-glyph { width:18px; height:18px; }
    body.web-equipment-ui #pveStoreModal #pveStoreCatalogView { grid-template-columns:minmax(0,2fr) minmax(245px,1fr); gap:10px; }
    body.web-equipment-ui #pveStoreModal .store-catalog-heading strong { font-size:12px; letter-spacing:.5px; }
    body.web-equipment-ui #pveStoreModal .store-secure { display:none; }
    body.web-equipment-ui #pveStoreModal .pve-category-tab { font-size:8px; gap:4px; }
    body.web-equipment-ui #pveStoreModal .pve-category-tab .store-glyph { display:none; }
    body.web-equipment-ui #pveStoreModal #pveCatalogItems .pve-item-card {
        grid-template-columns:46px minmax(0,1fr) 26px;
        min-height:78px; padding:9px; column-gap:9px;
    }
    body.web-equipment-ui #pveStoreModal #pveCatalogItems .pve-item-card > .pve-item-icon { width:46px; height:48px; }
    body.web-equipment-ui #pveStoreModal #pveCatalogItems .pve-item-card > strong { font-size:11px; }
    body.web-equipment-ui #pveStoreModal #pveCatalogItems .pve-item-card > small { font-size:10px; }
    body.web-equipment-ui #pveStoreModal #pveCatalogItems .pve-price { font-size:12px; }
    body.web-equipment-ui #pveStoreModal #pveCatalogSelectionPanel { padding:14px; }
    body.web-equipment-ui #pveStoreModal .store-welcome > strong { font-size:12px; }
    body.web-equipment-ui #pveStoreModal .store-welcome > span { font-size:10px; }
    body.web-equipment-ui #pveStoreModal .store-welcome p { font-size:12px; }
    body.web-equipment-ui #pveStoreModal .store-welcome img { max-height:220px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView { --ref-size:11px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .pve-refinery-upgrade {
        grid-template-columns:minmax(0,1.6fr) minmax(105px,.7fr) minmax(120px,.8fr) minmax(160px,1fr);
        gap:7px; padding:8px;
    }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-overview { gap:8px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-overview > .refinery-glyph { width:30px; height:30px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-overview strong { font-size:11px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-metric { padding:7px; gap:6px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-metric .refinery-glyph { width:20px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-stage { grid-template-columns:110px minmax(0,1fr); }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .refinery-flow { margin-left:140px; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .pve-refinery-tree-heading { flex-wrap:wrap; }
    body.web-equipment-ui #pveStoreModal #pveStoreRefineryView .pve-refinery-tree-heading em { margin-left:auto; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-header { min-height:54px; padding:9px 13px; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-title { min-width:0; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-title strong { font-size:16px; letter-spacing:1.5px; }
    body.web-equipment-ui #pveInventoryModal .pve-configuration-tabs,
    body.web-equipment-ui #pveInventoryModal .pve-loadout-tabs { min-height:44px; padding:5px 7px; }
    body.web-equipment-ui #pveInventoryModal .pve-configuration-tab,
    body.web-equipment-ui #pveInventoryModal .pve-loadout-tab { min-height:32px; font-size:10px; }
    body.web-equipment-ui #pveInventoryModal .pve-modal-body { padding:8px; gap:8px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-sections { --pve-slot-size:clamp(44px,calc((100cqh - 70px) / 6),60px); gap:6px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group { grid-template-columns:135px minmax(0,1fr); gap:7px; padding:6px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-label { font-size:10px; }
    body.web-equipment-ui #pveInventoryModal .pve-touch-slot-group .pve-slot-name { font-size:9px; }
    body.web-equipment-ui #pveInventoryModal .pve-category-tab { min-height:31px; font-size:8px; }
    body.web-equipment-ui #pveInventoryModal #pveOwnedItems { grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:6px; }
}
