:root{
 --bg:#171815;--panel:#20211d;--panel-alt:#262721;--panel-dark:#191a17;
 --line:#4b4b40;--line-soft:#383931;--text:#eee7d8;--muted:#aaa291;
 --red:#b9483c;--red-dark:#713b35;--brass:#c5a15e;--green:#829a78;
 --paper:#eee9dc;--ink:#20231f;
 font-family:"Liberation Sans",Arial,sans-serif;color:var(--text);background:var(--bg)
}
*{box-sizing:border-box;}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--text)}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:1px solid var(--brass);outline-offset:1px}
[hidden]{display:none!important}
html.app-booting body{visibility:hidden}
html.app-booting *,html.theme-switching *{transition:none!important;animation:none!important}

.topbar {
    height:56px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 14px;
    background:#181916;
    border-bottom:1px solid #625b4b
}
.logo {
    width: 39px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 2px solid var(--red);
    color: #eadfcb;
    font: 800 10px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .14em
}


.brand {
    min-width: 214px
}

.brand strong {
    display: block;
    color: #eee4d1;
    font: 800 13px/1 ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .14em
}

.brand small {
    display: block;
    margin-top: 4px;
    color: #8c8577;
    font: 8px/1.2 ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .12em
}

.repo-link {
    text-decoration: none
}

.repo-link img {
    width: 13px;
    height: 13px;
    display: block;
    object-fit: contain;
    filter: invert(1) sepia(.22) saturate(.8) hue-rotate(350deg) brightness(.9)
}

.drafts-icon {
    width: 13px;
    height: 13px;
    display: block;
    object-fit: contain;
    image-rendering: pixelated
}

.repo-link:hover {
    text-decoration: none
}


.archive-status {
    flex: 1;
    color: #7e786b;
    font: 9px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .12em
}


.top-actions {
    display: flex;
    align-items: center;
    gap: 5px
}

.lang-switch {
    display: flex;
    border: 1px solid var(--line);
    background: var(--panel)
}

.lang-switch button {
    height: 30px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    padding: 0 9px;
    color: #908979;
    font: 700 9px ui-monospace, "Liberation Mono", monospace
}

.lang-switch button:last-child {
    border-right: 0
}

.lang-switch button.active {
    background: #e8e0d0;
    color: #25261f
}


.soft-btn,
.primary-btn,
.icon-btn {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: #22231f;
    color: #c9c1b2;
    font: 700 9px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .02em
}

.soft-btn:hover,
.icon-btn:hover {
    border-color: #797161;
    background: #292a24
}

.primary-btn {
    border-color: #cc6a5e;
    background: var(--red);
    color: #fff7e9
}

.primary-btn:hover {
    background: #c55245
}

.archive-action i {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: transparent
}

.archive-action i.on {
    background: var(--brass)
}



.workspace {
    height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: 285px 300px minmax(470px, 1fr);
    gap: 1px;
    background: #4a493f;
    overflow: hidden
}

.panel {
    min-width: 0;
    min-height: 0;
    background: var(--panel)
}

.sidebar,
.builder,
.preview {
    display: flex;
    flex-direction: column;
    min-height: 0
}

.scroll {
    overflow: auto
}



.finder-head {
    padding: 13px 12px 10px;
    background: var(--panel);
    border-bottom: 1px solid var(--line)
}

.finder-head>.eyebrow,
.builder-top .eyebrow {
    display: none
}

.finder-head h2 {
    margin: 0 0 10px;
    color: #eee4d1;
    font: 800 14px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .08em;
    text-transform: uppercase
}


.smart-search {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border: 1px solid #5a5a4e;
    background: var(--panel-dark)
}

.smart-search:focus-within {
    border-color: var(--brass)
}

.smart-search>span {
    color: #9d957f;
    font-size: 18px
}

.smart-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    outline: 0;
    font: 10px ui-monospace, "Liberation Mono", monospace
}

.smart-search button {
    border: 0;
    background: transparent;
    color: #777164;
    font-size: 17px
}

.search-hint {
    display: none
}


.finder-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 8px;
    border-bottom: 1px solid var(--line-soft)
}

.finder-tabs button {
    height: 29px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #918a7b;
    font: 700 8px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .09em;
    text-transform: uppercase
}

.finder-tabs button.active {
    border-bottom-color: var(--red);
    color: #eee5d4
}


.action-chips {
    display: flex;
    gap: 4px;
    padding-top: 8px;
    overflow-x: auto;
    scrollbar-width: none
}

.action-chips::-webkit-scrollbar {
    display: none
}

.action-chip {
    flex: 0 0 auto;
    border: 1px solid #55554a;
    background: transparent;
    padding: 5px 8px;
    color: #aaa290;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.action-chip:hover,
.action-chip.active {
    border-color: #e5dcc9;
    background: #e5dcc9;
    color: #272821
}


.smart-list,
.preset-list {
    flex: 1;
    overflow: auto;
    padding: 0
}

.smart-section {
    margin: 0
}

.smart-section-head {
    display: flex;
    justify-content: space-between;
    padding: 8px 11px 6px;
    border-bottom: 1px solid var(--line-soft);
    background: #1b1c19
}

.smart-section-head strong {
    color: #8f8879;
    font: 700 8px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .13em;
    text-transform: uppercase
}

.smart-section-head span {
    color: #6f6a60;
    font: 8px ui-monospace, "Liberation Mono", monospace
}


.result-card {
    position: relative;
    margin: 0;
    padding: 9px 32px 9px 11px;
    border: 0;
    border-bottom: 1px solid #3e3f37;
    border-left: 3px solid transparent;
    background: #22231f;
    cursor: pointer
}

.result-card:hover {
    background: #292a24;
    border-left-color: #827965
}

.result-card.active {
    background: #2b2b25;
    border-left-color: var(--red)
}

.archive-ref {
    margin-bottom: 3px;
    color: #8c8576;
    font: 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .12em
}

.result-title {
    color: #eee5d5;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.25
}

.result-desc {
    display: -webkit-box;
    margin: 3px 0 5px;
    overflow: hidden;
    color: #aaa392;
    font-size: 8.6px;
    line-height: 1.35;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical
}

.result-meta {
    display: flex;
    justify-content: space-between;
    color: #7f796c;
    font: 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .07em;
    text-transform: uppercase
}

.meta-pill {
    display: none
}

.fav-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #777163
}

.fav-btn.on {
    color: var(--brass)
}


.catalog-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 35px;
    padding: 7px 34px 7px 10px;
    border-bottom: 1px solid var(--line-soft);
    background: #22231f;
    cursor: pointer
}

.catalog-row:hover {
    background: #292a24
}

.catalog-row.active {
    border-left: 3px solid var(--red);
    background: #2b2b25
}

.catalog-index {
    width: 26px;
    color: #7e786a;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.catalog-name {
    flex: 1;
    font-size: 9.5px
}

.catalog-row .fav-btn {
    top: 5px
}

.catalog-kind {
    display: none
}

.custom-form-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 5px;
    color: #8f8879;
    font: 700 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .72;
    vertical-align: middle
}

.syndicate-form-badge {
    color: #d66a64;
    opacity: .9
}

.dossier-title .custom-form-badge,
.result-title .custom-form-badge {
    position: relative;
    top: -1px
}

.no-results,
.empty {
    display: grid;
    min-height: 110px;
    place-items: center;
    padding: 20px;
    color: #918a7b;
    text-align: center;
    font-size: 10px;
    line-height: 1.5
}

.empty-compact {
    min-height: 55px
}


.sidebar-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 7px;
    border-top: 1px solid var(--line);
    background: #1b1c19
}

.sidebar-footer button {
    min-height: 29px;
    border: 1px solid var(--line);
    background: #23241f;
    color: #bbb3a4;
    font-size: 8px
}



.builder-top.compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 11px;
    border-bottom: 1px solid var(--line);
    background: #1b1c19
}

.builder-top.compact h2 {
    max-width: 170px;
    margin: 0;
    overflow: hidden;
    color: #eee4d2;
    font: 700 11px ui-monospace, "Liberation Mono", monospace;
    text-overflow: ellipsis;
    white-space: nowrap
}

.builder-mode-switch {
    display: flex;
    border: 1px solid var(--line)
}

.builder-mode-switch button {
    height: 27px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    padding: 0 7px;
    color: #918a7c;
    font: 700 8px ui-monospace, "Liberation Mono", monospace;
    text-transform: uppercase
}

.builder-mode-switch button:last-child {
    border-right: 0
}

.builder-mode-switch button.active {
    background: #e7decd;
    color: #272821
}


.fill-workspace {
    flex: 1;
    overflow: auto
}

.document-brief {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    background: #252620
}

.brief-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px
}

.brief-ref {
    margin-bottom: 5px;
    color: var(--brass);
    font: 7.5px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .12em
}

.document-brief h3 {
    margin: 0;
    color: #eee4d2;
    font-size: 12px;
    line-height: 1.35
}

.brief-tools {
    display: flex;
    gap: 4px
}

.brief-tools button {
    height: 27px;
    border: 1px solid #5a5549;
    background: transparent;
    padding: 0 7px;
    color: #c2b59f;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.brief-tools button:hover {
    border-color: var(--brass);
    color: #ead4aa
}


.fill-fields {
    display: grid;
    gap: 7px;
    padding: 7px 12px 12px
}

.fill-section-title {
    margin: 8px 0 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line)
}

.fill-section-title strong {
    color: #8e8778;
    font: 700 8px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .13em;
    text-transform: uppercase
}

.fill-control {
    padding: 0
}

.fill-control label {
    display: block;
    margin-bottom: 4px;
    color: #b0a997;
    font: 8.5px ui-monospace, "Liberation Mono", monospace
}

.fill-control input,
.fill-control textarea {
    width: 100%;
    border: 1px solid #505147;
    background: var(--panel-dark);
    padding: 7px 8px;
    color: #eee7d8;
    font-size: 10.5px;
    outline: 0
}

.fill-control input {
    height: 34px
}

.fill-control textarea {
    min-height: 58px;
    resize: vertical;
    line-height: 1.45
}

.fill-control input:focus,
.fill-control textarea:focus {
    border-color: var(--brass);
    box-shadow: inset 3px 0 0 var(--brass)
}

.fill-code-button {
    width: 100%;
    height: 34px;
    overflow: hidden;
    border: 1px solid #75423d;
    background: #241d1b;
    padding: 0 9px;
    color: #dc8177;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap
}


.smart-options {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px
}

.smart-option {
    border: 1px solid #55554a;
    background: transparent;
    padding: 4px 6px;
    color: #a9a18f;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.smart-option.on {
    border-color: var(--brass);
    background: #3a3327;
    color: #ead8b7
}


.wording-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 0 12px 13px
}

.wording-actions button {
    min-height: 30px;
    border: 1px solid #5c554b;
    background: transparent;
    color: #c2b49c;
    font: 8.5px ui-monospace, "Liberation Mono", monospace
}

.wording-actions button:hover {
    border-color: var(--brass);
    color: #ead8b7
}


.manual-workspace {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column
}

.manual-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 7px;
    border-bottom: 1px solid var(--line)
}

.manual-tools button {
    border: 1px solid var(--line);
    background: #23241f;
    padding: 5px 7px;
    color: #bdb5a6;
    font-size: 8px
}

.blocks {
    max-height: 30%;
    overflow: auto;
    padding: 7px;
    border-bottom: 1px solid var(--line)
}

.block-card {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin-bottom: 4px;
    padding: 7px;
    border: 1px solid var(--line);
    background: #242520;
    cursor: pointer
}

.block-card.selected {
    border-left: 3px solid var(--red);
    background: #2b2b25
}

.drag,
.x-btn {
    border: 0;
    background: transparent;
    color: #777164
}

.drag {
    cursor: grab
}

.block-index {
    color: #777164;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.block-copy {
    min-width: 0;
    flex: 1
}

.block-copy strong {
    display: block;
    font-size: 9.5px
}

.block-copy small {
    display: none
}

.editor {
    flex: 1;
    overflow: auto;
    padding: 10px
}

.editor label,
.field-row label {
    display: block;
    margin: 9px 0 4px;
    color: #9f9787;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.editor input,
.editor textarea,
.editor select,
.field-row input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--panel-dark);
    padding: 7px;
    color: #eee7d8;
    outline: 0
}

.editor textarea {
    min-height: 135px;
    resize: vertical;
    font: 10px/1.5 ui-monospace, "Liberation Mono", monospace
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 7px 0
}

.toolbar button {
    height: 27px;
    min-width: 27px;
    border: 1px solid var(--line);
    background: #242520;
    padding: 0 6px;
    color: #c4bcad;
    font-size: 8px
}

.danger {
    width: 100%;
    margin-top: 9px;
    border: 1px solid #67413d;
    background: #271c1b;
    padding: 7px;
    color: #d57a70;
    font-size: 8px
}

.quick-fields {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line)
}

.quick-head {
    display: flex;
    justify-content: space-between
}

.quick-head strong {
    font-size: 9px
}

.quick-head span {
    color: #777164;
    font-size: 7px
}

.field-list {
    display: grid;
    gap: 6px;
    margin-top: 6px
}

.dept-summary {
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    background: #242520
}

.dept-summary strong {
    font-size: 9px
}

.dept-summary small {
    color: #817b6f;
    font-size: 7px
}

.dept-summary button {
    border: 1px solid #67413d;
    background: #271c1b;
    padding: 6px;
    color: #d57a70;
    font-size: 8px
}



.preview-bar {
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
    background: #1b1c19
}

.tabs {
    display: flex;
    height: 100%
}

.tab {
    height: 100%;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 0 9px;
    color: #8e8778;
    font: 700 8px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .09em;
    text-transform: uppercase
}

.tab.active {
    border-bottom-color: var(--red);
    color: #eee4d2
}

.preview-canvas {
    flex: 1;
    overflow: auto;
    padding: 22px;
    background: #11120f
}

.paper {
    position: relative;
    width: 500px;
    max-width: calc(100vw - 42px);
    min-height: 625px;
    margin: auto;
    overflow: hidden;
    background: var(--paper);
    padding: 26px 15px 42px;
    color: var(--ink);
    box-shadow: 0 18px 48px #0009
}

