/*
 * Authentic TNO interface skin
 *
 * Every visible frame, button, tab, checkbox, scrollbar and CRT surface in
 * this layer comes from the supplied TNO `interface/` archive.  The base
 * stylesheet still owns generator geometry and export rendering; this file
 * only reskins the website shell and its editing controls.
 */

:root {
    --tno-cyan: #59c7c3;
    --tno-cyan-soft: #8ad7d3;
    --tno-blue: #596ad7;
    --tno-ink: #061013;
    --tno-panel: #121615;
    --tno-panel-soft: #202422;
    --tno-metal: #353735;
    --tno-copy: #d7dbd7;
    --tno-copy-muted: #9fa8a3;
    --tno-danger: #dd7f82;
}

html {
    background: #080a09;
}

body {
    color: var(--tno-copy);
    font-family: "RuiZheng";
    background:
        url("./assets/interface-ui/tile-frontend-bottom.webp") center bottom / 484px 128px repeat-x,
        #101312;
}

button,
input,
select,
textarea,
summary {
    font-family: "RuiZheng";
    border-radius: 0 !important;
}

.siteMastheadEdition,
#topButtons .navButton,
.workflowSidebarHeader > strong,
.workflowStep > summary strong,
.workflowDownload,
.assetLibraryHeader h2,
.portraitStudioHeader h2,
.assetLibraryTabs button,
.portraitStageTabs button {
    font-family: "WenHanJianZhu";
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
    outline: 1px solid var(--tno-cyan-soft);
    outline-offset: 2px;
}

/* Masthead and native TNO tab bar */
.siteMasthead {
    border: 0;
    border-bottom: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-frontend-bottom.webp") 28 30 70 / 0 0 8px 0 / 0 stretch;
    background:
        linear-gradient(rgba(3, 8, 12, 0.3), rgba(3, 8, 12, 0.55)),
        url("./assets/branding/tno-map-masthead.png") center 58% / cover no-repeat;
    box-shadow:
        inset 0 -28px 36px rgba(0, 0, 0, 0.42),
        inset 0 1px rgba(255, 255, 255, 0.08);
}

.siteMasthead::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    z-index: 3;
    height: 18px;
    pointer-events: none;
    background: url("./assets/interface-ui/topbar.webp") center bottom / auto 18px repeat-x;
    opacity: 0.92;
}

.siteMastheadEdition {
    right: 24px;
    bottom: 21px;
    min-width: 190px;
    padding: 8px 14px 7px;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-button-crt.webp") 8 fill / 7px / 0 stretch;
    color: #f1f3ee;
    background: rgba(4, 11, 13, 0.78);
    text-align: center;
    text-shadow: 0 1px 2px #000;
}

#topButtons {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    min-height: 42px;
    padding: 3px 5px 4px;
    box-sizing: border-box;
    background:
        url("./assets/interface-ui/header-wider.webp") center / auto 42px repeat-x,
        #252725;
    border-bottom: 1px solid #070808;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.56);
}

#topButtons .navButton {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 35px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/nav-tab-idle.webp") 8 16 fill / 7px 14px / 0 stretch;
    color: #bfc5c1;
    background: transparent;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-shadow: 0 1px #000;
}

#topButtons .navButton:hover {
    filter: none;
    border-image-source: url("./assets/interface-ui/nav-tab-hover.webp");
    color: #f0f2ed;
}

#topButtons .navButton.isActive,
#topButtons .navButton[aria-selected="true"] {
    border-image: url("./assets/interface-ui/button-blue.webp") 7 14 fill / 7px 14px / 0 stretch;
    color: #f2f6f2;
    background: #041219;
    text-shadow:
        0 0 7px rgba(89, 199, 195, 0.52),
        0 1px #000;
}

.assetLibraryNavButton {
    color: inherit;
    background: transparent;
}

.assetLibraryNavButton::before {
    display: none;
}

/* Core preview module */
.workspacePreview {
    border: 11px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-thin-crt.webp") 18 / 11px / 0 stretch;
    background:
        radial-gradient(circle at 50% 48%, rgba(4, 8, 9, 0.34) 0 22%, rgba(3, 7, 8, 0.66) 70%, rgba(1, 3, 3, 0.9) 100%),
        linear-gradient(rgba(3, 8, 9, 0.48), rgba(3, 8, 9, 0.7)),
        url("./assets/branding/tno-preview-workspace-bg.png") center / auto 118% no-repeat;
    background-color: #050808;
    box-shadow:
        inset 0 0 70px rgba(0, 0, 0, 0.72),
        0 4px 14px rgba(0, 0, 0, 0.58);
}

