/* Approved D1 / Astrolabe. Nine-slice artwork retains the circular corners.
   Native window geometry remains owned by the app; this integration targets web. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet,#end:not(:empty)),
html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{
 --astrolabe-edge:clamp(30px,5vw,64px);--ink:#f8edda;--muted:#c9cbd1;--soft-ink:#c9bea9;
 box-sizing:border-box!important;border:var(--astrolabe-edge) solid transparent!important;border-image:url(visuals/cosmic/astrolabe-d1.webp) 180 stretch!important;border-image-width:var(--astrolabe-edge)!important;background:linear-gradient(135deg,#202b38,#151d2b 70%,#22293a)!important;background-clip:padding-box!important;color:#f8edda!important;border-radius:0!important;padding:18px 22px!important;box-shadow:0 20px 50px #0007!important;max-height:calc(100dvh - 24px);overflow:auto;isolation:isolate;
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) :is(h1,h2,h3){color:#f8edda}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) button.primary:not(:disabled){background:linear-gradient(#e8d4a7,#b58a50)!important;color:#32261e!important;border:1px solid #bfa272!important;box-shadow:inset 0 2px #fff7,inset 0 -3px #67441c60,0 3px 0 #5b412c!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal>.close{top:calc(var(--astrolabe-edge) + 8px)!important;right:calc(var(--astrolabe-edge) + 8px)!important;z-index:12}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modalbody>h2,.drawer-heading,.faithful-context-heading){padding-right:36px}
@media(max-width:600px){html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#phone-faithful .sheet),html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{--astrolabe-edge:30px;padding:14px!important}}
/* Fill beneath the transparent frame, joining artwork and inner surface. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet,#end:not(:empty)),
html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{background-clip:border-box!important;border-radius:24px!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal>.close{top:8px!important;right:8px!important}
/* Preview art is decorative; it must not cover or intercept confirmation controls. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal .preview-scene{overflow:hidden!important;pointer-events:none!important;flex:none}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal .preview-scene *{pointer-events:none!important}

/* In shallow landscape windows reserve height for content and controls. */
@media(max-height:500px){
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet),
 html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{--astrolabe-edge:24px;padding:12px 16px!important;max-height:calc(100dvh - 16px)}
}