.paper:before {
    content: "ARCHIVE COPY";
    position: absolute;
    top: 10px;
    right: 12px;
    border: 1px solid #9b3f3626;
    padding: 3px 5px;
    color: #9b3f3626;
    font: 700 8px ui-monospace, monospace;
    transform: rotate(-2deg)
}

.paper:after {
    content: "NT";
    position: absolute;
    right: -20px;
    bottom: -54px;
    color: #244b7609;
    font-size: 180px;
    font-weight: 900;
    transform: rotate(-12deg);
    pointer-events: none
}

.paper-section {
    position: relative;
    margin: 0;
    overflow-wrap: anywhere;
    color: #202935;
    font: 13.2px/1.48 "Noto Sans", Arial, sans-serif;
    white-space: pre-wrap
}

.paper-section.header {
    overflow: hidden;
    font: 9.7px/1.37 ui-monospace, "Liberation Mono", monospace;
    white-space: pre
}

.paper-section.title {
    overflow: hidden;
    font: 650 10.4px/1.4 ui-monospace, "Liberation Mono", monospace;
    white-space: pre
}

.paper-section.stamp {
    font: 11px ui-monospace, "Liberation Mono", monospace
}

.paper-section h1,
.paper-section h2,
.paper-section h3 {
    display: inline;
    margin: 0;
    font: inherit;
    font-weight: 800
}

.paper-section code {
    font-family: ui-monospace, "Liberation Mono", monospace
}

.paper-field {
    display: inline-block;
    min-width: 42px;
    max-width: 245px;
    margin: 0 1px;
    border: 0;
    border-bottom: 1px dashed #397fbd;
    background: #5ca5e817;
    padding: 0 3px;
    color: #173d61;
    font: inherit;
    line-height: 1.3;
    vertical-align: baseline
}

.paper-field:hover {
    background: #5ca5e82c
}

.paper-field:focus {
    position: relative;
    z-index: 4;
    outline: 1px solid #4a9ce5;
    background: #fff
}

.paper-field.is-editing {
    position: relative;
    z-index: 4;
    outline: 1px solid #a36d50;
    background: #fff9ed;
    color: #2b241e
}

.paper-field.missing {
    border-bottom-color: #d88a2d;
    background: #f1ad451c
}

.paper-field::placeholder {
    color: #5880a3;
    font-style: italic;
    opacity: .85
}

.paper-section.header .paper-field {
    min-width: 24px;
    max-width: 116px
}

.paper-section.header input[data-field-key="station"] {
    max-width: 110px
}

.code-picker-field {
    min-width: 48px !important;
    max-width: 82px !important;
    overflow: hidden;
    padding: 0 4px !important;
    color: #8b2730 !important;
    font-size: 9.5px !important;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap
}

.editable-copy {
    margin: -2px -3px 0;
    padding: 2px 3px;
    border: 1px dashed transparent;
    cursor: text
}

.editable-copy:hover {
    border-color: #8e7e62
}

.copy-edit-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 3;
    width: 22px;
    height: 20px;
    border: 1px solid #8f7f63;
    background: #eee7d7;
    color: #5c5140;
    font-size: 10px;
    opacity: 0
}

.editable-copy:hover .copy-edit-badge {
    opacity: 1
}


.raw-box {
    width: min(900px, 96%);
    margin: auto;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #171815;
    box-shadow: 0 16px 45px #0008
}

.raw-head {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px;
    border-bottom: 1px solid var(--line);
    color: #817a6d;
    font: 700 8px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .12em
}

.raw-head button {
    border: 1px solid var(--line);
    background: #23241f;
    padding: 5px 7px;
    font-size: 8px
}

.raw-box pre {
    max-height: 70vh;
    margin: 0;
    overflow: auto;
    padding: 16px;
    color: #d0c8b9;
    font: 10px/1.55 ui-monospace, "Liberation Mono", monospace;
    white-space: pre-wrap
}



.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    background: #000b
}

.modal {
    width: min(560px, 92vw);
    max-height: 84vh;
    overflow: auto;
    border: 1px solid #5b5b50;
    background: var(--panel);
    padding: 15px;
    box-shadow: 0 25px 70px #000b
}

.modal-wide {
    width: min(700px, 94vw)
}

.modal h3 {
    margin: 0 0 11px;
    color: #eee4d2;
    font: 800 12px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .06em;
    text-transform: uppercase
}

.modal label {
    display: block;
    margin: 9px 0 4px;
    color: #9f9788;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.modal input,
.modal textarea,
.modal select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--panel-dark);
    padding: 7px;
    color: #eee7d8;
    font-size: 10px
}

.modal textarea {
    min-height: 160px;
    resize: vertical;
    font-family: ui-monospace, "Liberation Mono", monospace
}

.import-plain-text {
    min-height: 260px
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 12px
}

.modal-actions button {
    border: 1px solid var(--line);
    background: #23241f;
    padding: 7px 9px;
    color: #c2baa9;
    font-size: 8px
}

.modal-actions .primary-btn {
    border-color: #cc6a5e;
    background: var(--red);
    color: #fff6e8
}

.copy-editor-note {
    margin-bottom: 9px;
    border-left: 3px solid #756a58;
    background: #26261f;
    padding: 8px;
    color: #a9a18f;
    font-size: 9px;
    line-height: 1.45
}

.copy-editor-title {
    font-size: 15px !important;
    font-weight: 800
}

.copy-editor-text {
    min-height: 250px !important
}

.dept-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 7px;
    align-items: end
}

.dept-arrow {
    padding-bottom: 8px;
    color: #8f8879
}

.custom-code-input {
    margin-top: 5px
}

.code-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0
}

.code-suggestions button {
    border: 1px solid #6d6049;
    background: #2b2921;
    padding: 6px 8px;
    color: #dec18a;
    font: 8px ui-monospace, "Liberation Mono", monospace
}


.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 70;
    max-width: 330px;
    border: 1px solid var(--brass);
    background: #292a24;
    padding: 9px 11px;
    color: #eee5d4;
    font: 9px ui-monospace, "Liberation Mono", monospace;
    opacity: 0;
    pointer-events: none;
    transform: translateY(7px);
    transition: .15s
}

.toast.show {
    opacity: 1;
    transform: none
}



.draft-modal-head,
.profile-modal-head,
.clause-modal-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line)
}

.draft-modal-head span,
.profile-modal-head span,
.clause-modal-head span {
    color: #8a8374;
    font: 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .14em
}

.draft-modal-head h3,
.profile-modal-head h3,
.clause-modal-head h3 {
    margin: 3px 0 0
}

.draft-modal-head>button,
.profile-modal-head>button,
.clause-modal-head>button {
    border: 1px solid var(--brass);
    background: transparent;
    padding: 6px 8px;
    color: #dfc38d;
    font: 8px ui-monospace, "Liberation Mono", monospace
}

.draft-list,
.profile-list,
.clause-list {
    padding-top: 9px
}

.draft-section-label,
.list-section-label {
    margin: 9px 0 5px;
    color: #8c8576;
    font: 700 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .13em;
    text-transform: uppercase
}

.draft-row,
.profile-row,
.clause-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-bottom: 4px;
    border: 1px solid #45463d;
    border-left: 3px solid #766e5c;
    background: #242520;
    padding: 8px
}

.draft-file,
.profile-file,
.clause-copy {
    min-width: 0;
    flex: 1
}

.draft-file strong,
.profile-file strong,
.clause-copy strong {
    display: block;
    overflow: hidden;
    color: #eae1d1;
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap
}

.draft-file small,
.profile-file small,
.clause-copy small {
    display: block;
    margin-top: 2px;
    color: #7f796c;
    font: 7.5px ui-monospace, "Liberation Mono", monospace
}

.draft-tab {
    display: block;
    margin-bottom: 2px;
    color: var(--brass);
    font: 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .1em
}

.draft-actions,
.profile-actions,
.clause-actions {
    display: flex;
    gap: 3px
}

.draft-actions button,
.profile-actions button,
.clause-actions button {
    border: 1px solid #55564b;
    background: #1b1c19;
    padding: 5px 7px;
    color: #bdb5a5;
    font-size: 7.5px
}

.draft-actions .draft-delete,
.profile-actions .delete,
.clause-actions .delete {
    color: #c9786e;
    border-color: #67413d
}

.draft-empty,
.list-empty {
    padding: 25px 10px;
    color: #8f8879;
    text-align: center;
    font-size: 9px
}


.profile-conflict {
    margin: 8px 0;
    border-left: 3px solid var(--red);
    background: #28201e;
    padding: 8px;
    color: #cdbca8;
    font-size: 9px;
    line-height: 1.45
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px
}

.profile-grid .full {
    grid-column: 1/-1
}


.clause-category {
    padding: 7px 0 4px;
    color: #968e7d;
    font: 700 7px ui-monospace, "Liberation Mono", monospace;
    letter-spacing: .12em;
    text-transform: uppercase
}

.clause-row {
    cursor: pointer
}

.clause-row:hover {
    border-left-color: var(--brass);
    background: #292a24
}

.clause-copy strong {
    white-space: normal;
    line-height: 1.35
}

.custom-clause-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px;
    margin-top: 10px
}

.custom-clause-form input {
    min-width: 0
}

.custom-clause-form button {
    border: 1px solid var(--brass);
    background: transparent;
    padding: 0 9px;
    color: #dec18a;
    font-size: 8px
}



@media(max-width:1100px) {
    .workspace {
        grid-template-columns: 265px 285px minmax(430px, 1fr)
    }

    .archive-status {
        display: none
    }

    .brand {
        min-width: 178px
    }

}