.workspacePreviewChrome {
    background:
        linear-gradient(90deg, rgba(5, 12, 13, 0.15), rgba(2, 6, 7, 0.62)),
        url("./assets/interface-ui/category-header-long.webp") left center / auto 44px repeat-x;
    border-bottom: 1px solid #070a0a;
    box-shadow:
        inset 0 -1px rgba(104, 111, 107, 0.42),
        0 3px 10px rgba(0, 0, 0, 0.68);
}

.workspacePreviewIdentity strong {
    text-shadow:
        0 0 6px rgba(70, 190, 187, 0.26),
        0 1px #000;
}

.workspacePreviewIdentity span {
    text-shadow: 0 1px #000;
}

.previewScaler {
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.78));
}

.previewZoomControl {
    min-height: 34px;
    padding: 0 4px 0 9px;
    box-sizing: border-box;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/find-editbox.webp") 12 22 fill / 7px 10px / 0 stretch;
    color: var(--tno-copy);
    background: #071011;
    box-shadow:
        inset 0 0 8px rgba(70, 191, 188, 0.08),
        0 2px 7px rgba(0, 0, 0, 0.62);
}

.previewZoomControl input[type="range"] {
    appearance: none;
    height: 18px;
    background: transparent;
}

.previewZoomControl input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: #315f61;
    border: 1px solid #091011;
}

.previewZoomControl input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 13px;
    height: 18px;
    margin-top: -8px;
    background: url("./assets/interface-ui/scroll-thumb.webp") center / 13px 18px no-repeat;
}

.previewZoomControl button {
    border: 6px solid transparent;
    border-image: url("./assets/interface-ui/button-small.webp") 12 fill / 6px / 0 stretch;
    color: #d8e2de;
    background: transparent;
    text-shadow: 0 1px #000;
}

/* Right-hand workflow window */
.workflowSidebar {
    gap: 6px;
    padding: 9px 7px 12px 9px;
    border: 9px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-border.webp") 18 / 9px / 0 stretch;
    color: var(--tno-copy);
    background:
        linear-gradient(rgba(9, 12, 12, 0.93), rgba(12, 15, 14, 0.96)),
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.58);
    scrollbar-color: var(--tno-cyan) #121716;
}

.workflowInlineStatus {
    min-height: 30px;
    align-content: center;
    padding: 0 11px;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/generic-text-60.webp") 10 fill / 7px / 0 stretch;
    color: #a9bbb6;
    background: #071011;
    font-size: 11px;
    letter-spacing: 0.03em;
}

.workflowSidebar::-webkit-scrollbar,
.assetLibraryBody::-webkit-scrollbar,
.portraitControls::-webkit-scrollbar,
.nationalSpiritManagerList::-webkit-scrollbar {
    width: 18px;
}

.workflowSidebar::-webkit-scrollbar-track,
.assetLibraryBody::-webkit-scrollbar-track,
.portraitControls::-webkit-scrollbar-track,
.nationalSpiritManagerList::-webkit-scrollbar-track {
    background:
        url("./assets/interface-ui/scroll-track.webp") center / 12px 12px repeat-y,
        #101413;
}

.workflowSidebar::-webkit-scrollbar-thumb,
.assetLibraryBody::-webkit-scrollbar-thumb,
.portraitControls::-webkit-scrollbar-thumb,
.nationalSpiritManagerList::-webkit-scrollbar-thumb {
    border: 1px solid #14201f;
    background:
        url("./assets/interface-ui/scroll-thumb.webp") center / 16px 16px repeat-y,
        var(--tno-cyan);
}

#polinationalSpirit::-webkit-scrollbar {
    height: 28px;
}

#polinationalSpirit::-webkit-scrollbar-track {
    background:
        url("./assets/interface-ui/scrollbar-horizontal-political.webp") center / 100% 28px no-repeat,
        url("./assets/interface-ui/scroll-track-horizontal.webp") center / 12px 12px repeat-x,
        #101413;
}

