/* Keep controls inside their own reserved rows; retain the existing artwork. */
@media(min-width:951px){
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #desktop-shell{--action-dock-height:clamp(125px,20dvh,180px);grid-template-rows:minmax(0,1fr) var(--action-dock-height)}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #desktop-dock{width:min(710px,calc(80% - 40px),calc((var(--action-dock-height) - 18px)*4));min-height:0;padding:4px 16px 12px;margin:0 auto;align-self:end}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #desktop-dock::before{inset:0 -12px -6px}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar{gap:8px}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar .painted-action-label{font-size:clamp(12px,1vw,16px);line-height:1;flex:none}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar .action-cost{font-size:clamp(11px,.85vw,14px);line-height:1;min-height:0;flex:none;gap:2px}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar .action-cost .sw-symbol{width:clamp(12px,1vw,14px);height:clamp(12px,1vw,14px)}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar .action-event-note{font-size:10px;line-height:1;flex:none}
 /* Wrapped role/trait symbols must contribute to the caption's measured height. */
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #worlds .world-meta{height:auto;min-height:28px;row-gap:4px}
 /* Account names are an independent grid row, never an absolute footer overlay. */
 body.desktop-play.faithful-target.online-active #players{height:126px!important;min-height:126px!important;max-height:126px!important;align-items:stretch}
 body.desktop-play.faithful-target.online-active #players .player{height:126px!important;min-height:0!important;display:grid!important;grid-template-rows:34px 20px 28px 20px!important;row-gap:0!important;padding-block:6px!important}
 body.desktop-play.faithful-target.online-active #players .company-symbol{grid-row:1!important;max-height:34px!important;max-width:34px!important}
 body.desktop-play.faithful-target.online-active #players .player>small:not(.player-income){grid-column:1/-1!important;grid-row:2!important;min-width:0;line-height:20px!important}
 body.desktop-play.faithful-target.online-active #players .player-income{grid-column:1/-1;grid-row:3;margin:0!important;padding:0 3px!important;font-size:11px!important;line-height:14px!important;align-self:center}
 body.desktop-play.faithful-target.online-active #players .player-income .sw-symbol{width:11px!important;height:11px!important;vertical-align:-1px}
 body.desktop-play.faithful-target.online-active #players .online-player-name{position:static!important;inset:auto!important;grid-column:1/-1;grid-row:4;display:block!important;box-sizing:border-box;height:20px;min-height:20px;padding-top:4px;max-width:100%!important;min-width:0;font-size:12px!important;line-height:16px!important;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* Review: compact account footer, optical centering and an unframed settings glyph. */
@media(min-width:951px){
 body.desktop-play.faithful-target.online-active #players .player{align-content:center!important}
 body.desktop-play.faithful-target #players .company-symbol{position:static!important;inset:auto!important;object-fit:contain!important;object-position:center!important;box-sizing:border-box;padding:3px;background:#07131d;border-radius:50%;align-self:center!important;justify-self:center}
 body.faithful-target #desktop-menu>summary{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;min-width:44px;min-height:44px}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar .faithful-action-paper{left:8%;width:84%;text-align:center;align-items:center;justify-content:center;flex-direction:column;box-sizing:border-box}
 body.desktop-play.faithful-target[data-desktop-view=tabletop] #actionbar .painted-action-label{width:100%;text-align:center}
}
.vehicle-deployment{margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid var(--edge,#b49167);background:transparent}
.vehicle-deployment h3{margin:0 0 8px}
.vehicle-deployment .row{display:flex;flex-wrap:wrap;gap:8px}
.vehicle-deployment button{flex:1 1 150px;background:transparent;box-shadow:none}
#phone-faithful #research .vehicle-deployment button{background:transparent;box-shadow:none}
.vehicle-deployment button:hover:not(:disabled){background:color-mix(in srgb,currentColor 6%,transparent)}
.vehicle-deployment .deployment-reason{display:block;max-width:240px;font-size:11px;line-height:1.3;margin-top:5px}
.installation-unavailable{margin:8px 0;font-size:13px;line-height:1.4}

/* Shared shortage hints: omit zero deficits and keep adjacent choices aligned. */
:root{--shortfall-ink:#ad2520}
body[data-desktop-view="star-map"]{--shortfall-ink:#ff9e94}
.resource-shortfall-message,.resource-shortfall-message .shortfall-number{color:var(--shortfall-ink)}
.resource-shortfall-message .shortfall-item{white-space:nowrap}
.resource-shortfall-message .sw-symbol{vertical-align:middle}
.notice.resource-shortfall{color:var(--shortfall-ink)}
#research .vehicle-deployment .row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch}
#research .vehicle-deployment .row:has(>button:only-child){grid-template-columns:1fr}
#research .vehicle-deployment button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0}
#research .vehicle-deployment .deployment-reason{min-height:1.3em}
#research .row,.installation-actions{align-items:stretch}
.installation-actions{grid-auto-rows:1fr}

/* Connection roles belong to the containing parchment/sheet, with aligned actions. */
:is(#faithful-context-body,#phone-faithful) .connection-panel :is(.access-role,.role-letter,.your-access,.connection-status){background:transparent}
#faithful-context-body .connection-panel .notice{background:transparent}
:is(#faithful-context-body,#phone-faithful) .connection-panel :is(.connection-status,.your-access strong){color:inherit}
.connection-panel .connection-roles{align-items:stretch;grid-auto-rows:1fr}
.connection-panel .access-role{display:flex;flex-direction:column;min-width:0}
:is(#faithful-context-body,#phone-faithful) .connection-panel .access-role>button{margin-top:auto;background:transparent;box-shadow:none}
.connection-panel .access-role>small{margin-bottom:8px}
:is(#faithful-context-body,#phone-faithful) .connection-panel .access-role>button:hover:not(:disabled){background:color-mix(in srgb,currentColor 6%,transparent)}
#phone-faithful .sheet-body div.connection-panel,#phone-faithful .connection-panel .notice{background:transparent!important}
.connection-panel .access-role>p{flex:1}

/* Reserve space between the complete planet (including its Research rail) and
   the inspector frame. This narrows only the board's available fitting region. */
@media(min-width:951px){
 body.desktop-play.faithful-target #desktop-shell>.desktop-board{margin-inline-end:16px}
}
