#LeftContent astra-detail-highlight { display: none; pointer-events: none; }
#ShipScreen #Warpbar > .tval:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
#ShipScreen #Warpbar > .tval:last-child { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.build-action-chip {
    box-sizing: border-box; border: 0; border-radius: 10px; padding: 4px 8px; cursor: pointer;
    background: linear-gradient(to bottom, #006600 5%, #003300 100%); color: #fff;
    font: inherit; font-size: 10px; line-height: 14px; text-transform: uppercase; text-align: center;
}
.planet-build-base { position: absolute; z-index: 1; bottom: 144px; width: max-content; min-height: 26px; }
.build-action-chip.is-neutral { background: linear-gradient(#494949, #292929); }
.build-action-chip.is-queued { background: linear-gradient(#ffd36b, #efa32f); color: #281a08; }
.fleet-build-base {
    position: relative; padding: 0; margin: 0; border: 1px solid transparent; background: transparent; cursor: pointer;
}
.fleet-build-base img { display: block; opacity: .4; }
.fleet-build-base.is-queued img { opacity: 1; }
.fleet-build-base .build-action-chip {
    position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); padding: 1px 5px;
}
.fleet-build-base.MobileMainPic { position: absolute; left: 135px; top: 50px; z-index: 51; }
.fleet-build-base.MobileMainPic img { width: 60px; height: 60px; }
#MapScreenContainer .planet-build-base::after { content: ""; position: absolute; inset: -6px 0; }
#LeftContent #Friendlybar .fcv { z-index: 1; min-width: 0; width: max-content; }
#StarbaseScreen #Resourcesbar { padding-left: 0; }
#StarbaseScreen:has(#Resourcesbar .neu) :is(#StarbaseTechbar, #RaceTechbar, #StarbaseSuppliesbar, #Resourcesbar) {
    padding-block: 1px 2px;
}
@media (orientation: portrait), (max-height: 549px) {
    #StarbaseScreen:has(#Resourcesbar .neu) :is(#StarbaseTechbar, #RaceTechbar, #StarbaseSuppliesbar, #Resourcesbar) .lval {
        height: 19px; line-height: 19px;
    }
}
#ShipSpecialbar[data-action-label="Warp Chunnel"] { width: max-content; }
#ShipSpecialbar[data-action-label="Warp Chunnel"] > .special { min-width: 0; margin: 0; padding-inline-end: 8px; }
#PlanetScreen .planet-art-build {
    float: left; display: block; position: relative; padding: 0; margin: 0;
    border: 0; background: transparent; color: inherit; cursor: pointer;
}
.planet-art-build .MainScreenPic { display: block; float: none; aspect-ratio: 1; object-fit: contain; }
.planet-art-build .build-action-chip {
    position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%);
    width: max-content; pointer-events: none;
}
#rNavTop .planet-notes {
    float: right; display: grid; place-items: center; box-sizing: border-box; min-width: 38px; height: 40px;
    border: 0; background: transparent; cursor: pointer; font-size: 13px; padding: 0 15px 0 9px;
}
#rNavTop .planet-notes:is(:hover, :focus-visible) { background: linear-gradient(#393939, #202020); }
#PlanetScreen .planet-art-build, #rNavTop .planet-notes {
    outline: none; box-shadow: none; -webkit-tap-highlight-color: transparent;
}
#rNavTop .planet-notes:focus-visible .notes::before { color: white; }
#PlanetScreen #Resourcesbar .lval > span > span { z-index: 1; }
#MoreScreen:has(> #BuildStarbaseScreen) { min-height: 0; }
#BuildStarbaseScreen {
    --review-height: calc(100dvh / var(--game-ui-scale, 1));
    max-height: calc(var(--review-height) - 82px); overflow-y: auto; scrollbar-width: thin;
}
#MoreScreen.MoreFullScreen #BuildStarbaseScreen { max-height: calc(100% - 40px); --review-height: 100dvh; }
#BuildStarbaseScreen astra-model-preview { height: clamp(120px, calc(var(--review-height) - 330px), 250px); }
#BuildStarbaseScreen astra-model-preview img { width: 100%; height: 100%; }
.starbase-build-details { padding: 10px 14px 14px; color: #ddd; }
.starbase-build-details table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.starbase-build-details th, .starbase-build-details td { padding: 0; text-align: right; }
.starbase-build-details th:first-child, .starbase-build-details tfoot td { text-align: left; }
.starbase-build-details thead th { padding-bottom: 2px; font-size: 11px; color: #aaa; }
.starbase-build-details tbody { font: 12px/20px Arial, sans-serif; }
.starbase-build-details tbody th { color: #999; font-weight: normal; }
@media (orientation: landscape) and (min-height: 550px) {
    #MoreScreen:not(.MoreFullScreen) .starbase-build-details tbody { font-size: 13px; line-height: 24px; }
    #MoreScreen:not(.MoreFullScreen) .starbase-build-details tbody th { font-size: 12px; }
}
#MoreScreen .starbase-build-details p { max-width: none; padding: 8px 0 0; }
.starbase-build-details button { display: block; margin: 10px auto 0; }
#BuildStarbaseScreen #BuildingStarbaseMessage { font: inherit; color: #ddd; }
.planet-build-base:focus-visible, .fleet-build-base:focus-visible { outline: 2px solid #ddd; outline-offset: -2px; }

@media (any-hover: hover) and (any-pointer: fine) {
    #LeftContent :is(#PlanetScreen, #ShipScreen, #StarbaseScreen) .LeftBox { cursor: default; }
    #LeftContent :is(#PlanetScreen, #ShipScreen, #StarbaseScreen) .detail-action { cursor: pointer; }
    #SpaceDockbar:has(:is(#NoBuildYet, #BuildShipPic):hover) #NoBuildYet,
    .planet-build-base:not(.is-neutral, .is-queued):hover, .fleet-build-base:hover .build-action-chip:not(.is-neutral, .is-queued) {
        background: linear-gradient(#248424, #116511);
    }
    #SpaceDockbar:has(:is(#NoBuildYet, #BuildShipPic):hover) #NoBuildYet,
    .fleet-build-base:hover .build-action-chip:not(.is-neutral, .is-queued) {
        box-shadow: inset 0 0 0 1px #8bc68b;
    }
    #LeftContent astra-detail-highlight:not([hidden]) {
        display: block; position: absolute; z-index: 14; box-sizing: border-box;
        border: 1px solid rgb(153 204 204 / 55%); border-radius: 5px;
        background: linear-gradient(rgb(205 225 225 / 10%), rgb(205 225 225 / 4%));
    }
    astra-detail-highlight > svg { display: none; }
    .detail-row-highlight {
        position: absolute; inset-inline: 2px; border-radius: 3px;
        background: linear-gradient(rgb(205 225 225 / 12%), rgb(205 225 225 / 6%));
    }
    #LeftContent astra-detail-highlight.stepped:not([hidden]) { border-color: transparent; background: none; }
    astra-detail-highlight.stepped > svg {
        display: block; position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px);
        fill: rgb(205 225 225 / 7%); stroke: rgb(153 204 204 / 55%); pointer-events: none;
    }
}

@media (hover: hover) and (pointer: fine) {
    .Card.ship-choice { position: relative; }
    #MoreScreen .transfer-target-list .ItemSelection:hover::after,
    .ship-choice:hover::after, .fleetitem[data-shipid]:hover::after {
        content: ""; position: absolute; inset: -1px 0 0; pointer-events: none;
        border-radius: inherit;
        background: linear-gradient(rgb(153 204 204 / 18%), rgb(153 204 204 / 6%));
    }
    .ship-choice-table > div:hover > div {
        box-shadow: inset 0 0 0 100vmax rgb(153 204 204 / 12%); cursor: pointer;
    }
    #TransferScreen .formrow:not(.formrowselected, .formrowdisabled):hover,
    #MoreScreen.MoreTransfer :is(#ssup, #lfm, #mkt, #buyf, #buyt):not(.formrowselected):hover {
        background-image: linear-gradient(rgb(153 204 204 / 12%), rgb(153 204 204 / 4%));
    }
}