#polinationalSpirit::-webkit-scrollbar-thumb {
    border: 5px solid transparent;
    background: url("./assets/interface-ui/scroll-thumb.webp") center / 16px 16px no-repeat;
}

#polinationalSpirit::-webkit-scrollbar-button:horizontal:decrement {
    width: 18px;
    background: url("./assets/interface-ui/scroll-left.webp") center / 16px 16px no-repeat;
}

#polinationalSpirit::-webkit-scrollbar-button:horizontal:increment {
    width: 18px;
    background: url("./assets/interface-ui/scroll-right.webp") center / 16px 16px no-repeat;
}

.nationalSpiritScroller {
    background:
        url("./assets/interface-ui/scrollbar-horizontal.webp") center / 100% 18px no-repeat,
        #081011;
}

.nationalSpiritScroller [data-national-spirit-scroll="previous"] {
    background-image: url("./assets/interface-ui/scroll-left.webp");
    background-size: 16px 16px;
}

.nationalSpiritScroller [data-national-spirit-scroll="next"] {
    background-image: url("./assets/interface-ui/scroll-right.webp");
    background-size: 16px 16px;
}

.nationalSpiritScroller input[type="range"] {
    appearance: none;
    background: transparent;
}

.nationalSpiritScroller input[type="range"]::-webkit-slider-runnable-track {
    height: 12px;
    background: url("./assets/interface-ui/scroll-track-horizontal.webp") center / 12px 12px repeat-x;
}

.nationalSpiritScroller input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -2px;
    background: url("./assets/interface-ui/scroll-thumb.webp") center / 16px 16px no-repeat;
}

.nationalSpiritScroller input[type="range"]::-moz-range-track {
    height: 12px;
    background: url("./assets/interface-ui/scroll-track-horizontal.webp") center / 12px 12px repeat-x;
}

.nationalSpiritScroller input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 0;
    background: url("./assets/interface-ui/scroll-thumb.webp") center / 16px 16px no-repeat;
}

.nationalSpiritManager {
    padding: 5px;
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-border.webp") 64 fill / 8px / 0 stretch;
    background:
        linear-gradient(rgba(4, 9, 10, 0.9), rgba(5, 11, 12, 0.95)),
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat;
}

.nationalSpiritManagerHeader {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/category-header-long.webp") 12 20 fill / 7px 12px / 0 stretch;
    background: #272b29;
    text-shadow: 0 1px #000;
}

.nationalSpiritManagerList {
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-scroll-window.webp") 24 fill / 8px / 0 stretch;
    background: #071010;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.72);
}

.nationalSpiritManagerEmpty {
    background:
        url("./assets/interface-ui/generic-text-60.webp") center / 100% 100% no-repeat,
        #071010;
    text-shadow: 0 1px #000;
}

.nationalSpiritManagerItem {
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-idea-entry.webp") 64 fill / 8px / 0 stretch;
    background: #17201e;
    text-shadow: 0 1px #000;
}

.nationalSpiritManagerItem:hover {
    filter: brightness(1.1);
}

.nationalSpiritManagerItem.isDropTarget {
    border-image-source: url("./assets/interface-ui/tile-research-red.webp");
    background: #251012;
}

.nationalSpiritDragHandle {
    border: 6px solid transparent;
    border-image: url("./assets/interface-ui/tile-sort-handle.webp") 6 fill / 6px / 0 stretch;
    box-sizing: border-box;
    background: #09100f;
}

.nationalSpiritManagerPreview {
    border: 5px solid transparent;
    border-image: url("./assets/interface-ui/tile-card-idle.webp") 14 / 5px / 0 stretch;
    box-sizing: border-box;
    background-color: #060a09;
}

.nationalSpiritOrderButton {
    background-image: url("./assets/interface-ui/change-order.webp");
    background-size: 54px 28px;
}

.nationalSpiritOrderButtonLeft {
    background-position: left center;
}

.nationalSpiritOrderButtonRight {
    background-position: right center;
}

.nationalSpiritDeleteButton {
    background-image: url("./assets/interface-ui/delete-crt.webp");
    background-size: 31px 31px;
}

.nationalSpiritOrderButton:hover:not(:disabled),
.nationalSpiritDeleteButton:hover {
    filter: brightness(1.28);
}

.nationalSpiritOrderButton:focus-visible,
.nationalSpiritDeleteButton:focus-visible {
    outline: 1px solid var(--tno-cyan);
    outline-offset: 1px;
}

