/* Cosmic — approved charcoal / Noto presentation, 2026-11-18.
   Promoted to the standard Cosmic presentation, 2026-11-21.
   Geometry, artwork, owner colours, fitting, card faces and handlers are shared.
   Font faces use private family names and are fetched only when Dev uses them. */
@font-face {
  font-family: 'Cosmic Dev Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-sans-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Cosmic Dev Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-sans-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Cosmic Dev Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cosmic Dev Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cosmic Dev Serif';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-serif-greek-ext.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
@font-face {
  font-family: 'Cosmic Dev Serif';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-serif-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Cosmic Dev Serif';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cosmic Dev Serif';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/cosmic-dev/noto-serif-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]{
 --dev-surface:#23212c;--dev-raised:#2c2935;--dev-control:#302d39;
 --dev-hover:#3b3546;--dev-ink:#f4ead6;--dev-muted:#c5bec9;
 --dev-gold:#c9ad7c;--dev-line:#bfa67955;--dev-control-line:#8c8192;
 --dev-sans:'Cosmic Dev Sans',system-ui,sans-serif;
 --dev-serif:'Cosmic Dev Serif',Georgia,serif;
 font-family:var(--dev-sans);
}

/* Preserve the existing nine-slice frames and their measured content insets. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#desktop-inspector,#phone-faithful .sheet,#end:not(:empty),#online-screen:not(.welcome-screen)>.online-card)
 :not(:is(.printed-card *,.mission-card-v2 *,.sw-market-card *,.sw-research-card *)):is(h1,h2,h3){font-family:var(--dev-serif)!important;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#desktop-inspector,#phone-faithful .sheet,#end:not(:empty),#online-screen:not(.welcome-screen)>.online-card){
 --ink:var(--dev-ink);--soft-ink:var(--dev-muted);--muted:var(--dev-muted);
 --cosmic-control:var(--dev-control);--cosmic-control-hover:var(--dev-hover);
 --cosmic-control-ink:var(--dev-ink);--cosmic-control-line:var(--dev-control-line);
 color:var(--dev-ink)!important;font-family:var(--dev-sans)!important;
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#desktop-inspector,#phone-faithful .sheet,#end:not(:empty),#online-screen:not(.welcome-screen)>.online-card)
 :not(:is(.printed-card *,.mission-card-v2 *,.sw-market-card *,.sw-research-card *)):is(p,small,button,input,select,textarea,summary,label,legend,th,td,dt,dd,.company-name){font-family:var(--dev-sans)!important;}

/* The card-only viewers retain their transparent stage and their own skin. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#desktop-inspector,#phone-faithful .sheet,#end:not(:empty),#online-screen:not(.welcome-screen)>.online-card)
 :not(:is(.printed-card *,.mission-card-v2 *,.sw-market-card *,.sw-research-card *)):is(p,.world-lore,.faithful-production,.faithful-colonies,.faithful-owner>small,.world-presence-heading,.world-presence-name,.world-presence-title){color:var(--dev-ink)!important;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#desktop-inspector,#phone-faithful .sheet,#end:not(:empty),#online-screen:not(.welcome-screen)>.online-card):not(:has(.market-detail,.field-expedition,.generator-inventory,.generator-card-only)){background:var(--dev-surface)!important;}

html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet)
 :is(.installation-overview,.notice:not(.error):not(.resource-shortfall),.your-access,.cost-breakdown,.research-progress,.rover-relocation,.dual-drone-tools,.production-summary-grid>article,.resource>div,.experimental-setup,.market-setup){
 background:var(--dev-raised)!important;color:var(--dev-ink)!important;border-color:var(--dev-line)!important;box-shadow:none!important;
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 #faithful-context .installation-overview :is(p,strong,small){background:transparent!important;color:var(--dev-ink)!important;}
/* Scan notes need a matching surface as well as the Dev text colour. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet)
 .scan-option>p:not(.error){background:var(--dev-raised)!important;color:var(--dev-ink)!important;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet)
 :is(p,.muted,.world-lore){font-weight:400;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet)
 :is(.muted,.installation-unavailable,.generator-status,.production-summary small){color:var(--dev-muted)!important;}
/* Keep the long access explanation in the existing desktop panel's line budget. */
html[data-ui-runtime=web] body.desktop-play.faithful-target[data-board-background=cosmic]
 #faithful-context .connection-panel>.other-access{font-size:14px;line-height:1.6;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) button:disabled{
 background:var(--dev-raised)!important;color:#bdb5c5!important;border-color:#746c7d!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:linear-gradient(#ddc697,#bb985e)!important;color:#231e29!important;border-color:var(--dev-gold)!important;
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet)
 :is(.notice.error,.resource-shortfall,.resource-shortfall-message,.shortfall-item,.shortfall-number,.trade-form-error),
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet)
 :is(.notice.error,.resource-shortfall) :is(p,strong,small,span){color:var(--cosmic-warning-ink,#ffceca)!important;}

/* Apply the same typography to the board's UI, not to the raster card faces. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#players .company-title,#phone-faithful .company-title,#worlds .caption>strong){font-family:var(--dev-serif)!important;}
/* Illustrated action plaques keep the established lettering and fitting budget. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#actionbar,#phone-faithful [data-mobile-action]){font-family:Georgia,'Times New Roman',serif!important;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#players .player>small,#players .seat-label,#desktop-workshop button,#desktop-event-ribbon,#desktop-event-ribbon button,#desktop-event-ribbon strong,#desktop-phase,#online-toolbar-open,#phone-faithful .mobile-event-row,#phone-faithful .players .player>small){font-family:var(--dev-sans)!important;}
html[data-ui-runtime=web] body.desktop-play.faithful-target[data-board-background=cosmic] header::after,
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #phone-faithful .mobile-event-row{background:var(--dev-surface)!important;border-color:var(--dev-line)!important;}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#online-toolbar-open,#desktop-event-ribbon .event-next-link){background:var(--dev-control)!important;border-color:var(--dev-gold)!important;}

/* A dimmed, non-interactive backdrop does not reflow or reparent the board. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic] #modal::backdrop{background:#100c1caa;backdrop-filter:blur(3px);}
html[data-ui-runtime=web] body.desktop-play.faithful-target[data-board-background=cosmic]
 #desktop-shell:has(#faithful-context:not([hidden]))::after{content:'';position:absolute;inset:0;z-index:30;background:#100c1c66;backdrop-filter:blur(2px);pointer-events:none;}

/* One continuous window surface. Decorative card faces and controls retain their paint. */
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#desktop-inspector,#phone-faithful .sheet){
 --surface:var(--dev-surface);--paper:var(--dev-surface);
}
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modalbody,#faithful-context-body,#desktop-drawer-content,#desktop-world-panel,#desktop-research-panel),
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modalbody,#faithful-context-body,#desktop-drawer-content) > :is(section,div):not(:is(.market-detail,.field-expedition,.generator-inventory,.generator-card-only,.printed-card)),
html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 :is(#modal,#faithful-context,#desktop-drawer,#phone-faithful .sheet) .company-summary{
 background:transparent!important;
}

html[data-ui-runtime=web] body.faithful-target[data-board-background=cosmic]
 #desktop-menu .game-menu-content{background:var(--dev-surface)!important;}
