/* A single box beside the whole party, matching the PC's two-screen layout. */
.dual-console[data-surface=adventure][data-menu-kind=storage] .touch-screen:has(#overlay[data-kind=storage]:not([hidden])){height:max(var(--lower-height),575px);max-height:none}
.dual-console[data-surface=adventure] #control-display .overlay[data-kind=storage]{padding:8px!important;gap:0;overflow:auto;--pane-bg:linear-gradient(#428f99,#276678)}
#overlay[data-kind=storage]>.overlay-header{display:none}
.pc-workspace{display:flex;flex-direction:column;gap:7px;min-height:100%;color:#f4ffe9}
.pc-box-heading{display:grid;grid-template-columns:36px minmax(0,1fr) 36px 23%;align-items:center;gap:5px;min-height:38px;background:linear-gradient(#b4d990,#78a860);border:2px solid #437647;border-radius:18px 18px 5px 5px;padding:2px 5px;color:#203f42}
.pc-box-heading>strong{text-align:center;font-size:18px;line-height:1}.pc-box-heading small{display:block}.pc-total{text-align:center;font-size:13px;font-weight:bold;border-left:1px solid #507d5c}.pc-total small{font-size:10px!important;letter-spacing:.04em}
.dual-console[data-surface=adventure] #control-display .pc-box-heading button{padding:0;min-height:34px;height:34px;min-width:0;border:0;background:transparent;box-shadow:none;font-size:17px}
.pc-board{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr);gap:7px;min-height:180px;flex:1}
.pc-box-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(5,minmax(34px,1fr));gap:3px;padding:6px;background:radial-gradient(ellipse at 20% 20%,#7bc56788,transparent 60%),repeating-conic-gradient(#519e50 0 25%,#58a756 0 50%) 0/16px 16px;border:2px solid #366c43;box-shadow:inset 0 0 0 1px #a3d17a;border-radius:6px}
.pc-party-panel{display:flex;flex-direction:column;gap:7px;background:linear-gradient(#81d7e9,#50b5d7);padding:5px 3px;border:2px solid #286e94;border-radius:6px;color:#164e69;min-width:0}
.dual-console[data-surface=adventure] #control-display .pc-party-panel h3{font-size:12px;margin:0;text-align:center;white-space:nowrap}.pc-party-panel h3 span{display:block;font-size:11px}
.pc-team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(40px,1fr));gap:4px;flex:1}
.dual-console[data-surface=adventure] #control-display .pc-mon,.pc-vacant{min-width:0;min-height:34px;padding:0;border:1px solid #98d08788;border-radius:4px;background:#dff3b619;box-shadow:none;position:relative;display:flex;align-items:center;justify-content:center}
.dual-console[data-surface=adventure] #control-display .pc-mon{background:#daf4cc40;overflow:visible}
.dual-console[data-surface=adventure] #control-display .pc-team-grid .pc-mon{border-color:#2181ac77;background:#d4f5ff66}
.dual-console[data-surface=adventure] #control-display .pc-mon[aria-pressed=true]{background:#fcf2a4;border:1px solid #936a30;box-shadow:inset 0 0 0 1px #fff7d6}
.pc-mon img{width:30px;height:30px;max-width:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none}
.dual-console .screen .pc-mon .pc-prism-thumb{position:absolute;width:36px;height:36px;max-width:none;pointer-events:none;image-rendering:pixelated}
.pc-prism-thumb[data-ready=true]+img{visibility:hidden}
.dual-console[data-surface=adventure] #control-display .pc-mon small{position:absolute;right:1px;bottom:0;font:10px/1 Tiny5,monospace;color:#193e44;background:#e2f5cce6;padding:0 1px}
.pc-markers{position:absolute;left:1px;top:0;font:10px/1 Arial,sans-serif;color:#83511c;text-shadow:0 1px #fff8bd}
.pc-vacant{border-color:#b9e49c30;background:#29674316}.pc-team-grid .pc-vacant{border-color:#227fa933;background:#3b9ac144}
.pc-carry{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:7px;min-height:45px;padding:6px 8px;border:1px solid #cae9b2;border-radius:6px;background:#194e60;color:#f4ffe9;box-shadow:0 2px 4px #123b4355}
.pc-carry>span:not(.pc-carry-art){flex:1;min-width:0}.pc-carry strong{display:block;font:700 13px/1.2 Arial,sans-serif;overflow-wrap:anywhere}.pc-carry small{display:block;margin-top:3px;font:11px/1.25 Arial,sans-serif;color:#deefdf}
.pc-carry-art{position:relative;display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid #fee397;border-radius:6px;background:#dbeebc}
.pc-carry-art img{width:32px;height:32px;object-fit:contain;image-rendering:pixelated}.dual-console .screen .pc-carry-art canvas{position:absolute;width:36px;height:36px;image-rendering:pixelated;pointer-events:none}
.dual-console[data-surface=adventure] #control-display #pc-pickup-mode{min-height:36px;padding:5px 8px;font-size:12px;flex:none}
.dual-console[data-surface=adventure] #control-display .pc-mon.pc-carried{background:#1d526444;border:2px dashed #ffe59b;box-shadow:none}.pc-mon.pc-carried>*{visibility:hidden}.pc-mon.pc-carried::after{content:'↩';position:absolute;color:#ffe59b;font:bold 23px/1 Arial,sans-serif}
.dual-console[data-surface=adventure] #control-display button.pc-vacant{min-width:0;min-height:34px;padding:0;border:1px dashed #b9e49c80;border-radius:4px;background:#29674316;box-shadow:none}
.pc-carrying .pc-mon,.pc-carrying .pc-vacant{cursor:grabbing}.pc-carrying .pc-mon:hover,.pc-carrying button.pc-vacant:hover{outline:2px solid #ffe59b;outline-offset:-2px}
.pc-selection-line{font:700 14px/1.1 Arial,sans-serif;min-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#faffdd;padding:0 3px}
.pc-action-rail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none}
.dual-console[data-surface=adventure] #control-display .pc-action-rail button{font-size:13px;min-height:40px;padding:5px 2px;text-align:center}
.dual-console[data-surface=adventure] #control-display .pc-feedback{font-size:12px;line-height:1.2;min-height:29px;margin:0;color:#e3f4e9;padding:2px 3px}
.dual-console[data-surface=adventure][data-menu-kind=storage] .display-preview{padding:0!important;overflow:hidden!important;background:#367f90}
.pc-information{width:100%;height:100%;display:grid;place-items:center;background:#24596b}.pc-information canvas{display:block;width:100%;max-height:100%;object-fit:contain;image-rendering:pixelated}
@media(max-width:360px){.pc-board{gap:4px;grid-template-columns:minmax(0,2.8fr) minmax(0,1fr)}.pc-box-grid{gap:2px;padding:3px}.pc-team-grid{gap:2px}.pc-party-panel{padding:5px 2px}.dual-console[data-surface=adventure] #control-display .pc-action-rail button{font-size:12px}.pc-box-heading{grid-template-columns:30px minmax(0,1fr) 30px 23%}}

@media(max-width:719px){.dual-console[data-surface=adventure][data-menu-kind=storage] .top-display{height:calc(var(--display-width)*2/3);min-height:160px}}

/* Compact, labeled collection tools; wrap before any control can overflow. */
.pc-box-tools,.pc-search-tools,.pc-organize-tools{display:grid;gap:5px;align-items:end;min-width:0}
.pc-box-tools{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) auto}
.pc-search-tools{grid-template-columns:repeat(4,minmax(0,1fr));padding:6px;background:#1e586d;border:1px solid #73b0b8;border-radius:6px}
.pc-search-tools .pc-query{grid-column:span 2}.pc-box-tools label,.pc-search-tools label,.pc-organize-tools label{display:flex;flex-direction:column;gap:3px;min-width:0;font:11px/1.2 Arial,sans-serif;color:#effff1}
.dual-console[data-surface=adventure] #control-display .pc-workspace input,.dual-console[data-surface=adventure] #control-display .pc-workspace select{box-sizing:border-box;min-width:0;width:100%;font:12px/1.2 Arial,sans-serif;padding:5px;min-height:32px;border:1px solid #c4e6d9;border-radius:4px;background:#effbed;color:#163c45}
.dual-console[data-surface=adventure] #control-display .pc-box-tools button,.dual-console[data-surface=adventure] #control-display .pc-search-tools button,.dual-console[data-surface=adventure] #control-display .pc-organize-tools button{min-width:0;min-height:32px;padding:5px 3px;font-size:12px}
.pc-organize-tools{grid-template-columns:1fr 1.2fr 1fr .8fr}.pc-box-heading>strong{overflow-wrap:anywhere;font-size:16px}.pc-board{flex:none;min-height:195px}.pc-box-grid{grid-template-rows:repeat(5,minmax(34px,1fr))}
#pc-release{color:#8d2032}#overlay[data-kind=storage-release] label{display:flex;flex-direction:column;gap:8px}#pc-release-confirm{border-color:#ba5263;color:#8d2032}#pc-release-error{color:#8d2032}
@media(max-width:420px){.pc-box-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.pc-box-tools>button{grid-column:2}.pc-organize-tools{grid-template-columns:1fr 1fr}.pc-search-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.pc-search-tools .pc-query{grid-column:span 2}}

.battle-teams{display:grid;gap:10px}.team-preset-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.team-preset-tabs button{overflow-wrap:anywhere}.team-preset-tabs [aria-pressed=true]{outline:2px solid #ffe89b}.team-preset-members{padding:0;list-style-position:inside;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.team-preset-members li{display:flex;align-items:center;gap:6px;min-width:0;background:#ffffff0b;padding:6px}.team-preset-members img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated}.team-preset-members span{min-width:0;overflow-wrap:anywhere}.team-preset-members small{display:block}.battle-teams form{display:flex;flex-wrap:wrap;gap:6px;align-items:end}.battle-teams input{max-width:100%;min-width:0}.battle-teams label{display:grid;gap:4px}.battle-teams .foot-actions{display:flex;flex-wrap:wrap;gap:6px}

.dual-console[data-surface=adventure] #overlay[data-kind=battle-teams]{overflow-y:auto!important;overflow-x:hidden!important}.battle-teams input{box-sizing:border-box}.team-preset-tabs button,.battle-teams button{min-height:36px}