.workflowSidebarHeader {
    position: relative;
    min-height: 72px;
    gap: 1px;
    padding: 11px 17px 10px;
    border: 10px solid transparent;
    border-image: url("./assets/interface-ui/tile-plain-header.webp") 20 16 fill / 10px 8px / 0 stretch;
    background:
        url("./assets/interface-ui/header-wider.webp") center top / 100% 42px no-repeat,
        #252826;
}

.workflowSidebarHeader::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 5px;
    height: 1px;
    background: var(--tno-cyan);
    box-shadow: 0 0 5px rgba(89, 199, 195, 0.6);
    opacity: 0.72;
}

.workflowSidebarHeader > span {
    color: var(--tno-cyan-soft);
    font-size: 9px;
}

.workflowSidebarHeader > strong {
    font-size: 22px;
    text-shadow: 0 2px #000;
}

.workflowSidebarHeader > small {
    color: #a6afaa;
    font-size: 11px;
}

.workflowStep {
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-border.webp") 18 / 8px / 0 stretch;
    color: var(--tno-copy);
    background: #0c1111;
}

.workflowStep[open] {
    border-image: url("./assets/interface-ui/tile-research-red.webp") 32 fill / 8px / 0 round;
    background: #120a0d;
}

.workflowStep > summary {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 51px;
    margin: -4px;
    padding: 7px 38px 7px 8px;
    background:
        url("./assets/interface-ui/category-header-long.webp") center / 100% 100% no-repeat,
        #303230;
    border: 0;
}

.workflowStep > summary:hover {
    filter: brightness(1.12);
}

.workflowStep[open] > summary {
    border: 0;
    background:
        url("./assets/interface-ui/country-list-entry.webp") center / 100% 100% no-repeat,
        url("./assets/interface-ui/category-header-long.webp") center / 100% 100% no-repeat,
        #20283c;
}

.workflowStep > summary::after {
    content: "";
    right: 12px;
    width: 16px;
    height: 16px;
    background: url("./assets/interface-ui/expand.webp") center / 16px 16px no-repeat;
    transform: none;
}

.workflowStep[open] > summary::after {
    background-image: url("./assets/interface-ui/expand.webp");
    transform: rotate(180deg);
}

.workflowStepNumber {
    width: 38px;
    height: 27px;
    border: 0;
    color: var(--tno-cyan-soft);
    background: url("./assets/interface-ui/generic-text-60.webp") center / 60px 27px no-repeat;
    font-size: 11px;
    line-height: 1;
    text-shadow: 0 1px #000;
}

.workflowStep > summary > span:last-of-type {
    align-content: center;
    line-height: 1.1;
}

.workflowStep > summary strong {
    color: #f0f2ed;
    font-size: 15px;
    line-height: 1.05;
    text-shadow: 0 1px #000;
}

.workflowStep > summary small {
    color: #a9b0ac;
    font-size: 10px;
    line-height: 1.15;
}

.workflowStepBody {
    gap: 10px;
    margin: 5px -2px -2px;
    padding: 12px;
    border-top: 1px solid rgba(89, 199, 195, 0.35);
    background:
        linear-gradient(rgba(4, 10, 12, 0.84), rgba(5, 12, 14, 0.9)),
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat;
}

.workflowField {
    gap: 4px;
    color: #afb8b3;
}

.workflowField > span,
.assetLibraryToolbar label > span,
.portraitControlPanel label {
    color: #aeb9b4;
    text-shadow: 0 1px #000;
}

.workflowField input,
.assetLibraryToolbar input,
.assetLibraryToolbar select,
.portraitControlPanel select {
    height: 39px;
    padding: 0 34px;
    border: 9px solid transparent;
    border-image: url("./assets/interface-ui/find-editbox.webp") 12 22 fill / 9px 13px / 0 stretch;
    outline: 0;
    color: #e6efeb;
    background: #041014;
    box-shadow: none;
    font-size: 13px;
    line-height: 21px;
}

.portraitControlPanel input[type="color"] {
    height: 39px;
    padding: 2px 12px;
    border: 9px solid transparent;
    border-image: url("./assets/interface-ui/find-editbox.webp") 12 22 fill / 9px 13px / 0 stretch;
    outline: 0;
    background: #041014;
    box-shadow: none;
}

