/* Special cargo and salvage: one full-game information screen, shared custom scrollbar. */
.pq-app .pq-items-dialog { --cargo-gold:#ecd096; --cargo-ink:#082630; color:#e9e4cb; font-size:var(--pq-font-default); }
.pq-app .pq-items-dialog .gr-dialog__body { display:block; width:min(100%,1500px); padding:18px 24px 22px; justify-content:initial; }
.pq-app .pq-items-dialog :where(button,span,p,strong,b,h3,div) { font-size:inherit; }
.pq-items-shell { min-width:0; }
.pq-items-battle { position:sticky; top:-1px; z-index:3; display:grid; grid-template-columns:minmax(150px,1fr) auto; align-items:center; gap:20px; padding:10px 14px; margin:0 0 14px; border:1px solid #87ab9b; border-radius:12px; background:#10363f; box-shadow:0 6px 12px #02192155; }
.pq-items-battle-hull { min-width:0; }.pq-items-battle-hull__row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 14px; line-height:1.2; }.pq-items-battle-hull__row>span { display:flex; align-items:center; gap:8px; color:#bdd6c1; }.pq-items-battle-hull__row>strong { color:#f0dfb1; font-weight:500; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pq-items-battle-meter { height:8px; margin-top:7px; overflow:hidden; border:1px solid #617f70; border-radius:4px; background:#051e29; }.pq-items-battle-meter>span { display:block; height:100%; background:linear-gradient(90deg,#72b6a5,#b5d2a5); }.pq-items-battle--danger .pq-items-battle-meter>span { background:linear-gradient(90deg,#c46d56,#e5a27a); }
.pq-items-battle-turn { display:flex; align-items:center; justify-content:flex-end; gap:12px; min-width:0; color:#d0d8bd; line-height:1.2; text-align:right; }.pq-items-battle-turn>span { min-width:0; }.pq-items-battle-turn>[data-items-clock] { flex:none; }.pq-items-battle-turn>[data-items-clock][hidden] { display:none; }
.pq-items-toolbar { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.pq-items-warning { display:flex; align-items:center; gap:14px; padding:14px 16px; margin-bottom:16px; border:1px solid #d6b274; border-radius:12px; background:#b88b3b15; color:#f4d8a2; }
.pq-items-warning>svg { flex:none; }
.pq-items-warning>span { flex:1; line-height:1.35; }
.pq-items-warning strong { color:#ffe0a6; }
.pq-items-warning>.pq-button { flex:none; }
.pq-items-notice { display:flex; align-items:center; gap:12px; margin-bottom:16px; padding:12px 16px; border:1px solid #719e91; border-radius:10px; color:#bddcca; background:#113d43; line-height:1.35; }
.pq-items-notice[hidden] { display:none; }.pq-items-notice>span { flex:1; min-width:0; overflow-wrap:anywhere; }
.pq-items-notice--error { color:#f4c8ad; background:#573e352e; border-color:#bb8d74; }
.pq-items-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(310px,.9fr); gap:24px; align-items:start; }
.pq-app .pq-items-layout--no-detail { grid-template-columns:minmax(0,1fr); }.pq-item-detail[hidden] { display:none; }
.pq-items-cargo,.pq-item-detail { min-width:0; }
.pq-items-section-title { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin:0 0 14px; }
.pq-app .pq-items-section-title h3 { margin:0; color:#dcc899; font:inherit; font-weight:500; line-height:1.25; overflow-wrap:anywhere; }
.pq-items-section-title>span { color:#99b9ae; line-height:1.25; }
.pq-items-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.pq-app .pq-item-slot { position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:center; gap:4px; width:100%; min-width:0; min-height:172px; margin:0; padding:10px 8px 14px; border:1px solid #74968b; border-radius:15px; background:radial-gradient(ellipse at 50% 28%,#74b7a01b,transparent 70%),linear-gradient(155deg,#173c44,#08232e); color:#d9dfcc; font:inherit; line-height:1.16; text-align:center; cursor:pointer; transition:border-color .15s,background .15s,transform .15s; }
.pq-item-slot__shine { position:absolute; z-index:-1; inset:0; border-radius:inherit; background:linear-gradient(140deg,#d8e5cb0b,transparent 55%); pointer-events:none; }
.pq-item-slot__art { display:flex; align-items:center; justify-content:center; flex:none; height:110px; width:100%; }
.pq-item-art { display:block; flex:none; max-width:100%; overflow:visible; filter:drop-shadow(0 7px 5px #00151b50); }
.pq-item-slot__name { display:block; min-width:0; width:100%; overflow-wrap:anywhere; }
.pq-item-slot--rare,.pq-item-slot--legendary { border-color:#aa9c7b; }
.pq-app .pq-item-slot--selected { border:2px solid var(--item-accent,#ead096); padding:9px 7px 13px; background:radial-gradient(ellipse at 50% 20%,#becb9326,transparent 80%),#153e45; box-shadow:0 0 0 3px #d2bc8021,inset 0 0 30px #c6ba7610; }
.pq-item-slot:hover { border-color:#e2d1a3; background-color:#17434a; }.pq-item-slot:active { transform:translateY(1px); }
.pq-app .pq-item-slot--empty { justify-content:center; min-height:172px; gap:14px; border:1px dashed #64887c70; background:#08263080; color:#88a89a; cursor:default; }
.pq-item-slot--empty>span:first-child { color:#6f958b; opacity:.6; }
.pq-item-detail { position:sticky; top:0; padding:22px; border:1px solid #a5aa81; border-radius:17px; background:radial-gradient(ellipse at 50% 0,#637c6033,transparent 70%),#092934; box-shadow:inset 0 1px #d7d4ac12; }
.pq-item-detail__identity { display:flex; flex-direction:column; gap:12px; align-items:center; text-align:center; }
.pq-item-detail__art { position:relative; display:flex; align-items:center; justify-content:center; width:190px; height:180px; border-radius:50%; background:radial-gradient(circle,#a5c9a823,transparent 68%); }
.pq-item-detail__art::before { content:''; position:absolute; inset:12px; border:1px solid #b7c79c26; border-radius:50%; }
.pq-item-detail__art::after { content:''; position:absolute; inset:24px; border:1px solid #c6cdad12; border-radius:50%; }
.pq-item-kind { color:var(--item-accent,#d8c48e); text-transform:capitalize; line-height:1.2; }
.pq-app .pq-item-detail h3 { margin:6px 0 0; color:#f0dfb6; font-size:var(--pq-font-heading); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.15; overflow-wrap:anywhere; text-transform:none; letter-spacing:normal; }
.pq-app .pq-item-detail .pq-item-description { margin:16px 0; color:#b8cfc1; line-height:1.45; }
.pq-item-effects { display:grid; gap:9px; margin:18px 0; }
.pq-item-effect { display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:44px; padding:9px 12px; border:1px solid #aac3a92b; border-radius:9px; color:#bfd4c2; background:#99b7a509; }
.pq-item-effect strong { color:#f1d697; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pq-item-effect__amount { display:flex; flex-direction:column; align-items:flex-end; gap:3px; }.pq-item-effect__cap { display:block; color:#9ab8a9; font-weight:400; }
.pq-item-effect--damage { color:#efb58f; }.pq-item-effect--hull { color:#a9d6bd; }.pq-item-effect--crew { color:#b7cdee; }.pq-item-effect--supplies { color:#cedba5; }
.pq-item-curio { display:flex; align-items:center; gap:12px; min-height:44px; padding:12px; border:1px solid #bda5d838; border-radius:9px; color:#d0bce4; background:#b9a2d50a; line-height:1.35; }
.pq-item-curio>svg { flex:none; }
.pq-item-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.pq-app .pq-item-actions .pq-button { display:flex; justify-content:center; align-items:center; gap:10px; flex:1 1 150px; min-width:44px; min-height:52px; padding:10px 12px; font:inherit; line-height:1.2; }
.pq-item-actions .pq-button>svg { flex:none; }
.pq-app .pq-item-toss { background:#873f3e; color:#fff1e3; border:1px solid #e9a195; }
.pq-app .pq-item-toss:hover:not(:disabled) { background:#9b4844; border-color:#ffc3b5; }
.pq-app .pq-item-detail .pq-item-reason { margin:12px 0 0; color:#aec7bc; font-size:var(--pq-font-default); line-height:1.35; }
.pq-items-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:180px; padding:20px 12px; text-align:center; color:#9fc3b5; }
.pq-app .pq-items-empty h3 { margin:0; color:#d9ceaa; font-size:var(--pq-font-heading); }
.pq-app .pq-items-empty p { margin:0; color:#a8c4b6; line-height:1.4; }
.pq-items-footer { position:sticky; bottom:-1px; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px 0 0; margin-top:20px; background:linear-gradient(transparent,#0b2c36 16px); }
.pq-app .pq-items-done { display:flex; align-items:center; justify-content:center; gap:12px; min-height:56px; min-width:44px; padding:10px 18px; font:inherit; }
.pq-app .pq-items-discard-all { border-color:#e9a195; background:#873f3e; color:#fff1e3; }
.pq-app .pq-items-discard-all:hover:not(:disabled) { border-color:#ffc3b5; background:#9b4844; }
.pq-app .pq-items-collect { display:flex; align-items:center; justify-content:center; gap:10px; min-height:56px; min-width:44px; padding:10px 18px; }
.pq-items-footer:has(.pq-items-collect) { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:stretch; }
.pq-app .pq-items-dialog button:disabled { opacity:.48; cursor:default; }
@media (min-width:1250px) { .pq-items-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media (max-width:1050px) { .pq-items-layout { grid-template-columns:minmax(0,1.35fr) minmax(270px,1fr); gap:18px; }.pq-items-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }.pq-item-detail { padding:18px; }.pq-item-detail__art { width:150px; height:140px; }.pq-item-detail__art .pq-item-art { width:136px; height:136px; }.pq-app .pq-item-slot { min-height:166px; } }
@media (max-width:760px) { .pq-app .pq-items-dialog .gr-dialog__body { padding:12px 16px 16px; }.pq-items-toolbar { align-items:stretch; flex-wrap:wrap; gap:10px; margin-bottom:14px; }.pq-items-tabs { flex:1 0 100%; }.pq-items-tab { flex:1; }.pq-items-layout { grid-template-columns:minmax(0,1fr); gap:16px; }.pq-items-cargo { order:2; }.pq-item-detail { order:1; position:static; padding:16px; }.pq-item-detail__identity { flex-direction:row; align-items:center; text-align:left; gap:16px; }.pq-item-detail__art { width:112px; height:110px; flex:none; }.pq-item-detail__art .pq-item-art { width:108px; height:108px; }.pq-item-effects { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }.pq-item-effect { grid-template-columns:28px minmax(0,1fr); gap:7px; padding:9px; }.pq-item-effect strong { grid-column:2; }.pq-items-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }.pq-item-slot__art { height:94px; }.pq-item-slot__art .pq-item-art { width:92px; height:92px; }.pq-app .pq-item-slot { min-height:148px; }.pq-items-footer { gap:10px; }.pq-items-warning { flex-wrap:wrap; gap:10px; }.pq-items-warning>span { flex:1 1 180px; }.pq-items-warning>.pq-button { margin-left:42px; } }
@media (max-width:420px) { .pq-app .pq-items-dialog .gr-dialog__head { padding:8px 12px; gap:8px; }.pq-app .pq-items-dialog .gr-dialog__head h2 { font-size:var(--pq-font-heading); }.pq-app .pq-items-dialog .gr-dialog__body { padding:10px 12px 14px; }.pq-app .pq-items-tab { gap:6px; padding:9px 8px; min-height:48px; }.pq-items-tab>svg { display:none; }.pq-items-tab>b { padding:2px 5px; }.pq-item-detail { padding:12px; }.pq-item-detail__art { width:82px; height:88px; }.pq-item-detail__art .pq-item-art { width:84px; height:84px; }.pq-item-detail__identity { gap:10px; }.pq-app .pq-item-detail h3 { font-size:var(--pq-font-heading); }.pq-item-effects { grid-template-columns:minmax(0,1fr); }.pq-item-effect { grid-template-columns:28px minmax(0,1fr) auto; }.pq-item-effect strong { grid-column:auto; }.pq-items-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.pq-app .pq-items-done{ padding:10px; gap:8px; }.pq-items-footer { align-items:stretch; }.pq-items-footer>button { flex:1; }.pq-items-notice { flex-wrap:wrap; padding:10px; }.pq-item-actions .pq-button { flex-basis:100%; } }
@media (max-height:500px) and (min-width:500px) { .pq-app .pq-items-dialog .gr-dialog__head { padding:4px 14px; }.pq-app .pq-items-dialog .gr-dialog__head h2 { font-size:var(--pq-font-heading); }.pq-app .pq-items-dialog .gr-dialog__body { padding:10px 16px; }.pq-items-toolbar { flex-wrap:nowrap; gap:12px; margin-bottom:12px; }.pq-items-tabs { flex:1; }.pq-app .pq-items-tab { min-height:44px; padding:8px 10px; gap:8px; }.pq-items-tab>svg { display:none; }.pq-items-layout { grid-template-columns:minmax(0,1fr) minmax(260px,1.2fr); gap:16px; }.pq-items-cargo { order:initial; }.pq-item-detail { order:initial; padding:12px; position:sticky; }.pq-item-detail__identity { flex-direction:row; gap:10px; text-align:left; }.pq-item-detail__art { width:70px; height:74px; }.pq-item-detail__art .pq-item-art { width:74px; height:74px; }.pq-app .pq-item-detail h3 { font-size:var(--pq-font-heading); }.pq-app .pq-item-description { margin:10px 0; }.pq-item-effects { grid-template-columns:minmax(0,1fr); gap:6px; margin:10px 0; }.pq-item-effect { grid-template-columns:28px minmax(0,1fr) auto; min-height:44px; padding:7px 9px; }.pq-item-effect strong { grid-column:auto; }.pq-items-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.pq-app .pq-item-slot,.pq-app .pq-item-slot--empty { min-height:130px; }.pq-item-slot__art { height:76px; }.pq-item-slot__art .pq-item-art { width:76px; height:76px; }.pq-items-section-title { margin-bottom:8px; }.pq-item-actions { margin-top:10px; gap:8px; }.pq-app .pq-item-actions .pq-button { flex-basis:100%; min-height:44px; padding:8px 10px; }.pq-items-footer { margin-top:12px; padding-top:12px; }.pq-app .pq-items-done{ min-height:44px; padding:8px 12px; }.pq-items-warning { padding:10px 12px; margin-bottom:12px; }.pq-items-warning>.pq-button { min-height:44px; padding:8px 12px; } }

@media (max-width:420px) {.pq-items-footer>.pq-items-done { flex:1; } }
@media (max-width:650px) { .pq-items-footer:has(.pq-items-collect) { grid-template-columns:minmax(0,1fr); gap:12px; }.pq-items-footer>.pq-items-discard-all { min-width:0; white-space:normal; }.pq-items-footer>.pq-items-discard-all>svg { flex:0 0 28px; } }
/* Leave a real gutter for the common custom rail at every viewport size. */
.pq-app .pq-items-dialog .gr-dialog__body.gr-scroll-needed { padding-right:48px; }
@media (max-width:760px) { .pq-items-warning { flex-wrap:nowrap; padding:10px 12px; gap:10px; }.pq-items-warning>svg { display:none; }.pq-items-warning>span { flex:1; min-width:0; }.pq-items-warning>.pq-button { margin:0; padding:8px 10px; min-height:44px; } }
@media (max-width:420px) { .pq-items-battle { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:9px 10px; gap:12px; }.pq-items-battle-hull__row>span>svg { display:none; }.pq-items-battle-turn { display:grid; grid-template-columns:minmax(0,1fr); gap:5px; }.pq-items-battle-turn>strong { min-width:0; } }
@media (max-height:500px) and (min-width:500px) { .pq-items-footer { position:static; }.pq-items-battle { padding:8px 12px; margin-bottom:10px; grid-template-columns:minmax(150px,1fr) auto; }.pq-items-battle-hull__row>span>svg { display:none; } }

/* During short live turns, every carried item is one nearby touch away. */
@media (max-width:650px) and (min-height:501px) {
 .pq-items-dialog--battle .pq-items-cargo { order:0; }
 .pq-items-dialog--battle .pq-item-detail { order:1; }
 .pq-items-dialog--battle .pq-items-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; }
 .pq-app .pq-items-dialog--battle .pq-item-slot { min-height:56px; padding:4px; gap:0; border-radius:9px; }
 .pq-app .pq-items-dialog--battle .pq-item-slot--selected { padding:3px; }
 .pq-items-dialog--battle .pq-item-slot__art { width:100%; height:44px; }
 .pq-items-dialog--battle .pq-item-slot__art .pq-item-art { width:44px; height:44px; filter:none; }
 .pq-items-dialog--battle .pq-item-slot__name,.pq-items-dialog--battle .pq-item-slot--empty>span:last-child { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
 .pq-items-dialog--battle .pq-item-slot--empty { gap:0; }
 .pq-items-dialog--battle .pq-item-slot--empty>span:first-child svg { width:28px; height:28px; }
 .pq-app .pq-items-dialog--battle .pq-item-detail .pq-item-description { display:none; }
}

/* The current battle item has one persistent Use action, never a second copy. */
.pq-app .pq-items-use { min-height:56px; min-width:44px; padding:10px 16px; gap:10px; font:inherit; }
@media (max-width:650px) {.pq-items-dialog--battle .pq-items-footer>.pq-items-done { flex:1 1 0; min-width:0; padding:10px; gap:8px; }.pq-items-dialog--battle .pq-items-footer>.pq-items-done>svg { display:none; }
}

@media (max-width:650px) and (min-height:501px) {
 .pq-items-dialog--battle.pq-items-dialog--single .pq-items-toolbar { display:none; }
 .pq-items-dialog--battle .pq-item-detail__art,.pq-items-dialog--battle .pq-item-kind { display:none; }
 .pq-items-dialog--battle .pq-item-detail__identity { display:block; }
 .pq-app .pq-items-dialog--battle .pq-item-detail h3 { margin:0; }
 .pq-items-dialog--battle .pq-item-effects { margin:10px 0; }
}

/* Empty holds stay welcoming without crowding a phone's first view. */
.pq-items-empty__mobile-copy { display:none; }
@media (max-width:760px) {
 .pq-item-detail--empty { padding:12px; }
 .pq-item-detail--empty .pq-items-empty { display:grid; grid-template-columns:64px minmax(0,1fr); gap:4px 12px; min-height:0; padding:0; text-align:left; justify-content:start; }
 .pq-item-detail--empty .pq-items-empty>.pq-item-art { grid-row:1 / span 2; width:64px; height:64px; }
 .pq-app .pq-item-detail--empty .pq-items-empty h3 { margin:0; font-size:var(--pq-font-heading); line-height:1.2; }
 .pq-item-detail--empty .pq-items-empty p { line-height:1.25; }
 .pq-items-empty__desktop-copy { display:none; }
 .pq-items-empty__mobile-copy { display:inline; }
}

/* Functional actions stay with the item; discarding has its own separated row. */
.pq-app .pq-item-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; }
.pq-app .pq-item-use-row,.pq-app .pq-item-discard-row { min-width: 0; }
.pq-app .pq-item-use-row>.pq-button,.pq-app .pq-item-discard-row>.pq-button { width: 100%; }
.pq-app .pq-item-use-row>.pq-item-reason { margin: 10px 0 0; }
.pq-app .pq-item-discard-row { margin-top: 24px; padding-top: 18px; border-top: 1px solid #60877e; }
.pq-app .pq-item-actions>.pq-item-discard-row:only-child { margin-top: 0; }
.pq-items-footer { justify-content: flex-end; }
.pq-items-footer:has(.pq-items-collect) { justify-content: stretch; }
.pq-item-passive-benefit,.pq-item-passive-duration { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #6c9b8d; border-radius: 8px; background: #092f38; color: #bddbc8; line-height: 1.3; }
.pq-item-passive-benefit>svg,.pq-item-passive-duration>svg { flex: 0 0 28px; color: #ecd29c; }
.pq-item-passive-duration strong { font-weight: 600; color: #f1d9a5; }
.pq-app .pq-map-salvage-choice { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; min-width: 0; }
.pq-app .pq-map-salvage-choice>p { margin: 0; line-height: 1.35; }
.pq-app .pq-map-salvage-choice>.pq-button { width: 100%; min-width: 0; white-space: normal; }

/* Build146: cargo and item details have independent bounded scroll surfaces. */
.pq-app .pq-items-dialog .gr-dialog__body { display:block; flex:1 1 0; min-height:0; height:0; overflow:hidden; width:100%; padding:12px 16px; }
.pq-app .pq-items-dialog .gr-dialog__body.gr-scroll-needed { padding-right:16px; }
.pq-items-shell { height:100%; min-height:0; display:flex; flex-direction:column; }
.pq-items-shell>.pq-items-battle,.pq-items-shell>.pq-items-toolbar,.pq-items-shell>.pq-items-warning,.pq-items-shell>.pq-items-notice,.pq-items-shell>.pq-items-footer { flex:0 0 auto; }
.pq-app .pq-items-layout { flex:1 1 0; min-height:0; overflow:hidden; grid-template-columns:minmax(0,1.45fr) minmax(280px,1fr); align-items:stretch; gap:16px; }
.pq-items-pane { position:relative; min-width:0; min-height:0; height:100%; overflow:hidden; }
.pq-items-pane[hidden] { display:none; }
.pq-app .pq-items-cargo,.pq-app .pq-item-detail { height:100%; min-height:0; position:static; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.pq-app .pq-items-cargo { padding:4px 6px 12px 4px; }
.pq-app .pq-item-detail { padding:16px; }
.pq-app .pq-items-cargo.gr-scroll-needed { padding-right:40px; }
.pq-app .pq-item-detail.gr-scroll-needed { padding-right:44px; }
.pq-items-pane>.gr-scrollbar { z-index:4; }
.pq-items-pane .gr-scroll-viewport::-webkit-scrollbar { display:none; }
.pq-app .pq-items-layout--no-detail { grid-template-columns:minmax(0,1fr); }
.pq-app .pq-items-footer { position:static; min-height:44px; padding:10px 0 0; margin-top:0; background:#0b2c36; gap:10px; }
.pq-app .pq-items-done,.pq-app .pq-items-collect { min-height:44px; padding:8px 14px; }
.pq-items-shell>.pq-items-warning,.pq-items-shell>.pq-items-notice { padding:8px 12px; margin-bottom:10px; line-height:1.25; }
.pq-items-shell>.pq-items-toolbar { margin-bottom:10px; }
@media(max-width:760px){
 .pq-app .pq-items-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(100px,.9fr) minmax(120px,1.1fr); gap:10px; }
 .pq-app .pq-items-layout--no-detail { grid-template-rows:minmax(0,1fr); }
 .pq-items-pane--cargo { order:0; }.pq-items-pane--detail { order:1; }
 .pq-app .pq-items-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 .pq-app .pq-item-slot,.pq-app .pq-item-slot--empty { min-height:112px; padding:6px; gap:3px; }
 .pq-app .pq-item-slot--selected { padding:5px; }
 .pq-app .pq-item-slot__art { height:70px; }.pq-app .pq-item-slot__art .pq-item-art { width:70px; height:70px; }
 .pq-app .pq-item-detail { padding:12px; }.pq-app .pq-item-detail__identity { flex-direction:row; gap:10px; text-align:left; }
 .pq-app .pq-item-detail__art { display:flex; flex:0 0 72px; width:72px; height:72px; }.pq-app .pq-item-detail__art .pq-item-art { width:72px; height:72px; }
 .pq-app .pq-item-detail h3 { font-size:var(--pq-font-heading); line-height:1.2; }
 .pq-app .pq-item-kind { display:block; }.pq-app .pq-item-detail .pq-item-description { display:block; margin:10px 0; line-height:1.35; }
 .pq-app .pq-item-actions { margin-top:12px; }.pq-app .pq-item-discard-row { margin-top:12px; padding-top:12px; }
 .pq-app .pq-item-effects { grid-template-columns:minmax(0,1fr); gap:8px; margin:10px 0; }
 .pq-app .pq-item-slot__name { position:static; width:100%; height:auto; margin:0; clip-path:none; white-space:normal; }
}
@media(max-width:420px){
 .pq-app .pq-items-dialog .gr-dialog__body { padding:8px 10px; }
 .pq-app .pq-items-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pq-app .pq-items-dialog .gr-dialog__head h2 { font-size:var(--pq-font-heading); }
 .pq-app .pq-items-warning { font-size:var(--pq-small180); }
 .pq-app .pq-items-warning>svg { display:none; }
}
@media(max-height:500px) and (min-width:500px){
 .pq-app .pq-items-layout { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); grid-template-rows:minmax(0,1fr); gap:12px; }
 .pq-app .pq-items-layout--no-detail { grid-template-columns:minmax(0,1fr); }
 .pq-app .pq-items-dialog .gr-dialog__body { padding:6px 10px; }
 .pq-app .pq-items-dialog .gr-dialog__head { padding:3px 12px; min-height:50px; }
 .pq-app .pq-items-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
 .pq-app .pq-item-slot,.pq-app .pq-item-slot--empty { min-height:108px; padding:5px; }
 .pq-app .pq-item-slot--selected { padding:4px; }
 .pq-app .pq-item-slot__art { height:58px; }.pq-app .pq-item-slot__art .pq-item-art { width:58px; height:58px; }
 .pq-app .pq-item-detail { padding:10px; }.pq-app .pq-item-detail__identity { flex-direction:row; gap:8px; text-align:left; }
 .pq-app .pq-item-detail__art { flex:0 0 60px; width:60px; height:60px; }.pq-app .pq-item-detail__art .pq-item-art { width:60px; height:60px; }
 .pq-app .pq-item-detail h3 { font-size:var(--pq-font-heading); line-height:1.2; }
 .pq-app .pq-item-detail .pq-item-description { margin:8px 0; line-height:1.3; }
 .pq-app .pq-items-footer { padding-top:6px; }.pq-app .pq-items-footer>.pq-button { min-height:44px; padding:6px 12px; }
 .pq-items-shell>.pq-items-warning,.pq-items-shell>.pq-items-notice,.pq-items-shell>.pq-items-toolbar,.pq-items-shell>.pq-items-battle { margin-bottom:6px; }
}
/* Expedition cargo: choose an actual second held item; the server resolves it. */
.pq-app .pq-item-combine150 { width:100%; margin-top:8px; justify-content:center; }
.pq-app .pq-combine150 { padding:14px; border:1px solid #b99b63; border-radius:12px; background:linear-gradient(145deg,#123e49,#092b37); }
.pq-app .pq-combine150 h4 { margin:0 0 8px; font-size:var(--pq-small180); color:#ffe1a6; }
.pq-app .pq-combine150>p { font-size:var(--pq-body180); line-height:1.5; margin:0 0 12px; color:#d1ded4; }
.pq-app .pq-combine-grid150 { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin-bottom:12px; max-height:none; overflow:visible; }
.pq-app .pq-combine-item150 { min-width:0; display:flex; align-items:center; gap:8px; min-height:64px; padding:6px; border:1px solid #588580; border-radius:8px; color:#eee5ca; background:#0b2936; cursor:pointer; text-align:left; font:inherit; font-size:var(--pq-small180); line-height:1.3; }
.pq-app .pq-combine-item150 span { min-width:0; overflow-wrap:anywhere; }
.pq-app .pq-combine-item150 svg { flex:0 0 48px; width:48px; height:48px; }
.pq-app .pq-combine-item150:hover,.pq-app .pq-combine-item150:focus-visible { border-color:#f1ca7a; background:#1c4b51; outline:2px solid #f1ca7a; outline-offset:2px; }
.pq-app .pq-combine-item150:disabled { opacity:.5; cursor:wait; }
.pq-app .pq-item-quest150 { padding:10px; border:1px solid #7caa97; border-radius:8px; color:#bce5cb; line-height:1.4; }
@media(max-width:420px){.pq-app .pq-combine-grid150 { grid-template-columns:minmax(0,1fr); }}

/* Activated charms have their own view; hold space is reserved for cargo. */
.pq-app .pq-salvage-confirm155 { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; max-width:520px; margin:0 auto; padding:24px 12px; text-align:center; }
.pq-app .pq-salvage-confirm155__art { display:flex; justify-content:center; color:#edcf8c; }
.pq-app .pq-salvage-confirm155 h3 { margin:0; color:#ffe1a6; font-size:var(--pq-font-heading); line-height:1.25; }
.pq-app .pq-salvage-confirm155 p { margin:0 0 6px; color:#c7dbcf; font-size:var(--pq-body180); line-height:1.45; }
.pq-app .pq-salvage-confirm155>.pq-button { min-width:0; width:100%; white-space:normal; }
.pq-app .pq-items-footer[hidden] { display:none; }
@media(max-height:500px){.pq-app .pq-salvage-confirm155 { gap:10px; padding:6px 12px; }.pq-app .pq-salvage-confirm155__art { display:none; }}
.pq-app .pq-items-dialog .pq-items-tabs { width:100%; }
.pq-app .pq-items-dialog .pq-items-tab { flex:1 1 0; min-width:0; }
.pq-app .pq-items-dialog .pq-items-tab>span { min-width:0; overflow-wrap:anywhere; }
.pq-app .pq-items-dialog [data-items-tab="gear"]>span { overflow-wrap:normal; }
.pq-app .pq-items-section-title>span { text-align:right; overflow-wrap:normal; }
@media(max-width:500px){.pq-app .pq-items-tabs:has([data-items-tab="loot"]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }.pq-app .pq-items-section-title { align-items:flex-start; }.pq-app .pq-items-section-title>span { max-width:130px; }}
.pq-app .pq-item-slot--effect152 { border-color:#9cc6b1; background:radial-gradient(ellipse at 50% 24%,#8ed3b926,transparent 72%),linear-gradient(155deg,#17434a,#082a36); }
.pq-app .pq-item-slot__duration152 { display:block; margin-top:4px; color:#b6e3ca; font-size:var(--pq-small180); line-height:1.3; }
.pq-app .pq-effect-cargo152 { display:flex; align-items:center; gap:8px; margin:4px 0 0; color:#a9c8bc; font-size:var(--pq-small180); line-height:1.4; }
.pq-app .pq-effect-cargo152>svg { flex:0 0 24px; }
.pq-app .pq-effects-empty152 { min-height:220px; max-width:520px; margin:auto; }
.pq-app button.pq-active-powerup { width:100%; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.pq-app button.pq-active-powerup:hover { border-color:#d6cf94; background-color:#17454c; }
.pq-app button.pq-active-powerup:focus-visible { outline:2px solid #f0d291; outline-offset:3px; }
.pq-app .pq-active-powerup__name152 { display:block; color:#f1dfb5; font-weight:500; line-height:1.2; overflow-wrap:anywhere; }
.pq-app .pq-active-powerup__benefit152 { display:block; margin:8px 0; color:#b8cebb; line-height:1.35; overflow-wrap:anywhere; }
.pq-app .pq-items-shell { position:relative; }
.pq-app .pq-items-toast152 { position:absolute; z-index:8; left:50%; bottom:62px; transform:translateX(-50%); display:flex; align-items:center; gap:10px; width:max-content; max-width:min(680px,calc(100% - 16px)); padding:12px 16px; border:1px solid #abd4b5; border-radius:12px; background:#123e45fa; box-shadow:0 8px 26px #00182199,inset 0 1px #dff0cc25; color:#e8efd2; font-size:var(--pq-small180); line-height:1.4; pointer-events:none; }
.pq-app .pq-items-toast152>svg { flex:0 0 24px; color:#c1edbc; }
.pq-app .pq-items-toast152>span { min-width:0; overflow-wrap:anywhere; }
.pq-app .pq-items-toast152[hidden] { display:none; }
.pq-app .pq-items-toast152--error { border-color:#f0ae91; background:#502d34fa; color:#fff0db; }
.pq-app .pq-items-toast152 .pq-button { flex:0 0 auto; min-height:44px; padding:6px 12px; font-size:var(--pq-font-button); pointer-events:auto; }
.pq-app .pq-items-toast-dismiss155 { display:inline-flex; flex:0 0 32px; align-items:center; justify-content:center; width:32px; min-height:44px; padding:4px; border:0; color:inherit; background:transparent; cursor:pointer; pointer-events:auto; }
.pq-app .pq-items-toast-dismiss155:focus-visible { outline:2px solid #f3d48e; border-radius:6px; }
.pq-app .pq-items-toast152--recovery155 { padding:6px; width:auto; }
@media(max-width:500px){.pq-app .pq-items-toast152 { flex-wrap:wrap; justify-content:center; }.pq-app .pq-items-toast152>span { flex:1 1 160px; }}
@media(max-width:760px){
 .pq-app .pq-items-dialog .pq-items-toolbar { flex-wrap:nowrap; }
 .pq-app .pq-items-dialog .pq-items-tab { padding:8px; gap:6px; font-size:var(--pq-small180); min-height:48px; }
 .pq-app .pq-items-dialog .pq-items-tab>svg { display:none; }
 .pq-app .pq-items-dialog .pq-items-tab>b { padding:2px 5px; }
 .pq-app .pq-item-slot__duration152 { font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog .pq-items-section-title { margin-bottom:10px; gap:10px; }
 .pq-app .pq-items-dialog .pq-items-section-title>span { font-size:var(--pq-small180); }
 .pq-app .pq-items-toast152 { bottom:60px; padding:10px 12px; font-size:var(--pq-small180); }
}
@media(max-height:500px) and (min-width:500px){
 .pq-app .pq-items-dialog .pq-items-tab { font-size:var(--pq-small180); min-height:44px; padding:6px 10px; }
 .pq-app .pq-items-toast152 { bottom:54px; padding:8px 12px; font-size:var(--pq-small180); }
 .pq-app .pq-item-slot__duration152 { font-size:var(--pq-small180); }
}

/* Inventory cards grow with their complete labels, including compact battles.
   The cargo pane scrolls; a card must never squeeze its title below its border. */
.pq-app .pq-items-dialog .pq-items-grid { grid-auto-rows:max-content; align-items:stretch; align-content:start; }
.pq-app .pq-items-dialog .pq-items-grid>.pq-item-slot { box-sizing:border-box; height:auto; max-height:none; aspect-ratio:auto; justify-content:flex-start; align-self:stretch; overflow:visible; white-space:normal; }
.pq-app .pq-items-dialog .pq-items-grid>.pq-item-slot--empty { justify-content:center; }
.pq-app .pq-items-dialog .pq-items-grid .pq-item-slot__art { flex:0 0 auto; min-width:0; max-width:100%; }
.pq-app .pq-items-dialog .pq-items-grid .pq-item-slot__art>.pq-item-art { flex:0 1 auto; width:auto; height:100%; max-width:100%; max-height:100%; object-fit:contain; }
.pq-app .pq-items-dialog .pq-items-grid .pq-item-slot__name,
.pq-app .pq-items-dialog .pq-items-grid>.pq-item-slot--empty>span:last-child,
.pq-app .pq-items-dialog .pq-items-grid .pq-item-slot__duration152 { position:static; flex:0 0 auto; width:100%; min-width:0; height:auto; max-height:none; margin:0; padding:0; overflow:visible; clip:auto; clip-path:none; white-space:normal; word-break:normal; overflow-wrap:anywhere; text-overflow:clip; font-size:var(--pq-small180); line-height:1.25; }
.pq-app .pq-items-dialog .pq-items-grid .pq-item-slot__duration152 { margin-top:4px; }
.pq-app .pq-item-slot--equipped156 { border-color:#8de2ba; box-shadow:inset 0 0 0 1px #8de2ba80,0 4px 12px #00192235; }
.pq-app .pq-items-dialog .pq-item-equipped156 { position:absolute; top:8px; left:8px; z-index:2; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; padding:3px; border:1px solid #9be8ba; border-radius:50%; color:#c8f5da; background:#154f46; font-size:var(--pq-small180); line-height:1; }
.pq-item-equipped156 svg { flex:0 0 20px; width:20px; height:20px; }
.pq-gear-state156 { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid #6b989b; border-radius:10px; font-size:var(--pq-small180); color:#c2d7db; }
.pq-gear-state156--equipped { color:#c8f5da; border-color:#8de2ba; background:#154f4640; }

/* A pending find is a local review choice, never a connection failure. */
.pq-app .pq-salvage-review158 { display:flex; flex-wrap:wrap; gap:10px; padding:14px; border:1px solid #b99b63; border-radius:12px; background:linear-gradient(145deg,#123e49,#092b37); }
.pq-app .pq-salvage-review158 h4 { flex:1 0 100%; margin:0; font-size:var(--pq-small180); color:#ffe1a6; }
.pq-app .pq-salvage-review158 p { flex:1 0 100%; margin:0 0 2px; font-size:var(--pq-body180); line-height:1.5; color:#d1ded4; }
.pq-app .pq-salvage-review158 .pq-button { flex:1 1 auto; min-height:44px; }

/* Compact inventory uses one full-height grid or one item detail view.
   The inventory owns its width policy independently of the ocean scene. */
@media (max-width:860px) {
 .pq-app .pq-items-dialog--portrait162 { font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .gr-dialog__body { padding:8px 12px 12px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-layout,
 .pq-app .pq-items-dialog--portrait162 .pq-items-layout--no-detail { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:0; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-toolbar[hidden] { display:none; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-toolbar { margin-bottom:8px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-tabs,
 .pq-app .pq-items-dialog--portrait162 .pq-items-tabs:has([data-items-tab="loot"]) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-tabs:not(:has([data-items-tab="loot"])) { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .pq-app .pq-items-dialog--portrait162 .pq-items-tabs:not(:has([data-items-tab="effects"])) { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .pq-app .pq-items-dialog--portrait162 .pq-items-tab { min-height:44px; padding:6px; gap:4px; font-size:var(--pq-small180); line-height:1.2; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-tab>b { padding:2px 4px; font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-items-cargo { padding:3px 3px 10px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-cargo.gr-scroll-needed { padding-right:26px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-detail.gr-scroll-needed { padding-right:32px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-section-title { gap:8px; margin-bottom:8px; align-items:center; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-section-title h3 { font-size:var(--pq-small180); line-height:1.3; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-section-title>span { font-size:var(--pq-small180); max-width:145px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-grid>.pq-item-slot { min-height:117px; padding:7px 5px; gap:4px; border-radius:12px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-grid>.pq-item-slot--selected { padding:6px 4px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-slot__art { height:68px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-grid .pq-item-slot__name,
 .pq-app .pq-items-dialog--portrait162 .pq-items-grid>.pq-item-slot--empty>span:last-child,
 .pq-app .pq-items-dialog--portrait162 .pq-items-grid .pq-item-slot__duration152 { font-size:var(--pq-small180); line-height:1.25; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-equipped156 { top:5px; left:5px; width:23px; height:23px; padding:2px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-equipped156 svg { width:17px; height:17px; flex-basis:17px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-back162 { flex:0 0 auto; margin-bottom:8px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-back162>.pq-button { min-height:44px; padding:7px 10px; font-size:var(--pq-font-button); }
 .pq-app .pq-items-dialog--portrait162 .pq-items-back162>.pq-button>svg { transform:rotate(180deg); }
 .pq-app .pq-items-dialog--portrait162 .pq-item-detail { padding:14px; border-radius:14px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-detail__identity { gap:12px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-detail__art { flex:0 0 92px; width:92px; height:100px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-detail__art .pq-item-art { width:92px; height:92px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-detail h3 { font-size:var(--pq-font-heading); line-height:1.2; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-kind { font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-item-description,
 .pq-app .pq-items-dialog--portrait162 .pq-item-quest150 { font-size:var(--pq-body180); line-height:1.45; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-effects { grid-template-columns:minmax(0,1fr); }
 .pq-app .pq-items-dialog--portrait162 .pq-item-effect { grid-template-columns:26px minmax(0,1fr) auto; min-height:48px; padding:9px; gap:8px; font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-item-effect strong { grid-column:auto; font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-item-effect>svg { width:26px; height:26px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-actions .pq-button,
 .pq-app .pq-items-dialog--portrait162 .pq-items-footer>.pq-button { min-height:44px; padding:9px 10px; font-size:var(--pq-font-button); line-height:1.25; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-reason { font-size:var(--pq-small180); line-height:1.4; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-footer { padding-top:8px; gap:8px; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-footer>.pq-button { flex:1 1 0; min-width:0; }
 .pq-app .pq-items-dialog--portrait162 .pq-gear-state156,
 .pq-app .pq-items-dialog--portrait162 .pq-item-powerup-benefit,
 .pq-app .pq-items-dialog--portrait162 .pq-item-powerup-duration,
 .pq-app .pq-items-dialog--portrait162 .pq-effect-cargo152 { font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-combine-grid150 { grid-template-columns:minmax(0,1fr); }
 .pq-app .pq-items-dialog--portrait162 .pq-combine-item150 { min-height:52px; font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-items-toast152 { bottom:58px; max-width:calc(100% - 8px); padding:8px 10px; font-size:var(--pq-small180); line-height:1.35; }
 .pq-app .pq-items-dialog--portrait162 .pq-items-toast152 .pq-button { font-size:var(--pq-font-button); }
 .pq-app .pq-items-dialog--portrait162 .pq-salvage-confirm155 { padding:12px 3px; gap:10px; }
 .pq-app .pq-items-dialog--portrait162 .pq-salvage-confirm155 h3 { font-size:var(--pq-small180); }
 .pq-app .pq-items-dialog--portrait162 .pq-salvage-confirm155 p { font-size:var(--pq-body180); }
 .pq-app .pq-items-dialog--portrait162 input,
 .pq-app .pq-items-dialog--portrait162 select,
 .pq-app .pq-items-dialog--portrait162 textarea { font-size:var(--pq-body180); }
}

/* The timed update itself is its dismissal target; recovery retains its own action. */
.pq-app .pq-items-toast-message165{display:flex;align-items:center;gap:10px;flex:1;min-width:0;min-height:44px;padding:0;border:0;background:none;color:inherit;text-align:left;font:inherit;line-height:inherit;cursor:pointer}.pq-app .pq-items-toast-message165 span{min-width:0;overflow-wrap:anywhere}.pq-app .pq-items-toast-message165 svg{flex:none}.pq-app .pq-items-toast-message165:focus-visible{outline:2px solid #f1ca7a;outline-offset:3px;border-radius:5px}

/* Status marks share the left corner; abilities belong to the opposite side. */
.pq-item-markers { position:absolute; top:8px; left:8px; z-index:2; display:grid; grid-template-columns:20px 16px; grid-template-rows:repeat(2,20px); gap:3px; align-items:start; pointer-events:none; }
.pq-app .pq-items-dialog .pq-item-markers :is(.pq-item-equipped156,.pq-item-purchased) { position:static; grid-column:1; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:20px; height:20px; padding:2px; }
.pq-app .pq-items-dialog .pq-item-markers .pq-item-equipped156>svg { width:15px; height:15px; flex:0 0 15px; }
.pq-item-purchased { border:1px solid #f2d395; border-radius:50%; color:#ffe7ac; background:#473d25; font:700 14px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; box-shadow:0 2px 4px #00151b80; }
.pq-app .pq-items-dialog .pq-item-markers .pq-item-badges178 { position:static; grid-column:2; grid-row:1 / span 2; display:flex; flex-direction:column; align-items:center; gap:3px; width:16px; margin:0; padding:0; border:0; border-radius:0; background:none; color:#f3d79e; }
.pq-app .pq-items-dialog .pq-item-markers .pq-item-badges178:only-child { grid-column:1; }
.pq-app .pq-items-dialog .pq-item-markers .pq-item-badges178>svg { display:block; flex:0 0 16px; width:16px; height:16px; padding:1px; box-sizing:border-box; border-radius:4px; background:#082b37e8; }
.pq-app .pq-item-detail .pq-item-purchase-note { display:flex; gap:8px; align-items:center; margin:12px 0; color:#ebd49c; font-size:var(--pq-small180); line-height:1.4; overflow-wrap:anywhere; }
.pq-item-purchase-note>span { display:inline-flex; align-items:center; justify-content:center; flex:none; width:23px; height:23px; border:1px solid #bca572; border-radius:50%; font-weight:700; }
@media(max-width:860px) {
 .pq-app .pq-items-dialog--portrait162 .pq-item-markers { top:5px; left:5px; }
}

/* Compact ability marks overlap the artwork; no extra row is reserved. */
.pq-app .pq-items-dialog .pq-item-slot { container-type:inline-size; container-name:pq-item166; }
.pq-app .pq-items-dialog .pq-item-slot__art { position:relative; }
.pq-app .pq-items-dialog .pq-item-slot__abilities166 { position:absolute; top:0; right:0; z-index:2; display:flex; flex-direction:column; align-items:center; gap:3px; width:20px; margin:0; pointer-events:none; }
.pq-app .pq-items-dialog .pq-item-ability166 { display:inline-flex; flex:0 0 20px; box-sizing:border-box; align-items:center; justify-content:center; width:20px; height:20px; border:1px solid #9db9aa59; border-radius:5px; color:#e5d9b3; background:#0a2d37e8; box-shadow:0 1px 3px #00151b80; }
.pq-app .pq-items-dialog .pq-item-ability166>svg { display:block; flex:0 0 15px; width:15px; height:15px; }
.pq-app .pq-items-dialog .pq-item-ability166--cannon { color:#edb899; }
.pq-app .pq-items-dialog .pq-item-ability166--repair { color:#b6dbc0; }
.pq-app .pq-items-dialog .pq-item-ability166--shield { color:#b6d9d1; }
.pq-app .pq-items-dialog .pq-item-ability166--supplies { color:#c9ddb1; }
.pq-app .pq-items-dialog .pq-item-ability166--people { color:#c3d8e6; }
.pq-app .pq-items-dialog .pq-item-ability166--coin { color:#edce8c; }
.pq-app .pq-items-dialog .pq-item-ability166--help { color:#cbbddd; }
@media(max-width:860px) {
 .pq-app .pq-items-dialog--portrait162 .pq-item-slot__abilities166 { width:18px; gap:2px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-ability166 { flex-basis:18px; width:18px; height:18px; border-radius:4px; }
 .pq-app .pq-items-dialog--portrait162 .pq-item-ability166>svg { flex-basis:14px; width:14px; height:14px; }
}
@container pq-item166 (max-width:90px) {
 .pq-app .pq-items-dialog .pq-item-markers { grid-template-columns:18px 14px; grid-template-rows:repeat(2,18px); gap:2px; }
 .pq-app .pq-items-dialog .pq-item-markers :is(.pq-item-equipped156,.pq-item-purchased) { width:18px; height:18px; font-size:12px; }
 .pq-app .pq-items-dialog .pq-item-markers .pq-item-equipped156>svg { width:13px; height:13px; flex-basis:13px; }
 .pq-app .pq-items-dialog .pq-item-markers .pq-item-badges178 { width:14px; gap:2px; }
 .pq-app .pq-items-dialog .pq-item-markers .pq-item-badges178>svg { width:14px; height:14px; flex-basis:14px; }
 .pq-app .pq-items-dialog .pq-item-slot__abilities166 { width:14px; gap:1px; }
 .pq-app .pq-items-dialog .pq-item-ability166 { flex-basis:14px; width:14px; height:14px; border-radius:3px; }
 .pq-app .pq-items-dialog .pq-item-ability166>svg { flex-basis:11px; width:11px; height:11px; }
}

/* Item filters share the primary button's ink and artwork. Selected filters
   change the view, so they never become the dialog's Enter action. */
.pq-app .pq-items-dialog :is(.pq-cargo-filters197,.pq-gear-filters178) { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.pq-app .pq-items-dialog :is(.pq-cargo-filters197,.pq-gear-filters178) .pq-button { min-height:44px; min-width:0; padding:7px 10px; gap:6px; font-size:var(--pq-small180); white-space:normal; }
.pq-app .pq-items-dialog :is(.pq-cargo-filters197,.pq-gear-filters178) .pq-button>svg { flex:none; width:24px; height:24px; filter:none; }
.pq-app .pq-items-dialog :is(.pq-cargo-filters197,.pq-gear-filters178) .pq-button[aria-pressed=true],
.pq-app .pq-items-dialog .pq-items-tab[aria-selected=true] { color:var(--gr-control-ink,#153e3d)!important; }
.pq-app .pq-items-dialog :is(.pq-cargo-filters197,.pq-gear-filters178) .pq-button[aria-pressed=true]>span,
.pq-app .pq-items-dialog .pq-items-tab[aria-selected=true]>span { color:inherit!important; }
.pq-app .pq-items-dialog .pq-items-make-room197 { margin-top:14px; }
.pq-app .pq-items-dialog .pq-salvage-use197 { margin-top:12px; }

/* Exact partner choices retain the same purchase/protection markers as cargo. */
.pq-app .pq-combine-markers230 { display:inline-flex; align-items:center; gap:4px; flex:0 0 auto; margin-left:auto; }
.pq-app .pq-combine-item150 .pq-combine-markers230 svg { width:18px; height:18px; flex:0 0 18px; }

/* The protection toggle belongs to the selected item's illustration. At the
 * five-item limit it stays focusable so its unavailable reason can be read. */
.pq-app .pq-items-dialog .pq-item-detail__art>.pq-item-lock233 { position:absolute; z-index:2; top:0; right:0; display:flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; min-width:44px; min-height:44px; padding:7px; border:1px solid #b6c9b67a; border-radius:50%; background:#0a2b35; color:#e9d6a3; cursor:pointer; box-shadow:0 2px 8px #00182055; }
.pq-app .pq-items-dialog .pq-item-lock233.is-protected { color:#f5d17f; border-color:#d7b671; background:#21434a; }
.pq-app .pq-items-dialog .pq-item-lock233.is-unavailable { opacity:.45; cursor:not-allowed; }
.pq-app .pq-items-dialog .pq-item-lock233:focus-visible { outline:3px solid #c3e1d5; outline-offset:3px; }
.pq-app .pq-items-dialog .pq-item-lock233:hover:not(:disabled):not(.is-unavailable) { border-color:#f5d17f; background:#25484e; }
.pq-app .pq-items-dialog .pq-item-lock233:disabled { opacity:.45; cursor:wait; }
.pq-app .pq-items-dialog .pq-item-lock233>svg { flex:none; width:28px; height:28px; pointer-events:none; }
/* Detail statistics grow with their wrapped label. Do not compress a long
   effect row to the minimum touch height or share a fixed-height grid track. */
#piratequest-app .pq-items-dialog .pq-item-detail .pq-item-effects{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-auto-rows:max-content;align-content:start;align-items:stretch;flex:0 0 auto;min-width:0;width:100%;height:auto;min-height:min-content;max-height:none;gap:10px;box-sizing:border-box}
#piratequest-app .pq-items-dialog .pq-item-detail .pq-item-effect{display:grid;grid-template-columns:28px minmax(0,1fr) max-content;grid-template-rows:minmax(min-content,max-content);grid-auto-rows:max-content;align-items:center;align-content:start;gap:10px;flex:0 0 auto;min-width:0;width:100%;height:auto;min-height:44px;max-height:none;padding:11px 12px;box-sizing:border-box;overflow:visible;line-height:1.35}
#piratequest-app .pq-items-dialog .pq-item-detail .pq-item-effect>svg{position:static;grid-column:1;grid-row:1;align-self:center;display:block;flex:none;width:28px;height:28px;min-width:0;max-width:100%;margin:0}
#piratequest-app .pq-items-dialog .pq-item-detail .pq-item-effect>span{position:static;grid-column:2;grid-row:1;align-self:center;display:block;min-width:0;max-width:100%;height:auto;min-height:0;max-height:none;margin:0;white-space:normal;word-break:normal;overflow-wrap:anywhere;line-height:1.35}
#piratequest-app .pq-items-dialog .pq-item-detail .pq-item-effect>strong{grid-column:3;grid-row:1;align-self:center;justify-self:end;height:auto;min-height:0;max-height:none;margin:0;white-space:nowrap;line-height:1.35}
#piratequest-app .pq-items-dialog .pq-item-detail :is(.pq-gear-state156,.pq-item-powerup-benefit,.pq-item-powerup-duration,.pq-item-passive-benefit,.pq-item-passive-duration,.pq-item-curio){flex:0 0 auto;min-width:0;height:auto;min-height:44px;max-height:none;box-sizing:border-box;line-height:1.35}
#piratequest-app .pq-items-dialog .pq-item-detail :is(.pq-gear-state156,.pq-item-powerup-benefit,.pq-item-powerup-duration,.pq-item-passive-benefit,.pq-item-passive-duration,.pq-item-curio)>:is(span,strong){min-width:0;max-width:100%;height:auto;max-height:none;white-space:normal;word-break:normal;overflow-wrap:anywhere;line-height:1.35}
#piratequest-app .pq-items-dialog .pq-item-detail__identity>div:last-child { min-width:0; }
#piratequest-app .pq-items-dialog .pq-item-detail__identity h3 { word-break:normal; overflow-wrap:anywhere; }
@media(max-width:860px) {
 #piratequest-app .pq-items-dialog--portrait162 .pq-items-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 #piratequest-app .pq-items-dialog--portrait162 .pq-items-cargo { order:initial; }
}
@media(max-width:600px) {
 #piratequest-app .pq-items-dialog--portrait162 .pq-items-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* A short landscape screen has room for one header row, not three. */
@media(max-height:500px) and (min-width:500px) {
 #piratequest-app .pq-items-dialog>.gr-dialog__head {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,1.2fr) 44px;
  align-items:center; gap:8px; min-height:58px; padding:6px 10px;
 }
 #piratequest-app .pq-items-dialog>.gr-dialog__head>h2 {
  grid-column:1; grid-row:1; margin:0; font-size:var(--pq-small180); line-height:1.2;
 }
 #piratequest-app .pq-items-dialog>.gr-dialog__head>[data-cargo-capacity180] {
  grid-column:2; grid-row:1; width:100%; min-width:0; margin:0; gap:8px;
 }
 #piratequest-app .pq-items-dialog .pq-cargo-capacity180>span { font-size:var(--pq-small180); }
 #piratequest-app .pq-items-dialog>.gr-dialog__head>[data-dialog-close] {
  grid-column:3; grid-row:1; display:grid; place-items:center; box-sizing:border-box;
  width:44px; height:44px; min-width:44px; min-height:44px; max-height:44px; padding:0;
 }
 #piratequest-app .pq-items-dialog>.gr-dialog__head>[data-dialog-close]>svg { width:24px; height:24px; }
 #piratequest-app .pq-items-dialog :is(.pq-gear-filters178,.pq-cargo-filters197) {
  flex-wrap:nowrap; overflow-x:auto; overscroll-behavior-x:contain; touch-action:pan-x;
  scrollbar-width:none; padding-bottom:2px; margin-bottom:8px;
 }
 #piratequest-app .pq-items-dialog :is(.pq-gear-filters178,.pq-cargo-filters197)::-webkit-scrollbar { display:none; }
 #piratequest-app .pq-items-dialog :is(.pq-gear-filters178,.pq-cargo-filters197)>.pq-button { flex:0 0 auto; white-space:nowrap; }
}

/* Visible browser geometry, including iPad toolbars, bounds this one modal. */
#piratequest-app dialog.pq-items-dialog {
 position:fixed;inset:auto;left:var(--pq-items-left284,0px);top:var(--pq-items-top284,0px);
 width:var(--pq-items-width284,100dvw);max-width:var(--pq-items-width284,100dvw);
 height:var(--pq-items-height284,100dvh);max-height:var(--pq-items-height284,100dvh);min-height:0;
 margin:0;padding:0;overflow:hidden;box-sizing:border-box;
}
#piratequest-app dialog.pq-items-dialog[open]{display:flex;flex-direction:column}
#piratequest-app .pq-items-dialog>.gr-dialog__head{flex:0 0 auto;min-height:0;padding-top:max(8px,env(safe-area-inset-top,0px));padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}
#piratequest-app .pq-items-dialog>.gr-dialog__body{display:block;flex:1 1 0;min-width:0;min-height:0;height:0;max-height:100%;overflow:hidden;box-sizing:border-box;padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px));padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
#piratequest-app .pq-items-dialog .pq-items-shell{height:100%;max-height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column}
#piratequest-app .pq-items-dialog .pq-items-layout{flex:1 1 0;min-height:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
#piratequest-app .pq-items-dialog .pq-items-pane{min-height:0;max-height:100%;overflow:hidden}
#piratequest-app .pq-items-dialog :is(.pq-items-cargo,.pq-item-detail){height:100%;min-height:0;max-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scroll-padding-block:8px}
#piratequest-app .pq-items-dialog .pq-items-footer{position:relative;flex:0 0 auto;min-height:44px;margin:0;padding-top:8px;padding-bottom:0;overflow:visible;background:#0b2c36;z-index:5}
#piratequest-app .pq-items-dialog .pq-items-footer[hidden]{display:none}
@media(max-height:500px){#piratequest-app .pq-items-dialog>.gr-dialog__head{padding-top:max(4px,env(safe-area-inset-top,0px))}#piratequest-app .pq-items-dialog>.gr-dialog__body{padding-top:4px;padding-bottom:max(4px,env(safe-area-inset-bottom,0px))}#piratequest-app .pq-items-dialog .pq-items-footer{padding-top:4px}}

#piratequest-app .pq-items-dialog--portrait162 .pq-items-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
/* Browser chrome and keyboards can make a wide layout short without a CSS
   height media query changing, so use the measured visible height as well. */
#piratequest-app .pq-items-dialog[data-items-short284="true"]>.gr-dialog__head{display:grid;grid-template-columns:minmax(0,.8fr) minmax(140px,1.4fr) 44px;align-items:center;gap:6px;min-height:52px;padding:4px 8px;padding-top:max(4px,env(safe-area-inset-top,0px));padding-left:max(8px,env(safe-area-inset-left,0px));padding-right:max(8px,env(safe-area-inset-right,0px))}
#piratequest-app .pq-items-dialog[data-items-short284="true"]>.gr-dialog__head>h2{grid-column:1;grid-row:1;margin:0;font-size:var(--pq-font-secondary);line-height:1.2}
#piratequest-app .pq-items-dialog[data-items-short284="true"]>.gr-dialog__head>[data-cargo-capacity180]{grid-column:2;grid-row:1;min-width:0;width:100%;margin:0}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-cargo-capacity180>span{font-size:var(--pq-font-meta);gap:4px}
#piratequest-app .pq-items-dialog[data-items-short284="true"]>.gr-dialog__head>[data-dialog-close]{grid-column:3;grid-row:1;width:44px;height:44px;min-width:44px;min-height:44px;padding:6px}
#piratequest-app .pq-items-dialog[data-items-short284="true"]>.gr-dialog__body{padding-top:4px;padding-bottom:max(4px,env(safe-area-inset-bottom,0px))}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-items-tabs{display:flex;flex-wrap:nowrap;gap:4px}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-items-tab{min-height:44px;padding:6px 4px;gap:3px;font-size:var(--pq-font-meta);line-height:1.2}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-items-tab>svg{display:none}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-items-footer:has(.pq-items-collect){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-items-footer{padding-top:4px}
#piratequest-app .pq-items-dialog[data-items-short284="true"] .pq-items-footer>.pq-button{min-height:44px;padding:6px 8px;font-size:var(--pq-font-secondary);line-height:1.2}

#piratequest-app .pq-items-dialog .pq-items-toast152{z-index:4;bottom:calc(var(--pq-items-footer284,44px) + 8px)}

/* Shop stays at the left; salvage actions and Done share the remaining space. */
.pq-app .pq-items-footer.pq-items-footer--shop306{display:flex;flex-wrap:wrap;align-items:stretch;justify-content:space-between;gap:10px}
.pq-app .pq-items-shop306{flex:0 1 auto;margin-right:auto;min-height:44px;white-space:normal}
.pq-app .pq-items-footer-actions306{display:flex;flex:1 1 260px;justify-content:flex-end;align-items:stretch;gap:10px;min-width:0;flex-wrap:wrap;margin-left:auto}
.pq-app .pq-items-footer-actions306>.pq-button{min-width:0;white-space:normal}
@media(max-width:650px){.pq-app .pq-items-footer-actions306{flex-basis:100%}.pq-app .pq-items-footer-actions306>.pq-button{flex:1 1 120px}}