/* Permanent desktop information panel: retain its existing content inset. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #desktop-inspector{
 box-sizing:border-box!important;border:24px solid transparent!important;border-image:url(visuals/cosmic/astrolabe-d1.webp) 180 stretch!important;border-image-width:24px!important;background:linear-gradient(135deg,#202b38,#151d2b)!important;border-radius:14px!important;padding:14px 2px 6px!important;color:#f8edda!important;overflow:auto!important
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #desktop-inspector :is(h2,p,.world-lore,.faithful-production,.faithful-colonies,.faithful-owner>small){color:#f8edda!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #desktop-inspector small{color:#c9bea9}
/* Adapt the report to its actual panel width, including split-screen tablets. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] .production-summary{container-type:inline-size}
@container(max-width:300px){
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] .production-summary-grid dl{grid-template-columns:minmax(0,1fr);gap:4px}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] .production-summary-grid dt{overflow-wrap:normal;word-break:normal}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] .production-summary-grid dd{text-align:left;margin-bottom:10px}
}
/* Content-first web windows: spend the viewport on choices, not empty frame. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet),
html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{--astrolabe-edge:32px;padding:18px!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal #modalbody,
html[data-ui-runtime=web] body.faithful-target #modal.local-entry-dialog #modalbody{max-height:none!important;overflow:visible!important;padding:0!important}
html[data-ui-runtime=web] body.faithful-target #modal[data-fit-dialog]{width:var(--dialog-fit-width)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 32px)!important}
html[data-ui-runtime=web] body.faithful-target #modal.local-entry-dialog{max-height:calc(100dvh - 32px)!important}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit{display:grid;gap:14px;min-width:0;--ink:#f8edda;--soft-ink:#d0c7b6;--surface:#192b3c;--edge:#b9955a;color:var(--ink);background:transparent!important}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit :is(h2,p,label){margin:0!important}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit .notice{background:#192b3c!important;color:#f8edda!important}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit h2{padding-right:35px}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit p{font-size:14px;line-height:1.45}
.local-setup-stats{display:flex;flex-wrap:wrap;gap:8px 22px;color:#d8bf89}
.local-setup-options{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.local-setup-options label{display:flex;flex-direction:column;gap:5px;min-width:0}
.local-setup-options select{width:100%;min-height:44px;font-size:16px}
.local-setup-rules{border-top:1px solid #b99a6666;padding-top:12px}
.local-setup-rules summary{cursor:pointer;min-height:32px;color:#d8bf89}
.local-setup-rules[open]{display:grid;gap:10px}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit>.row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit>.row button{white-space:normal;min-height:46px;margin:0;padding:9px;font-size:14px}
/* Experimental is one real checkbox, never a full-width input tile. */
html[data-ui-runtime=web] body.faithful-target :is(#modal,#online-screen) .experimental-setup{display:block!important;font-size:14px!important;line-height:1.4;padding:10px!important;margin:0!important}
html[data-ui-runtime=web] body.faithful-target :is(#modal,#online-screen) .experimental-setup input{display:inline-block!important;vertical-align:middle;width:18px!important;height:18px!important;min-height:18px!important;margin:0 8px 0 0!important;accent-color:#c8ad79}
html[data-ui-runtime=web] body.faithful-target :is(#modal,#online-screen) .experimental-setup small{display:block;font-size:12px;line-height:1.4;margin:4px 0 0 27px!important}
html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{width:min(1240px,100%)!important;max-height:calc(100dvh - 32px)!important;container-type:inline-size}
html[data-ui-runtime=web] #online-content{container-type:inline-size}
html[data-ui-runtime=web] #online-screen.setup-screen .hub-tabs{margin:10px 0 14px;padding:6px 0}
html[data-ui-runtime=web] #online-screen.setup-screen .setup-game{display:flex;flex-direction:column;gap:10px}
html[data-ui-runtime=web] #online-screen.setup-screen .setup-game>:is(label,h2,p){margin:0}
html[data-ui-runtime=web] #online-screen.setup-screen .setup-game>label{width:100%;margin-left:0}
html[data-ui-runtime=web] #online-screen.setup-screen .setup-public{margin:0}
html[data-ui-runtime=web] #online-screen.setup-screen .setup-footer{margin-top:14px;padding-top:12px}
html[data-ui-runtime=web] #online-screen .setup-fill-hint{color:#d3c5aa!important}
html[data-ui-runtime=web] #online-screen .public-settings{padding:10px;margin:0;min-width:0}
html[data-ui-runtime=web] #online-screen .public-settings label{margin:4px 0;font-size:13px}
html[data-ui-runtime=web] #online-screen .public-settings button{font-size:13px;padding:6px 10px;min-height:36px}
html[data-ui-runtime=web] #online-screen .lobby-workspace{display:grid;gap:18px;align-items:start}
html[data-ui-runtime=web] #online-screen .online-seat{padding:10px;gap:6px}
html[data-ui-runtime=web] #online-screen .online-seat-controls{gap:6px}
html[data-ui-runtime=web] #online-screen .online-seat-controls :is(button,select){font-size:13px;padding:6px 9px;min-height:36px;margin:0}
html[data-ui-runtime=web] #online-screen .online-seat-controls label{font-size:12px}
html[data-ui-runtime=web] #online-screen .lobby-settings-details{margin-top:14px}
html[data-ui-runtime=web] #online-screen .lobby-settings-details summary{min-height:40px;cursor:pointer;color:#d8bf89}
html[data-ui-runtime=web] #online-screen .lobby-settings-details>label{margin:8px 0;font-size:14px}
@container(min-width:760px){html[data-ui-runtime=web] #online-screen .lobby-workspace{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}}
@container(min-width:620px){html[data-ui-runtime=web] #online-screen.setup-screen .setup-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}html[data-ui-runtime=web] #online-screen.setup-screen .setup-players{border-top:0;border-left:1px solid #b7976666;padding:0 0 0 20px}}
@media(max-width:540px){html[data-ui-runtime=web] body.faithful-target #modal .local-setup-fit>.row{grid-template-columns:1fr}.local-setup-options{gap:10px}html[data-ui-runtime=web] body.faithful-target :is(#modal,#online-screen) .experimental-setup{font-size:14px!important}}
@media(max-height:500px){html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal,html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{--astrolabe-edge:20px;padding:12px!important}}
@media(min-width:1100px){html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog[data-fit-dialog]{width:var(--dialog-fit-width)!important;max-width:calc(100vw - var(--entry-panel-left) - 24px)!important}}
/* Labels stay within the usable centre of the existing illustrated plaque. */
html[data-ui-runtime=web] body.faithful-target #actionbar .painted-action-label{max-width:86%!important;text-align:center;flex-shrink:0;overflow:visible}
html[data-ui-runtime=web] #phone-faithful .action-label{padding-inline:3px;box-sizing:border-box}
/* Context panels are bounded by the viewport, not the board beneath the HUD. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context{position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;width:min(1240px,calc(100vw - 32px))!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;display:block;z-index:100}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context[hidden]{display:none!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context-body{max-height:none!important;overflow:visible!important;padding:0!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context #research{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment{grid-column:1/-1}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment>.row{display:contents}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment h3{grid-column:1/-1;margin:0}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment button{margin:0!important;width:100%;min-width:0;white-space:normal}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .drone-panel{grid-column:2;grid-row:2;border-top:0;border-left:1px solid #b18a5855;padding:0 0 0 24px;margin:0}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .research-rover-info{grid-column:1;grid-row:2;min-width:0}
@media(max-width:700px){html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context #research{display:block}html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .drone-panel{border-left:0;padding:14px 0;margin-top:14px}}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #desktop-inspector :is(.world-presence-heading,.world-presence-name,.world-presence-title,.world-presence-heading small){color:#f8edda!important;opacity:1!important}
/* Hover must not create nested filtered/3D compositing layers around sprites. */
html[data-ui-runtime=web] body.faithful-target #worlds .world,
html[data-ui-runtime=web] body.faithful-target #worlds .world:hover{transform:none!important;transform-style:flat!important;filter:none!important;transition:none!important}
html[data-ui-runtime=web] body.faithful-target #worlds .world .art,
html[data-ui-runtime=web] body.faithful-target #worlds .world:hover .art{filter:none!important;transform:none!important}
html[data-ui-runtime=web] body.faithful-target #worlds .world.hidden .art{contain:paint!important;overflow:hidden!important;background-image:none!important}
html[data-ui-runtime=web] body.faithful-target #worlds .world.hidden .art::before,
html[data-ui-runtime=web] body.faithful-target #worlds .world.hidden .art::after{display:none!important;content:none!important;background:none!important}
html[data-ui-runtime=web] body.faithful-target #worlds .world-meta{isolation:isolate;transform:none!important;filter:none!important}
@container(min-width:620px){
 html[data-ui-runtime=web] #online-screen.setup-screen .setup-game{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:10px 14px}
 html[data-ui-runtime=web] #online-screen.setup-screen .setup-game>:not(label){grid-column:1/-1}
}
@container(min-width:620px){html[data-ui-runtime=web] #online-screen.setup-screen .setup-game>.experimental-setup{grid-column:1/-1}}
html[data-ui-runtime=web] #online-screen .setup-public .public-settings{display:block!important}
html[data-ui-runtime=web] #online-screen .setup-public .public-settings [data-public-signin]{width:100%;margin-top:8px}
html[data-ui-runtime=web] #online-screen .setup-public .public-settings .public-choices{gap:8px}
html[data-ui-runtime=web] #online-screen .setup-public .public-settings .public-choices label{align-items:flex-start}
html[data-ui-runtime=web] #online-screen .setup-public .public-settings small{color:#d4c8b1}
/* The lobby shows occupancy first; editing a seat expands only that seat. */
html[data-ui-runtime=web] #online-screen .lobby-seat-details{width:100%}
html[data-ui-runtime=web] #online-screen .lobby-seat-details summary{color:#e5c995;cursor:pointer;font-size:13px;min-height:32px;display:list-item;padding:6px 0}
html[data-ui-runtime=web] #online-screen .lobby-seat-details .invite-seat{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:start}
html[data-ui-runtime=web] #online-screen .lobby-seat-details .invite-seat label{margin:8px 0;font-size:13px}
html[data-ui-runtime=web] #online-screen .lobby-seat-details .invite-seat button{font-size:13px;min-height:36px;padding:6px 10px}
@container(min-width:620px){html[data-ui-runtime=web] #online-screen .lobby-workspace{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}}
@media(max-width:540px){html[data-ui-runtime=web] #online-screen .lobby-seat-details .invite-seat{grid-template-columns:1fr}}
@media(min-width:701px){
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment{grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment:has(>.row+.row){grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* Finished report: viewport centered, readable surfaces, content-sized height. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end:not(:empty){position:fixed!important;inset:auto!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;width:min(1280px,calc(100vw - 40px))!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 40px)!important;margin:0!important;box-sizing:border-box;overflow:auto!important;z-index:85;padding:clamp(28px,4vw,64px)!important;gap:18px!important;color:#f5ecd9!important;font-size:16px!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end :is(.final-heading,.standings-footer){display:flex;align-items:center;flex-wrap:wrap;gap:12px}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-heading>div{margin-right:auto}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end :is(h2,th,td,caption,.final-note,.eyebrow,.company-name){color:#f5ecd9!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end h2{font:700 clamp(22px,2vw,30px)/1.2 Georgia,serif!important;margin:5px 0 0!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-winner{background:#253f4d!important;color:#f5ecd9!important;padding:12px!important;font:16px/1.5 system-ui!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end :is(button,a){background:#203847!important;color:#f5ecd9!important;border:1px solid #b99a60!important;min-height:44px;padding:8px 14px!important;font:15px/1.4 system-ui!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table{width:100%!important;table-layout:fixed;font:14px/1.4 system-ui!important;margin:0}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table :is(th,td){padding:10px 5px!important;overflow-wrap:normal!important;word-break:normal!important;text-align:center;border-color:#82999e66!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table thead th{background:#263f4d!important;font-size:12px!important;white-space:normal!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table th:first-child{width:125px;text-align:left}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-note{margin:6px 0 0!important;font:13px/1.5 system-ui!important}
html body.results-dismissed #end{display:none!important}
html body.results-dismissed #desktop-shell[data-phase=finished] :is(#desktop-planets,#desktop-rail,#desktop-inspector){visibility:visible!important}
#final-results-reopen{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:90;background:#203847;color:#f5ecd9;border:1px solid #b99a60;border-radius:8px;padding:10px 18px;min-height:44px}
@media(max-width:850px){
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table,html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table tbody{display:block}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table thead{display:none}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;margin-bottom:14px;padding:10px;background:#1a3040;border-radius:9px}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table th:first-child{grid-column:1/-1;width:auto}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table td{display:flex;align-items:center;justify-content:space-between;gap:8px}
 html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table td:before{content:attr(data-label);font-size:12px;text-align:left;color:#d4cbb8}
}
.final-cell-label{display:none}
@media(max-width:850px){html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-table td:before{content:none}html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .final-cell-label{display:inline;font-size:12px;text-align:left;color:#d4cbb8}}
/* Inspector and sheet inventory rows own an explicit dark-surface palette. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#desktop-inspector,#selected,#faithful-context,#desktop-drawer,#phone-faithful .sheet) .world-presence{--ink:#f8edda;--muted:#d0c7b6;--soft-ink:#d0c7b6;color:#f8edda!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#desktop-inspector,#selected,#faithful-context,#desktop-drawer,#phone-faithful .sheet) .generator-mini-link{background:#203442!important;color:#f8edda!important;border-color:#c6aa72!important;opacity:1!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#desktop-inspector,#selected,#faithful-context,#desktop-drawer,#phone-faithful .sheet) .generator-mini-link :is(span,small,strong){color:inherit!important;opacity:1!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#desktop-inspector,#selected,#faithful-context,#desktop-drawer,#phone-faithful .sheet) .generator-mini-link small{color:#d0c7b6!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#desktop-inspector,#selected,#faithful-context,#desktop-drawer,#phone-faithful .sheet) .generator-mini-link:is(:hover,:focus-visible){background:#304b5b!important;color:#fff3df!important;filter:none!important;opacity:1!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) button.primary:not(:disabled){background-color:#d2b37c!important}
/* Guide text is content, never the brown Tabletop hint colour on dark panels. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) :is(.guidehint,#guide p){color:#f8edda!important;opacity:1!important;text-shadow:none!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) #guide .muted{color:#d0c7b6!important;opacity:1!important}
/* Labels share one title row; both selects share the same 44px control row.
   The civilization emblem is inside that row and does not push its select down. */
html[data-ui-runtime=web] .local-setup-options{grid-template-rows:auto 44px;row-gap:6px;align-items:stretch}
html[data-ui-runtime=web] .local-setup-options>label{display:grid!important;grid-template-rows:subgrid;grid-row:span 2;position:relative;gap:6px!important}
html[data-ui-runtime=web] .local-setup-options>label>select{grid-row:2;height:44px;min-height:44px;margin:0!important;box-sizing:border-box}
html[data-ui-runtime=web] .local-setup-options .company-select-symbol{position:absolute;left:8px;bottom:6px;width:32px!important;height:32px!important;margin:0!important;pointer-events:none}
html[data-ui-runtime=web] .local-setup-options #humanseat{padding-left:48px!important}

/* Phone final standings: cream text on a cream card was unreadable. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .score{background:#203847!important;border:1px solid #b99a60!important;color:#f5ecd9!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .score :is(div,b,strong,span){color:#f5ecd9!important}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #end .score small{color:#d8ccb4!important}

/* The expedition and Drone information share the surrounding Cosmic window surface. */
.research-expedition-standard{display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap}
.research-expedition-deck{display:none}
html[data-ui-runtime=web] body[data-board-background=cosmic] :is(#faithful-context,#desktop-drawer,#phone-faithful .sheet) #research,
html[data-ui-runtime=web] body[data-board-background=cosmic] :is(#faithful-context,#desktop-drawer,#phone-faithful .sheet) #research :is(.research-rover-info,.drone-panel){
 background:transparent!important;box-shadow:none!important;
}
html[data-ui-runtime=web] body[data-board-background=cosmic] :is(#faithful-context,#desktop-drawer,#phone-faithful .sheet) #research :is(.research-expedition-standard,.research-expedition-hazards){display:none}
html[data-ui-runtime=web] body[data-board-background=cosmic] :is(#faithful-context,#desktop-drawer,#phone-faithful .sheet) .research-expedition-deck{
 display:inline-flex;align-items:center;gap:12px;max-width:100%;margin-block:2px;
}
html[data-ui-runtime=web] body[data-board-background=cosmic] .research-expedition-deck .research-deck-mark{
 width:40px;height:56px;flex:0 0 40px;border:1px solid #bc99738f;border-radius:5px;
}
html[data-ui-runtime=web] body[data-board-background=cosmic] .research-expedition-count{display:grid;gap:2px;color:#e5d7c1}
html[data-ui-runtime=web] body[data-board-background=cosmic] .research-expedition-count strong{color:#ecc484;font-size:1.28em}
html[data-ui-runtime=web] body[data-board-background=cosmic] .research-expedition-count small{color:#d0c3ae;font-size:1em}
html[data-ui-runtime=web] body[data-board-background=cosmic] :is(#faithful-context,#phone-faithful .sheet) #research .vehicle-deployment button{
 background:#fbdfac08!important;border-color:#d0ae7780!important;
}
html[data-ui-runtime=web] body[data-board-background=cosmic] :is(#faithful-context,#phone-faithful .sheet) #research .vehicle-deployment button:enabled:hover{
 background:#fbdfac16!important;border-color:#ecc484!important;
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #faithful-context .vehicle-deployment{
 grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr));
}