.workflowField input:focus,
.assetLibraryToolbar input:focus,
.assetLibraryToolbar select:focus,
.portraitControlPanel select:focus {
    border-image-source: url("./assets/interface-ui/tile-window-thin-crt.webp");
    box-shadow: 0 0 8px rgba(89, 199, 195, 0.28);
}

/* Authentic selectors, entries and descriptions */
.workflowSidebar .picker {
    gap: 7px;
}

.workflowSidebar .picker > .title {
    min-height: 31px;
    padding: 2px 9px;
    color: #d9e2de;
    background: url("./assets/interface-ui/header-wide.webp") center / 100% 31px no-repeat;
    text-shadow: 0 1px #000;
}

.workflowSidebar ideology,
.workflowSidebar poliideology,
.workflowSidebar faction,
.workflowSidebar polifaction {
    height: 100px;
    padding: 7px;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-card-idle.webp") 15 fill / 7px / 0 stretch;
    background: #111716;
}

.workflowSidebar ideology:hover,
.workflowSidebar poliideology:hover,
.workflowSidebar faction:hover,
.workflowSidebar polifaction:hover {
    filter: brightness(1.13);
    border-image-source: url("./assets/interface-ui/tile-card-selected.webp");
}

.workflowSidebar #ideologyDescription,
.workflowSidebar #poliideologyDescription,
.workflowSidebar #subideologyDescription,
.workflowSidebar #polisubideologyDescription,
.workflowSidebar #factionDescription,
.workflowSidebar #polifactionDescription,
.workflowSidebar #statusDescription,
.workflowSidebar #polistatusDescription {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-idea-entry.webp") 14 / 7px / 0 stretch;
    color: #b9c5c0;
    background: #071115;
}

/* TNO buttons */
.workflowSidebar .buttonGroup button,
.workflowSidebar .polibuttonGroup button,
.workflowSidebar #popularityTools button,
.workflowSidebar #polipopularityTools button,
.portraitControlPanel button,
.portraitStudioFooter button,
.portraitLibraryShortcut,
.assetLibraryLoadMore,
.assetLibraryApply {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 0 11px;
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/button-medium.webp") 8 12 fill / 8px 10px / 0 stretch;
    color: #e5e8e4;
    background: transparent;
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 1px #202120;
    box-shadow: none;
}

.workflowSidebar .buttonGroup button:hover,
.workflowSidebar .polibuttonGroup button:hover,
.workflowSidebar #popularityTools button:hover,
.workflowSidebar #polipopularityTools button:hover,
.portraitControlPanel button:hover,
.portraitStudioFooter button:hover,
.portraitLibraryShortcut:hover,
.assetLibraryLoadMore:hover,
.assetLibraryApply:hover {
    filter: brightness(1.18);
}

.workflowSidebar button.workflowFullAction,
button.portraitPrimaryButton,
.assetLibraryApply:not(:disabled),
#portraitExport {
    border-image: url("./assets/interface-ui/button-blue.webp") 7 14 fill / 8px 12px / 0 stretch;
    color: #e7fffb;
    background: #04131c !important;
    text-shadow:
        0 0 6px rgba(89, 199, 195, 0.34),
        0 1px #000;
}

.workflowSidebar button.secondaryAction,
#portraitResetPosition,
#portraitRestoreMask,
#portraitClearDetailMask,
#portraitStartOver {
    border-image: url("./assets/interface-ui/button-red.webp") 7 12 fill / 8px 10px / 0 stretch;
    color: #f4c4c2;
    background: #19090b;
    filter: none;
    text-shadow:
        0 0 5px rgba(221, 127, 130, 0.26),
        0 1px #000;
}

.workflowSidebar button.secondaryAction:hover,
#portraitResetPosition:hover,
#portraitRestoreMask:hover,
#portraitClearDetailMask:hover,
#portraitStartOver:hover {
    filter: brightness(1.16);
}

.workflowDownload {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 51px;
    margin: 1px 0 0;
    padding-block: 0;
    border: 10px solid transparent !important;
    border-image: url("./assets/interface-ui/button-blue.webp") 7 14 fill / 10px 13px / 0 stretch !important;
    color: #eafffb !important;
    background: #04131c !important;
    font-size: 16px;
    line-height: 1.1;
    text-align: center;
    text-shadow:
        0 0 7px rgba(89, 199, 195, 0.32),
        0 1px #000;
}

