/* Approved equipment artwork replaces presentation only. Existing metric boxes retain their sizes. */
img.equipment-icon{object-fit:contain;display:inline-block;vertical-align:middle;flex-shrink:0;max-width:none}
.symbolized img.equipment-icon{width:1.25em;height:1.25em}
#modal .resource-shortfall img.equipment-icon,#modal .research-card-rewards img.equipment-icon{width:26px;height:26px}
/* Coloured bases and owner numbers work independently of artwork colour. */
.faithful-target .painted-piece.equipment-painted{display:inline-block!important;background:none!important;position:relative;filter:none!important;min-width:0}
.equipment-painted>img{display:block;width:100%;height:100%;object-fit:contain}
.equipment-painted::after{content:'';position:absolute;left:15%;right:15%;height:3px;bottom:0;border-radius:3px;background:var(--equipment-owner)}
.faithful-target .rover-marker.damaged .equipment-painted>img,.world-presence-item.is-damaged .equipment-painted>img{opacity:.7}
#phone-faithful .unit-token{position:relative}
#phone-faithful .mobile-vehicle-damage{position:absolute;right:-2px;top:-3px;background:#a92e2a;color:#fff8e8;border-radius:50%;font:bold 11px/13px system-ui;width:13px;height:13px;text-align:center;z-index:2}
/* Parchment faces; no words or reward symbols are baked into the paintings. */
#modal .sw-research-card,.sw-research-card{position:relative;display:flex;flex-direction:column;min-width:0;width:100%;max-width:310px;margin:0 auto;padding:6px!important;text-align:left;background:linear-gradient(130deg,#fff2d6,#e6d0a6)!important;color:#4e3b2d!important;border:1px solid #b18a53!important;border-radius:12px!important;box-shadow:0 3px 8px #5a371b25,inset 0 0 0 2px #f8e8c5;overflow:hidden}
.sw-research-card .research-art{display:block;width:100%;height:auto;aspect-ratio:1.5;object-fit:cover;border-radius:7px 7px 0 0}
.research-card-copy{padding:10px;display:flex;flex-direction:column;flex:1;min-width:0}
.research-category{font:10px/1.4 system-ui;letter-spacing:1px;text-transform:uppercase;color:#8a672e}
.sw-research-card.damage .research-category{color:#a0362b}
#modal .sw-research-card h3,.sw-research-card h3{font:bold 21px/1.15 Georgia,serif;letter-spacing:0;margin:6px 0 10px;color:#4e3b2d}
#modal .sw-research-card .research-description,.sw-research-card .research-description{font:14px/1.45 Georgia,serif;margin:0 0 12px;color:#66533e}
.research-card-rewards{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid #bea474;padding-top:8px;margin-top:auto;font-size:20px;color:#4e3b2d}
.research-card-rewards>strong,.research-card-rewards>span{display:inline-flex;align-items:center;gap:4px}
.research-card-rewards .sw-symbol{width:26px;height:26px}
.research-card-count{font:10px/1.5 system-ui;display:block;margin-top:7px;color:#756045}
.research-quantity{position:absolute;right:14px;top:13px;border:1px solid #cbaa66;border-radius:15px;padding:2px 8px;background:#352d24ed;color:#fff0ce;font:12px/1.6 system-ui}
.research-reveal{max-width:480px;margin:auto;text-align:center}
.research-reveal>.eyebrow{display:block;margin-bottom:12px}
.research-reveal>.primary{margin-top:14px;min-width:180px}
.research-reveal .notice{font-size:14px;line-height:1.4;margin:12px auto;max-width:360px}
#modal:has(.research-reveal){width:min(520px,calc(100vw - 24px))}
#modal:has(.research-collection){width:min(900px,calc(100vw - 24px))}
#modal:has(.research-reveal)>.close{top:18px!important;right:18px}
.research-collection h2{margin-top:0}
.research-collection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px;margin-top:20px}
#modal .research-collection-card{padding:0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important;display:flex;min-width:0;align-items:stretch;text-align:left}
.research-collection-card .sw-research-card{max-width:260px;height:100%}
.research-collection-card .sw-research-card h3{font-size:17px!important}
.research-collection-card .research-description{display:none}
.research-collection-card .research-card-rewards{font-size:17px}
.research-collection-card .research-card-rewards .sw-symbol{width:22px;height:22px}
.research-collection-summary{padding:14px 0;background:none!important;border:0;border-top:1px solid #b49b72;border-bottom:1px solid #b49b72;border-radius:0!important;margin-top:15px;min-width:0}
.research-collection-summary h3{font-size:17px;line-height:1.35;margin:0 0 8px}
.research-collection-summary p{font-size:14px;line-height:1.4;margin:7px 0}
.research-collection-summary .sw-symbol{width:20px;height:20px;vertical-align:middle}
.research-progress-slots{display:flex;gap:5px;margin:10px 0;flex-wrap:wrap}
.research-progress-slots>span{display:grid;place-items:center;width:25px;height:33px;color:#9d8256;border:1px dashed #b5a184;border-radius:4px;background:#eee0c4;font-size:19px;line-height:1}
.research-progress-slots>span.filled{background:#8c7143;border:1px solid #8c7143;color:#fff4dc}
.research-collection-note,.research-origins{font-size:13px;line-height:1.5}
.research-origins{text-align:left;max-height:140px;overflow:auto;padding-left:22px}
.scan-option .sw-research-card{max-width:310px;flex:1}
.scan-choice-grid .scan-option{background:none;border:0;padding:0;box-shadow:none;gap:10px}
.scan-option>.notice,.scan-option>p{font-size:13px;line-height:1.4}
/* A small public deck counter. The tile remains the single accessible button. */
.planet-research-badge{display:inline-flex;align-items:center;justify-content:center;gap:3px;white-space:nowrap;padding:1px 5px;border:1px solid #ad8e58;border-radius:5px;background:#eeddba;color:#493823;font:11px/1.35 Georgia,serif;vertical-align:middle;min-width:40px}
.planet-research-badge.exhausted{background:#e7dfd1;color:#756b5a;border-color:#b9aa91}
/* A miniature card back using the existing Starwoven emblem, not a text glyph. */
.planet-research-badge>.research-deck-mark{display:inline-block!important;position:relative;flex:0 0 15px;width:15px;height:20px;box-sizing:border-box;border:1px solid #d5ae66;border-radius:3px;background:#102b43;box-shadow:inset 0 0 0 1px #416079,1px 1px 0 #917346;vertical-align:middle}
.planet-research-badge>.research-deck-mark::after{content:'';position:absolute;width:11px;height:12px;left:50%;top:50%;transform:translate(-50%,-50%);background:url("brand/starwoven-header-06.webp") no-repeat left center;background-size:auto 8.4px}
.planet-research-badge.exhausted>.research-deck-mark{opacity:.55}
.world>.caption>.planet-research-badge{margin:2px 0}
.planet-research-summary{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:13px}
#phone-faithful .world>.planet-research-badge{position:absolute;top:2px;right:3px;font-size:10px;min-width:32px;padding:1px 3px;z-index:5}
#phone-faithful .world{position:relative}
@media(max-width:600px){
 #modal:has(.research-reveal),#modal:has(.research-collection){max-height:calc(100dvh - 20px);padding:28px 18px 20px}
 #modal .research-collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #modal .research-collection-card .research-card-copy{padding:8px 5px}
 #modal .research-collection-card .sw-research-card h3{font-size:15px!important;overflow-wrap:normal}
 .research-collection-card .research-card-rewards{gap:6px;font-size:15px}
 #modal .research-collection-card .research-card-rewards .sw-symbol{width:19px;height:19px}
 .research-reveal>.sw-research-card{max-width:290px}
 .research-collection h2{font-size:22px}
}
@media(max-height:550px) and (min-width:601px){
 .research-reveal{display:grid;grid-template-columns:230px minmax(160px,1fr);gap:8px 20px;align-items:center;max-width:660px}
 .research-reveal>.sw-research-card{grid-column:1;grid-row:1/5}
 .research-reveal>.eyebrow,.research-reveal>.notice,.research-reveal>.primary,.research-reveal>.research-origins,.research-reveal>button{grid-column:2}
 #modal:has(.research-reveal){width:min(720px,calc(100vw - 24px))}
 #modal .research-reveal .research-description{font-size:12px;line-height:1.3}
 #modal .research-reveal .research-card-copy{padding:7px}
 #modal .research-reveal h3{font-size:18px}
}
.planet-research-badge>span{display:inline!important}
.world-meta>.planet-research-badge{flex:none;line-height:1.2;margin:0;background:#eedcba;color:#493823;font-size:10px;padding:1px 3px;min-width:34px}

/* Approved option A: a fine light outline, without opaque vehicle bases. */
.equipment-painted>img{position:relative;z-index:1;filter:var(--equipment-tint,brightness(1)) drop-shadow(1px 0 0 #fff2cf) drop-shadow(-1px 0 0 #fff2cf) drop-shadow(0 1px 0 #fff2cf) drop-shadow(0 -1px 0 #fff2cf) drop-shadow(0 2px 1px #251f28)!important}

.equipment-painted::after{z-index:2}
.faithful-target #worlds .world[data-vehicle-crowded="true"] .rover-markers{left:5%!important;right:5%!important;top:65%!important;gap:3px}
.faithful-target #worlds .world[data-vehicle-crowded="true"] .rover-marker.damaged:after{width:12px;height:12px;font-size:12px;line-height:12px;right:-2px;top:-2px}
#phone-faithful .unit-token .mobile-vehicle-art img{width:16px;height:16px}
#phone-faithful .selected-units .mobile-vehicle-art img{width:19px;height:19px}
/* The last row shares two equal buttons: Trait and Trade. */
.faithful-target .faithful-world-actions button[data-world-section="trait"],.faithful-target .faithful-world-actions button[data-inspector-trade]{grid-column:auto!important;min-height:38px!important}
#phone-faithful .detail-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}

#phone-faithful .mobile-vehicle-art{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;background:transparent;border:0}
#phone-faithful .unit-token .mobile-vehicle-art img{filter:var(--equipment-tint,brightness(1)) drop-shadow(1px 0 0 #fff2cf) drop-shadow(-1px 0 0 #fff2cf) drop-shadow(0 1px 0 #fff2cf) drop-shadow(0 -1px 0 #fff2cf)!important}
/* The frame asset already provides the shape; no rectangular backdrop behind it. */
.faithful-target[data-desktop-view='tabletop'] #desktop-drawer{background-color:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border-radius:0;filter:drop-shadow(0 15px 20px #35241e70)}

/* Also suppress the former counter if an older artwork module is cached. */
.equipment-owner-mark{display:none!important}

/* Owner paint applies to the artwork, not the neutral action/resource vocabulary. */
img.equipment-owned{filter:var(--equipment-tint,brightness(1))}
.infrastructure-role.owned .infrastructure-symbol{color:var(--owner)}

/* Research reveals sit directly on the illustrated parchment, outside the card face. */
#modal .research-reveal{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0;padding:0!important}
#modal .research-reveal>#cardclose{display:block;margin:28px auto 8px;min-width:180px;padding:10px 24px;background:transparent;color:#513c29;border:1px solid #b28a56;border-radius:8px;box-shadow:none;text-shadow:none}
#modal .research-reveal>#cardclose:hover{background:#c49a5426;border-color:#8f6735}
#modal .research-reveal>#cardclose:focus-visible{outline:2px solid #8f6735;outline-offset:3px}
@media(max-height:550px) and (min-width:601px){#modal .research-reveal>#cardclose{align-self:end;margin-top:24px}}

/* Composed-board QA: hidden worlds never paint terrain or retain revealed metadata. */
body.faithful-target #worlds .world.hidden .art{background:none!important;isolation:isolate;overflow:hidden;contain:paint}
body.faithful-target #worlds .world.hidden .art::before,body.faithful-target #worlds .world.hidden .art::after{content:none!important;background-image:none!important}
body.faithful-target[data-desktop-view='tabletop'] #worlds .world{transform-style:flat}
body.faithful-target[data-desktop-view='tabletop'] #worlds .world:hover{transform:translateY(-3px)}
/* Retain the settlement summary under each puck; vehicle pieces remain on the board. */
.faithful-target[data-desktop-view='tabletop'] .world-meta>.mini-colonies{display:inline-flex}
.faithful-target[data-desktop-view='tabletop'] .world-meta>.mini-vehicles{display:none}
.faithful-target .painted-colony.is-developed:is(.owner-2,.owner-3,.owner-4){filter:var(--settlement-tint,brightness(1))!important}
.faithful-target .world .rover-marker.damaged{outline:none;background:transparent}
@media(min-width:951px){
 .faithful-target #selected .world-presence-row{min-height:35px;grid-template-columns:62px minmax(0,1fr)}
 .faithful-target #selected .world-presence-items{flex-wrap:wrap;gap:4px}
 .faithful-target #selected .world-presence-item{flex-basis:23px}
 .faithful-target #selected .world-presence-item-art,.faithful-target #selected .world-presence-item-art>:is(.painted-piece,.sw-symbol,.infrastructure-symbol),.faithful-target #selected .world-presence-item-art .infrastructure-symbol svg{width:23px;height:24px}
 .desktop-play .mini-colonies .mini-piece.occupied{--piece-light:color-mix(in srgb,var(--owner) 35%,white);--piece-mid:var(--owner);--piece-dark:color-mix(in srgb,var(--owner) 55%,#10202b)}
}

/* Inspector pieces use the same clean presentation as the settlements. */
.faithful-target #selected .world-presence .equipment-painted::before,
.faithful-target #selected .world-presence .equipment-painted::after{content:none!important}
.faithful-target #selected .world-presence .equipment-painted{background:none!important;border:0;box-shadow:none}
.faithful-target #selected .world-presence .equipment-painted>img{filter:var(--equipment-tint,brightness(1)) drop-shadow(0 1px 1px #35241e55)!important;transform:none}
.faithful-target #selected .world-presence-item.is-damaged .equipment-painted>img{opacity:.85}
#phone-faithful .selected-units .mobile-vehicle-art img{filter:var(--equipment-tint,brightness(1)) drop-shadow(0 1px 1px #35241e55)!important}
@media(min-width:951px){
 .faithful-target #selected .world-presence-row{min-height:41px}
 .faithful-target #selected .world-presence-primary,.faithful-target #selected .world-presence-primary>.painted-piece{width:32px;height:32px}
 .faithful-target #selected .is-settlement .world-presence-items{padding-left:36px}
 .faithful-target #selected .world-presence-item:has(.equipment-painted){flex-basis:32px}
 .faithful-target #selected .world-presence-item-art:has(.equipment-painted),.faithful-target #selected .world-presence-item-art>.equipment-painted{width:32px;height:32px}
 .faithful-target #selected .world-presence-damage{width:9px;height:9px;font-size:9px;top:0;right:-1px}
}
/* Owned infrastructure/installations share their row's company paint. */
.faithful-target #selected .world-presence-item-art{--piece-light:color-mix(in srgb,var(--presence-owner) 30%,white);--piece-mid:var(--presence-owner);--piece-dark:color-mix(in srgb,var(--presence-owner) 50%,#182332)}

/* Solo controls belong in settings, not in the board's available height. */
#desktop-settings #botstatus>div,#phone-options-panel #botstatus>div{display:none}
#desktop-settings #botstatus{width:auto;max-width:none;justify-content:flex-start;margin:12px 0 0;padding:0;background:none;border:0;box-shadow:none}

/* Public notes flank the upper shoulders of each tabletop planet, without panels. */
.faithful-target[data-desktop-view='tabletop'] #worlds .art>.planet-side-research,
.faithful-target[data-desktop-view='tabletop'] #worlds .art>.planet-side-trait{position:absolute;top:6%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:clamp(24px,calc(var(--world-size)*.13),42px);height:clamp(42px,calc(var(--world-size)*.16),58px);min-width:0;max-width:none;padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;transform:none;float:none;z-index:5;color:#493823;font:bold clamp(9px,calc(var(--world-size)*.04),12px)/1.2 Georgia,serif;text-shadow:0 1px 1px #fff4d9}
.faithful-target[data-desktop-view='tabletop'] #worlds .art>.planet-side-research{left:auto;right:0}
.faithful-target[data-desktop-view='tabletop'] #worlds .art>.planet-side-trait{left:0;right:auto}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-trait>img{position:static;display:block;width:clamp(20px,calc(var(--world-size)*.1),32px);height:clamp(20px,calc(var(--world-size)*.1),32px);object-fit:contain;border:0;border-radius:50%}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-trait>b{position:static;width:auto;display:flex;align-items:center;gap:2px;font:inherit;color:inherit;background:none;padding:0;margin:0}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-trait>b .sw-symbol{width:12px;height:12px}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-trait .trait-number{display:none}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-trait .trait-tooltip{right:auto;left:0;text-shadow:none}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-research>.research-deck-mark{flex:0 0 auto;width:22px;height:30px}
.faithful-target[data-desktop-view='tabletop'] #worlds .planet-side-research>.research-deck-mark::after{width:15px;height:16px;background-size:auto 11.4px}

/* The player company card is a direct route to its existing panel. */
.desktop-play #players .company-shortcut{cursor:pointer}
.desktop-play #players .company-shortcut:focus-visible{outline:2px solid var(--p);outline-offset:3px}

/* Bug review 2026-10-16: integrate collections and retain visible equipment. */
#modalbody>.research-collection{background:transparent!important;border:0!important;box-shadow:none!important;padding:0}
.research-progress-slots>span.filled{background:#102b43;border-color:#d5ae66;overflow:hidden}
.research-progress-slots>span.filled img{width:23px;height:20px;object-fit:cover;object-position:left}
.faithful-target[data-desktop-view='tabletop'] .world-meta>.mini-vehicles:not(:has(.vacant)){display:inline-flex}

.sw-research-card .research-brand{display:block;width:100px;height:24px;object-fit:contain;margin:0 auto 6px}