@media(max-width:900px) {

    html,
    body {
        overflow: auto;
        height: auto
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 30
    }

    .brand small,
    .archive-status {
        display: none
    }

    .brand {
        min-width: auto;
        flex: 1
    }

    .workspace {
        height: auto;
        display: block
    }

    .panel {
        min-height: 420px
    }

    .preview {
        height: 720px
    }

    .paper {
        width: 480px
    }

    .top-actions .archive-action span {
        display: none
    }

}
/* v0.8 — square corners */
*{border-radius:0!important}
.profile-head-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.profile-head-actions button{border:1px solid #625c4f;background:#22231f;padding:6px 8px;color:#c9bea9;font:8px ui-monospace,"Liberation Mono",monospace}
.profile-head-actions button:last-child{border-color:var(--brass);color:#e2c98f}
.profile-storage-note{margin-top:8px;padding:6px 8px;border:1px solid #45463d;background:#1b1c19;color:#827b6d;font:7.5px ui-monospace,"Liberation Mono",monospace}
.profile-job-custom{width:100%;margin-top:5px}
.paper{border-radius:2px}
.paper-field,.copy-edit-badge{border-radius:2px 2px 0 0}
.result-card,.catalog-row,.smart-section-head,.document-brief,.fill-section-title{border-radius:0}
.preview-bar{justify-content:space-between}
.preview-zoom{display:flex;align-items:center;margin-left:auto;border:1px solid #48493f;overflow:hidden}
.preview-zoom button{height:26px;min-width:28px;border:0;border-right:1px solid #48493f;background:#20211d;color:#a9a190;font:8px ui-monospace,"Liberation Mono",monospace}
.preview-zoom button:last-child{border-right:0}
.preview-zoom #zoomValue{min-width:43px;color:#ddd2bd}
.preview-zoom button:hover{background:#2a2b25;color:#eee3cf}


/* v0.9 refinements */
.brand small{display:flex;align-items:center;gap:7px;white-space:nowrap}.brand small em{color:#b19f80;font-style:normal;font-size:7px;text-transform:none;letter-spacing:.03em}
.topbar{height:58px}.workspace{height:calc(100vh - 58px);grid-template-columns:290px 320px minmax(480px,1fr)}
.action-chips{display:block;overflow:visible}.filter-primary,.filter-more{display:flex;gap:4px;flex-wrap:wrap}.filter-more{padding-top:5px}.action-chip{padding:6px 9px;font-size:8.5px}
.finder-head h2{font-size:15px}.smart-search input{font-size:11px}.result-title{font-size:11px}.result-desc{font-size:9px}
.builder-top.compact h2{font-size:12px}.fill-control label{font-size:9px}.fill-control input,.fill-control textarea{font-size:11px}.fill-control input{height:35px}
.fill-section-title{display:flex;align-items:center;justify-content:space-between}.fill-section-title button{border:1px solid #5b5549;background:#23241f;color:#c4baa7;padding:4px 7px;font:8px ui-monospace,"Liberation Mono",monospace}
.wording-actions{padding-bottom:7px}.phrase-hotbar{padding:0 12px 14px}.phrase-hotbar-label{margin-bottom:5px;color:#8f8778;font:700 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.11em;text-transform:uppercase}.phrase-hotbar-items{display:flex;gap:4px;overflow-x:auto;padding-bottom:3px;scrollbar-width:thin}.phrase-hotbar-items button{flex:0 0 auto;max-width:220px;border:1px solid #544f45;background:#1b1c19;color:#bdb4a3;padding:6px 8px;font:8px/1.25 ui-monospace,"Liberation Mono",monospace;text-align:left}.phrase-hotbar-items button:hover{border-color:#a18d69;color:#ead8b7}.phrase-hotbar-items .phrase-more{border-style:dashed;color:#c77b6f}.inline-phrase-menu{margin-top:8px;padding:8px 0;border-top:1px solid #48463e}.inline-phrase-menu .phrase-hotbar{padding:0}
.smart-options{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.smart-option{padding:5px 7px}.smart-option.smart-save{min-width:25px;color:#c7ad74}
.preview-canvas{padding:18px}.paper-stage{min-height:100%;display:flex;align-items:flex-end;justify-content:center;gap:24px}.paper{width:500px;flex:0 0 auto}.preview-zoom #zoomFit{min-width:66px}.preview-zoom button{font-size:8.5px}
.egg-character{align-self:flex-end;width:138px;height:138px;margin-bottom:20px;border:0;background:transparent;padding:0;cursor:pointer;transform-origin:50% 85%;filter:drop-shadow(0 9px 6px #0007)}.egg-character img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;image-rendering:crisp-edges}@media(max-width:1180px){.workspace{grid-template-columns:270px 300px minmax(430px,1fr)}.egg-character{width:112px;height:112px}.paper-stage{gap:12px}}
@media(max-width:980px){.egg-character{display:none}.paper-stage{display:block}.paper{margin:auto}.workspace{grid-template-columns:260px 285px minmax(400px,1fr)}}


/* v0.10 — readability, vertical phraseology and restrained colour coding */
:root{
 --ui-blue:#6d879f;
 --ui-violet:#84739d;
 --ui-teal:#668f87;
 --ui-amber:#ad8750;
 --ui-orange:#a86f4f;
 --ui-green:#728c69;
 --ui-security:#a45750;
 --ui-legal:#637e98;
}

/* General desktop scale. Paper zoom remains independent. */
.topbar{height:64px;padding:0 16px;gap:14px}
.logo{width:43px;height:34px;font-size:11px}
.brand{min-width:235px}.brand strong{font-size:14px}.brand small{font-size:8.5px}
.top-actions{gap:7px}.soft-btn,.primary-btn,.icon-btn{height:37px;padding:0 13px;font-size:10px}
.lang-switch button{height:35px;padding:0 11px;font-size:10px}
.workspace{height:calc(100vh - 64px);grid-template-columns:320px 350px minmax(500px,1fr)}

.finder-head{padding:16px 14px 12px}.finder-head h2{font-size:17px;margin-bottom:12px}
.smart-search{height:44px;padding:0 11px}.smart-search>span{font-size:20px}.smart-search input{font-size:12px}.smart-search button{font-size:19px}
.finder-tabs{margin-top:10px}.finder-tabs button{height:34px;font-size:9.5px}

/* Stable square filter grid instead of a loose wrap or sideways scroller. */
.action-chips{display:block;padding-top:10px;overflow:visible}
.filter-primary,.filter-more{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.filter-more{grid-template-columns:repeat(4,minmax(0,1fr));padding-top:6px}
.action-chip{min-width:0;min-height:34px;padding:6px 5px;font-size:9.5px;line-height:1.15;text-align:center;white-space:normal;box-shadow:inset 0 -2px 0 var(--chip,#626257);transition:border-color .12s ease,color .12s ease,background .12s ease}
.action-chip:hover{border-color:var(--chip,#d9d0bd);background:#292a24;color:#eee5d4}
.action-chip.active{border-color:var(--chip,#e5dcc9);background:#e5dcc9;color:#272821;box-shadow:inset 0 -3px 0 var(--chip,#272821)}
.action-chip[data-kind="Заявление"]{--chip:var(--ui-blue)}
.action-chip[data-kind="Разрешение"]{--chip:var(--ui-teal)}
.action-chip[data-kind="Отчёт"]{--chip:var(--ui-violet)}
.action-chip[data-kind="Приказ"]{--chip:var(--ui-security)}
.action-chip[data-kind="Жалоба"]{--chip:#9c625d}
.action-chip[data-kind="Запрос"]{--chip:var(--ui-amber)}
.action-chip[data-kind="Свидетельство"]{--chip:#788f78}
.action-chip[data-kind="Заказ"]{--chip:var(--ui-orange)}
.action-chip[data-kind="Решение"]{--chip:var(--ui-legal)}
.action-chip[data-kind="Заключение"]{--chip:#7b7896}
.action-chip[data-kind="Обращение"]{--chip:#8b776d}

.smart-section-head{padding:10px 13px 8px}.smart-section-head strong{font-size:9px}.smart-section-head span{font-size:9px}
.result-card{min-height:66px;padding:11px 37px 10px 14px;border-left-color:var(--group-accent,#827965);transition:background .12s ease,border-color .12s ease}
.result-title{font-size:12px}.result-desc{font-size:9.8px;line-height:1.4;-webkit-line-clamp:2}.archive-ref{font-size:8px;color:var(--group-accent,#8c8576)}.result-meta{font-size:8px}
.catalog-row{min-height:43px;padding:9px 38px 9px 13px;border-left:3px solid var(--group-accent,#777164)}
.catalog-index{font-size:9px}.catalog-name{font-size:10.5px}.fav-btn{width:28px;height:28px;font-size:14px}

/* no department colour accents — uniform sidebar accent */
.group-syndicate{--group-accent:#b94b4b}
.group-syndicate.result-card{background:linear-gradient(90deg,#2b1718,#20211d 38%)}
.group-syndicate.result-card:hover{background:linear-gradient(90deg,#361b1d,#292a24 42%)}
.group-syndicate .catalog-index{width:45px;color:#cf6b66}

.builder-top.compact{min-height:38px;padding:12px 13px}.builder-top.compact h2{max-width:205px;font-size:13px}
.builder-mode-switch button{height:32px;padding:0 9px;font-size:9px}
.document-brief{padding:14px}.brief-ref{font-size:8.5px}.document-brief h3{font-size:14px}.brief-tools button{height:32px;padding:0 10px;font-size:9px}
.fill-fields{gap:9px;padding:10px 14px 15px}.fill-section-title{display:flex;align-items:center;min-height:29px;margin:10px 0 3px;padding:0 0 5px 9px;border-left:3px solid #777164}.fill-section-title strong{font-size:9px}.fill-section-title button{margin-left:auto;height:27px;border:1px solid #59584e;background:#242520;padding:0 8px;color:#c8bfaf;font-size:8.5px}
.fill-section-title.section-main{border-left-color:var(--ui-blue)}
.fill-section-title.section-document{border-left-color:var(--ui-amber)}
.fill-control label{font-size:10px;margin-bottom:5px}.fill-control input,.fill-control textarea{padding:9px 10px;font-size:12px}.fill-control input{height:40px}.fill-control textarea{min-height:82px}.fill-code-button{height:40px;font-size:11px}
.smart-options{gap:5px;margin-top:6px}.smart-option{min-height:29px;padding:5px 8px;font-size:9px;border-color:#4f655f}.smart-option:hover,.smart-option.on{border-color:var(--ui-teal);color:#d8ebe6}.smart-option.on{background:#273632}
.wording-actions{gap:6px;padding:0 14px 9px}.wording-actions button{min-height:35px;font-size:9.5px}

/* Formulations are a readable vertical hot menu, not a horizontal carousel. */
.phrase-hotbar{padding:0 14px 16px;border-top:1px solid #3f4038;padding-top:11px}
.phrase-hotbar-label{display:flex;align-items:center;gap:7px;margin-bottom:7px;color:#a897bd;font-size:9px}
.phrase-hotbar-label::before{content:"";width:3px;height:12px;background:var(--ui-violet)}
.phrase-hotbar-items{display:grid;grid-template-columns:1fr;gap:5px;max-height:255px;overflow-y:auto;overflow-x:hidden;padding:0 4px 1px 0;scrollbar-width:thin;scrollbar-color:#62576f #1b1c19}
.phrase-hotbar-items button{width:100%;max-width:none;min-height:36px;display:flex;align-items:center;border:1px solid #514b58;border-left:3px solid var(--ui-violet);background:#1b1c19;padding:7px 9px;color:#c5bacc;font-size:9.5px;line-height:1.35;white-space:normal;text-align:left;transition:background .12s ease,border-color .12s ease,color .12s ease}
.phrase-hotbar-items button:hover{border-color:#8d7aa7;background:#29252d;color:#eee5f2}
.phrase-hotbar-items .phrase-more{border-left-color:var(--red);border-style:solid;color:#d58a7f}
.inline-phrase-menu{margin-top:10px;padding-top:10px}.inline-phrase-menu .phrase-hotbar{padding:0;border-top:0}.inline-phrase-menu .phrase-hotbar-items{max-height:220px}

.manual-tools button,.toolbar button,.sidebar-footer button{font-size:9px}.block-copy strong{font-size:10.5px}.block-copy small{display:none}.editor label,.field-row label{font-size:9px}.editor input,.editor textarea,.editor select,.field-row input{font-size:11px}.editor textarea{min-height:165px;font-size:11px}

.preview-bar{height:48px}.tab{font-size:9px;padding:0 12px}.preview-zoom button{height:30px;min-width:32px;font-size:9.5px}.preview-zoom #zoomValue{min-width:50px}.preview-zoom #zoomFit{min-width:76px}
.preview-canvas{padding:22px}.paper-stage{gap:20px}

/* Easter egg: one clean jump. Audio is triggered by the same click. */
.egg-character{width:126px;height:126px;margin-bottom:24px;transform-origin:50% 100%;will-change:transform}
.egg-character.jump{animation:eggJump .48s cubic-bezier(.25,.75,.3,1)}
@keyframes eggJump{
 0%{transform:translateY(0) scale(1,1)}
 18%{transform:translateY(2px) scale(1.08,.90)}
 48%{transform:translateY(-46px) scale(.96,1.05)}
 76%{transform:translateY(-8px) scale(1.02,.98)}
 100%{transform:translateY(0) scale(1,1)}
}

@media(max-width:1250px){
 .workspace{grid-template-columns:295px 330px minmax(450px,1fr)}
 .egg-character{width:105px;height:105px}.paper-stage{gap:12px}
}
@media(max-width:1020px){
 .workspace{grid-template-columns:280px 310px minmax(420px,1fr)}
 .egg-character{display:none}.paper-stage{display:block}.paper{margin:auto}
 .filter-primary{grid-template-columns:repeat(3,minmax(0,1fr))}.filter-more{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* v0.10 readability pass — normal desktop scale, still compact */
.topbar{height:68px}.workspace{height:calc(100vh - 68px);grid-template-columns:335px 365px minmax(500px,1fr)}
.logo{width:45px;height:36px;font-size:11.5px}.brand{min-width:245px}.brand strong{font-size:15px}.brand small{font-size:9px}
.soft-btn,.primary-btn,.icon-btn{height:40px;padding:0 14px;font-size:10.5px}.lang-switch button{height:38px;font-size:10.5px}
.finder-head{padding:17px 15px 13px}.finder-head h2{font-size:18px}.smart-search{height:46px}.smart-search input{font-size:13px}.finder-tabs button{height:37px;font-size:10px}
.action-chip{min-height:37px;font-size:10.5px;padding:7px 5px}
.smart-section-head{padding:11px 14px 9px}.smart-section-head strong,.smart-section-head span{font-size:9.5px}
.result-card{min-height:72px;padding:12px 39px 11px 15px}.result-title{font-size:13px}.result-desc{font-size:10.5px}.archive-ref,.result-meta{font-size:8.5px}
.catalog-row{min-height:46px}.catalog-name{font-size:11.5px}.catalog-index{font-size:9.5px}
.builder-top.compact{min-height:52px;padding:13px 14px}.builder-top.compact h2{font-size:14px;max-width:220px}.builder-mode-switch button{height:34px;font-size:9.5px}
.document-brief{padding:15px}.document-brief h3{font-size:15px}.brief-ref{font-size:9px}.brief-tools button{height:34px;font-size:9.5px}
.fill-fields{padding:11px 15px 16px}.fill-section-title{min-height:31px}.fill-section-title strong{font-size:9.5px}.fill-section-title button{height:29px;font-size:9px}
.fill-control label{font-size:10.5px}.fill-control input,.fill-control textarea{font-size:13px}.fill-control input,.fill-code-button{height:42px}.fill-control textarea{min-height:90px}.fill-code-button{font-size:12px}
.smart-option{min-height:31px;font-size:9.5px}.wording-actions button{min-height:38px;font-size:10px}
.phrase-hotbar-label{font-size:9.5px}.phrase-hotbar-items button{min-height:40px;font-size:10.5px;padding:8px 10px}
.preview-bar{height:50px}.tab{font-size:9.5px}.preview-zoom button{height:32px;font-size:10px}
@media(max-width:1450px){.workspace{grid-template-columns:300px 335px minmax(450px,1fr)}.egg-character{width:100px;height:100px}.paper-stage{gap:12px}}
@media(max-width:1280px){.workspace{grid-template-columns:285px 320px minmax(420px,1fr)}.egg-character{display:none}.paper-stage{display:block}.paper{margin:auto}}



/* ================================================================
   SS14 Paperwork Studio 1.1 — archive UI and responsive polish
   ================================================================ */
:root{
 --bg:#12130f;--panel:#1d1e19;--panel-alt:#23241e;--panel-dark:#171814;
 --line:#45463c;--line-soft:#34352e;--text:#ece4d4;--muted:#a59d8c;
 --red:#b8493e;--red-hover:#c9574b;--brass:#c3a261;--paper:#eee9dc;--ink:#20231f;
 --topbar-h:62px;--archive-w:310px;--editor-w:390px;
}
*{border-radius:0!important}
html,body{background:var(--bg)}
body{font-size:14px}
button{transition:background .12s ease,border-color .12s ease,color .12s ease,opacity .12s ease}

.topbar{height:var(--topbar-h);padding:0 16px;gap:11px;background:#151612;border-bottom:1px solid #5b5548;position:relative;z-index:20}
.logo{width:42px;height:34px;border:1px solid var(--red);font-size:10px;background:#191a16}
.brand{min-width:255px}.brand strong{font-size:14px;letter-spacing:.16em}.brand small{font-size:8px;color:#817b6e;letter-spacing:.11em}
.archive-status{display:none}.top-actions{margin-left:auto;gap:6px}
.soft-btn,.primary-btn,.icon-btn{height:36px;padding:0 12px;font-size:9px;border-color:#4b4c42;background:#20211c}
.soft-btn:hover,.icon-btn:hover{border-color:#766d5c;background:#282921;color:#f0e6d3}.primary-btn{min-width:122px;border-color:#c85a4f;background:var(--red);font-size:9.5px}.primary-btn:hover{background:var(--red-hover)}

.workspace{height:calc(100vh - var(--topbar-h));grid-template-columns:var(--archive-w) var(--editor-w) minmax(440px,1fr);gap:1px;background:#45453b}
.panel{background:var(--panel)}
.sidebar,.builder,.preview{overflow:hidden}

/* Archive */
.finder-head{padding:14px 13px 10px;background:#20211c}
.finder-head h2{margin:0 0 9px;font-size:13px;letter-spacing:.1em}
.smart-search{height:40px;padding:0 10px;background:#171814;border-color:#515247}.smart-search>span{font-size:17px}.smart-search input{font-size:10.5px}.smart-search button{width:26px;height:26px;font-size:16px}
.finder-tabs{margin-top:9px}.finder-tabs button{height:31px;font-size:8px}.finder-tabs button.active{border-bottom-color:var(--red)}
.action-chips{display:block;padding-top:8px;overflow:visible}.filter-primary,.filter-more{display:flex;gap:4px;flex-wrap:wrap}.filter-more{margin-top:5px;padding-top:5px;border-top:1px solid #34352e}
.action-chip{min-height:28px;padding:5px 8px;border-color:#4a4b41;color:#aaa291;font-size:8px;white-space:nowrap}.action-chip:hover,.action-chip.active{border-color:#d8cfbc;background:#ddd5c5;color:#25261f}
.smart-list,.preset-list{background:#1b1c18;scrollbar-color:#5d594e #191a16}
.smart-section{border-bottom:1px solid #414138}.smart-section-head{position:sticky;top:0;z-index:2;padding:8px 11px 7px;background:#181915;border-bottom-color:#393a32}.smart-section-head strong{font-size:7.5px;letter-spacing:.15em}.smart-section-head span{font-size:7.5px}
.result-card{min-height:64px;padding:10px 34px 9px 12px;background:#20211c;border-bottom-color:#393a32}.result-card:hover{background:#272821;border-left-color:#8e826d}.result-card.active{background:#2a2a23;border-left-color:var(--red)}
.archive-ref{font-size:7px}.result-title{font-size:11.5px;line-height:1.3}.result-desc{font-size:8.5px;line-height:1.35;margin:4px 0}.result-meta{font-size:7px}.fav-btn{right:6px;top:7px;font-size:15px}
.catalog-row{min-height:39px;padding:8px 34px 8px 11px;background:#20211c}.catalog-name{font-size:10px}.catalog-index{font-size:7.5px}
.home-empty{padding:12px;color:#777164;font-size:8px;text-align:center}

/* Editor */
.builder-top.compact{min-height:50px;padding:9px 13px;background:#191a16}.builder-top.compact>div:first-child{min-width:0;flex:1}.builder-top.compact h2{max-width:none;font-size:12px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.builder-mode-switch{flex:0 0 auto}.builder-mode-switch button{height:30px;padding:0 9px;font-size:8px}.builder-mode-switch button.active{background:#ded6c7}
.fill-workspace{background:#20211c}.document-brief{padding:9px 13px;background:#24251f;border-bottom-color:#46473d}.brief-head{align-items:center}.brief-ref{margin:0;font-size:7.5px;color:var(--brass)}.document-brief h3{display:none}.brief-description{margin-top:5px;color:#9c9586;font-size:8.5px;line-height:1.4}.brief-tools{display:flex;flex-wrap:wrap;justify-content:flex-end}.brief-tools button{height:28px;padding:0 7px;font-size:7.5px;background:#20211c}.brief-tools button.danger{border-color:#70443f;color:#d9857b}
.fill-fields{gap:9px;padding:10px 13px 13px}.fill-section-title{min-height:28px;margin:7px 0 1px;padding:0 0 5px;border-bottom-color:#47483e}.fill-section-title strong{font-size:8px}.fill-section-title button{height:26px;font-size:7.5px}
.fill-control label{margin-bottom:5px;font-size:9px;color:#c0b7a6}.fill-control input,.fill-control textarea{padding:8px 9px;background:#171814;border-color:#4c4d43;font-size:11px}.fill-control input{height:37px}.fill-control textarea{min-height:78px;line-height:1.45}.fill-control input:focus,.fill-control textarea:focus{border-color:var(--brass);box-shadow:inset 2px 0 0 var(--brass)}.fill-code-button{height:37px;font-size:10.5px}
.field-formatbar{display:flex;flex-wrap:wrap;gap:3px;margin:0 0 4px}.field-formatbar button{height:25px;min-width:27px;padding:0 6px;border:1px solid #484a40;background:#1a1b17;color:#aaa291;font:700 7.5px ui-monospace,"Liberation Mono",monospace}.field-formatbar button:hover{border-color:#958468;color:#eadbc0;background:#24251f}.field-formatbar .format-wide{padding:0 8px}
.smart-options{gap:4px;margin-top:5px}.smart-option{min-height:26px;padding:4px 7px;font-size:7.5px}.smart-option.smart-save{font-size:12px}
.wording-actions{gap:5px;padding:0 13px 9px}.wording-actions button{min-height:31px;font-size:8px}
.phrase-hotbar{padding:10px 13px 14px;border-top:1px solid #3d3e36}.phrase-hotbar-label{margin-bottom:6px;font-size:8px}.phrase-hotbar-items{max-height:210px;gap:4px}.phrase-hotbar-items button{min-height:32px;padding:6px 8px;font-size:8.5px}

/* Manual constructor */
.manual-workspace{background:#1d1e19}.manual-tools{display:flex;flex-wrap:wrap;gap:4px;padding:8px 10px;border-bottom:1px solid #42433a;background:#191a16}.manual-tools button{min-height:29px;padding:0 8px;border:1px solid #4a4b41;background:#22231d;color:#b9b09f;font-size:7.5px}.manual-tools button:hover{border-color:#8d806a;color:#eadcc3}
.blocks{padding:7px 9px;max-height:42%;overflow:auto;border-bottom:1px solid #42433a}.block-card{min-height:38px;padding:6px 7px;border:1px solid transparent;border-bottom-color:#383930;background:#20211c}.block-card:hover{background:#272820}.block-card.selected{border-color:#75654b;background:#292820}.block-copy strong{font-size:9px}.block-copy small{display:none}.block-index{font-size:7px}.drag,.x-btn{width:25px;height:25px}
.editor{padding:10px 12px 18px;overflow:auto}.editor>label{font-size:8px}.editor input,.editor textarea,.editor select{font-size:10px;background:#171814}.editor textarea{min-height:160px;line-height:1.45}.toolbar{display:flex;flex-wrap:wrap;gap:3px;margin:6px 0}.toolbar button{height:27px;padding:0 7px;font-size:7.5px}.editor-actions{display:flex;gap:5px;margin-top:7px}.editor-actions button{flex:1;min-height:30px;border:1px solid #514e44;background:#22231d;color:#bdb3a1;font-size:8px}.editor-actions .danger{border-color:#70443f;color:#d9857b}
.block-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.block-library button{min-height:56px;padding:8px;border:1px solid #4b4c42;background:#22231d;color:#c7bead;text-align:left;font-size:9px}.block-library button small{display:block;margin-top:4px;color:#817b70;font-size:7.5px}

/* Preview */
.preview{background:#11120f}.preview-bar{height:44px;padding:0 10px;background:#191a16;border-bottom-color:#45463c}.tab{height:44px;padding:0 11px;font-size:8px}.preview-zoom button{height:28px;min-width:29px;font-size:8px}.preview-zoom #zoomFit{min-width:72px}.preview-zoom #zoomValue{min-width:45px}
.preview-canvas{padding:18px;overflow:auto;background:radial-gradient(circle at 50% 30%,#1a1b17 0,#11120f 68%)}.paper-stage{min-height:100%;align-items:flex-start;justify-content:center;gap:16px}.paper{box-shadow:0 12px 34px #000b}.egg-character{width:96px;height:96px;margin:18px 0 0}
.raw-box{max-width:820px;margin:0 auto}.raw-head{font-size:8px}

/* Modal */
.modal-backdrop{padding:18px}.modal{width:min(620px,calc(100vw - 28px));max-height:calc(100vh - 36px);border-color:#5b584d;background:#20211c}.modal h3{font-size:13px}.modal input,.modal textarea,.modal select{background:#171814;font-size:10.5px}.modal-actions button{height:34px;font-size:8.5px}.copy-editor-note{font-size:8.5px}.clause-row,.draft-row,.profile-row{background:#1c1d18}
.import-preview{max-height:170px;overflow:auto;margin:8px 0;padding:8px;border:1px solid #45463c;background:#171814;color:#a8a08f;font:8px/1.45 ui-monospace,"Liberation Mono",monospace;white-space:pre-wrap}

.top-actions .archive-action span{display:inline!important}
.finder-tabs button{font-size:8.5px}.action-chip{font-size:8.5px}.smart-section-head strong,.smart-section-head span{font-size:8px}
.archive-ref{font-size:7.5px}.result-title{font-size:12px}.result-desc{font-size:9px}.result-meta{font-size:7.5px}
.fill-control label{font-size:9.5px}.fill-control input,.fill-control textarea{font-size:11.5px}

@media(max-width:1320px){
 :root{--archive-w:285px;--editor-w:350px}
 .brand{min-width:220px}.brand small{display:none}.soft-btn,.primary-btn{padding:0 9px}.primary-btn{min-width:105px}
 .egg-character{display:none}.paper-stage{display:block}.paper{margin:0 auto}
}
@media(max-width:1080px){

  html{
    scroll-padding-top:calc(var(--topbar-h) + 8px);
  }

  .workspace{
    padding-top:0;
  }

  .topbar{
    position:sticky;
    top:0;
    z-index:30;
  }

 .workspace{height:auto;min-height:calc(100vh - var(--topbar-h));grid-template-columns:285px minmax(410px,1fr);grid-template-rows:minmax(600px,calc(100vh - var(--topbar-h))) minmax(620px,78vh);overflow:visible}
 .sidebar,.builder{height:calc(100vh - var(--topbar-h));min-height:600px}.preview{grid-column:1/-1;height:78vh;min-height:620px}
 .preview-canvas{padding:16px}
}
@media(max-width:760px){
 :root{--topbar-h:auto}
 .topbar{min-height:58px;height:auto;padding:9px 10px;flex-wrap:wrap}.logo{width:38px;height:32px}.brand{min-width:0;flex:1}.brand strong{font-size:12px}.top-actions{width:100%;display:grid;grid-template-columns:repeat(4,1fr);margin-left:0}.soft-btn,.primary-btn{min-width:0;height:34px;padding:0 5px;font-size:7.5px}
 .workspace{
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:none;
  min-height:0}
  .sidebar,.builder,.preview{height:auto;min-height:610px;grid-column:1}.sidebar{min-height:620px}.builder{min-height:720px}.preview{min-height:650px}
 .builder-top.compact{position:sticky;top:0;z-index:4}.preview-bar{position:sticky;top:0;z-index:4}
 .paper{transform-origin:top center}.finder-head{position:sticky;top:0;z-index:3}
}
@media(max-width:470px){
 .top-actions{grid-template-columns:repeat(2,1fr)}.workspace{font-size:13px}.builder-top.compact{align-items:flex-start;gap:8px;flex-direction:column}.builder-mode-switch{width:100%}.builder-mode-switch button{flex:1}.brief-head{align-items:flex-start;flex-direction:column}.brief-tools{justify-content:flex-start}.field-formatbar button{height:28px}.preview-zoom #zoomFit{display:none}.preview-canvas{padding:8px}
}


/* v1.2 clarity pass */
.paper:before,.paper:after{display:none!important}
.document-brief{min-height:42px;padding:6px 10px;background:#20211c}
.brief-head{justify-content:flex-end}
.brief-tools{width:100%;justify-content:flex-end;gap:4px}
.result-card{padding-top:10px}
.archive-ref{opacity:.55}
.result-desc{max-height:2.8em;overflow:hidden;font-size:8px;line-height:1.4}
.profile-storage-note{display:none!important}
.copy-editor-note{display:none!important}
.copy-formatbar{position:sticky;top:-15px;z-index:3;display:flex;flex-wrap:wrap;gap:4px;margin:-2px 0 8px;padding:7px 0;background:var(--panel)}
.copy-formatbar button{min-width:30px;height:29px;border:1px solid var(--line);background:#25261f;color:#d6cebd;font:8px ui-monospace,"Liberation Mono",monospace}
.copy-formatbar button:hover{border-color:#9b8c70;color:#fff1d7}
.paper-field{max-width:calc(100% - 8px)!important;box-sizing:content-box}
.paper-section.header .paper-field{max-width:160px!important}
.paper-section{overflow:visible}
.smart-section+.smart-section{margin-top:12px}


/* v1.3 — cohesive archive palette and paper typography */
:root{
 --bg:#171711;--panel:#222219;--panel-alt:#29281d;--panel-dark:#191912;
 --line:#55513f;--line-soft:#3e3c30;--text:#eee7d3;--muted:#aaa189;
 --red:#a7823f;--red-dark:#67542f;--brass:#c2a25f;--green:#8e9672;
 --paper:#eee8d8;--ink:#24241f;--red-hover:#b4934f;
}
.topbar,.preview-bar,.builder-top.compact,.manual-tools,.smart-section-head,.sidebar-footer{background:#1b1b14}
.logo{border-color:#9d824d;color:#e7d7ae}
.primary-btn{border-color:#a98a4a;background:#8f7137;color:#fff6df}.primary-btn:hover{background:#a18140}
.finder-tabs button.active,.tab.active{border-bottom-color:#b49350}
.result-card.active,.catalog-row.active,.block-card.selected{border-left-color:#b49350}
.action-chip:hover,.action-chip.active,.builder-mode-switch button.active{background:#ded4bb;color:#29281e;border-color:#ded4bb}
.fill-code-button{border-color:#6e5b35;background:#242016;color:#d8ba77}
.smart-option.on{border-color:#b49350;background:#3a3220;color:#eed8a8}
.brief-tools button.danger,.danger,.dept-summary button{border-color:#705f39!important;background:#272116!important;color:#d8bd83!important}
.brief-tools button.danger:hover,.danger:hover,.dept-summary button:hover{border-color:#b49350!important;color:#ffe5ad!important}
.editor-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
.editor-actions button,.editor-actions .danger{width:auto!important;min-width:0!important;min-height:34px!important;margin:0!important;flex:none!important}
.paper{background:#eee8d8;color:#24241f;padding:26px 18px 42px}
.paper-section{color:#24241f;font-family:"Noto Sans","Liberation Sans",Arial,sans-serif;font-size:13.5px;line-height:1.42;letter-spacing:0;white-space:pre-wrap;overflow-wrap:anywhere}
.paper-section.header{font-family:"Liberation Mono",ui-monospace,monospace;font-size:11px;line-height:1.28;white-space:pre-wrap}
.paper-section.title{font-family:"Noto Sans","Liberation Sans",Arial,sans-serif;font-size:13px;line-height:1.35;font-weight:700;white-space:pre-wrap;text-align:center}
.paper-section.stamp{font-family:"Noto Sans","Liberation Sans",Arial,sans-serif;font-size:13px;line-height:1.4;text-align:center}
.paper-section h1,.paper-section h2,.paper-section h3{display:inline;margin:0;font-family:inherit;line-height:inherit}
.paper-section h1{font-size:1.12em}.paper-section h2{font-size:1.06em}.paper-section h3{font-size:1em}
.paper-section code{font-family:"Liberation Mono",ui-monospace,monospace;font-size:.96em}
.paper-field{display:inline;min-width:2.5ch;max-width:none;margin:0 .08em;border:0;border-bottom:1px dashed #9a793c;background:#c8a45a18;padding:0 .16em;color:#5f4b25;font:inherit!important;line-height:inherit!important;vertical-align:baseline;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.paper-field:empty:before{content:attr(data-placeholder);color:#8b7650;font-style:italic;opacity:.78}
.paper-field:hover{background:#c8a45a2b}.paper-field:focus{position:relative;z-index:4;outline:1px solid #b28e4a;background:#fff9e9;color:#332a1a}
.paper-field.missing{border-bottom-color:#aa6d35;background:#d09a4118}
.paper-section.header .paper-field{min-width:2.5ch;max-width:none}.paper-section.header [data-field-key="station"]{max-width:none}
.code-picker-field{border-color:#9a793c!important;background:#c8a45a18!important;color:#6b4d20!important;font:inherit!important}
.copy-edit-badge{border-color:#aa8b4b!important;background:#f3ead5!important;color:#735b2b!important}
.fill-control input,.fill-control textarea,.editor input,.editor textarea,.modal input,.modal textarea,.modal select{border-color:#57513e;background:#191912;color:#eee7d3}
.fill-control input:focus,.fill-control textarea:focus,.editor input:focus,.editor textarea:focus{border-color:#b49350;box-shadow:inset 2px 0 0 #b49350}
.toolbar button,.field-formatbar button{border-color:#55513f;background:#25241b;color:#d2c7aa}.toolbar button:hover,.field-formatbar button:hover{border-color:#b49350;color:#f2dfad}
@media(max-width:760px){
  .paper-section{font-size:13px}
  .paper-section.header{font-size:10.5px}
  .paper-section.title{font-size:12.5px}
}


/* v1.5 — clearer theme selector; keyboard undo/redo retained */
:root{
 --bg:#151614;--panel:#20211f;--panel-alt:#272724;--panel-dark:#1a1b19;
 --line:#50504c;--line-soft:#393a37;--text:#ebe7df;--muted:#aaa59c;
 --red:#a85d45;--red-hover:#b66b50;--brass:#ad7954;--paper:#ece8df;--ink:#252625;
 --ui-blue:#727a7d;--ui-violet:#7b7478;--ui-teal:#6f7c78;--ui-amber:#a37858;
 --ui-orange:#aa6f4d;--ui-green:#747d70;--ui-security:#9a6250;--ui-legal:#717a80;
}
.topbar{background:#191a18;border-bottom-color:#5c554f}
.workspace{background:#494946}
.soft-btn,.primary-btn,.icon-btn{background:#262724;border-color:#55544f;color:#d1cbc1}
.soft-btn:hover,.icon-btn:hover{background:#30312e;border-color:#80736a}
.primary-btn{background:#a85d45;border-color:#bd745b;color:#fff8f1}.primary-btn:hover{background:#b66b50}
.action-chip{box-shadow:inset 0 -2px 0 var(--chip,#706a64)}
.result-card.active,.catalog-row.active{border-left-color:var(--ui-orange)}
.finder-tabs button.active{border-bottom-color:var(--ui-orange)}
.paper-field{border-bottom-color:#9a6b48;background:#b56f3d12;color:#5b4637}
.paper-field:empty:before{color:#82766b}.paper-field:hover{background:#b56f3d20}.paper-field:focus{outline-color:#a86f4f;background:#fbf7ef;color:#302b27}
.paper-field.missing{border-bottom-color:#a35f42;background:#a35f4212}
.code-picker-field{border-color:#9a6b48!important;background:#b56f3d12!important;color:#65452f!important}
.copy-edit-badge{border-color:#9a6b48!important;background:#eee5d9!important;color:#6a4c39!important}
.fill-control input:focus,.fill-control textarea:focus,.editor input:focus,.editor textarea:focus{border-color:#a97857;box-shadow:inset 2px 0 0 #a97857}
.toolbar button:hover,.field-formatbar button:hover{border-color:#a97857;color:#f0d7c4}

html[data-theme="minimal"]{
 --bg:#171717;--panel:#202020;--panel-alt:#252525;--panel-dark:#191919;
 --line:#494949;--line-soft:#353535;--text:#ececec;--muted:#a3a3a3;
 --red:#777;--red-hover:#888;--brass:#929292;--paper:#f2f2f0;--ink:#242424;
 --ui-blue:#777;--ui-violet:#777;--ui-teal:#777;--ui-amber:#777;--ui-orange:#777;
 --ui-green:#777;--ui-security:#777;--ui-legal:#777;
}
html[data-theme="minimal"] .topbar{background:#181818;border-bottom-color:#444}
html[data-theme="minimal"] .logo{display:none}
html[data-theme="minimal"] .brand small{display:none}
html[data-theme="minimal"] .workspace{background:#444}
html[data-theme="minimal"] .result-desc,html[data-theme="minimal"] .archive-ref,html[data-theme="minimal"] .brief-ref{display:none}
html[data-theme="minimal"] .result-card{min-height:38px;padding-top:9px;padding-bottom:9px}
html[data-theme="minimal"] .result-card,html[data-theme="minimal"] .catalog-row,html[data-theme="minimal"] .block-card{border-left-color:#666!important}
html[data-theme="minimal"] .result-card.active,html[data-theme="minimal"] .catalog-row.active,html[data-theme="minimal"] .block-card.selected{border-left-color:#bbb!important}
html[data-theme="minimal"] .action-chip{box-shadow:none;border-color:#555!important}
html[data-theme="minimal"] .action-chip.active{background:#d8d8d8;color:#222}
html[data-theme="minimal"] .phrase-hotbar-label::before{background:#888}
html[data-theme="minimal"] .phrase-hotbar-items button{border-left-color:#666}
html[data-theme="minimal"] .paper-field{border-bottom-color:#888;background:#8881;color:#444}
html[data-theme="minimal"] .paper-choice{border-bottom-color:#777;background:#7771;color:#222}
html[data-theme="minimal"] .paper-field:focus,
html[data-theme="minimal"] .paper-field.is-editing{outline-color:#777;background:#fff;color:#222}
html[data-theme="minimal"] .paper-choice:hover,html[data-theme="minimal"] .paper-choice:focus{outline-color:#777;background:#fff;color:#111}
html[data-theme="minimal"] .preview-canvas{background:#151515}
html[data-theme="minimal"] .soft-btn,html[data-theme="minimal"] .icon-btn{background:#242424}
html[data-theme="minimal"] .primary-btn{background:#666;border-color:#888;color:#fff}

.theme-control,.sound-control{display:flex;align-items:center;gap:8px;height:34px;padding:0 9px;border:1px solid var(--line);background:#242522;color:var(--muted);font-size:10px;letter-spacing:.09em;text-transform:uppercase;white-space:nowrap}
.theme-control label,.sound-control span{font-weight:700;color:#c8c1b6}
.theme-control select{height:26px;min-width:112px;padding:0 26px 0 8px;border:1px solid #5a5954;background:#1d1e1c;color:var(--text);font:inherit;letter-spacing:.04em;text-transform:none;cursor:pointer}
.theme-control select:focus{outline:1px solid var(--ui-orange);border-color:var(--ui-orange)}
.sound-control{width:34px;min-width:34px;justify-content:center;cursor:pointer;background:#1f201d;padding:0}
.sound-control:before{content:"◖))";font:700 11px ui-monospace,"Liberation Mono",monospace;color:#837b6c;letter-spacing:-1px}
.sound-control[aria-pressed="true"]{border-color:var(--ui-orange);background:#2a241d;color:var(--text);box-shadow:inset 0 -2px 0 #0005}
.sound-control[aria-pressed="true"]:before{color:var(--ui-orange)}
.sound-control[aria-pressed="true"] span{color:var(--text)}
html[data-theme="minimal"] .theme-control,html[data-theme="minimal"] .sound-control{background:#202020;border-color:#494949}
html[data-theme="minimal"] .sound-control[aria-pressed="true"]{background:#333;border-color:#bbb}
html[data-theme="minimal"] .theme-control select{background:#181818;border-color:#555;color:#eee}
@media(max-width:760px){
  .top-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .theme-control{grid-column:1/-1;justify-content:space-between}
  .theme-control select{flex:1;max-width:180px}
}

.role-toolbar{margin:8px 0 11px;padding:9px;border:1px solid #4b4b42;background:#1c1d19}.role-toolbar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.role-toolbar-head strong{font:700 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.12em;color:#b8a77f;text-transform:uppercase}.role-toolbar-head small{color:#777164;font:7px ui-monospace,"Liberation Mono",monospace}.role-buttons{display:flex;gap:5px;flex-wrap:wrap}.role-buttons button{border:1px solid #5d584c;background:#252620;color:#d1c7b5;padding:6px 8px;font:8px ui-monospace,"Liberation Mono",monospace}.role-buttons button.primary-role{border-color:var(--brass);color:#e5ce98}.role-picker-list{display:grid;gap:5px;margin-top:10px}.role-picker-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border:1px solid #4b4b42;background:#1b1c18}.role-picker-item strong{display:block;font-size:9px;color:#e4dccd}.role-picker-item small{display:block;margin-top:2px;color:#80796b;font:7px ui-monospace,"Liberation Mono",monospace}.role-picker-item button{border:1px solid #665f50;background:#24251f;color:#d3c8b2;padding:6px 8px;font:8px ui-monospace,"Liberation Mono",monospace}.profile-department-custom{width:100%;margin-top:5px}.participant-field{border-left:2px solid #6f654f;padding-left:8px}

/* v1.11 — исправленные шапки и компактный список блоков */
.build-badge{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:3px 7px;border:1px solid #5a5448;color:#b9aa86;background:#20211d;font:700 7px ui-monospace,"Liberation Mono",monospace;letter-spacing:.08em;vertical-align:middle}
.participants-panel{margin:8px 0 12px;border:1px solid #4d4b43;background:#1b1c18}
.participants-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-bottom:1px solid #45433c;background:#20211d}
.participants-panel-head strong{font:700 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.14em;color:#c8b98f;text-transform:uppercase}
.participants-panel-head span{font:7px ui-monospace,"Liberation Mono",monospace;color:#777267}
.participants-list{display:grid;gap:1px;background:#3d3c36}
.participant-card{background:#1b1c18;padding:9px 10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center}
.participant-card-main{min-width:0}.participant-card-label{display:block;color:#d7cfbf;font:700 9px ui-monospace,"Liberation Mono",monospace;margin-bottom:3px}
.participant-card-value{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#aaa293;font-size:10px}.participant-card-value.empty{color:#6e6a61;font-style:italic}
.participant-card-actions{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.participant-card-actions button{border:1px solid #5e594e;background:#262721;color:#d0c6b2;padding:5px 7px;font:7px ui-monospace,"Liberation Mono",monospace}.participant-card-actions button.primary{border-color:#9b8150;color:#ead49d}.participant-card-actions button.danger{color:#a7867f}
.role-picker-note{padding:8px 9px;margin-bottom:8px;border:1px solid #48463e;background:#1c1d19;color:#8f887b;font-size:9px}
.profile-freeform-note{margin-top:4px;color:#777166;font:7px ui-monospace,"Liberation Mono",monospace}.profile-grid input[list]{width:100%}
.catalog-warning{position:fixed;right:14px;bottom:14px;z-index:80;max-width:340px;padding:9px 11px;border:1px solid #8b6546;background:#2a211a;color:#e1c7aa;font:8px ui-monospace,"Liberation Mono",monospace;box-shadow:0 8px 30px #0008}
@media(max-width:760px){
  .participant-card{grid-template-columns:1fr}
  .participant-card-actions{justify-content:flex-start}
  .participants-panel-head{align-items:flex-start;flex-direction:column}
}


/* v1.10 compact participants */
.participants-panel{margin:7px 0 10px;border:1px solid #48473f;background:#1b1c18;padding:0;min-height:0}
.participants-panel-head{display:flex;align-items:center;gap:8px;padding:7px 9px;border-bottom:1px solid #3d3c36;background:#20211d}
.participants-panel-head strong{font:700 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.13em;color:#c8b98f;text-transform:uppercase;white-space:nowrap}
.participants-panel-head span{margin-left:auto;color:#716d64;font:7px ui-monospace,"Liberation Mono",monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.participants-list{display:flex;gap:5px;flex-wrap:wrap;padding:7px 8px;background:#1b1c18}
.participant-chip{display:inline-flex;align-items:center;max-width:100%;min-height:27px;border:1px solid #565247;background:#24251f;color:#cfc5b0;padding:0;cursor:pointer}
.participant-chip:hover{border-color:#8e774a;background:#292a23}
.participant-chip-role{padding:6px 6px 6px 8px;color:#958b79;font:700 7px ui-monospace,"Liberation Mono",monospace;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.participant-chip-value{padding:6px 8px 6px 0;color:#e0d6c2;font:8px ui-monospace,"Liberation Mono",monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.participant-chip.empty .participant-chip-value{color:#756f64;font-style:italic}
.participant-chip-clear{display:inline-grid;place-items:center;width:25px;align-self:stretch;border:0;border-left:1px solid #4a473e;background:transparent;color:#8f8175;font:10px ui-monospace,"Liberation Mono",monospace;cursor:pointer}
.participant-chip-clear:hover{background:#342a27;color:#c99d91}
.participant-add{width:28px;min-height:27px;border:1px dashed #5b564a;background:#20211d;color:#aa9567;cursor:pointer;font:13px ui-monospace,"Liberation Mono",monospace}
.role-catalog-search{width:100%;margin:8px 0 10px}
.role-picker-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:6px;max-height:min(58vh,520px);overflow:auto;margin-top:0;padding-right:2px}
.role-picker-item{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;padding:9px;border:1px solid #47463f;background:#1b1c18;cursor:pointer}
.role-picker-item:hover{border-color:#887347;background:#22231e}
.role-picker-item.active-character{border-color:#9a8050;box-shadow:inset 2px 0 #b99a5c}
.role-picker-item strong{display:block;font-size:9px;color:#e4dccd}.role-picker-item small{display:block;margin-top:3px;color:#80796b;font:7px ui-monospace,"Liberation Mono",monospace}
.role-picker-item button{border:1px solid #665f50;background:#24251f;color:#d3c8b2;padding:6px 8px;font:8px ui-monospace,"Liberation Mono",monospace}
.role-picker-note{color:#8d8678;font:8px ui-monospace,"Liberation Mono",monospace;line-height:1.5}
@media(max-width:760px){
  .participants-panel-head span{display:none}
  .participant-chip-value{max-width:135px}
  .participants-list{gap:4px}
  .role-picker-list{grid-template-columns:1fr}
}

/* v1.13 — desktop hierarchy pass */
:root{
 --topbar-h:72px;
 --archive-w:340px;
 --editor-w:430px;
 --nt-gold:#d4af64;
 --nt-gold-dim:#8f7647;
 --nt-red:#b45f4b;
 --nt-blue:#5e7f9b;
 --nt-green:#7f956f;
 --nt-panel:#20221e;
 --nt-panel-strong:#282923;
 --nt-void:#10120f;
}
body{background:var(--nt-void)}
*{scrollbar-width:thin;scrollbar-color:#6b614f #171915}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#171915}
::-webkit-scrollbar-thumb{background:#5f5647;border:2px solid #171915}
::-webkit-scrollbar-thumb:hover{background:#8c7651}
.topbar{
 height:var(--topbar-h);padding:0 18px;background:#151713;border-bottom:1px solid #776851;
 box-shadow:0 10px 28px #0006;
}
.logo{width:48px;height:38px;border-color:var(--nt-gold);color:#f1dfaf;background:#11130f}
.brand{min-width:270px}.brand strong{font-size:16px;color:#f4ead7}.brand small{margin-top:6px;color:#8f8878}
.build-badge{border-color:#675941;background:#181a16;color:#d8bf80}
.top-actions{margin-left:auto;gap:7px}.soft-btn,.primary-btn,.icon-btn{height:38px}
.icon-action{width:38px;padding:0;font-size:14px}.icon-action:disabled{opacity:.35;cursor:not-allowed}
.primary-btn{min-width:122px;background:#b5654e;border-color:#d18165;box-shadow:inset 0 -2px 0 #7a392c;color:#fff8ee}
.primary-btn:hover{background:#c27058}
.workspace{height:calc(100vh - var(--topbar-h));grid-template-columns:var(--archive-w) var(--editor-w) minmax(520px,1fr);background:#585344}
.panel{background:var(--nt-panel)}
.finder-head{padding:17px 15px 14px;background:#1b1d19;border-bottom-color:#5a5344}
.finder-head h2{margin-bottom:13px;color:#f2e8d7;font-size:17px;letter-spacing:.1em}
.smart-search{height:44px;border-color:#686250;background:#141612}.smart-search:focus-within{border-color:var(--nt-gold)}
.finder-tabs{margin-top:11px}.finder-tabs button{height:36px}.finder-tabs button.active{border-bottom-color:var(--nt-gold);color:#f0e5d0}
.action-chip{min-height:36px;background:#1d1f1a;border-color:#4f4c40;color:#b9af9e}.action-chip.active{background:#e2d6bd;color:#24251f}
.smart-section-head{padding:10px 13px;background:#171915;border-top:1px solid #35352e;border-bottom-color:#434237}
.smart-section-head strong{color:#bca46f;font-size:8.5px}.smart-section-head span{color:#807868}
.home-empty{min-height:52px;display:grid;place-items:center;padding:12px;color:#827a6a;font-size:9px;text-align:center}
.result-card{
 min-height:82px;padding:13px 42px 12px 16px;background:#20221d;border-bottom-color:#3a3b33;border-left-width:4px;
 transition:background .12s ease,border-color .12s ease,transform .12s ease;
}
.result-card:hover{background:#292b24;transform:translateX(2px)}
.result-card.active{background:#302d23;border-left-color:var(--nt-gold)!important;box-shadow:inset 0 0 0 1px #6f5c38}
.archive-ref{margin-bottom:5px;color:#9a8e71;opacity:1;font-size:8px}.result-title{font-size:13.5px;line-height:1.25;color:#f4ead8}
.result-desc{margin-top:5px;color:#aca391;font-size:10px;line-height:1.35;-webkit-line-clamp:2}
.result-meta{margin-top:8px;color:#8d8371;font-size:8px}.fav-btn{top:8px;right:8px;width:28px;height:28px}
.builder-top.compact{min-height:54px;padding:0 14px;background:#181a16;border-bottom-color:#5a5344}
.builder-profile-btn{height:34px;border:1px solid #675d4b;background:#20211c;color:#d8ccb5;padding:0 11px;font:800 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.08em;text-transform:uppercase}
.builder-profile-btn:hover{border-color:var(--nt-gold);color:#ffe4a8}
.builder-mode-switch button{height:34px}
.builder-mode-switch button.active{background:#e2d6bd;color:#22231e}
.fill-workspace{background:#20221e}
.document-brief{
 min-height:0;padding:13px 14px;background:linear-gradient(180deg,#292922,#20211d);border-bottom:1px solid #5b5342;
}
.dossier-card{display:grid;gap:11px}
.dossier-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}
.dossier-kicker{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:7px;color:#9b917b;font:700 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.12em;text-transform:uppercase}
.dossier-kicker span{padding:3px 6px;border:1px solid #5b523f;background:#1a1b17;color:#c9b071}
.dossier-title{display:block!important;margin:0;color:#f3ebdc;font:800 15px/1.25 "Liberation Sans",Arial,sans-serif}
.dossier-summary{margin-top:5px;color:#a8a08f;font-size:10px;line-height:1.35}
.dossier-actions{display:flex;justify-content:flex-end;gap:5px;flex-wrap:wrap;max-width:230px}
.dossier-actions button,.brief-tools button{height:28px;border:1px solid #675d4b;background:#20211c;color:#cabfa9;padding:0 8px;font:700 7.5px ui-monospace,"Liberation Mono",monospace}
.dossier-actions button:hover{border-color:var(--nt-gold);color:#ffe4a8}
.variant-control{display:flex;align-items:center;gap:6px;height:28px;border:1px solid #675d4b;background:#1a1b17;padding:0 6px;color:#cabfa9;font:700 7.5px ui-monospace,"Liberation Mono",monospace;letter-spacing:.08em;text-transform:uppercase}
.variant-control span{color:#9f927d}
.variant-control select{width:118px;height:22px;border:1px solid #5d5445;background:#20211c;color:#f0e3c8;padding:0 4px;font:700 8px ui-monospace,"Liberation Mono",monospace}
.dossier-progress{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:center}
.status-pill{display:inline-flex;align-items:center;height:24px;padding:0 8px;border:1px solid #655c49;background:#1a1b17;color:#c8bda5;font:800 8px ui-monospace,"Liberation Mono",monospace;letter-spacing:.08em;text-transform:uppercase}
.status-pill.ready{border-color:#65744e;color:#bfd69e}.status-pill.missing{border-color:#8c5946;color:#e0a58f}
.status-track{height:7px;overflow:hidden;border:1px solid #5a5345;background:#171915}.status-fill{height:100%;background:linear-gradient(90deg,var(--nt-gold-dim),var(--nt-gold));width:0}
.status-count{color:#9e947e;font:700 8px ui-monospace,"Liberation Mono",monospace;white-space:nowrap}
.missing-list{display:none}
.fill-fields{gap:10px;padding:12px 14px 16px}
.fill-section-title{min-height:34px;margin:9px 0 2px;padding:0 0 6px 10px;border-left:4px solid #777164;border-bottom-color:#4a463a}
.fill-section-title strong{color:#d7c59c;font-size:9px;letter-spacing:.16em}
.fill-section-title button{height:28px;border-color:#665e4f;background:#252620;color:#d7ccb8}
.fill-control{position:relative;padding:2px 0 3px}
.fill-control label{display:flex;align-items:center;gap:6px;margin-bottom:6px;color:#c8beac;font-size:9.5px;letter-spacing:.04em}
.field-required-dot{width:6px;height:6px;background:#8b5948;box-shadow:0 0 0 1px #c5856f55}.field-done-dot{width:6px;height:6px;background:#75895e;box-shadow:0 0 0 1px #a9c78355}
.field-required-text{display:none}
.fill-control input,.fill-control textarea{border-color:#5d5849;background:#171914;color:#f0e7d8}
.fill-control input{height:42px}.fill-control textarea{min-height:96px}
.fill-control.required.missing input,.fill-control.required.missing textarea{border-color:#8b5948;box-shadow:inset 3px 0 0 #8b5948;background:#1d1715}
.fill-control.required.filled input,.fill-control.required.filled textarea{border-color:#596948;box-shadow:inset 3px 0 0 #596948}
.fill-code-button{height:42px;border-color:#866b3e;background:#251f15;color:#f0ca7b}
.field-formatbar{margin-bottom:6px}.field-formatbar button{height:27px;border-color:#575343;background:#181a16;color:#c4b79b}
.wording-actions{gap:7px;padding:0 14px 11px}.wording-actions button{min-height:36px;background:#1c1e19;border-color:#5a5344;color:#cfc4ad}
.phrase-hotbar{padding:0 14px 17px}.phrase-hotbar-label{color:#b8a071}.phrase-hotbar-items button{min-height:38px;background:#191b16;border-left-color:#9b7a45}
.participants-panel{margin:8px 0 12px;border-color:#575041;background:#181a16}
.participants-panel-head{background:#22231e;border-bottom-color:#454036}.participants-panel-head strong{color:#d6bf85}
.participant-chip{background:#25261f;border-color:#5a5345}.participant-chip:hover{border-color:#b08b4f}
.preview-bar{height:52px;background:#171915;border-bottom-color:#5a5344}.tab{font-size:9px;padding:0 14px}.tab.active{border-bottom-color:var(--nt-gold);color:#f0e3c8}
.preview-zoom{margin-left:auto;border-color:#4e4a3e}.preview-zoom button{height:31px;background:#20211d;color:#b9af9d}
.preview-canvas{padding:28px;background:#0f110e}
.paper-stage{align-items:flex-start;gap:22px}
.paper{
 width:530px;min-height:650px;padding:28px 22px 46px;border:1px solid #d3c8ae;background:#eee8d8;
 box-shadow:0 24px 60px #000c,0 0 0 1px #fff4 inset;
}
.paper-section{font-size:14px;line-height:1.46;color:#24231f}.paper-section.header{font-size:10.8px;line-height:1.28}.paper-section.title{font-size:13.5px}
.paper-field{border-bottom-color:#956a42;background:#a96e3f14;color:#5a4330}.paper-field.missing{border-bottom-color:#a25842;background:#a2584217}
.egg-character{opacity:.88;filter:drop-shadow(0 10px 7px #000a)}

/* v1.13 — closer in-game paper preview */
.paper{
 width:510px;min-height:650px;padding:30px 40px 46px;border:0;background:#eeeadc;
 box-shadow:0 24px 60px #000c;
}
.paper-section{
 color:#202020;font-family:"Noto Sans","Liberation Sans",Arial,sans-serif;
 font-size:13px;line-height:1.34;letter-spacing:0;white-space:pre-wrap;
}
.paper-section.header{
 overflow:hidden;font-family:"Courier New","Liberation Mono",ui-monospace,monospace;
 font-size:12px;line-height:1.16;white-space:pre;
}
.paper-section.title,.paper-section.stamp{
 width:max-content;max-width:100%;margin:0 auto;overflow:hidden;font-family:"Noto Sans","Liberation Sans",Arial,sans-serif;
 font-size:13px;line-height:1.34;font-weight:400;text-align:center;white-space:pre;
}
.paper-section h1,.paper-section h2,.paper-section h3{font-family:inherit;font-weight:700;line-height:inherit}
.paper-section h1{font-size:2em}.paper-section h2{font-size:1.42em}.paper-section h3{font-size:1.17em}
.paper-field{background:#e7dece;border-bottom:1px dashed #b97860;color:#8d7762;padding:0 .15em;font-style:italic}
.paper-field:empty:before{color:#9a8873}
.code-picker-field{background:#e7dece!important;border-bottom-color:#b97860!important;color:#6f4a2c!important;font-style:normal}

/* v1.14 — readability pass */
.paper{
 padding:30px 38px 48px;background:#eeeadc;color:#1e1e1a;
}
.paper-section{
 color:#1f1f1b;font-size:14px;line-height:1.43;overflow-wrap:normal;
}
.paper-section.header{
 font-size:11.5px;line-height:1.14;margin-bottom:2px;
}
.paper-section.title{
 font-size:14px;line-height:1.32;font-weight:400;margin:1px auto 3px;
}
.paper-section.stamp{
 font-size:14px;line-height:1.32;margin-top:3px;color:#25211b;
}
.paper-section h1{font-size:1.82em}.paper-section h2{font-size:1.34em}.paper-section h3{font-size:1.12em}
.paper-field{
 background:#d8c7ab55;border-bottom-color:#ad7d5f;color:#796755;
 padding:0 .12em;font-style:italic;box-decoration-break:clone;-webkit-box-decoration-break:clone;
}
.paper-field:hover{background:#d8c7ab78}
.paper-field:focus,.paper-field.is-editing{outline:1px solid #a36d50;background:#fff9ed;color:#2b241e}
.paper-field:empty:before{color:#8d7f6d}
.paper-choice{
 cursor:pointer;border-bottom:1px dotted #9b7b58;background:#d8c7ab30;color:#4f3a29;
 padding:0 .08em;box-decoration-break:clone;-webkit-box-decoration-break:clone;
}
.paper-choice:hover,.paper-choice:focus{outline:1px solid #a36d50;background:#fff4dc;color:#211812}
.code-picker-field{
 background:#d8c7ab55!important;border-bottom-color:#ad7d5f!important;color:#5f432b!important;
}
.editable-copy{padding:1px 2px;margin:-1px -2px}
.editable-copy:hover{border-color:#b9a98b66;background:#fff8e91a}
.copy-edit-badge{width:20px;height:18px;background:#eee6d4cc;color:#6b583d}
.raw-box{width:min(980px,96%);background:#151613}
.raw-head{height:40px;color:#a99f8f;font-size:8.5px}
.raw-box pre{
 max-height:74vh;padding:18px 20px;color:#e0d7c8;
 font:11.5px/1.62 "Noto Sans Mono","Cascadia Mono","Courier New",ui-monospace,monospace;
 white-space:pre;overflow:auto;
}

/* v1.15 — quiet paper preview */
.paper{
 width:510px;min-height:650px;padding:32px 42px 50px;background:#eeeadd;color:#23211d;
}
.paper-section{
 color:#24221e;font-size:14px;line-height:1.48;overflow-wrap:normal;
}
.paper-section.header{
 color:#211f1b;font-size:11.25px;line-height:1.17;margin-bottom:6px;
}
.paper-section.title{
 color:#24211d;font-size:13.5px;line-height:1.32;margin:2px auto 8px;
}
.paper-section.stamp{
 color:#353026;font-size:13.5px;line-height:1.38;margin-top:5px;
}
.paper-section strong{font-weight:650}
.paper-section h1{font-size:1.72em}.paper-section h2{font-size:1.28em}.paper-section h3{font-size:1.08em}
.paper-field{
 background:transparent;border-bottom-color:#b88970;color:#827161;
 padding:0 .08em;font-style:italic;
}
.paper-field.filled{
 background:#e7dece;color:#6b3f25;border-bottom-color:#9b5f45;font-style:normal;
}
.paper-field.placeholder{
 color:#9b8d7d;border-bottom-color:#c1a28e;font-style:italic;
}
.paper-field:hover{background:#d8c7ab38}
.paper-field:focus{outline:1px solid #9d6b55;background:#fffaf0;color:#2a241f}
.paper-field.missing{background:transparent;border-bottom-color:#b88970}
.paper-field:empty:before{color:#958879;opacity:.82}
.code-picker-field{
 background:transparent!important;border-bottom-color:#b88970!important;color:#674a32!important;
}
.code-picker-field.filled{background:#e7dece!important;color:#4f3522!important;border-bottom-color:#8f5b46!important}
.editable-copy{padding:1px 2px;margin:-1px -2px}
.editable-copy:hover{border-color:#b8a98a55;background:#fff8e912}
.copy-edit-badge{opacity:0!important;pointer-events:none}
.editable-copy:hover .copy-edit-badge{opacity:.72!important;pointer-events:auto}
html[data-theme="minimal"] .document-brief{background:#242424}
html[data-theme="minimal"] .status-fill{background:#aaa}
html[data-theme="minimal"] .dossier-kicker span,html[data-theme="minimal"] .status-pill{border-color:#555;background:#1b1b1b;color:#ddd}
html[data-theme="minimal"] .topbar,html[data-theme="minimal"] .preview-bar,html[data-theme="minimal"] .builder-top.compact,html[data-theme="minimal"] .finder-head,html[data-theme="minimal"] .smart-section-head{background:#1b1b1b;box-shadow:none}
html[data-theme="minimal"] .build-badge,html[data-theme="minimal"] .dossier-summary,html[data-theme="minimal"] .result-desc,html[data-theme="minimal"] .dossier-kicker span:not(:first-child),html[data-theme="minimal"] .participants-panel-head span{display:none}
html[data-theme="minimal"] .workspace{background:#3a3a3a;grid-template-columns:310px 400px minmax(520px,1fr)}
html[data-theme="minimal"] .document-brief{background:#202020;border-bottom-color:#444}
html[data-theme="minimal"] .dossier-card{gap:8px}
html[data-theme="minimal"] .dossier-title{font-size:14px;font-weight:700}
html[data-theme="minimal"] .dossier-actions button,html[data-theme="minimal"] .builder-profile-btn,html[data-theme="minimal"] .soft-btn,html[data-theme="minimal"] .primary-btn{box-shadow:none;background:#242424;border-color:#555;color:#eee}
html[data-theme="minimal"] .variant-control{background:#202020;border-color:#555;color:#eee}
html[data-theme="minimal"] .variant-control span{color:#aaa}
html[data-theme="minimal"] .variant-control select{background:#181818;border-color:#555;color:#eee}
html[data-theme="minimal"] .primary-btn{background:#5d5d5d}
html[data-theme="minimal"] .result-card{min-height:48px;background:#202020}
html[data-theme="minimal"] .result-card:hover,html[data-theme="minimal"] .result-card.active{transform:none;background:#282828;box-shadow:none}
html[data-theme="minimal"] .fill-control input,html[data-theme="minimal"] .fill-control textarea,html[data-theme="minimal"] .fill-code-button{background:#181818;border-color:#4d4d4d;color:#eee;box-shadow:none!important}
html[data-theme="minimal"] .fill-control.required.missing input,html[data-theme="minimal"] .fill-control.required.missing textarea{border-color:#777}
html[data-theme="minimal"] .field-required-dot,html[data-theme="minimal"] .field-done-dot{background:#777;box-shadow:none}
html[data-theme="minimal"] .paper{box-shadow:none;border-color:#cfcfcf;background:#f4f4f2}

/* v1.14 — Retro 98 theme */
html[data-theme="retro"]{
 --bg:#008080;
 --panel:#c0c0c0;
 --panel-alt:#d4d0c8;
 --panel-dark:#fff;
 --line:#808080;
 --line-soft:#a0a0a0;
 --text:#000;
 --muted:#404040;
 --red:#800000;
 --brass:#000080;
 --paper:#fffdf0;
 --ink:#000;
 --nt-gold:#000080;
 --nt-red:#800000;
 --nt-panel:#c0c0c0;
 --nt-void:#008080;
 font-family:Tahoma,"MS Sans Serif","Liberation Sans",Arial,sans-serif;
 color:#000;background:#008080;
}
html[data-theme="retro"] body{background:#008080;color:#000}
html[data-theme="retro"] *{scrollbar-color:#c0c0c0 #808080}
html[data-theme="retro"] ::selection{background:#000080;color:#fff}
html[data-theme="retro"] .topbar{
 height:64px;background:#c0c0c0;color:#000;border:0;border-bottom:2px solid #404040;box-shadow:none;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
}
html[data-theme="retro"] .logo{
 position:relative;width:42px;height:34px;background:#c0c0c0;border:0;color:transparent;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #000;font-family:"Liberation Mono",monospace;
 background-image:url("https://station14.ru/images/5/5b/FaxMachineBase.png");
 background-repeat:no-repeat;background-position:center;background-size:27px 27px;
}
html[data-theme="retro"] .logo:before{
 content:"";position:absolute;left:8px;top:7px;width:25px;height:20px;background:#fff;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #404040;
}
html[data-theme="retro"] .logo:after{
 content:"";position:absolute;left:10px;top:9px;width:21px;height:4px;background:#000080;
 box-shadow:
  0 6px #d4d0c8,
  0 10px #d4d0c8,
  3px 7px #ff0,
  7px 7px #008000,
  11px 7px #f00,
  4px 12px #808080,
  8px 12px #808080,
  12px 12px #808080;
}
html[data-theme="retro"] .logo:before,
html[data-theme="retro"] .logo:after{display:none}
html[data-theme="retro"] .brand{position:relative;min-width:430px;padding-left:0}
html[data-theme="retro"] .brand strong{
 position:relative;display:block;height:18px;overflow:hidden;color:transparent;font:700 15px Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0;
}
html[data-theme="retro"] .brand strong:before{
 content:"NT Bureaucratic Assistant v1.12 (Trial Version)";
 position:absolute;inset:0;color:#000;white-space:nowrap;
}
html[data-theme="retro"] .brand small{
 position:relative;display:block;height:15px;overflow:hidden;color:transparent;font:11px Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0;text-transform:none;
}
html[data-theme="retro"] .brand small:before{
 content:"NanoTrasen Office Compatibility Mode • Evaluation Copy";
 position:absolute;inset:0;color:#404040;white-space:nowrap;
}
html[data-theme="retro"] .build-badge{display:none}
html[data-theme="retro"] .workspace{background:#008080;gap:4px;grid-template-columns:320px 430px minmax(520px,1fr)}
html[data-theme="retro"] .panel{position:relative;z-index:2}
html[data-theme="retro"] .workspace:before{
 content:"NT Office Tools";position:fixed;right:18px;bottom:18px;z-index:0;width:150px;height:72px;padding:10px 8px 8px 54px;
 background-color:#c0c0c0;color:#000;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040,3px 3px 0 #0004;
 background-image:url("https://station14.ru/images/d/d7/PosterLegitCleanliness.png"),url("https://station14.ru/images/e/e2/TowelColorNT.png");
 background-repeat:no-repeat,no-repeat;background-position:11px 10px,21px 45px;background-size:32px 32px,22px 14px;
 font:11px/1.25 Tahoma,"MS Sans Serif",Arial,sans-serif;pointer-events:none;
}
html[data-theme="retro"] .workspace:after{
 content:"Trial\\A corporate edition";white-space:pre;position:fixed;right:26px;bottom:30px;z-index:1;width:104px;color:#404040;
 font:10px/1.2 Tahoma,"MS Sans Serif",Arial,sans-serif;pointer-events:none;
}
html[data-theme="retro"] .panel,
html[data-theme="retro"] .modal,
html[data-theme="retro"] .raw-box{
 background:#c0c0c0;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040;
}
html[data-theme="retro"] .finder-head,
html[data-theme="retro"] .builder-top.compact,
html[data-theme="retro"] .preview-bar,
html[data-theme="retro"] .smart-section-head,
html[data-theme="retro"] .document-brief,
html[data-theme="retro"] .participants-panel-head,
html[data-theme="retro"] .sidebar-footer,
html[data-theme="retro"] .manual-tools,
html[data-theme="retro"] .blocks{
 background:#c0c0c0;border-color:#808080;color:#000;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
}
html[data-theme="retro"] .finder-head h2,
html[data-theme="retro"] .dossier-title,
html[data-theme="retro"] .document-brief h3,
html[data-theme="retro"] .modal h3{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0;text-transform:none}
html[data-theme="retro"] .theme-control,
html[data-theme="retro"] .smart-search,
html[data-theme="retro"] input,
html[data-theme="retro"] textarea,
html[data-theme="retro"] select,
html[data-theme="retro"] .fill-control input,
html[data-theme="retro"] .fill-control textarea,
html[data-theme="retro"] .modal input,
html[data-theme="retro"] .modal textarea,
html[data-theme="retro"] .modal select,
html[data-theme="retro"] .editor input,
html[data-theme="retro"] .editor textarea,
html[data-theme="retro"] .editor select{
 background:#fff;color:#000;border:0;box-shadow:inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;
}
html[data-theme="retro"] .theme-control label,
html[data-theme="retro"] .variant-control,
html[data-theme="retro"] .variant-control span,
html[data-theme="retro"] .fill-control label,
html[data-theme="retro"] .fill-section-title strong,
html[data-theme="retro"] .participants-panel-head strong,
html[data-theme="retro"] .participants-panel-head span,
html[data-theme="retro"] .dossier-summary,
html[data-theme="retro"] .archive-ref,
html[data-theme="retro"] .result-meta,
html[data-theme="retro"] .smart-section-head strong,
html[data-theme="retro"] .smart-section-head span{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0}
html[data-theme="retro"] .variant-control{background:#c0c0c0;border:0;box-shadow:inset -1px -1px #808080,inset 1px 1px #fff;padding:3px 5px;text-transform:none}
html[data-theme="retro"] .variant-control select{height:22px;background:#fff;color:#000;border:0;box-shadow:inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;font:11px Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] button,
html[data-theme="retro"] .soft-btn,
html[data-theme="retro"] .primary-btn,
html[data-theme="retro"] .icon-btn,
html[data-theme="retro"] .builder-profile-btn,
html[data-theme="retro"] .dossier-actions button,
html[data-theme="retro"] .brief-tools button,
html[data-theme="retro"] .builder-mode-switch button,
html[data-theme="retro"] .finder-tabs button,
html[data-theme="retro"] .action-chip,
html[data-theme="retro"] .smart-option,
html[data-theme="retro"] .participant-add,
html[data-theme="retro"] .role-picker-item button,
html[data-theme="retro"] .preview-zoom button,
html[data-theme="retro"] .tab{
 background:#c0c0c0;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040;
 font-family:Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0;text-transform:none;
}
html[data-theme="retro"] button:active,
html[data-theme="retro"] .soft-btn:active,
html[data-theme="retro"] .primary-btn:active,
html[data-theme="retro"] .action-chip:active{box-shadow:inset -1px -1px #fff,inset 1px 1px #404040;transform:translate(1px,1px)}
html[data-theme="retro"] .primary-btn,
html[data-theme="retro"] .builder-mode-switch button.active,
html[data-theme="retro"] .finder-tabs button.active,
html[data-theme="retro"] .tab.active,
html[data-theme="retro"] .action-chip.active{
 background:#000080;color:#fff;box-shadow:inset 1px 1px #1084d0,inset -1px -1px #000040;
}
html[data-theme="retro"] .finder-tabs,
html[data-theme="retro"] .builder-mode-switch,
html[data-theme="retro"] .preview-zoom{border:0;box-shadow:inset 1px 1px #808080,inset -1px -1px #fff}
html[data-theme="retro"] .result-card,
html[data-theme="retro"] .catalog-row,
html[data-theme="retro"] .block-card,
html[data-theme="retro"] .draft-row,
html[data-theme="retro"] .profile-row,
html[data-theme="retro"] .clause-row,
html[data-theme="retro"] .role-picker-item,
html[data-theme="retro"] .participants-panel,
html[data-theme="retro"] .participant-chip{
 background:#d4d0c8;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
}
html[data-theme="retro"] .result-card:hover,
html[data-theme="retro"] .catalog-row:hover,
html[data-theme="retro"] .role-picker-item:hover{background:#e6e6e6;transform:none}
html[data-theme="retro"] .result-card.active,
html[data-theme="retro"] .catalog-row.active,
html[data-theme="retro"] .block-card.selected{
 background:#000080!important;color:#fff;border-left-color:#000080!important;box-shadow:none;
}
html[data-theme="retro"] .result-card.active .result-title,
html[data-theme="retro"] .result-card.active .result-desc,
html[data-theme="retro"] .result-card.active .archive-ref,
html[data-theme="retro"] .result-card.active .result-meta{color:#fff}
html[data-theme="retro"] .result-title,
html[data-theme="retro"] .catalog-name,
html[data-theme="retro"] .participant-chip-value,
html[data-theme="retro"] .role-picker-item strong{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .result-desc,
html[data-theme="retro"] .participant-chip.empty .participant-chip-value,
html[data-theme="retro"] .role-picker-item small{color:#404040}
html[data-theme="retro"] .profile-modal-head span,
html[data-theme="retro"] .profile-modal-head h3{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0}
html[data-theme="retro"] .profile-head-actions button,
html[data-theme="retro"] .profile-head-actions button:last-child,
html[data-theme="retro"] .profile-actions button{
 background:#c0c0c0!important;color:#000!important;border:0!important;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #404040!important;
 font:11px Tahoma,"MS Sans Serif",Arial,sans-serif;
}
html[data-theme="retro"] .profile-head-actions button:active,
html[data-theme="retro"] .profile-actions button:active{box-shadow:inset -1px -1px #fff,inset 1px 1px #404040!important}
html[data-theme="retro"] .profile-row{background:#d4d0c8!important;color:#000!important;padding:10px;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080}
html[data-theme="retro"] .profile-file strong{color:#000!important;font:700 11px Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .profile-file small{color:#404040!important;font:10px Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .profile-actions .delete{color:#800000!important}
html[data-theme="retro"] .dossier-kicker span{background:#000080;color:#fff;border:0;padding:3px 7px;box-shadow:inset 1px 1px #1084d0,inset -1px -1px #000040}
html[data-theme="retro"] .fill-workspace,
html[data-theme="retro"] .participants-list,
html[data-theme="retro"] .manual-workspace{background:#c0c0c0}
html[data-theme="retro"] .fill-section-title{border:0;border-top:1px solid #808080;padding:7px 0 0 0;margin-top:12px}
html[data-theme="retro"] .field-required-dot{background:#800000;box-shadow:none}
html[data-theme="retro"] .field-done-dot{background:#008000;box-shadow:none}
html[data-theme="retro"] .fill-control.required.missing input,
html[data-theme="retro"] .fill-control.required.missing textarea{box-shadow:inset 3px 0 #800000,inset -1px -1px #fff,inset 1px 1px #404040}
html[data-theme="retro"] .fill-control.required.filled input,
html[data-theme="retro"] .fill-control.required.filled textarea{box-shadow:inset 3px 0 #008000,inset -1px -1px #fff,inset 1px 1px #404040}
html[data-theme="retro"] .preview-canvas{background:#008080}
html[data-theme="retro"] .paper{background:#fffdf0;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080,8px 8px 0 #0005}
html[data-theme="retro"] .paper:before{content:"";display:none}
html[data-theme="retro"] .paper:after{display:none}
html[data-theme="retro"] .paper-section{color:#000;font-family:"Times New Roman",serif}
html[data-theme="retro"] .paper-section.header,
html[data-theme="retro"] .paper-section.title,
html[data-theme="retro"] .paper-section.stamp{font-family:"Courier New","Liberation Mono",monospace}
html[data-theme="retro"] .paper-field{background:#ffffcc;color:#000;border-bottom:1px dotted #000;box-shadow:none}
html[data-theme="retro"] .paper-choice{background:#ffffcc;color:#000;border-bottom:1px dotted #000}
html[data-theme="retro"] .paper-field:focus,
html[data-theme="retro"] .paper-field.is-editing{outline:1px dotted #000;background:#fff;color:#000}
html[data-theme="retro"] .paper-choice:hover,html[data-theme="retro"] .paper-choice:focus{outline:1px dotted #000;background:#fff;color:#000}
html[data-theme="retro"] .toast{background:#ffffe1;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040,4px 4px 0 #0005}
html[data-theme="retro"] .home-empty,
html[data-theme="retro"] .no-results,
html[data-theme="retro"] .empty{
 background:#d4d0c8;color:#404040;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
}
html[data-theme="retro"] .fill-control.required.missing input,
html[data-theme="retro"] .fill-control.required.missing textarea,
html[data-theme="retro"] .fill-control.required.filled input,
html[data-theme="retro"] .fill-control.required.filled textarea{
 background:#fff;color:#000;border:0;
}
html[data-theme="retro"] .fill-control.required.missing input,
html[data-theme="retro"] .fill-control.required.missing textarea{
 box-shadow:inset 4px 0 #800000,inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;
}
html[data-theme="retro"] .fill-control.required.filled input,
html[data-theme="retro"] .fill-control.required.filled textarea{
 box-shadow:inset 4px 0 #008000,inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;
}
html[data-theme="retro"] .fill-code-button{
 background:#fff;color:#000080;border:0;box-shadow:inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;
}
html[data-theme="retro"] .preview-canvas{padding:34px 28px 28px}
html[data-theme="retro"] .paper-stage{align-items:flex-start;gap:34px}
html[data-theme="retro"] .egg-character{
 background:#c0c0c0;padding:8px;border:0;filter:none;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040,4px 4px 0 #0004;
}
html[data-theme="retro"] .phrase-hotbar-label{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0}
html[data-theme="retro"] .phrase-hotbar-items button,
html[data-theme="retro"] .wording-actions button,
html[data-theme="retro"] .field-formatbar button{
 background:#c0c0c0;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040;
}
html[data-theme="retro"] .participant-chip-clear:hover{background:#000080;color:#fff}
html[data-theme="retro"] .dept-summary,
html[data-theme="retro"] .copy-editor-note,
html[data-theme="retro"] .profile-conflict,
html[data-theme="retro"] .role-picker-note{
 background:#d4d0c8;color:#000;border:0;border-left:0;padding:9px 10px;
 box-shadow:inset 1px 1px #808080,inset -1px -1px #fff;
 font:11px/1.35 Tahoma,"MS Sans Serif",Arial,sans-serif;
}
html[data-theme="retro"] .dept-summary{grid-template-columns:1fr auto;align-items:center;margin-top:2px}
html[data-theme="retro"] .dept-summary strong{color:#000;font:700 11px Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .dept-summary small{display:block;margin-top:2px;color:#404040;font:10px Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .dept-summary button,
html[data-theme="retro"] .modal-actions button,
html[data-theme="retro"] .code-suggestions button{
 background:#c0c0c0!important;color:#000!important;border:0!important;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #404040!important;
 font:11px Tahoma,"MS Sans Serif",Arial,sans-serif;
}
html[data-theme="retro"] .dept-summary button:active,
html[data-theme="retro"] .modal-actions button:active,
html[data-theme="retro"] .code-suggestions button:active{box-shadow:inset -1px -1px #fff,inset 1px 1px #404040!important}
html[data-theme="retro"] .role-picker-list{gap:6px;margin-top:8px}
html[data-theme="retro"] .role-picker-item{
 min-height:46px;padding:9px 10px;background:#d4d0c8;box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
}
html[data-theme="retro"] .role-picker-item strong{font-size:11px}
html[data-theme="retro"] .role-picker-item small{font-size:10px;color:#404040}
html[data-theme="retro"] .role-picker-item button{min-width:58px;height:28px}
html[data-theme="retro"] .modal-actions{padding-top:8px;border-top:1px solid #808080}
html[data-theme="retro"] .modal-actions .primary-btn{background:#000080!important;color:#fff!important;box-shadow:inset 1px 1px #1084d0,inset -1px -1px #000040!important}
html[data-theme="retro"] .clause-modal-head span,
html[data-theme="retro"] .clause-modal-head h3{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0}
html[data-theme="retro"] .clause-category{
 color:#000;background:#c0c0c0;padding:7px 8px;margin-top:8px;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #808080;
 font:700 11px Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0;text-transform:none;
}
html[data-theme="retro"] .clause-row{
 background:#d4d0c8!important;color:#000!important;border:0!important;border-left:0!important;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #808080!important;
 padding:9px 10px;min-height:42px;
}
html[data-theme="retro"] .clause-row:hover{background:#e6e6e6!important}
html[data-theme="retro"] .clause-copy strong,
html[data-theme="retro"] .clause-row strong{color:#000!important;font:11px/1.35 Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .clause-actions button,
html[data-theme="retro"] .custom-clause-form button,
html[data-theme="retro"] .copy-formatbar button{
 background:#c0c0c0!important;color:#000!important;border:0!important;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #404040!important;
 font:11px Tahoma,"MS Sans Serif",Arial,sans-serif;
}
html[data-theme="retro"] .clause-actions .delete{color:#800000!important}
html[data-theme="retro"] .custom-clause-form input{
 background:#fff!important;color:#000!important;border:0!important;
 box-shadow:inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080!important;
}
html[data-theme="retro"] .copy-formatbar{background:#c0c0c0!important}
html[data-theme="retro"] .smart-search{
 background:#fff;border:0;gap:5px;padding:0 8px;
 box-shadow:inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;
}
html[data-theme="retro"] .smart-search>span{color:#404040;font-size:16px}
html[data-theme="retro"] .smart-search input{
 background:transparent!important;color:#000;border:0!important;box-shadow:none!important;padding:0;font:12px Tahoma,"MS Sans Serif",Arial,sans-serif;
}
html[data-theme="retro"] .smart-search input::placeholder{color:#808080}
html[data-theme="retro"] .smart-search button{background:transparent;color:#000;border:0;box-shadow:none;width:22px;height:22px;padding:0}
html[data-theme="retro"] .smart-search:focus-within{box-shadow:inset -1px -1px #fff,inset 1px 1px #000,inset 2px 2px #808080}
html[data-theme="retro"] .sound-control{background:#c0c0c0;color:#000;box-shadow:inset -1px -1px #808080,inset 1px 1px #fff;border-color:#808080}
html[data-theme="retro"] .sound-control span{color:#000}
html[data-theme="retro"] .sound-control:before{color:#000;font-family:Tahoma,"MS Sans Serif",Arial,sans-serif}
html[data-theme="retro"] .sound-control[aria-pressed="true"]{background:#000080;color:#fff;box-shadow:inset 1px 1px #000,inset -1px -1px #fff}
html[data-theme="retro"] .sound-control[aria-pressed="true"] span{color:#fff}
html[data-theme="retro"] .sound-control[aria-pressed="true"]:before{color:#fff}
html[data-theme="retro"] .repo-link img{filter:none}
html[data-theme="retro"] .raw-box{
 background:#c0c0c0;width:min(860px,92%);border:0;
 box-shadow:inset 1px 1px #fff,inset -1px -1px #404040,6px 6px 0 #0004;
}
html[data-theme="retro"] .raw-head{
 height:32px;margin:3px;padding:0 8px;background:#000080;color:#fff;border:0;
 box-shadow:none;font:700 11px Tahoma,"MS Sans Serif",Arial,sans-serif;letter-spacing:0;
}
html[data-theme="retro"] .raw-head button{
 background:#c0c0c0;color:#000;border:0;box-shadow:inset 1px 1px #fff,inset -1px -1px #404040;
 font:700 10px Tahoma,"MS Sans Serif",Arial,sans-serif;
}
html[data-theme="retro"] .raw-box pre{
 margin:0 3px 3px;padding:14px;max-height:62vh;background:#fff;color:#000;
 box-shadow:inset -1px -1px #fff,inset 1px 1px #404040,inset 2px 2px #808080;
 font:12px/1.45 "Courier New","Liberation Mono",monospace;
}
html[data-theme="retro"] .result-card.active *,
html[data-theme="retro"] .catalog-row.active *,
html[data-theme="retro"] .block-card.selected *,
html[data-theme="retro"] .action-chip.active *,
html[data-theme="retro"] .tab.active *{color:#fff!important}
html[data-theme="retro"] .result-card.active .fav-btn,
html[data-theme="retro"] .catalog-row.active .fav-btn{color:#fff!important;background:transparent;box-shadow:none}
html[data-theme="retro"] .result-card.active .fav-btn.on,
html[data-theme="retro"] .catalog-row.active .fav-btn.on{color:#ffff00!important}
html[data-theme="retro"] .catalog-row.active .catalog-index,
html[data-theme="retro"] .catalog-row.active .catalog-name,
html[data-theme="retro"] .result-card.active .result-title,
html[data-theme="retro"] .result-card.active .result-desc,
html[data-theme="retro"] .result-card.active .archive-ref,
html[data-theme="retro"] .result-card.active .result-meta{color:#fff!important}
@media(max-width:1280px){:root{--archive-w:300px;--editor-w:390px}.result-title{font-size:12.5px}.paper{width:510px}}

@media(max-width:760px){

  :root {
    --topbar-h: 0;
  }

  .topbar {
    min-height: 0;
  }

  .finder-head{
    position:sticky;
    padding-top: 260px;
    top:0;
    z-index:3
  }

  .top-actions {
    background-color: #00000015;
  }

  .builder-top.compact{position:sticky;top:0;z-index:4}
  .fill-workspace{overflow-y:auto;height:calc(100% - 54px)}
  .preview-bar{position:sticky;top:0;z-index:4}
  .preview-canvas{overflow-y:auto}

  .smart-section {
  }

  .sidebar,.builder,.preview{
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  .preset-list .smart-list {
    height: 700px;
    min-height: 700px;
    max-height: 800px;
    padding-top: 100px;
  }

  .builder .fill-workspace,
  .builder .manual-workspace{
    flex:1;
    overflow-y:auto;
    min-height:0;
  }
  .preview .preview-canvas{
    flex:1;
    overflow-y:auto;
    min-height:0;
    padding: 0;
  }
}