/* Asset library: native modal frame, tabs, fields and entries */
.assetLibraryModal {
    padding: 15px;
    background: rgba(2, 6, 7, 0.91);
    backdrop-filter: blur(2px);
}

.assetLibraryDialog,
.portraitStudioDialog {
    border: 12px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-border.webp") 18 fill / 12px / 0 stretch;
    color: var(--tno-copy);
    background:
        linear-gradient(rgba(5, 11, 12, 0.96), rgba(7, 12, 12, 0.98)),
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat;
    box-shadow: 0 24px 86px rgba(0, 0, 0, 0.84);
}

.assetLibraryHeader,
.portraitStudioHeader {
    min-height: 70px;
    padding: 12px 18px 11px;
    border: 0;
    border-bottom: 1px solid #4d5350;
    background:
        url("./assets/interface-ui/header-wider.webp") center top / 100% 42px no-repeat,
        #272a28;
}

.assetLibraryEyebrow {
    color: var(--tno-cyan-soft);
}

.assetLibraryHeader h2,
.portraitStudioHeader h2 {
    color: #f0f3ee;
    text-shadow: 0 2px #000;
}

.assetLibraryHeader > div > p:last-child,
.portraitStudioHeader p {
    color: #a4ada8;
}

.assetLibraryClose,
.portraitStudioClose {
    width: 32px;
    height: 33px;
    flex-basis: 32px;
    padding: 0;
    border: 0;
    color: transparent;
    background: url("./assets/interface-ui/close.webp") center / 32px 33px no-repeat;
    font-size: 0;
}

.assetLibraryClose:hover,
.portraitStudioClose:hover {
    filter: brightness(1.22);
}

.assetLibraryTabs,
.portraitStageTabs {
    gap: 2px;
    padding: 3px 4px 4px;
    border: 0;
    border-bottom: 1px solid #151918;
    background: #252826;
}

.assetLibraryTabs button,
.portraitStageTabs button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 9px;
    border: 0;
    color: #b8c0bc;
    background: url("./assets/interface-ui/large-tab-idle.webp") center / 100% 42px no-repeat;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px #000;
}

.assetLibraryTabs button:hover,
.assetLibraryTabs button:focus-visible,
.portraitStageTabs button:hover {
    color: #e8efeb;
    background-image: url("./assets/interface-ui/large-tab-active.webp");
}

.assetLibraryTabs button.isActive,
.portraitStageTabs button.isActive {
    color: #effffb;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/button-blue.webp") 7 14 fill / 7px 12px / 0 stretch;
    background: #04131c;
    box-shadow: none;
}

.assetLibraryToolbar {
    gap: 9px;
    padding: 11px 13px;
    border-bottom: 1px solid #313735;
    background:
        linear-gradient(rgba(7, 13, 14, 0.87), rgba(8, 14, 15, 0.92)),
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat;
}

.assetLibraryBody {
    padding: 12px 13px 18px;
    background: rgba(4, 9, 10, 0.76);
}

.assetLibraryStatus {
    color: #aeb9b4;
    background: rgba(5, 12, 13, 0.96);
    border-bottom-color: rgba(89, 199, 195, 0.26);
}

.assetLibraryGrid {
    gap: 10px;
}

.assetLibraryCard {
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-card-idle.webp") 14 fill / 8px / 0 stretch;
    color: #e0e6e2;
    background: #0b1112;
    transition: filter 100ms ease, transform 100ms ease;
}

.assetLibraryCard:hover,
.assetLibraryCard:focus-visible {
    border-image-source: url("./assets/interface-ui/tile-card-selected.webp");
    background: #0b1112;
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.assetLibraryCard.isSelected {
    border-image: url("./assets/interface-ui/tile-research-blue.webp") 32 fill / 8px / 0 round;
    background: #070d18;
    box-shadow:
        0 0 9px rgba(89, 106, 215, 0.3),
        0 0 7px rgba(89, 199, 195, 0.22);
}

.assetLibraryCardVisual {
    background-color: #071012;
    background-image:
        linear-gradient(45deg, rgba(46, 55, 53, 0.36) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(46, 55, 53, 0.36) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(46, 55, 53, 0.36) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(46, 55, 53, 0.36) 75%);
}

.assetLibraryCardCopy strong {
    color: #edf2ee;
}

.assetLibraryCardCopy small {
    color: #9facaa;
}

.assetLibraryBadge {
    border: 5px solid transparent;
    border-image: url("./assets/interface-ui/generic-text-60.webp") 7 fill / 5px / 0 stretch;
    color: #bac8c3;
    background: transparent;
}

.assetLibraryFooter,
.portraitStudioFooter {
    border-top: 1px solid #4d5350;
    background:
        url("./assets/interface-ui/header-wider.webp") center bottom / 100% 42px no-repeat,
        #262a28;
}

.assetLibrarySelectionPreview,
#portraitFinalPreview {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-thin-crt.webp") 15 / 7px / 0 stretch;
    background-color: #061014;
}

