/* Shared item and debrief sheets. The reading area paginates long options. */
.cargo-list,.cargo-items {display:grid;gap:4px}
button.cargo-row {display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;width:100%;min-height:34px;padding:5px 10px;border-left:2px solid #9891ae}
.cargo-row small {white-space:nowrap;color:#ccd0df}.cargo-row.rarity-5 {border-left-color:#e3bb76;color:#f2d198}
.item-sheet-title {display:flex;align-items:center;gap:12px;min-height:60px;color:color-mix(in srgb,var(--grade) 63%,white)}
.item-sheet-title small,.item-sheet-title>span:last-child {display:block}.item-sheet-title small {font-size:11px;letter-spacing:.06em}
.gear-emblem,.item-emblem {display:grid;place-items:center;background:#131828;border:1px solid var(--grade,#a3a0b4);width:56px;height:56px;flex:none}
.gear-emblem .item-art,.item-emblem svg {width:42px;height:42px}
#modal-content>.gear-reader {height:min(380px,calc(100dvh - 215px));min-height:85px;padding:9px 12px;background:#121824;border:1px solid #a8b3d52d}
.option-heading {font-size:12px;line-height:1.3;color:#d6bf90;border-bottom:1px solid #c1ac8d40;padding-bottom:3px}
.report-banner {padding:12px 14px;border-left:2px solid #b3a5dc;background:linear-gradient(100deg,#3e3659,#202b39)}
.report-banner h3 {font-size:18px;margin:3px 0}.report-banner small,.report-banner span {font-size:12px;color:#d2cddd}
.report-totals {display:grid;grid-template-columns:repeat(3,1fr);gap:5px}
.report-totals span {padding:6px 9px;background:#151d2d;color:#b6bfd2;font-size:11px}.report-totals b {display:block;color:#f0eff8;font-size:16px}
@media(orientation:landscape) and (max-height:480px){
 #modal[data-kind=result] #modal-content {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:5px 14px}
 #modal[data-kind=result] #modal-title {grid-column:1/-1}
 #modal[data-kind=result] .report-banner,#modal[data-kind=result] .report-totals {grid-column:1}
 #modal[data-kind=result] .cargo-list {grid-column:2;grid-row:2/4;align-self:start}
 #modal[data-kind=result] :is(.pagination,.list-count) {grid-column:2;grid-row:4}
 #modal[data-kind=result] .primary {grid-column:1/-1}
}
@media(orientation:portrait){
 :root{--bar:48px;--dock:58px}
 #app {background-image:url('./art/ui/guild-hall-mobile.webp')}
 .workspace {grid-template-columns:minmax(0,1fr);grid-template-rows:var(--bar) minmax(0,1fr) var(--dock)}
 .topbar {grid-area:1/1;padding:0 12px;height:var(--bar);gap:7px}
 .screen-host {grid-area:2/1}
 #navigation {grid-area:3/1;flex-direction:row;justify-content:space-evenly;align-items:stretch;padding:0 4px;border:0;border-top:1px solid #a9b6ca38}
 #navigation button {flex:1;width:auto;max-height:none;padding:4px 1px;gap:3px}
 #navigation button.active::before {inset:0 25% auto;width:auto;height:2px}
 #navigation .nav-icon,#navigation .ui-icon {width:21px;height:21px}
 #navigation .nav-label {font-size:10px}
 main,main[data-page=watch] {gap:8px;padding:14px 12px;max-width:680px}
 .page-heading h1 {font-size:22px}.page-heading {min-height:30px}
 .flow-tabs {display:flex;gap:3px;flex-wrap:nowrap;width:100%}
 .flow-tabs button {flex:1;min-width:0;min-height:38px;padding:5px 3px;letter-spacing:-.03em;font-size:12px}
 .panel {padding:12px}
 .search-field {max-width:none;flex:0 0 auto}.search-field input {height:38px;max-width:none}
 .unit-grid,.inventory-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .unit-card,.inventory-card {min-height:0;padding:7px}
 .unit-portrait,.inventory-art {height:clamp(52px,8.5dvh,86px)}
 .unit-portrait .actor-composite {width:56px;height:61px}
 .unit-portrait .guild-member {width:clamp(50px,8.5dvh,86px);height:clamp(50px,8.5dvh,86px)}
 .inventory-art>.item-art {width:48px;height:48px}
 .guild-home {display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;gap:14px}
 .guild-scene {flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
 .guild-scene h1 {font-size:clamp(36px,10vw,56px)}
 .facility-grid {width:100%;max-width:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0}
 .facility-card {min-width:0;min-height:clamp(94px,16dvh,155px);padding:8px}
 .facility-art {width:86px;height:86px;right:-5px;top:0}.facility-label b {font-size:14px}
 .expedition-grid,.modal-list {grid-template-columns:1fr}
 .expedition-card-head,.expedition-card-foot {padding:6px 10px}
 .party-lineup {min-height:58px;padding:5px}.party-lineup .actor-composite {width:34px;height:37px}
 .hero-layout,.party-prepare,.forge-work {display:flex;flex-direction:column;gap:10px}
 .hero-summary {flex-direction:row;justify-content:flex-start;align-items:center;gap:12px;padding:7px 12px}
 .hero-summary .actor-composite {width:58px;height:63px}.hero-summary h2 {font-size:17px}
 .hero-details {flex:1;gap:8px}.hero-details .row-actions {max-width:52%;gap:3px}
 .hero-details .row-actions button {min-height:32px;padding:4px 7px}
 .prepare-members {grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin:6px 0}
 .prepare-member {min-width:0;padding:4px 1px}.prepare-member small {font-size:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}
 .prepare-member .actor-composite {width:32px;height:35px}
 .prepare-plan .button-row {margin-top:4px}
 .summon-layout {display:flex;flex-direction:column;gap:8px}
 .summon-rail .flow-tabs {display:flex;flex-direction:row;gap:4px;margin:0}
 .summon-rail .flow-tabs button {padding:6px 3px;min-height:36px;text-align:center}
 .summon-body {flex:1;height:auto}
 .summon-flow {display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:8px;padding:12px;flex:1}
 .summon-illustration {flex:1;min-height:45px;max-height:220px;height:auto}
 .contract-card {height:min(15dvh,118px);width:min(10dvh,79px)}.contract-orbit {width:108px;height:108px}
 .summon-controls h2 {font-size:21px}.summon-controls .cost-row {margin:6px 0}
 .exchange-entry {bottom:0;right:0;padding:3px 8px}
 .forge-execute {border-left:0;border-top:1px solid var(--line);padding:8px 0 0;gap:5px}
 main[data-page=forge]>.panel:not(.forge-work){flex:none}
 .toolbar {flex-wrap:wrap;gap:4px}.attribute-table th,.attribute-table td {padding:5px 3px}
 dialog,#modal[data-summon],body[data-spectating] #modal:is([data-kind="watch-panel"],[data-kind="supply"]),body[data-spectating] #modal:has(#watch-map) {inset:0;width:min(94vw,520px);max-width:94vw;max-height:calc(100dvh - 28px);margin:auto;padding:16px;border-radius:4px 17px 4px 4px}
 #modal-content {max-height:calc(100dvh - 74px);gap:8px}
 #modal-content .modal-list .flow-row,#modal-content .modal-list .check-row {min-height:52px}
 .summon-results .draw-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
 .summon-result-footer {flex-wrap:wrap;gap:5px}.summon-result-footer>.button-row {width:100%}
 .summon-result-footer>.button-row button {flex:1;min-width:0}
 .watch-field .hud-team {max-width:none;right:var(--edge);display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
 .hud-team .hud-unit {width:100%;padding:4px}.hud-heading h1 {font-size:15px}
 .watch-field .hud-cargo {bottom:calc(44px + var(--edge));max-width:54%}
 .watch-field .hud-actions {bottom:calc(106px + var(--edge))}
 .hud-team .hud-unit>.actor-composite {display:block;width:17px;height:19px}
 #toast {bottom:calc(var(--dock) + env(safe-area-inset-bottom) + 8px)}
}
@media(orientation:portrait) and (max-height:600px){
 main {padding:8px 10px;gap:5px}.page-heading p {display:none}
 .unit-portrait {height:44px}.unit-portrait .actor-composite {width:40px;height:43px}
 .prepare-plan {gap:4px}.prepare-plan .field {margin:0}.prepare-plan .muted {margin:0}
 .party-prepare {gap:5px}.party-prepare>.panel {padding:8px}
}
.career-count{display:flex;align-items:center;gap:6px;font-size:12px;min-height:28px}.career-count b{color:#e1cfa7}.career-count button{margin-left:auto;min-height:28px;padding:3px 12px}

main[data-page=attributes] > .stat-chips {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}