.assetLibraryNameSync input {
    appearance: none;
    width: 23px;
    height: 23px;
    margin: 0;
    background: url("./assets/interface-ui/checkbox-off.webp") center / 23px 23px no-repeat;
}

.assetLibraryNameSync input:checked {
    background-image: url("./assets/interface-ui/checkbox-on.webp");
}

.assetLibraryApply:disabled {
    border-image-source: url("./assets/interface-ui/button-medium.webp");
    color: #727b77;
    background: transparent;
    filter: brightness(0.6);
}

/* Portrait workshop uses the same native TNO component vocabulary */
.portraitStudio {
    background: rgba(2, 6, 7, 0.92);
    backdrop-filter: blur(2px);
}

.portraitSourceStage,
.portraitEditorStage {
    background:
        linear-gradient(rgba(5, 11, 12, 0.84), rgba(5, 11, 12, 0.9)),
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat;
}

.portraitSourceBlock,
.portraitControlPanel,
.portraitCanvasShell,
.portraitFineMode {
    border: 9px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-border.webp") 18 fill / 9px / 0 stretch;
    background: #0b1111;
}

.portraitPresetCard {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-card-idle.webp") 15 fill / 7px / 0 stretch;
    background: #101615;
}

.portraitPresetCard:hover,
.portraitPresetCard:focus-visible {
    border-image-source: url("./assets/interface-ui/tile-card-selected.webp");
}

.portraitPresetCard[aria-pressed="true"],
.portraitPresetCard.isSelected {
    border-image: url("./assets/interface-ui/tile-research-blue.webp") 32 fill / 7px / 0 round;
    background: #070d18;
}

.portraitPresetEmptyIcon {
    width: 32px;
    height: 32px;
    overflow: hidden;
    color: transparent;
    background: url("./assets/interface-ui/quick-add.webp") center / 32px 32px no-repeat;
    font-size: 0;
}

.portraitDropZone {
    border: 10px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-thin-crt.webp") 18 fill / 10px / 0 stretch;
    color: #dce5e1;
    background: #061014;
}

.portraitDropZone:hover,
.portraitDropZone.isDragging {
    border-image-source: url("./assets/interface-ui/tile-scroll-window.webp");
    background: #061014;
}

.portraitDropIcon {
    width: 32px;
    height: 32px;
    overflow: hidden;
    color: transparent;
    background: url("./assets/interface-ui/quick-add.webp") center / 32px 32px no-repeat;
    font-size: 0;
}

.portraitStageTabs span {
    border: 0;
    color: var(--tno-cyan-soft);
    background: url("./assets/interface-ui/generic-text-60.webp") center / 60px 27px no-repeat;
}

.portraitSegmentedButtons {
    gap: 2px;
    border: 0;
}

.portraitSegmentedButtons button.isActive {
    border-image-source: url("./assets/interface-ui/button-crt-wide.webp");
    color: #eafffb;
    background: #061014;
}

.portraitCanvasColumn p,
.portraitControlPanel p,
.portraitSectionHeading span {
    color: #a7b0ab;
}

/* Preserve the complete supplied ERROR / Fehler focus placeholder. */
#focusIcon,
#polifocusIcon {
    background-image: url("./Focus.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#focusIcon::before,
#focusIcon::after,
#polifocusIcon::before,
#polifocusIcon::after {
    content: none !important;
    display: none !important;
}

@media screen and (max-width: 1179px) {
    .workflowSidebar {
        border-width: 8px;
        border-image-width: 8px;
    }

    .workspacePreview {
        background-size: cover;
    }
}

@media screen and (max-width: 700px) {
    #topButtons {
        grid-template-columns: 1fr;
    }

    #topButtons .navButton {
        min-height: 34px;
    }

    .siteMastheadEdition {
        min-width: 0;
    }

    .workflowSidebarHeader {
        min-height: 66px;
    }

    .assetLibraryTabs,
    .portraitStageTabs {
        gap: 1px;
    }
}

/* Unified, extensible component workbench */
#topButtons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.componentDock {
    border: 9px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-border.webp") 18 / 9px / 0 stretch;
    color: var(--tno-copy);
    background:
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat,
        #0c0f0e;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.58);
}

.componentDockHeader {
    background: url("./assets/interface-ui/category-header-long.webp") left center / auto 44px repeat-x;
    color: #edf1ed;
    text-shadow: 0 1px #000;
}

.componentDockHeader small {
    color: #91a09b;
}

.componentLibraryToggle,
.componentLibrary button,
.workbenchEmptyState button {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/button-blue.webp") 7 14 fill / 7px 12px / 0 stretch;
    color: #eaf5f2;
    background: #061114;
    text-shadow: 0 1px #000;
}

.componentLibraryToggle[aria-expanded="true"] {
    border-image-source: url("./assets/interface-ui/button-red.webp");
    background: #18090b;
}

.componentTabs {
    padding: 2px;
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-scroll-window.webp") 12 fill / 7px / 0 stretch;
    background: #070b0b;
}

.componentTabSlot {
    border: 1px solid #252a28;
    background: #111514;
}

.componentTab {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/large-tab-idle.webp") 8 16 fill / 7px 12px / 0 stretch;
    color: #b8c0bc;
    background: #101311;
    text-shadow: 0 1px #000;
}

.componentTab:hover {
    color: #eef1ed;
    filter: brightness(1.08);
}

.componentTab.isActive,
.componentTab[aria-selected="true"] {
    border-image: url("./assets/interface-ui/button-red.webp") 7 12 fill / 7px 10px / 0 stretch;
    color: #fff1ef;
    background: #18080b;
    text-shadow:
        0 0 7px rgba(218, 77, 82, 0.48),
        0 1px #000;
}

.componentRemove {
    border-left: 1px solid #0a0c0b;
    color: transparent;
    background:
        url("./assets/interface-ui/close-small.webp") center / 27px 27px no-repeat,
        #121514;
    font-size: 0;
}

.componentRemove:hover {
    filter: brightness(1.22);
}

.componentLibrary {
    border-top: 1px solid #434a46;
}

.componentLibrary span,
.componentTabsEmpty {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/generic-text-60.webp") 10 fill / 7px / 0 stretch;
    background: #091011;
}

.workbenchEmptyState {
    border: 11px solid transparent;
    border-image: url("./assets/interface-ui/tile-window-thin-crt.webp") 18 / 11px / 0 stretch;
    background:
        url("./assets/interface-ui/tile-internal-crt.webp") center / 180px 180px repeat,
        #050808;
    box-shadow:
        inset 0 0 70px rgba(0, 0, 0, 0.72),
        0 4px 14px rgba(0, 0, 0, 0.58);
}

.componentTab:focus-visible,
.componentRemove:focus-visible,
.componentLibraryToggle:focus-visible,
.componentLibrary button:focus-visible,
.workbenchEmptyState button:focus-visible {
    outline-color: var(--tno-danger);
}

@media screen and (max-width: 700px) {
    #topButtons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.portraitAlgorithmProof {
    border-top: 1px solid #3f4743;
}

.portraitAlgorithmProofHeader {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/category-header-long.webp") 10 fill / 7px / 0 stretch;
    background: #111615;
    text-shadow: 0 1px #000;
}

.portraitAlgorithmExample {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/tile-scroll-window.webp") 12 fill / 7px / 0 stretch;
    background: #071011;
}

.portraitAlgorithmImageFrame {
    border: 8px solid transparent;
    border-image: url("./assets/interface-ui/tile-card-selectable.webp") 15 fill / 8px / 0 stretch;
    background: #080b0a;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.48);
}

.portraitAlgorithmLicense {
    border: 7px solid transparent;
    border-image: url("./assets/interface-ui/generic-text-60.webp") 10 fill / 7px / 0 stretch;
    background: #071011;
}
