.sw-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sw-brand {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px 0;
    letter-spacing: 0.2px;
}

.sw-subtitle {
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.sw-notice {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    padding: 8px 12px;
    border-left: 3px solid var(--brand-primary);
    background: rgba(var(--sw-shadow-rgb), 0.02);
    border-radius: 6px;
}

.sw-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 14px 0;
}

.sw-muted {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.sw-error {
    color: var(--sw-danger-600);
    font-size: 14px;
    margin: 0;
}

.sw-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.sw-chip {
    border: 1px solid var(--border-light, var(--sw-n-150));
    background: var(--sw-white);
    color: var(--text-dark);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}

.sw-chip.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--sw-white);
}

.sw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.sw-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(var(--sw-shadow-rgb), 0.06);
    border-radius: 16px;
    overflow: hidden;
    background: var(--sw-white);
}

.sw-thumb {
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, var(--sw-n-50) 0%, var(--sw-n-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sw-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sw-card-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.sw-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.sw-card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.sw-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 8px;
    padding: 9px 16px;
    border-radius: var(--btn-radius, 10px);
    background: var(--main-gradient);
    color: var(--sw-white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.sw-btn.secondary {
    background: var(--sw-white);
    color: var(--text-dark);
    border: 1px solid var(--border-light, var(--sw-n-150));
}

.sw-projects {
    display: flex;
    flex-direction: column;
}

.sw-project {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.06);
}

.sw-project:last-child {
    border-bottom: none;
}

.sw-project-name {
    font-weight: 600;
    color: var(--text-dark);
    flex: 1 1 200px;
    overflow-wrap: anywhere;
}

.sw-project-meta {
    color: var(--text-muted);
    font-size: 13px;
    flex: 2 1 240px;
}

.sw-project .sw-btn {
    margin-top: 0;
}

@media (max-width: 480px) {
    .sw-grid {
        grid-template-columns: 1fr;
    }

    .sw-brand {
        font-size: 22px;
    }
}

.sw-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.sw-toolbar .sw-brand {
    margin: 0;
    flex: 1 1 240px;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.sw-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sw-overall {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    background: rgba(var(--sw-shadow-rgb), 0.04);
    border-radius: 999px;
    padding: 6px 12px;
}

.sw-xray-banner {
    background: var(--sw-ink-600);
    color: var(--sw-white);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
}

.sw-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--sw-n-300);
    margin-bottom: 10px;
    font-size: 14px;
}

.sw-parts {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sw-parts-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 8px;
}

.sw-parts-head .sw-heading {
    margin: 0;
    font-size: 15px;
}

.sw-parts-count {
    flex: 1;
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.sw-parts-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    margin: 0 0 10px;
    padding: 0 10px;
    border: 1.5px solid var(--sw-n-300);
    border-radius: 12px;
    background: var(--sw-white);
    color: var(--sw-n-500);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sw-parts-search:focus-within {
    border-color: var(--sw-ink-500);
    box-shadow: 0 0 0 4px rgba(var(--sw-ink-rgb), 0.15);
}

.sw-parts-search input#sw-part-search {
    flex: 1;
    min-width: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    font: inherit;
    font-size: 14px;
    color: var(--sw-n-900);
}

.sw-parts-search kbd {
    font: 600 11px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sw-n-500);
    border: 1px solid var(--sw-n-200);
    border-radius: 6px;
    padding: 1px 6px;
}

.sw-part-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 60px;
}

.sw-part-sep {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sw-n-400);
    padding: 8px 6px 2px;
}

.sw-part-item {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 34px;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 6px;
    border: none;
    background: transparent;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 13px;
}

.sw-part-item:hover {
    background: var(--sw-n-50);
}

.sw-part-item.active {
    background: var(--sw-ink-600);
    color: var(--sw-white);
}

.sw-part-item.active .sw-part-code {
    background: rgba(var(--sw-white-rgb), 0.15);
    color: var(--sw-white);
}

.sw-part-item.active .sw-part-th {
    color: var(--sw-ink-100);
}

.sw-part-item.is-hidden {
    color: var(--text-muted);
}

.sw-part-code {
    white-space: nowrap;
    font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--sw-ink-600);
    background: var(--sw-ink-50);
    border-radius: 6px;
    padding: 2px 6px;
}

.sw-part-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sw-part-th {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sw-part-details:empty {
    display: none;
}

.sw-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    font-size: 13px;
    margin: 6px 0 0 0;
}

.sw-details dt {
    color: var(--text-muted);
}

.sw-details dd {
    margin: 0;
    color: var(--text-dark);
    overflow-wrap: anywhere;
}

.sw-chip:disabled {
    opacity: 0.45;
    cursor: default;
}

.sw-viewport {
    position: relative;
    height: 500px;
    min-height: 320px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--sw-n-50);
    touch-action: none;
}

.sw-viewport canvas {
    display: block;
    cursor: grab;
}

.sw-dim-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.sw-dim-leader {
    position: absolute;
    height: 1px;
    background: var(--sw-oak-700);
    opacity: 0.7;
    transform-origin: 0 50%;
}

.sw-dim-overflow {
    position: absolute;
    top: 8px;
    left: 8px;
    max-width: 40%;
    max-height: 35%;
    overflow: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    pointer-events: auto;
}

.sw-dim-overflow .sw-dim-label {
    position: static;
    transform: none;
}

@media (max-width: 390px) {
    .sw-dim-overflow {
        max-width: 55%;
    }
}

.sw-dim-label {
    position: absolute;
    transform: translate(-50%, -50%);
    background: var(--sw-ink-600);
    color: var(--sw-white);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .sw-viewport {
        height: 55vh;
        min-height: 300px;
    }
}

.sw-param-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sw-dim-strip {
    display: flex;
    border: 1px solid var(--sw-n-200);
    border-radius: 16px;
    background: var(--sw-n-50);
    overflow: hidden;
}

.sw-dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

.sw-dim-seg {
    --c: var(--sw-n-400);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    margin: 0;
    cursor: text;
    background: var(--sw-n-50);
}

.sw-dim-grid .sw-dim-seg {
    border: 1px solid var(--sw-n-200);
    border-radius: 14px;
}

.sw-dim-strip .sw-dim-seg + .sw-dim-seg {
    border-left: 1px solid var(--sw-n-200);
}

.sw-dim-seg--w { --c: var(--sw-ink-600); }
.sw-dim-seg--h { --c: var(--sw-oak-500); }
.sw-dim-seg--d { --c: var(--sw-success-600, #2f7a4f); }

.sw-dim-seg:focus-within {
    background: var(--sw-white);
    box-shadow: inset 0 -3px 0 var(--c);
}

.sw-dim-k {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sw-n-500);
}

.sw-dim-k i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--c);
}

.sw-dim-v {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.sw-dim-seg input.sw-dim-input {
    width: 4ch;
    max-width: 100%;
    flex: none;
    height: auto;
    padding: 2px 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 26px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--sw-n-900);
    outline: none;
}

.sw-dim-grid .sw-dim-seg input.sw-dim-input {
    font-size: 20px;
}

.sw-dim-seg input.sw-dim-input:disabled {
    color: var(--sw-n-500);
    background: transparent;
}

.sw-dim-unit {
    font-size: 13px;
    color: var(--sw-n-500);
}

.sw-dim-r {
    font-size: 11px;
    color: var(--sw-n-500);
    font-variant-numeric: tabular-nums;
}

.sw-dim-seg.is-error {
    background: var(--sw-danger-50);
}

.sw-dim-seg.is-error .sw-dim-r,
.sw-dim-seg.is-error input.sw-dim-input {
    color: var(--sw-danger-600);
}

.sw-dim-seg.is-error .sw-dim-r {
    font-weight: 700;
}

.sw-eng-flyout .sw-dim-strip {
    flex-direction: column;
}

.sw-eng-flyout .sw-dim-strip .sw-dim-seg + .sw-dim-seg {
    border-left: 0;
    border-top: 1px solid var(--sw-n-200);
}

.sw-toolbar input.sw-title-input {
    flex: 1 1 260px;
    min-width: 0;
    width: auto;
    height: auto;
    margin: 0 0 0 -8px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 24px;
    font-weight: 700;
    color: var(--sw-n-900);
}

.sw-toolbar input.sw-title-input:hover {
    border-color: var(--sw-n-200);
}

.sw-toolbar input.sw-title-input:focus {
    border-color: var(--sw-ink-500);
    background: var(--sw-white);
    box-shadow: 0 0 0 4px rgba(var(--sw-ink-rgb), 0.15);
}

.sw-toolbar input.sw-title-input.has-error {
    border-color: var(--sw-danger-600);
}

@media (max-width: 720px) {
    .sw-dim-strip {
        flex-direction: column;
    }

    .sw-dim-strip .sw-dim-seg + .sw-dim-seg {
        border-left: 0;
        border-top: 1px solid var(--sw-n-200);
    }
}

.sw-param-label {
    flex: 0 0 180px;
    font-weight: 600;
    color: var(--text-dark);
}

.sw-issues,
.sw-adjust-notice {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.sw-issues {
    background: var(--sw-danger-50);
    color: var(--sw-danger-700);
}

.sw-adjust-notice {
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
}

.sw-issues ul,
.sw-adjust-notice ul {
    margin: 6px 0;
    padding-left: 20px;
}

.sw-save-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.sw-save-bar .sw-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sw-drag-badge {
    position: fixed;
    z-index: 50;
    pointer-events: none;
    background: var(--sw-ink-600);
    color: var(--sw-white);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.sw-drag-badge .sw-limit {
    color: var(--sw-warning-100);
}

@media (max-width: 600px) {
    .sw-param-label {
        flex-basis: 100%;
    }
}

.sw-admin-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--sw-ink-600);
    font-weight: 600;
}

.sw-admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.sw-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sw-admin-table th,
.sw-admin-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
    vertical-align: top;
}

.sw-admin-table th {
    font-weight: 600;
    white-space: nowrap;
}

.sw-admin-version {
    display: inline-block;
    margin-right: 10px;
    white-space: nowrap;
}

.sw-admin-latest {
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--sw-ink-600);
    color: var(--sw-white);
    font-size: 11px;
}

.sw-admin-errors {
    margin: 0;
    padding-left: 18px;
    color: var(--sw-danger-700);
}

.sw-admin-errors ul {
    padding-left: 18px;
    color: inherit;
}

.sw-admin-subnav {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
}

.sw-admin-subnav a {
    padding: 6px 2px;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.sw-admin-subnav a.active {
    color: var(--sw-ink-600);
    border-bottom-color: var(--sw-ink-600);
}

.sw-admin-notice {
    margin: 8px 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--sw-success-50);
    color: var(--sw-success-700);
}

.sw-admin-notice-error {
    background: var(--sw-danger-50);
    color: var(--sw-danger-700);
}

.sw-admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.sw-admin-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sw-admin-form-row .sw-search {
    flex: 1 1 220px;
    min-width: 0;
}

.sw-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sw-admin-actions form {
    margin: 0;
}

.sw-admin-module-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.sw-admin-module-head h3 {
    margin: 0;
}

.sw-admin-module-head form {
    margin: 0;
}

.sw-admin-versions .sw-admin-latest {
    display: inline-block;
    white-space: nowrap;
}

.sw-admin-confirm summary {
    cursor: pointer;
    list-style: none;
}

.sw-admin-confirm summary::-webkit-details-marker {
    display: none;
}

.sw-admin-confirm[open] {
    padding: 8px;
    border-radius: 8px;
    background: var(--sw-danger-50);
}

.sw-admin-confirm-text {
    margin: 8px 0;
    max-width: 36ch;
    color: var(--sw-danger-700);
}

.sw-admin-danger {
    background: var(--sw-danger-600);
    color: var(--sw-white);
}

.sw-status-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--sw-n-100);
    color: var(--sw-ink-600);
}

.sw-status-active,
.sw-status-published {
    background: var(--sw-success-50);
    color: var(--sw-success-700);
}

.sw-status-invited,
.sw-status-draft {
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
}

.sw-status-blocked,
.sw-status-unpublished {
    background: var(--sw-danger-50);
    color: var(--sw-danger-700);
}

.sw-admin-new {
    display: inline-block;
    margin: 8px 12px 0 0;
    text-decoration: none;
}

a.sw-admin-version {
    color: inherit;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 6px;
}

a.sw-admin-version:hover {
    background: rgba(var(--sw-ink-rgb), 0.08);
}

.sw-admin-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.sw-admin-edit-card {
    min-width: 0;
}

.sw-admin-json-label {
    display: block;
    font-weight: 600;
    margin: 8px 0 6px;
}

.sw-json {
    width: 100%;
    min-height: 360px;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    padding: 10px;
    border: 1px solid var(--border-light, var(--sw-n-150));
    border-radius: 8px;
    resize: vertical;
    tab-size: 2;
}

.sw-json[readonly] {
    background: var(--sw-n-50);
}

.sw-admin-upload {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 8px 0;
    font-size: 13px;
}

.sw-admin-upload input {
    max-width: 100%;
}

.sw-admin-edit-card .sw-admin-actions {
    margin-top: 8px;
}

.sw-danger {
    color: var(--sw-danger-700);
}

.sw-admin-preview {
    min-width: 0;
}

.sw-admin-preview-heading {
    margin: 0 0 8px;
}

.sw-admin-preview .sw-editor-page {
    padding: 0;
    margin: 0;
    max-width: none;
    min-height: 0;
    width: auto;
}

@media (min-width: 1100px) {
    .sw-admin-editor-layout {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        align-items: start;
    }
}

.sw-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sw-help {
    min-width: 32px;
    font-weight: 700;
}

.sw-toolbar .sw-help {
    margin-left: auto;
}

.sw-welcome .card-body {
    border-left: 3px solid var(--brand-primary);
}

.sw-onboard-list {
    margin: 0 0 14px 0;
    padding-left: 20px;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
}

.sw-hint-overlay {
    position: absolute;
    top: 56px;
    left: 16px;
    z-index: 20;
    max-width: 420px;
    max-height: calc(100% - 72px);
    overflow-y: auto;
    padding: 16px 18px;
    background: var(--sw-white);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(var(--sw-shadow-rgb), 0.18);
}

@media (max-width: 600px) {
    .sw-hint-overlay {
        left: 8px;
        right: 8px;
        max-width: none;
    }
}

.sw-project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sw-project-source {
    color: var(--text-muted);
    font-size: 12px;
}

.sw-project.is-archived {
    opacity: 0.75;
}

.sw-appearance {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
}

.sw-appearance-heading {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.sw-appearance-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.sw-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sw-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(var(--sw-shadow-rgb), 0.2);
    cursor: pointer;
    padding: 0;
}

.sw-swatch.active {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.sw-custom-color {
    width: 36px;
    height: 28px;
    padding: 0;
    border: none;
    background: none;
}

.sw-swatch-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(var(--sw-shadow-rgb), 0.25);
    vertical-align: middle;
}

.sw-version {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--text-dark);
    background: rgba(var(--sw-shadow-rgb), 0.04);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.sw-preview-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: var(--sw-oak-800);
    color: var(--sw-white);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
}

.sw-editor-page.is-readonly .sw-viewport canvas {
    cursor: default;
}

.sw-history-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sw-history-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
    font-size: 14px;
}

.sw-history-row.is-current {
    border-color: var(--brand-primary);
}

.sw-history-row.is-previewing {
    background: rgba(var(--sw-oak-rgb), 0.08);
}

.sw-history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.sw-history-fp {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--text-muted, var(--sw-n-500));
}

.sw-history-when,
.sw-history-changes {
    color: var(--text-muted, var(--sw-n-500));
}

.sw-history-current {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
}

.sw-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.sw-import {
    margin-bottom: 14px;
}

.sw-import .sw-import-row {
    margin-bottom: 12px;
}

.sw-import-heading {
    margin: 0 0 4px;
    font-size: 15px;
}

.sw-import-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sw-import-name {
    flex: 1 1 180px;
    min-width: 0;
}


.sw-legal {
    max-width: 820px;
}

.sw-legal h2 {
    font-size: 17px;
    margin: 20px 0 6px;
}

.sw-legal-version {
    color: var(--text-muted, #666);
    margin-top: 0;
}

.sw-history-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.sw-history-find {
    flex: 1 1 200px;
    min-width: 0;
}

.sw-history-pick {
    margin: 0;
}

.sw-history-row.is-match {
    outline: 2px solid var(--brand-primary);
    outline-offset: 1px;
}

.sw-compare {
    margin-top: 14px;
    border-top: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
    padding-top: 10px;
}

.sw-compare-heading {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    margin: 0 0 8px;
}

.sw-compare-scroll {
    overflow-x: auto;
    margin-bottom: 10px;
}

.sw-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.sw-compare-table th,
.sw-compare-table td {
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.06);
}

.sw-home-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.sw-home-titles {
    flex: 1 1 220px;
}

.sw-home-title {
    margin: 0 0 2px;
    font-size: 24px;
    color: var(--sw-n-900);
}

.sw-home-titles .sw-muted {
    margin: 0;
}

.sw-home-search {
    flex: 1 1 240px;
    max-width: 420px;
}

.sw-home-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 260px;
    max-width: 480px;
}

.sw-home-search-form .sw-home-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

a.sw-chip,
a.sw-chip:hover {
    text-decoration: none;
}

.sw-list-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0;
}

.sw-btn.sw-home-new {
    margin-top: 0;
    align-self: center;
    background: var(--sw-ink-600);
    padding: 11px 20px;
    box-shadow: 0 6px 18px rgba(var(--sw-ink-rgb), 0.28);
}

.sw-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.sw-home-card {
    display: flex;
    flex-direction: column;
    background: var(--sw-white);
    border: 1px solid var(--sw-n-200);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
}

.sw-home-card:hover {
    box-shadow: 0 10px 26px rgba(var(--sw-shadow-rgb), 0.08);
    transform: translateY(-2px);
}

.sw-home-card.is-archived {
    opacity: 0.7;
}

.sw-home-card-new {
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 240px;
    border: 2px dashed var(--sw-n-300);
    background: transparent;
    color: var(--sw-ink-600);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.sw-home-card-plus {
    font-size: 40px;
    line-height: 1;
}

.sw-home-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.sw-home-thumb {
    position: relative;
    height: 150px;
    background: linear-gradient(160deg, var(--sw-oak-50), var(--sw-oak-100));
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-home-thumb svg,
.sw-home-thumb .sw-home-preview {
    width: 100%;
    height: 100%;
    padding: 18px;
    object-fit: contain;
    box-sizing: border-box;
}

.sw-home-thumb.is-imported {
    background: linear-gradient(160deg, var(--sw-oak-100), var(--sw-oak-200));
}

.sw-home-thumb-icon {
    font-size: 30px;
    font-weight: 800;
    color: var(--sw-oak-600);
    letter-spacing: 0.04em;
}

.sw-home-kind {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--sw-ink-50);
    color: var(--sw-ink-700);
}

.sw-home-kind.is-imported {
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
}

.sw-home-kind.is-cutlist {
    background: var(--sw-info-50);
    color: var(--sw-info-700);
}

.sw-home-kind.is-pieces {
    background: var(--sw-success-50);
    color: var(--sw-success-700);
}

.sw-home-thumb.is-cutlist {
    background: linear-gradient(160deg, var(--sw-info-50), var(--sw-info-100));
}

.sw-home-thumb.is-cutlist .sw-home-thumb-icon {
    color: var(--sw-info-600);
}

.sw-home-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px 8px;
}

.sw-home-card-name {
    font-weight: 700;
    color: var(--sw-n-900);
    overflow-wrap: anywhere;
}

.sw-home-card-meta {
    font-size: 12.5px;
}

.sw-home-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 14px 14px;
}

.sw-home-empty {
    grid-column: 1 / -1;
}

.sw-home-notice {
    margin-top: 22px;
}



.sw-new-steps {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--sw-n-500);
}

.sw-new-steps b {
    color: var(--sw-ink-600);
}

.sw-new-title {
    margin: 0 0 4px;
    font-size: 22px;
}

.sw-new-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.sw-new-options--two {
    max-width: 720px;
}

.sw-new-options--three {
    max-width: 1040px;
}

.sw-new-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px;
    border: 2px solid var(--sw-n-200);
    border-radius: 16px;
    background: var(--sw-white);
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.sw-new-option.is-selected {
    border-color: var(--sw-oak-500);
    background: var(--sw-oak-50);
    box-shadow: 0 0 0 4px rgba(var(--sw-oak-rgb), 0.18);
}

.sw-new-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--sw-n-300);
    box-sizing: border-box;
}

.sw-new-option.is-selected .sw-new-radio {
    border: 6px solid var(--sw-oak-500);
}

.sw-new-option-title {
    font-size: 18px;
    font-weight: 700;
}

.sw-new-option-desc {
    font-size: 14px;
    color: var(--sw-n-500);
    line-height: 1.45;
}

.sw-new-recommended {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--sw-success-600);
    color: var(--sw-white);
}

.sw-new-restart {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
    font-size: 14px;
}

.sw-new-warning {
    display: block;
    margin: 6px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
    font-size: 13.5px;
    line-height: 1.4;
}

.sw-new-table-wrap {
    overflow-x: auto;
}

.sw-new-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.sw-new-table th,
.sw-new-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--sw-n-200);
    text-align: left;
}

.sw-new-table th {
    color: var(--sw-n-500);
    font-weight: 600;
}

.sw-new-table .sw-yes {
    color: var(--sw-success-600);
    font-weight: 700;
}

.sw-new-table .sw-no {
    color: var(--sw-danger-600);
    font-weight: 700;
}

.sw-new-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.sw-new-foot .sw-btn {
    margin-top: 0;
    align-self: auto;
}



@media (max-width: 720px) {
    .sw-new-options {
        grid-template-columns: 1fr;
    }

    .sw-home-search {
        max-width: none;
    }

    .sw-home-search-form {
        max-width: none;
    }

    .sw-home-card-new {
        min-height: 110px;
    }
}

.sw-new-page {
    max-width: 1100px;
}

.sw-new-page .sw-new-title {
    font-size: 26px;
}

.sw-new-steps a {
    color: var(--sw-n-500);
    text-decoration: none;
}

.sw-new-foot a.sw-btn {
    text-decoration: none;
}

.sw-browse-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 14px 0 10px;
}

.sw-browse-search {
    flex: 1 1 280px;
}

.sw-browse-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-browse-count {
    margin: 0 0 12px;
}

.sw-module-card {
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.15s;
}

.sw-module-card:hover {
    box-shadow: 0 10px 26px rgba(var(--sw-shadow-rgb), 0.08);
    transform: translateY(-2px);
}

.sw-module-card .sw-thumb {
    aspect-ratio: auto;
    height: 170px;
}

.sw-browse-more {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.sw-browse-more .sw-btn {
    margin-top: 0;
    align-self: auto;
}

.sw-notice.sw-locked {
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
    border-color: var(--sw-warning-500);
    font-weight: 600;
}

.sw-status-badge.sw-status-discontinued {
    background: var(--sw-danger-50);
    color: var(--sw-danger-700);
}

.sw-dim-label.sw-dim-ext {
    background: var(--sw-ink-600);
}

.sw-dim-label.sw-dim-int,
.sw-dim-label.sw-dim-gap {
    background: var(--sw-oak-600);
}

.sw-dim-label.sw-dim-group {
    background: var(--sw-oak-700);
}

.sw-dim-label.sw-dim-selected {
    box-shadow: 0 0 0 2px var(--sw-white), 0 0 0 3px var(--sw-oak-700);
}

.sw-eng-stage .sw-dim-layer {
    left: 64px;
}

.sw-eng-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 64px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    background: var(--sw-white);
    border-right: 1px solid var(--sw-n-150);
}

.sw-eng-rail-tools {
    margin-top: auto;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sw-eng-rail-btn {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 0;
    background: none;
    color: var(--sw-n-600);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.sw-eng-rail-btn:hover {
    background: var(--sw-n-100);
}

.sw-eng-rail-btn.on {
    background: var(--sw-oak-100);
    color: var(--sw-oak-700);
}

.sw-eng-rail-btn.is-primary {
    background: var(--sw-ink-600);
    color: var(--sw-white);
}

.sw-eng-rail-btn:disabled {
    opacity: .45;
    cursor: default;
}

.sw-eng-ico {
    display: inline-grid;
    place-items: center;
}

.sw-eng-count {
    position: absolute;
    top: 2px;
    right: 2px;
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--sw-danger-600);
    color: var(--sw-white);
    font-size: 10px;
    font-weight: 700;
}

.sw-eng-tip {
    position: absolute;
    left: 54px;
    white-space: nowrap;
    background: var(--sw-n-800);
    color: var(--sw-white);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
    z-index: 6;
}

.sw-eng-rail-btn:hover .sw-eng-tip,
.sw-eng-rail-btn:focus-visible .sw-eng-tip {
    opacity: 1;
}

.sw-eng-flyout {
    position: absolute;
    left: 64px;
    top: 0;
    bottom: 0;
    width: min(320px, calc(100% - 64px));
    z-index: 3;
    overflow: auto;
    background: var(--sw-white);
    border-right: 1px solid var(--sw-n-150);
    box-shadow: 8px 0 24px rgba(var(--sw-shadow-rgb), .10);
    color: var(--sw-n-900);
    font-size: 14px;
}

.sw-eng-fly-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 16px 8px;
}

.sw-eng-fly-head h3 {
    margin: 0;
    font-size: 16px;
}

.sw-eng-fly-head span {
    color: var(--sw-n-500);
    font-size: 12px;
}

.sw-thk-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
    border: 1px solid var(--sw-n-150);
    border-radius: 14px;
    overflow: hidden;
}
.sw-thk-defaults { margin:0 0 6px; font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
.sw-back-sheet { flex-wrap:wrap; gap:8px; align-items:center; }

.sw-thk-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    background: var(--sw-n-50);
}

.sw-thk-list li + li {
    border-top: 1px solid var(--sw-n-150);
}

.sw-thk-list li:hover {
    background: var(--sw-ink-50);
}

.sw-thk-list small {
    color: var(--sw-n-500);
}

.sw-thk-list b {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sw-thk-mixed {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--sw-oak-600);
    background: var(--sw-oak-100);
    border-radius: 8px;
    padding: 1px 6px;
    margin-left: 6px;
}

.sw-thk-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sw-thk-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--sw-n-900);
}

.sw-thk-close {
    border: 0;
    background: var(--sw-n-100);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: var(--sw-n-700);
}

.sw-thk-scope {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--sw-n-100);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 12px;
}

.sw-thk-scope button {
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 8px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    color: var(--sw-n-700);
}

.sw-thk-scope button b {
    display: block;
    font-size: 13px;
}

.sw-thk-scope button span {
    display: block;
    font-size: 11px;
    color: var(--sw-n-500);
    margin-top: 1px;
}

.sw-thk-scope button.on {
    background: var(--sw-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: var(--sw-ink-800);
}

.sw-thk-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}

.sw-thk-card {
    border: 1.5px solid var(--sw-n-200);
    background: var(--sw-n-50);
    border-radius: 12px;
    padding: 10px 6px;
    font: inherit;
    font-size: 12px;
    color: var(--sw-n-500);
    cursor: pointer;
    text-align: center;
}

.sw-thk-card b {
    font-size: 20px;
    color: var(--sw-n-900);
    font-variant-numeric: tabular-nums;
}

.sw-thk-card span {
    display: block;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw-thk-card.on {
    border-color: var(--sw-ink-600);
    background: var(--sw-white);
    box-shadow: 0 0 0 3px rgba(var(--sw-ink-rgb), 0.12);
}

.sw-thk-more,
.sw-thk-reset {
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: var(--sw-ink-600);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 0;
}

.sw-thk-all {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--sw-n-150);
    border-radius: 12px;
    background: var(--sw-n-25);
}

.sw-thk-chip {
    border: 1px solid var(--sw-n-200);
    background: var(--sw-white);
    border-radius: 18px;
    padding: 5px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-n-700);
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.sw-thk-chip.on {
    background: var(--sw-ink-600);
    border-color: var(--sw-ink-600);
    color: var(--sw-white);
}

.sw-thk-own {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px dashed var(--sw-n-300);
    border-radius: 18px;
    padding: 2px 10px;
    background: var(--sw-white);
    font-size: 13px;
    color: var(--sw-n-500);
}

.sw-thk-own.on {
    border-style: solid;
    border-color: var(--sw-ink-600);
}

.sw-thk-own input.sw-thk-own-input {
    width: 4ch;
    height: auto;
    padding: 4px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    text-align: right;
    color: var(--sw-n-900);
}

.sw-thk-err {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--sw-danger-600);
}

.sw-eng-fly-body {
    padding: 0 8px 16px;
}

.sw-eng-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
}

.sw-eng-col-width {
    width: 88px;
    padding: 4px 8px;
    border: 1px solid var(--sw-n-300);
    border-radius: 6px;
    font: inherit;
}

.sw-eng-col-front .sw-eng-lbl {
    font-weight: 500;
}

.sw-eng-col-removed {
    background: var(--sw-danger-50);
}

.sw-eng-row.has-error {
    background: var(--sw-danger-50);
}

.sw-eng-lbl {
    min-width: 110px;
    color: var(--sw-n-800);
    font-weight: 600;
    font-size: 13px;
}

.sw-eng-row.sw-eng-band-row {
    flex-wrap: nowrap;
}

.sw-eng-band-row .sw-eng-lbl {
    min-width: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.sw-eng-band-row .sw-eng-sel,
.sw-eng-band-row .sw-eng-note {
    flex: 1;
    min-width: 0;
}

.sw-eng-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sw-eng-chip {
    border: 1px solid var(--sw-n-200);
    background: var(--sw-white);
    border-radius: 999px;
    padding: 5px 11px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    color: var(--sw-n-800);
}

.sw-eng-chip:hover {
    border-color: var(--sw-oak-400);
}

.sw-eng-chip.on {
    background: var(--sw-oak-100);
    border-color: var(--sw-oak-500);
    color: var(--sw-oak-700);
    font-weight: 600;
}

.sw-eng-chip:disabled,
.sw-eng-card:disabled {
    opacity: .5;
    cursor: progress;
}

.sw-eng-cards {
    display: grid;
    gap: 8px;
    padding: 4px 8px;
}

.sw-eng-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    border: 1px solid var(--sw-n-200);
    background: var(--sw-white);
    border-radius: 8px;
    padding: 9px 11px;
    font: inherit;
    cursor: pointer;
}

.sw-eng-card.on {
    border-color: var(--sw-oak-500);
    background: var(--sw-oak-50);
    box-shadow: inset 0 0 0 1px var(--sw-oak-500);
}

.sw-eng-sel {
    padding: 6px 8px;
    border: 1px solid var(--sw-n-200);
    border-radius: 8px;
    font: inherit;
    max-width: 230px;
}

.sw-eng-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-weight: 600;
    cursor: pointer;
}

.sw-eng-note {
    margin: 4px 8px;
    color: var(--sw-n-500);
    font-size: 12px;
}

.sw-eng-custom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 8px;
}

.sw-eng-custom-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sw-eng-custom-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--sw-n-300);
    border-radius: 8px;
    font: inherit;
}

.sw-eng-sub {
    margin: 6px 0 0;
    font-size: 13px;
}

.sw-eng-custom .sw-eng-note {
    margin: 0;
}

@media (max-width: 760px) {
    .sw-eng-rail {
        top: auto;
        right: 0;
        width: auto;
        height: 56px;
        flex-direction: row;
        align-items: center;
        padding: 0 8px;
        overflow-x: auto;
        border-right: 0;
        border-top: 1px solid var(--sw-n-150);
    }

    .sw-eng-rail-tools {
        margin-top: 0;
        margin-left: auto;
        padding-bottom: 0;
        flex-direction: row;
    }

    .sw-eng-tip {
        display: none;
    }

    .sw-eng-flyout {
        left: 0;
        right: 0;
        top: auto;
        bottom: 56px;
        width: auto;
        max-height: 60%;
        border-right: 0;
        border-top: 1px solid var(--sw-n-150);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 24px rgba(var(--sw-shadow-rgb), .12);
    }
}

.sw-eng-issue {
    margin: 6px 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--sw-danger-50);
    color: var(--sw-danger-700);
    font-size: 12.5px;
    line-height: 1.4;
}
.sw-eng-issue.is-warning {
    background: var(--sw-warning-50);
    color: var(--sw-warning-700);
}

.sw-eng-progress {
    position: absolute;
    top: 0;
    left: 64px;
    height: 3px;
    width: 0;
    z-index: 5;
    background: var(--sw-ink-500);
}

.sw-eng-stage.is-busy .sw-eng-progress {
    animation: sw-eng-load .6s linear forwards;
}

@keyframes sw-eng-load {
    from {
        width: 0;
    }

    to {
        width: calc(100% - 64px);
    }
}

.sw-eng-pill {
    position: absolute;
    top: 14px;
    left: calc(50% + 32px);
    transform: translateX(-50%);
    z-index: 5;
    background: var(--sw-ink-600);
    color: var(--sw-white);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
}

.sw-eng-notice {
    position: absolute;
    top: 48px;
    left: calc(50% + 32px);
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--sw-white);
    border: 1px solid var(--sw-n-200);
    color: var(--sw-n-800);
    padding: 5px 8px 5px 12px;
    border-radius: 999px;
    font-size: 12px;
}

body.sw-focus-layout .sw-editor-page { padding-left: 2vw; padding-right: 2vw; }

.sw-prod-top {
	margin-bottom: 12px;
}
.sw-prod-profiles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}
.sw-prod-select {
	min-width: 0;
	max-width: 100%;
	padding: 6px 8px;
	border: 1px solid var(--sw-ink-200);
	border-radius: 6px;
	background: #fff;
}
.sw-prod-form .card-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.sw-prod-station {
	border: 1px solid var(--sw-ink-100);
	border-radius: 8px;
	padding: 12px;
	margin: 0 0 12px;
	min-width: 0;
}
.sw-prod-legend {
	padding: 0 4px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.sw-prod-model {
	font-size: 0.9rem;
}
.sw-prod-add-machine {
	border: 1px dashed var(--sw-ink-200);
	border-radius: 8px;
	padding: 12px;
	margin: 0 0 16px;
}
.sw-prod-add-machine .sw-prod-fields {
	margin-bottom: 10px;
}
.sw-prod-fields {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}
.sw-prod-field-wide {
	grid-column: 1 / -1;
}
.sw-prod-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.sw-prod-label {
	font-size: 0.85rem;
	color: var(--sw-ink-600);
}
.sw-prod-default {
	font-size: 0.75rem;
	color: var(--sw-ink-500);
}
.sw-prod-field .sw-input,
.sw-prod-table .sw-input {
	width: 100%;
	min-width: 70px;
	padding: 6px 8px;
	border: 1px solid var(--sw-ink-200);
	border-radius: 6px;
	box-sizing: border-box;
	height: auto;
	font-size: inherit;
	line-height: 1.3;
	background: var(--sw-white);
	display: block;
}
.sw-prod-field .sw-input.sw-invalid,
.sw-prod-table .sw-input.sw-invalid {
	border-color: #c0392b;
	background: #fdf1ef;
}
.sw-prod-scroll {
	max-width: 100%;
	overflow-x: auto;
}
.sw-prod-subheading {
	margin: 12px 0 6px;
	font-size: 0.95rem;
}
.sw-prod-table {
	border-collapse: collapse;
	width: 100%;
}
.sw-prod-table th,
.sw-prod-table td {
	padding: 4px 6px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--sw-ink-100);
}
.sw-prod-table th {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--sw-ink-600);
	vertical-align: bottom;
}
.sw-prod-table .sw-input[type="text"] {
	min-width: 160px;
}
.sw-fp-holder {
	margin: 8px 0;
	border: 1px solid var(--sw-ink-200);
	border-radius: 8px;
	background: var(--sw-n-50);
	overflow: hidden;
}
.sw-fp-svg {
	display: block;
	width: 100%;
	max-height: 60vh;
	touch-action: none;
	user-select: none;
}
.sw-fp-room {
	fill: #ffffff;
	stroke: var(--sw-ink-600);
	stroke-width: 40;
}
.sw-fp-park {
	fill: none;
	stroke: var(--sw-ink-200);
	stroke-width: 20;
	stroke-dasharray: 120 80;
}
.sw-fp-zone {
	fill: var(--sw-n-100);
	stroke: var(--sw-n-200);
	stroke-width: 20;
	stroke-dasharray: 80 60;
}
.sw-fp-machine {
	cursor: grab;
}
.sw-fp-machine rect:not(.sw-fp-zone) {
	fill: #dfe7f2;
	stroke: #3a5a8c;
	stroke-width: 30;
}
.sw-fp-machine.sw-fp-selected rect:not(.sw-fp-zone) {
	stroke-width: 70;
}
.sw-fp-machine.sw-fp-bad rect:not(.sw-fp-zone) {
	fill: var(--sw-danger-50);
	stroke: var(--sw-danger-600);
}
.sw-prod-station.sw-offline {
	opacity: 0.6;
}
.sw-fp-machine.sw-fp-offline rect:not(.sw-fp-zone) {
	fill: var(--sw-n-100);
	stroke: var(--sw-n-500);
}
.sw-fp-cross {
	stroke: var(--sw-danger-600);
	stroke-width: 40;
	pointer-events: none;
}
.sw-fp-label {
	font-size: 260px;
	fill: var(--sw-ink-700);
	pointer-events: none;
}
.sw-fp-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px;
}
.sw-fp-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.sw-fp-head .sw-btn {
	margin-top: 0;
	text-decoration: none;
}
.sw-fp-status {
	margin-left: 8px;
	font-weight: 600;
	color: var(--sw-ink-600);
}
.sw-fp-zone.sw-fp-zone-in {
	fill: rgba(63, 127, 176, 0.25);
	stroke: var(--sw-info-600);
	stroke-dasharray: none;
}
.sw-fp-zone.sw-fp-zone-out {
	fill: rgba(var(--sw-success-rgb), 0.25);
	stroke: var(--sw-success-600);
	stroke-dasharray: none;
}
.sw-fp-zone-word {
	font-weight: 700;
	pointer-events: none;
}
.sw-fp-zone-word-in {
	fill: var(--sw-info-600);
}
.sw-fp-zone-word-out {
	fill: var(--sw-success-700);
}
.sw-fp-flow {
	stroke: var(--sw-ink-600);
	stroke-width: 40;
	pointer-events: none;
}
.sw-fp-flow-head {
	fill: var(--sw-ink-600);
}
.sw-fp-edit {
	cursor: pointer;
}
.sw-fp-edit circle {
	fill: var(--brand-primary, var(--sw-ink-600));
	stroke: var(--sw-white);
	stroke-width: 40;
}
.sw-fp-edit text {
	fill: var(--sw-white);
	pointer-events: none;
}
.sw-fp-machine.sw-fp-dim {
	opacity: 0.45;
}
.sw-fp-readonly .sw-fp-machine {
	cursor: default;
}
.sw-fp-handle-hit {
	fill: transparent;
}
.sw-fp-handle-x {
	cursor: ew-resize;
}
.sw-fp-handle-y {
	cursor: ns-resize;
}
.sw-fp-handle-xy {
	cursor: nwse-resize;
}
.sw-fp-handle-grip {
	stroke: var(--sw-ink-600);
	stroke-width: 80;
	stroke-linecap: round;
	fill: var(--sw-ink-600);
}
.sw-fp-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 4px 0 8px;
	font-size: 13px;
	color: var(--sw-ink-700);
}
.sw-fp-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.sw-fp-swatch {
	width: 28px;
	height: 17px;
}
.sw-fp-swatch .sw-fp-zone {
	stroke-width: 1.5;
}
.sw-fp-swatch .sw-fp-flow {
	stroke-width: 1.5;
}
.sw-ws-machines {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}
.sw-ws-machines li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px solid var(--sw-ink-100);
}
.sw-ws-machines li.sw-offline {
	opacity: 0.7;
}
.sw-ws-machine-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.sw-ws-machine-name .sw-chip {
	padding: 2px 10px;
	cursor: default;
}
.sw-ws-machine-name .sw-chip-offline {
	border-color: var(--sw-danger-600);
	color: var(--sw-danger-600);
}
.sw-ws-edit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--brand-primary, var(--sw-ink-600));
	color: var(--sw-white);
	text-decoration: none;
}
.sw-prod-readonly {
	display: inline-block;
	padding: 6px 0;
	color: var(--sw-ink-700);
}
.sw-prod-sheets {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sw-prod-sheet {
	display: flex;
	align-items: center;
	gap: 6px;
}
.sw-prod-sheet .sw-input {
	width: 90px;
}
.sw-prod-faces {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 6px 0;
}
.sw-prod-small {
	padding: 4px 10px;
	font-size: 0.85rem;
}
.sw-prod-issues {
	border: 1px solid #e3b5ad;
	background: #fdf1ef;
	border-radius: 6px;
	padding: 8px 12px;
}
.sw-prod-history {
	margin-top: 20px;
}
.sw-prod-history-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sw-prod-history-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid var(--sw-ink-100);
}
.sw-prod-history-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-left: auto;
}
.sw-batches-top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}
.sw-batches-group {
	margin-bottom: 16px;
}
.sw-batches-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sw-batches-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--sw-ink-100);
}
.sw-sim-row {
	align-items: center;
}
.sw-sim-play {
	margin-left: auto;
}
.sw-batches-link {
	font-weight: 600;
	min-width: 0;
	overflow-wrap: anywhere;
}
.sw-batch-head {
	margin-bottom: 12px;
}
.sw-batch-section {
	margin-bottom: 16px;
	min-width: 0;
}
.sw-batch-table {
	border-collapse: collapse;
	width: 100%;
	max-width: 720px;
}
.sw-batch-table td {
	padding: 6px 8px 6px 0;
	border-bottom: 1px solid var(--sw-ink-100);
	vertical-align: middle;
	overflow-wrap: anywhere;
}
.sw-batch-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-end;
}
.sw-batch-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	background: var(--sw-ink-100);
	font-size: 12px;
	margin: 0 6px;
}
.sw-batch-machine {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
}
.sw-batch-machine-step {
	min-width: 140px;
	font-weight: 600;
}
.sw-batch-machine .sw-prod-select {
	max-width: 100%;
}
.sw-ptag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	border-radius: 6px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}
.sw-ptag-0, .sw-pfill-0 { background: #3b6fc4; fill: #3b6fc4; }
.sw-ptag-1, .sw-pfill-1 { background: #2f8a55; fill: #2f8a55; }
.sw-ptag-2, .sw-pfill-2 { background: #c26a1b; fill: #c26a1b; }
.sw-ptag-3, .sw-pfill-3 { background: #8a4fc0; fill: #8a4fc0; }
.sw-ptag-4, .sw-pfill-4 { background: #c23b5a; fill: #c23b5a; }
.sw-ptag-5, .sw-pfill-5 { background: #1f8a8a; fill: #1f8a8a; }
.sw-ptag-6, .sw-pfill-6 { background: #7a6a1f; fill: #7a6a1f; }
.sw-ptag-7, .sw-pfill-7 { background: #5a6478; fill: #5a6478; }
.sw-planbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}
.sw-plan-badge {
	display: inline-flex;
	align-items: center;
	border-radius: 12px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
}
.sw-plan-none {
	background: var(--sw-n-150, #ebe7df);
	color: var(--sw-n-600, #5f574f);
}
.sw-plan-auto {
	background: #edf6f0;
	color: #2f7d4f;
}
.sw-plan-manual {
	background: var(--sw-oak-100);
	color: var(--sw-oak-700);
}
.sw-parkbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	background: var(--sw-oak-100);
	color: var(--sw-oak-700);
	border-radius: 10px;
	padding: 8px 12px;
	margin: 8px 0;
	max-width: 900px;
}
.sw-sheet-err {
	display: inline-block;
	margin-left: 8px;
	color: var(--sw-danger-600);
	font-size: 12px;
	font-weight: 600;
}
.sw-grp {
	border: 1px solid var(--sw-n-200, #e2ddd3);
	border-radius: 12px;
	margin: 10px 0;
	overflow: hidden;
	max-width: 900px;
}
.sw-grp-h {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 8px 12px;
	background: var(--sw-n-50, #f8f6f2);
}
.sw-grp-prod {
	overflow-wrap: anywhere;
}
.sw-grp-sp {
	flex: 1;
}
.sw-grp-unlinked,
.sw-grp-short {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	border-radius: 10px;
	padding: 8px 12px;
	margin: 8px 12px;
}
.sw-grp-unlinked {
	background: #fdf1ef;
	border: 1px dashed #e3b5ad;
	color: #b3261e;
}
.sw-grp-short {
	background: #fff7e6;
	border: 1px solid #f0d58c;
	color: #5c4000;
}
.sw-band-swatch {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	border: 1px solid var(--sw-n-200, #e2ddd3);
	flex: none;
}
.sw-band-body {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	padding: 8px 12px;
	border-top: 1px solid var(--sw-n-150, #ebe7df);
}
.sw-band-metres {
	margin-left: auto;
}
.sw-band-totals {
	max-width: 900px;
	margin-top: 12px;
}
.sw-sheet-table {
	width: 100%;
	border-collapse: collapse;
}
.sw-sheet-table td {
	padding: 6px 12px;
	border-top: 1px solid var(--sw-n-150, #ebe7df);
	vertical-align: middle;
}
.sw-sheet-no {
	width: 40px;
	color: var(--sw-n-500, #756b61);
}
.sw-sheet-input {
	width: 72px;
	padding: 4px 6px;
	border: 1px solid var(--sw-ink-200);
	border-radius: 6px;
	font-size: 13px;
}
.sw-ready {
	margin-top: 12px;
}
.sw-ready-title {
	margin: 0 0 2px;
	font-size: 13px;
}
.sw-ready-hint {
	margin: 0 0 6px;
	font-size: 12px;
}
.sw-ready-pose {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
}
.sw-ready-field {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--sw-n-500, #756b61);
}
.sw-ready-field select {
	max-width: 240px;
	padding: 4px 6px;
	border: 1px solid var(--sw-ink-200);
	border-radius: 6px;
	font-size: 13px;
}
.sw-ready-add {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	padding: 6px 12px;
}
.sw-ready-qty {
	width: 56px;
}
.sw-ready-table .sw-sheet-size {
	white-space: nowrap;
	width: 1%;
}
.sw-ready-add .sw-sheet-input:not(.sw-ready-qty) {
	width: 104px;
}
.sw-sheet-input.sw-edited {
	border-color: var(--sw-oak-500);
	background: #fffaf2;
}
.sw-sheet-edited {
	color: var(--sw-oak-700);
	font-size: 12px;
	margin-left: 6px;
}
.sw-linkbtn {
	border: 0;
	background: none;
	color: var(--sw-ink-600);
	cursor: pointer;
	font-size: 14px;
}
.sw-thumbbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--sw-n-200, #e2ddd3);
	background: #fff;
	border-radius: 8px;
	padding: 3px 8px 3px 3px;
	cursor: pointer;
}
.sw-thumbbtn:hover:not([disabled]) {
	border-color: var(--sw-ink-300);
	background: var(--sw-ink-50);
}
.sw-thumbbtn[disabled] {
	cursor: default;
	opacity: 0.6;
}
.sw-thumbbtn .sw-thumb {
	height: 40px;
	width: 64px;
	display: block;
}
.sw-thumb-pct {
	font-weight: 600;
	font-size: 13px;
}
.sw-thumb-open {
	font-size: 11px;
	color: var(--sw-ink-600);
}
.sw-sheet-del {
	text-align: right;
}
.sw-sheet-bg {
	fill: #fbfaf7;
	stroke: #aaa196;
	stroke-width: 4;
}
.sw-sheet-trim {
	fill: none;
	stroke: #cec7ba;
	stroke-width: 3;
	stroke-dasharray: 12 8;
}
.sw-sheet-piece {
	fill-opacity: 0.22;
	stroke: #34487e;
	stroke-width: 3;
}
.sw-pfill-single {
	fill: #b97a36;
}
.sw-sheet-strip {
	fill-opacity: 1;
}
.sw-sheet-code {
	font-weight: 700;
	fill: #1d2a4a;
}
.sw-sheet-sub {
	fill: #4d6199;
}
.sw-drawer-bg,
.sw-modal-bg {
	position: fixed;
	inset: 0;
	background: rgba(20, 29, 51, 0.3);
	z-index: 20000;
}
.sw-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(760px, 100vw);
	background: #fff;
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
	z-index: 20001;
	display: flex;
	flex-direction: column;
}
.sw-drawer-h {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 12px 14px;
	border-bottom: 1px solid var(--sw-n-150, #ebe7df);
}
.sw-drawer-title {
	font-size: 16px;
}
.sw-drawer-body {
	flex: 1;
	overflow: auto;
	padding: 12px 14px;
}
.sw-drawer-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	font-size: 13px;
	margin-bottom: 8px;
}
.sw-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.sw-drawer-svg {
	width: 100%;
	height: auto;
	display: block;
}
.sw-drawer-ro {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.sw-sheet-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0 10px;
	padding-bottom: 2px;
}
.sw-sheet-tab {
	border: 1px solid var(--sw-n-200, #e2ddd3);
	border-radius: 10px;
	padding: 4px 8px;
	background: var(--sw-n-50, #f8f6f2);
	cursor: pointer;
	font-size: 12px;
	white-space: nowrap;
}
.sw-sheet-tab.sw-sel {
	border-color: var(--sw-ink-500);
	background: var(--sw-ink-50);
	font-weight: 600;
}
.sw-sheet-tab.sw-drop-ok {
	outline: 2px dashed var(--sw-success-600);
	outline-offset: 1px;
}
.sw-sheet-tab.sw-drop-bad {
	outline: 2px solid var(--sw-danger-600);
	outline-offset: 1px;
	background: var(--sw-danger-50);
}
.sw-drawer-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}
.sw-drawer-msg {
	min-height: 1.4em;
	font-size: 13px;
	margin-bottom: 6px;
}
.sw-drawer-msg.sw-good {
	color: var(--sw-success-700);
}
.sw-drawer-msg.sw-bad {
	color: var(--sw-danger-700);
	font-weight: 600;
}
.sw-drawer-errors {
	color: var(--sw-danger-700);
	font-size: 13px;
	padding-left: 18px;
	margin: 8px 0;
}
.sw-manual [data-piece] {
	cursor: grab;
	touch-action: none;
}
.sw-manual [data-piece]:focus {
	outline: none;
}
.sw-manual [data-piece]:focus .sw-sheet-piece {
	stroke: var(--sw-ink-600);
	stroke-dasharray: 10 6;
}
.sw-sheet-piece.sw-sheet-piece-err {
	fill: var(--sw-danger-600);
	fill-opacity: 0.35;
	stroke: var(--sw-danger-700);
	stroke-width: 6;
}
.sw-piece-sel .sw-sheet-piece {
	stroke: var(--sw-ink-700);
	stroke-width: 10;
}
.sw-move-zone {
	min-height: 84px;
	max-height: 40vh;
	overflow: auto;
	border: 2px dashed var(--sw-ink-200);
	border-radius: 12px;
	background: var(--sw-ink-50);
	padding: 8px;
	margin-top: 8px;
}
.sw-move-zone.sw-over {
	border-color: var(--sw-success-600);
	background: var(--sw-success-50);
}
.sw-move-zone-lbl {
	font-size: 12px;
	color: var(--sw-n-500, #756b61);
	margin-bottom: 4px;
}
.sw-zone-piece {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	max-width: 200px;
	max-height: 70px;
	overflow: hidden;
	margin: 4px;
	padding: 4px 8px;
	border: 1px solid var(--sw-ink-300);
	border-radius: 8px;
	background: #fff;
	font-size: 12px;
	vertical-align: top;
	cursor: grab;
	touch-action: none;
	user-select: none;
}
.sw-zone-code {
	font-weight: 600;
}
.sw-drag-ghost {
	position: fixed;
	z-index: 20010;
	pointer-events: none;
	opacity: 0.85;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f3e3cf;
	border: 2px solid #34487e;
	border-radius: 2px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	font-size: 12px;
	font-weight: 700;
	color: #1d2a4a;
	overflow: hidden;
}
@media (max-width: 600px) {
	.sw-sheet-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
	}
}
.sw-modal-bg {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.sw-modal-bg.sw-modal-over {
	z-index: 20005;
}
.sw-modal {
	background: #fff;
	border-radius: 14px;
	max-width: 460px;
	width: 100%;
	padding: 16px;
	max-height: 90vh;
	overflow: auto;
}
.sw-modal h3 {
	margin: 0 0 4px;
}
.sw-pick {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	align-items: center;
	width: 100%;
	text-align: left;
	padding: 8px;
	border: 1px solid var(--sw-n-200, #e2ddd3);
	border-radius: 10px;
	margin: 6px 0;
	background: #fff;
	cursor: pointer;
}
.sw-pick:hover {
	border-color: var(--sw-ink-300);
	background: var(--sw-ink-50);
}
.sw-pick-cur {
	border-color: var(--sw-ink-500);
	background: var(--sw-ink-50);
}
.sw-pick-h {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sw-n-500, #756b61);
	margin: 12px 0 2px;
}
.sw-pick-note {
	font-size: 12px;
	margin-top: 10px;
}
.sw-modal-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-top: 12px;
}
@media (max-width: 600px) {
	.sw-sheet-table td {
		display: block;
		border: 0;
		padding: 3px 12px;
	}
	.sw-sheet-table tr {
		display: block;
		border-top: 1px solid var(--sw-n-150, #ebe7df);
		padding: 6px 0;
	}
	.sw-sheet-no {
		width: auto;
	}
	.sw-sheet-del {
		text-align: left;
	}
	.sw-band-metres {
		margin-left: 0;
		flex-basis: 100%;
	}
}
.sw-batch-issue-list {
	color: #a4262c;
	padding-left: 18px;
	overflow-wrap: anywhere;
}
.sw-batch-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 16px;
}
.sw-batch-section:focus {
	outline: none;
}
.sw-batch-section.sw-attn {
	animation: sw-attn 1.6s ease-out;
}
@keyframes sw-attn {
	0% { box-shadow: 0 0 0 3px #a4262c; }
	100% { box-shadow: 0 0 0 3px transparent; }
}
.sw-send-hint {
	color: #a4262c;
	font-weight: 600;
	margin: 0 0 4px;
}
.sw-blocker {
	margin: 4px 0;
}
.sw-blocker-msg {
	margin-right: 6px;
}
.sw-blocker-code {
	display: inline-block;
	font-size: 12px;
	color: var(--sw-n-700, #444);
	background: var(--sw-n-100, #f2f2f2);
	border-radius: 4px;
	padding: 1px 6px;
	margin-right: 6px;
	overflow-wrap: anywhere;
}
.sw-blocker-fix {
	padding: 0;
	text-decoration: underline;
	white-space: normal;
	text-align: left;
}
.sw-batch-send.sw-send-blocked {
	opacity: 0.6;
	cursor: help;
}
.sw-send-confirm {
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	padding: 10px 12px 2px;
	margin: 0 0 12px;
	max-width: 560px;
}
.sw-send-confirm p {
	margin: 0;
}
.sw-send-status:empty {
	display: none;
}
.sw-send-status {
	font-weight: 600;
	margin: 0 0 12px;
}
.sw-send-status-bad {
	color: #a4262c;
}
.sw-batch-files-group { margin: 12px 0 4px; font-size: 13px; font-weight: 700; color: var(--text-dark); }
.sw-batch-files-list {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
}
.sw-batch-files-list li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	padding: 4px 0;
}

.sw-cmd,
.sw-timing {
	margin-top: 12px;
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	padding: 8px 12px;
}

.sw-cmd-summary {
	cursor: pointer;
	font-weight: 600;
}

.sw-timing > .sw-prod-fields {
	margin-top: 8px;
}

.sw-cmd-body {
	display: grid;
	gap: 10px;
	margin-top: 8px;
}

.sw-cmd-action {
	display: grid;
	gap: 4px;
}

.sw-cmd-action-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sw-cmd-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	width: 100%;
	min-width: 0;	resize: vertical;
	overflow: hidden;
}

.sw-cmd button:disabled {
	opacity: .4;
	cursor: default;
}

.sw-cmd-vars {
	font-size: 12px;
	overflow-wrap: anywhere;
}

.sw-cmd-custom-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-end;
	padding: 8px 0;
	border-top: 1px solid var(--sw-n-200);
}

.sw-cmd-preview {
	max-height: 24rem;
	overflow: auto;
	margin: 0;
	padding: 8px;
	background: var(--sw-n-150);
	border-radius: 6px;
	font-size: 12px;
	white-space: pre;
}

.sw-cmd-hint {
	background: var(--sw-warning-50);
	color: var(--sw-warning-700);
}

.sw-cmd-number {
	width: 6rem;
}

.sw-prod-table .sw-input.sw-invalid-soft {
	border-color: var(--sw-warning-700);
	background: var(--sw-warning-50);
}

.sw-batch-machine-commands {
	margin-left: 6px;
}

.sw-sim-status {
	margin: 12px 0;
	padding: 10px 14px;
	border: 1px solid var(--sw-warning-100);
	border-radius: 8px;
	background: var(--sw-warning-50);
	color: var(--sw-warning-700);
}

.sw-sim-controls .sw-btn:disabled,
.sw-sim-controls select:disabled,
.sw-sim-controls input:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.sw-sim-status p {
	margin: 0 0 8px;
}

.sw-sim-status p:last-child {
	margin-bottom: 0;
}

.sw-sim-status .sw-issues {
	margin: 0 0 8px;
}

.sw-sim-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 12px 0;
}

.sw-sim-speed {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.sw-sim-scrub {
	flex: 1 1 200px;
	min-width: 120px;
}

.sw-sim-time {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.sw-sim-controls .sw-btn {
		flex: 1 1 calc(50% - 8px);
	}

	.sw-sim-scrub {
		flex-basis: 100%;
	}
}

.sw-sim-stage {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.sw-sim-view {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: clamp(360px, 66vh, 800px);
	max-height: 80vh;
	touch-action: none;
	cursor: grab;
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	overflow: hidden;
	background: #fbfaf7;
}

.sw-sim-view canvas {
	display: block;
}

.sw-sim-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.sw-sim-badge {
	position: absolute;
	transform: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	padding: 3px 6px;
	border: 1px solid var(--sw-n-200);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.92);
	font-size: 10px;
	line-height: 1.2;
	pointer-events: auto;
	cursor: pointer;
	max-width: 170px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
}

.sw-sim-badge.sw-sim-off {
	opacity: 0.55;
}

.sw-sim-badge-tool,
.sw-sim-badge-queue {
	color: var(--sw-n-500, #6b6b6b);
}

.sw-sim-panel {
	flex: 0 0 320px;
	max-height: 70vh;
	overflow: auto;
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	padding: 10px 12px;
	background: #fff;
}

.sw-sim-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.sw-sim-program,
.sw-sim-tools {
	margin: 4px 0 8px;
	padding-left: 18px;
	font-size: 12px;
}

.sw-sim-current {
	font-weight: 700;
}

.sw-sim-counters {
	display: grid;
	grid-template-columns: auto auto;
	gap: 2px 12px;
	font-size: 13px;
}

.sw-sim-findings {
	margin-top: 16px;
}

.sw-sim-finding {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	text-align: left;
	cursor: pointer;
	text-decoration: underline;
}

.sw-sim-nowebgl {
	padding: 16px;
}

.sw-sim-piece {
	margin-top: 16px;
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	padding: 10px 12px;
	background: #fff;
}

.sw-sim-piece-view {
	height: 320px;
	cursor: grab;
	touch-action: none;
}

.sw-sim-piece-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	text-decoration: underline;
}

@media (max-width: 700px) {
	.sw-sim-stage {
		flex-direction: column;
	}

	.sw-sim-panel {
		flex: 0 0 auto;
		max-height: none;
	}

	.sw-sim-view {
		aspect-ratio: 4 / 3;
	}
}

.sw-dz {
    border: 2px dashed var(--sw-ink-200);
    border-radius: 14px;
    background: var(--sw-n-25);
    padding: 16px;
    min-height: 140px;
    cursor: pointer;
    transition: background 0.15s;
}

.sw-dz:hover,
.sw-dz:focus-visible {
    background: var(--sw-ink-50);
    outline: none;
}

.sw-dz-drag {
    outline: 3px solid var(--sw-ink-400);
    outline-offset: 2px;
    background: var(--sw-ink-50);
}

.sw-dz-empty {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-height: 104px;
    text-align: center;
    color: var(--sw-ink-500);
}

.sw-dz-cloud {
    width: 38px;
    height: 38px;
    opacity: 0.75;
}

.sw-dz-empty-title {
    font-weight: 600;
}

.sw-dz-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.sw-dz-tile {
    position: relative;
    width: 112px;
    padding: 12px 8px 8px;
    border-radius: 12px;
    background: var(--sw-white);
    border: 1px solid var(--sw-n-150);
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 4px;
    text-align: center;
    cursor: default;
}

.sw-dz-bad {
    border-color: var(--sw-danger-500);
    background: var(--sw-danger-50);
}

.sw-dz-done {
    background: var(--sw-success-50);
    border-color: var(--sw-success-100);
}

.sw-dz-icon {
    width: 44px;
    height: 54px;
}

.sw-dz-name {
    font-size: 12px;
    line-height: 1.25;
    word-break: break-word;
    max-height: 31px;
    overflow: hidden;
}

.sw-dz-size {
    font-size: 12px;
    color: var(--sw-n-500);
}

.sw-dz-kind {
    font: inherit;
    font-size: 12px;
    max-width: 100%;
    padding: 3px 4px;
    border: 1px solid var(--sw-n-200);
    border-radius: 6px;
    background: var(--sw-white);
    color: var(--sw-ink-700);
}

.sw-dz-kind-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sw-ink-600);
}

.sw-dz-x,
.sw-dz-trash {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--sw-white);
    color: var(--sw-white);
    font-size: 13px;
    line-height: 18px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(var(--sw-shadow-rgb), 0.25);
}

.sw-dz-x {
    background: var(--sw-n-700);
}

.sw-dz-trash {
    display: grid;
    place-items: center;
    background: var(--sw-n-500);
}

.sw-dz-trash svg {
    width: 11px;
    height: 11px;
}

.sw-dz-x:hover,
.sw-dz-trash:hover {
    background: var(--sw-danger-500);
}

.sw-dz-more {
    width: 112px;
    min-height: 124px;
    border: 2px dashed var(--sw-ink-200);
    border-radius: 12px;
    display: grid;
    place-content: center;
    justify-items: center;
    color: var(--sw-ink-500);
    font-size: 12px;
}

.sw-dz-more b {
    font-size: 26px;
    line-height: 1;
}

.sw-dz-bar {
    width: 90%;
    height: 4px;
    border-radius: 2px;
    background: var(--sw-n-150);
    overflow: hidden;
}

.sw-dz-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--sw-ink-500);
}

.sw-dz-bar-on i {
    width: 40%;
    animation: sw-dz-slide 0.9s ease-in-out infinite;
}

@keyframes sw-dz-slide {
    from { transform: translateX(-100%); }
    to { transform: translateX(250%); }
}

.sw-dz-errors {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--sw-danger-50);
    color: var(--sw-danger-600);
    font-size: 13px;
    display: grid;
    gap: 4px;
}

.sw-cc-issues {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--sw-danger-50);
    color: var(--sw-danger-600);
    font-size: 13px;
    display: grid;
    gap: 10px;
}

.sw-cc-piece h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
}

.sw-cc-piece ul {
    margin: 0;
    padding-left: 18px;
}

.sw-cc-path {
    word-break: break-all;
    font-size: 12px;
    color: var(--sw-n-500);
}

.sw-dz-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.sw-dz-uploaded {
    margin-top: 16px;
}

.sw-dz-uploaded-title {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--sw-success-600);
}
.sw-dz-host {
    margin-bottom: 14px;
}

.sw-savebar {
    position: fixed;
    left: calc(var(--sw-sidebar-w, 0px) + (100% - var(--sw-sidebar-w, 0px)) / 2);
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100% - var(--sw-sidebar-w, 0px) - 32px);
    padding: 8px 8px 8px 18px;
    border-radius: 999px;
    background: var(--sw-n-900);
    color: var(--sw-white);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(var(--sw-shadow-rgb), 0.28);
}

.sw-savebar-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sw-savebar-text::before {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sw-oak-400);
}

.sw-savebar.is-saving .sw-savebar-text::before {
    background: var(--sw-n-300);
}

.sw-savebar.is-saved {
    background: var(--sw-success-600);
    padding-right: 18px;
}

.sw-savebar.is-saved .sw-savebar-text::before {
    background: var(--sw-white);
}

.sw-savebar.is-failed {
    background: var(--sw-danger-600);
}

.sw-savebar.is-failed .sw-savebar-text::before {
    background: var(--sw-white);
}

.sw-savebar-discard,
.sw-savebar-save {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
}

.sw-savebar-discard {
    background: transparent;
    color: var(--sw-white);
    opacity: 0.85;
}

.sw-savebar-discard:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

.sw-savebar-save {
    background: var(--sw-white);
    color: var(--sw-ink-700);
}

.sw-savebar-discard:disabled,
.sw-savebar-save:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 768px) {
    .sw-savebar {
        left: 50%;
        bottom: 84px;
        max-width: calc(100% - 24px);
        padding-left: 14px;
        font-size: 13px;
    }
}

.sw-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    align-self: center;
}

.sw-send-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sw-chip-send {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sw-chip-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sw-send-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 29, 51, 0.45);
}

.sw-send {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    border-radius: 18px;
    background: var(--sw-white);
    box-shadow: 0 20px 48px rgba(var(--sw-shadow-rgb), 0.3);
    box-sizing: border-box;
}

.sw-send-title {
    margin: 0;
    font-size: 18px;
    color: var(--text-dark);
}

.sw-send-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.sw-send-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--sw-n-200);
    border-radius: 12px;
    background: var(--sw-n-50);
    font: inherit;
    font-size: 15px;
    text-align: left;
    color: var(--text-dark);
    cursor: pointer;
}

.sw-send-opt:hover,
.sw-send-opt:focus-visible {
    border-color: var(--sw-ink-600);
    outline: none;
}

.sw-send-opt.is-new {
    font-weight: 700;
    color: var(--sw-ink-600);
}

.sw-send-opt:disabled {
    opacity: 0.5;
    cursor: default;
}

.sw-send-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sw-send-meta {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--text-muted);
}

.sw-send-empty {
    margin: 0;
    font-size: 14px;
}

.sw-send-warning {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff7e6;
	border: 1px solid #f0d58c;
	color: #5c4000;
	font-size: 13px;
}
.sw-batch-imported {
	background: #fff7e6;
	color: #5c4000;
}

.sw-batch-cutlist {
	background: #eef4ff;
	color: #1f3a66;
}

.sw-piece-qty {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 10px;
	padding: 8px 10px;
	border: 1px solid var(--sw-n-200, #ddd);
	border-radius: 8px;
	font-size: 14px;
}

.sw-piece-qty-label {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.sw-piece-qty-ctl {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.sw-piece-qty-ctl .sw-btn {
	align-self: center;
	margin: 0;
}

.sw-piece-qty-ctl input {
	width: 4.5em;
	padding: 4px 6px;
	font: inherit;
	text-align: center;
}

.sw-piece-qty-hint {
	font-size: 12px;
}

.sw-batch-subset {
	background: #eefaf1;
	color: #1d4d2c;
}

.sw-send-copies {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 14px;
}

.sw-send-copies input {
	width: 5em;
	padding: 4px 6px;
	font: inherit;
}

.sw-send-pieces {
	margin: 0 0 10px;
	font-size: 14px;
}

.sw-send-pieces summary {
	cursor: pointer;
	color: var(--text-muted);
}

.sw-send-piece-list {
	max-height: 40vh;
	overflow-y: auto;
	margin-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sw-send-piece {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	overflow-wrap: anywhere;
}

.sw-send-piece.is-all {
	font-weight: 600;
}
.sw-batch-left-out {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	overflow-wrap: anywhere;
}
.sw-send-err {
    margin: 0;
    font-size: 14px;
    color: var(--sw-danger-600);
}

.sw-send-cancel {
    align-self: flex-end;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    color: var(--text-muted);
    cursor: pointer;
}

.sw-send-cancel:hover {
    background: var(--sw-n-100);
}

.sw-setup-toolbar {
    flex-wrap: nowrap;
}

.sw-setup-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sw-setup-title small {
    font-size: 12px;
}

.sw-toolbar .sw-setup-title input.sw-title-input {
    flex: none;
    width: 100%;
}

.sw-setup-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.sw-setup-preview {
    position: sticky;
    top: 110px;
}

.sw-setup-sub {
    margin: 4px 0 14px;
    font-size: 13px;
}

.sw-setup-sec {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--sw-n-150);
}

.sw-setup-sec h3 {
    margin: 0;
    font-size: 15px;
}

.sw-setup-cap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 4px 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.sw-setup-cap b {
    font-size: 14px;
    color: var(--text-dark);
}

.sw-setup-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--sw-n-150);
    border-radius: 18px;
    background: radial-gradient(circle at 50% 40%, var(--sw-white) 0%, var(--sw-n-50) 70%);
}

.sw-setup-stage svg {
    width: 100%;
    height: 100%;
}

.sw-setup-ext {
    stroke: var(--sw-n-300);
    stroke-dasharray: 3 3;
}

.sw-setup-dl.is-w { stroke: var(--sw-ink-600); }
.sw-setup-dl.is-h { stroke: var(--sw-oak-500); }
.sw-setup-dl.is-d { stroke: var(--sw-success-600); }

.sw-setup-dt {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    paint-order: stroke;
    stroke: var(--sw-white);
    stroke-linejoin: round;
}

.sw-setup-dt.is-w { fill: var(--sw-ink-600); }
.sw-setup-dt.is-h { fill: var(--sw-oak-500); }
.sw-setup-dt.is-d { fill: var(--sw-success-600); }

.sw-setup-legend {
    margin: 10px 4px 0;
    font-size: 12px;
}

.sw-setup-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sw-setup-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 12px 10px;
    border: 1.5px solid var(--sw-n-200);
    border-radius: 14px;
    background: var(--sw-n-50);
    font: inherit;
    text-align: left;
    color: var(--text-dark);
    cursor: pointer;
}

.sw-setup-card:hover {
    border-color: var(--sw-ink-200);
}

.sw-setup-card.on {
    border-color: var(--sw-ink-600);
    background: var(--sw-white);
    box-shadow: 0 0 0 3px rgba(var(--sw-ink-rgb), 0.12);
}

.sw-setup-card-big {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sw-setup-card-big small {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.sw-setup-card-sm {
    font-size: 12px;
    color: var(--text-muted);
}

.sw-setup-tick {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--sw-n-300);
    border-radius: 50%;
    background: var(--sw-white);
    box-sizing: border-box;
}

.sw-setup-card.on .sw-setup-tick {
    border-color: var(--sw-ink-600);
    background: var(--sw-ink-600);
    box-shadow: inset 0 0 0 3px var(--sw-white);
}

.sw-setup-custom {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-ink-700);
}

.sw-setup-more {
    margin-top: 10px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-ink-600);
    cursor: pointer;
}

.sw-setup-all {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid var(--sw-n-150);
    border-radius: 14px;
    background: var(--sw-n-50);
}

.sw-setup-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sw-setup-row + .sw-setup-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--sw-n-150);
}

.sw-setup-row-k {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.sw-setup-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sw-setup-chip {
    padding: 6px 11px;
    border: 1px solid var(--sw-n-200);
    border-radius: 18px;
    background: var(--sw-white);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--sw-n-700);
    cursor: pointer;
}

.sw-setup-chip.on {
    border-color: var(--sw-ink-600);
    background: var(--sw-ink-600);
    color: var(--sw-white);
}

.sw-setup-bands {
    margin: 12px 0;
}

.sw-setup-band {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sw-setup-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--sw-n-300);
    flex: none;
}

.sw-setup-own {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border: 1px dashed var(--sw-n-300);
    border-radius: 18px;
    background: var(--sw-white);
    font-size: 13px;
    color: var(--text-muted);
}

.sw-setup-own:focus-within {
    border-style: solid;
    border-color: var(--sw-ink-500);
}

.sw-setup-own.on {
    border-style: solid;
    border-color: var(--sw-ink-600);
    color: var(--sw-ink-700);
}

.sw-setup .sw-setup-own input.sw-setup-own-input {
    flex: none;
    width: 4ch;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-weight: 600;
    text-align: right;
    color: var(--text-dark);
}

.sw-setup-err {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--sw-danger-600);
}

.sw-setup-hint {
    margin: 10px 0 0;
    padding: 8px 10px;
    border: 1px dashed var(--sw-oak-300, #ddb680);
    border-radius: 10px;
    background: var(--sw-oak-50, #fbf6ee);
    font-size: 12px;
    color: var(--text-muted);
}

.sw-setup-counter {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--sw-n-200);
    border-radius: 14px;
    background: var(--sw-n-50);
}

.sw-setup-counter button {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 20px;
    color: var(--sw-ink-600);
    cursor: pointer;
}

.sw-setup-counter button:disabled {
    opacity: 0.35;
    cursor: default;
}

.sw-setup-counter output {
    min-width: 120px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.sw-setup-toggle {
    display: inline-flex;
    margin-top: 8px;
    padding: 3px;
    border-radius: 22px;
    background: var(--sw-n-100);
}

.sw-setup-toggle button {
    padding: 8px 16px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--sw-ink-500);
    cursor: pointer;
}

.sw-setup-toggle button.on {
    background: var(--sw-white);
    color: var(--sw-ink-800, #1d2a4a);
    box-shadow: 0 1px 3px rgba(var(--sw-shadow-rgb), 0.12);
}

.sw-setup-go {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.sw-setup-go p {
    margin: 0;
}

.sw-setup-go .sw-btn {
    margin-top: 0;
}

@media (max-width: 1180px) {
    .sw-setup-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sw-setup-preview {
        position: static;
        order: -1;
    }

    .sw-setup-stage {
        aspect-ratio: 4 / 3;
    }

    .sw-setup-toolbar {
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .sw-setup-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

.sw-sheets-list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	max-width: 760px;
}
.sw-sheets-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid var(--sw-ink-100);
}
.sw-sheets-main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.sw-sheets-name {
	overflow-wrap: anywhere;
}
.sw-sheets-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 0.85rem;
	color: var(--sw-ink-600);
}
.sw-sheets-note {
	font-size: 0.8rem;
	color: #9a6700;
}
.sw-sheets-form {
	max-width: 760px;
	margin-top: 8px;
}
.sw-sheets-issues {
	margin-top: 10px;
}
.sw-sheets-form-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.sw-shell {
    background: var(--sw-white);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(var(--sw-shadow-rgb), 0.05);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.sw-shell-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--sw-n-150);
    min-width: 0;
}

.sw-grow {
    flex: 1;
}

.sw-back.sw-back-icon,
.sw-icon-btn {
    width: 34px;
    height: 34px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: 10px;
    color: var(--sw-n-700);
    cursor: pointer;
    font-size: 15px;
}

.sw-back.sw-back-icon:hover,
.sw-icon-btn:hover {
    background: var(--sw-n-100);
}

.sw-crumb {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    flex-wrap: wrap;
}

.sw-crumb-labels {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.sw-crumb-sep {
    color: var(--sw-n-300);
    padding: 0 2px;
}

.sw-shell-top input.sw-crumb-input {
    display: inline-block;
    width: auto;
    field-sizing: content;
    min-width: 60px;
    max-width: 180px;
    height: auto;
    margin: 0;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 13px;
    color: var(--sw-n-600);
    transition: none;
}

.sw-shell-top input.sw-crumb-input:hover {
    border-color: var(--sw-n-200);
    background: var(--sw-n-25);
}

.sw-shell-top input.sw-crumb-input:focus {
    outline: none;
    border-color: var(--sw-ink-500);
    background: var(--sw-white);
    box-shadow: 0 0 0 3px rgba(var(--sw-ink-rgb), 0.15);
}

.sw-shell-top input.sw-crumb-input.sw-invalid,
.sw-shell-top input.sw-crumb-input.has-error {
    border-color: var(--sw-danger-600);
    background: var(--sw-danger-50);
}

.sw-shell-top input.sw-crumb-name {
    max-width: 320px;
    font-size: 16px;
    font-weight: 800;
    color: var(--sw-n-900);
}

.sw-shell-top .sw-crumb-title {
    margin: 0;
    padding: 4px 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--sw-n-900);
    overflow-wrap: anywhere;
}

.sw-shell-top .sw-help {
    font-weight: 700;
}

.sw-shell-top .sw-send-btn {
    margin-top: 0;
    align-self: center;
    white-space: nowrap;
}

.sw-menubar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 2px 12px;
    background: var(--sw-n-25);
    border-bottom: 1px solid var(--sw-n-150);
}

.sw-menu {
    position: relative;
}

.sw-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    padding: 7px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    color: var(--sw-n-800);
    cursor: pointer;
}

.sw-menu-btn i {
    font-size: 10px;
    color: var(--sw-n-500);
}

.sw-menu-btn:hover,
.sw-menu.is-open > .sw-menu-btn {
    background: var(--sw-n-100);
}

.sw-menu-pop {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    z-index: 950;
    min-width: 230px;
    padding: 6px;
    background: var(--sw-white);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(var(--sw-shadow-rgb), 0.18);
}

.sw-menu.is-open .sw-menu-pop {
    display: block;
}

.sw-history-pop {
    width: min(460px, 90vw);
    max-height: 70vh;
    overflow: auto;
    padding: 4px 12px 12px;
}

.sw-history-pop .sw-history-tools {
    margin-top: 6px;
}

@media (max-width: 600px) {
    .sw-menubar {
        position: relative;
    }

    #sw-menu-history {
        position: static;
    }

    .sw-history-pop {
        left: 0;
        width: min(460px, calc(100vw - 32px));
        min-width: 0;
    }
}

.sw-history-pop input.sw-history-find {
    height: 34px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--sw-n-300);
    border-radius: 8px;
    background: var(--sw-white);
    font-size: 13px;
}

.sw-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 8px 10px 8px 30px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: var(--sw-n-800);
    cursor: pointer;
    position: relative;
}

a.sw-menu-item,
a.sw-menu-btn {
    text-decoration: none;
}

.sw-menu-item:hover {
    background: var(--sw-n-50);
}

.sw-menu-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sw-menu-item i {
    width: 16px;
    margin-left: -20px;
    color: var(--sw-n-600);
}

.sw-menu-item kbd {
    margin-left: auto;
    font: 600 11px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--sw-n-500);
}

.sw-menu-item.is-current::before,
.sw-menu-item[aria-checked="true"]::before {
    content: '✓';
    position: absolute;
    left: 10px;
    color: var(--sw-ink-600);
    font-weight: 700;
}

.sw-menu-sep {
    height: 1px;
    background: var(--sw-n-150);
    margin: 4px 6px;
}

.sw-menubar-sep {
    width: 1px;
    height: 20px;
    background: var(--sw-n-200);
    margin: 0 8px;
}

.sw-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    padding: 6px 9px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: var(--sw-n-700);
    cursor: pointer;
    white-space: nowrap;
}

.sw-tool:hover {
    background: var(--sw-n-100);
}

.sw-tool.active {
    background: var(--sw-ink-50);
    color: var(--sw-ink-800);
    font-weight: 600;
}

.sw-tool:disabled {
    opacity: 0.45;
    cursor: default;
    background: transparent;
}

.sw-shell-notices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 0;
}

.sw-shell-body {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 260px;
    min-height: 0;
}

.sw-shell-body > .sw-parts,
.sw-shell-body > .sw-inspector {
    height: 520px;
    overflow: auto;
    padding: 12px;
    box-sizing: border-box;
}

.sw-shell-body > .sw-parts {
    border-right: 1px solid var(--sw-n-150);
}

.sw-shell-body > .sw-inspector {
    border-left: 1px solid var(--sw-n-150);
}

.sw-viewport-wrap {
    position: relative;
    padding: 10px;
    min-width: 0;
}

.sw-viewport-wrap:fullscreen {
    padding: 0;
    background: var(--sw-n-50);
}

.sw-viewport-wrap:fullscreen .sw-viewport {
    height: 100vh;
    border-radius: 0;
}

.sw-viewport canvas.is-pan {
    cursor: move;
}

.sw-view-cube {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 92px;
    height: 92px;
    z-index: 6;
}

.sw-view-cube polygon {
    fill: rgba(var(--sw-white-rgb), 0.92);
    stroke: var(--sw-n-300);
    stroke-width: 1;
    cursor: pointer;
}

.sw-view-cube polygon:hover {
    fill: var(--sw-ink-100);
}

.sw-view-cube polygon.is-current {
    fill: var(--sw-ink-100);
    stroke: var(--sw-ink-500);
}

.sw-view-cube text {
    font: 700 6.5px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    fill: var(--sw-n-600);
    text-transform: uppercase;
    pointer-events: none;
}

.sw-nav-stack {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    background: rgba(var(--sw-white-rgb), 0.92);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(var(--sw-shadow-rgb), 0.12);
}

.sw-nav-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--sw-n-700);
    cursor: pointer;
}

.sw-nav-btn:hover {
    background: var(--sw-n-100);
}

.sw-nav-btn.active {
    background: var(--sw-ink-600);
    color: var(--sw-white);
}

.sw-nav-sep {
    height: 1px;
    background: var(--sw-n-200);
    margin: 3px 4px;
}

.sw-nav-hint {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 6;
    max-width: calc(100% - 80px);
    font-size: 11px;
    color: var(--sw-n-500);
    background: rgba(var(--sw-white-rgb), 0.75);
    padding: 4px 8px;
    border-radius: 8px;
    pointer-events: none;
}

.sw-eng-stage .sw-nav-hint {
    left: 76px;
    bottom: 36px;
    z-index: 2;
}

.sw-eng-stage .sw-view-cube,
.sw-eng-stage .sw-nav-stack {
    z-index: 2;
}

.sw-inspector .sw-card-name {
    margin: 0 0 6px;
    font-size: 15px;
}

.sw-statusbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding: 6px 14px;
    border-top: 1px solid var(--sw-n-150);
    background: var(--sw-n-25);
    border-radius: 0 0 16px 16px;
    font-size: 12px;
    color: var(--sw-n-500);
}

.sw-statusbar .sw-muted,
.sw-statusbar .sw-error {
    font-size: 12px;
}

.sw-statusbar .sw-overall {
    font-size: 12px;
    font-weight: 400;
    color: var(--sw-n-600);
    background: transparent;
    padding: 0;
}

.sw-statusbar .sw-version {
    font-size: 12px;
    background: transparent;
    padding: 0;
}

.sw-saved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sw-success-600);
}

.sw-saved::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sw-success-600);
}

.sw-editor-page.is-readonly #sw-menu-project {
    opacity: 0.6;
}

@media (max-width: 900px) {
    .sw-shell-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .sw-shell-body > .sw-parts,
    .sw-shell-body > .sw-inspector {
        height: auto;
        max-height: 320px;
        border: 0;
    }

    .sw-shell-body > .sw-inspector {
        border-top: 1px solid var(--sw-n-150);
    }

    .sw-nav-hint {
        display: none;
    }
}

@media (max-width: 600px) {
    .sw-shell-top {
        flex-wrap: wrap;
    }
}

.sw-match-file {
    margin: 4px 0 12px;
    color: var(--text-muted);
}

.sw-match-diff {
    margin: 8px 0 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(var(--sw-shadow-rgb), 0.03);
}

.sw-match-ids {
    display: inline-block;
    margin: 0 6px 2px 0;
    font-family: monospace;
    font-size: 12px;
}

.sw-match-name-label {
    font-weight: 600;
    margin-right: 8px;
}

.sw-match-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.sw-match-table th {
    text-align: left;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 8px;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.12);
}

.sw-match-table td {
    vertical-align: top;
    padding: 10px 8px;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
}

.sw-match-table td:first-child {
    width: 40%;
}

.sw-match-label {
    display: block;
    color: var(--text-dark);
}

.sw-match-meta {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.sw-match-filter {
    display: block;
    width: 100%;
    margin-bottom: 6px;
}

.sw-match-select {
    width: 100%;
    max-width: 100%;
    padding: 6px;
}

.sw-match-row.is-invalid .sw-match-select {
    border-color: var(--sw-danger-600);
}

.sw-match-row-error {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--sw-danger-600);
}

.sw-match-own {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 8px 0 16px;
}

@media (max-width: 640px) {
    .sw-match-table td:first-child {
        width: auto;
    }

    .sw-match-table,
    .sw-match-table tbody,
    .sw-match-table tr,
    .sw-match-table td {
        display: block;
    }

    .sw-match-table thead {
        display: none;
    }
}

.sw-materials {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
}

.sw-mat-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    list-style-position: inside;
}

.sw-mat-count {
    font-size: 12px;
    color: var(--text-muted, var(--sw-n-500));
}

.sw-mat-count-todo {
    color: var(--brand-primary);
    font-weight: 600;
}

.sw-mat-row {
    margin-top: 10px;
    padding: 8px;
    border: 1px solid rgba(var(--sw-shadow-rgb), 0.08);
    border-radius: 8px;
}

.sw-mat-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sw-mat-label {
    font-size: 13px;
}

.sw-mat-chosen {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sw-mat-name {
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sw-mat-missing {
    font-size: 12px;
    color: var(--brand-primary);
}

.sw-mat-swatch {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(var(--sw-shadow-rgb), 0.15);
    background: var(--sw-n-150);
}

.sw-mat-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sw-mat-swatch-missing {
    border-style: dashed;
}

.sw-mat-status {
    margin: 6px 0 0 0;
    font-size: 12px;
    color: var(--text-muted, var(--sw-n-500));
}

.sw-mat-status-changed,
.sw-mat-status-gone,
.sw-mat-status-too_narrow {
    color: var(--brand-primary);
}

.sw-mat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.sw-mat-chooser {
    margin-top: 8px;
}

.sw-mat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sw-mat-search {
    flex: 1 1 100%;
    min-width: 0;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid var(--border-light, var(--sw-n-150));
    border-radius: 6px;
}

.sw-mat-filter {
    flex: 1 1 40%;
    min-width: 0;
    font-size: 12px;
    padding: 4px 6px;
}

.sw-mat-results {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
}

.sw-mat-color-head {
    margin-top: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 6px 0;
    background: var(--sw-white);
}

.sw-mat-color-head,
.sw-mat-color-selected {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sw-mat-color-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sw-mat-color-eyedropper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sw-mat-color-error {
    flex-basis: 100%;
    margin: 0;
    font-size: 12px;
}

.sw-mat-color-icon,
.sw-mat-color-sample,
.sw-mat-color-preset {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-light, var(--sw-n-150));
    flex: 0 0 auto;
}

.sw-mat-color-icon {
    background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
}

.sw-mat-color-selected {
    margin-left: auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.sw-mat-color-clear {
    padding: 2px 8px;
    font-size: 20px;
    line-height: 1;
    min-height: 32px;
}

.sw-mat-color-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    padding: 12px 0;
}

.sw-mat-color-wheel {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle closest-side, white, transparent),
        conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    border: 1px solid var(--border-light, var(--sw-n-150));
    touch-action: none;
    cursor: crosshair;
    flex: 0 0 auto;
}

.sw-mat-color-wheel:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 4px;
}

.sw-mat-color-shade {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: black;
    pointer-events: none;
}

.sw-mat-color-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border: 2px solid white;
    box-shadow: 0 0 0 1px black;
    border-radius: 50%;
    pointer-events: none;
}

.sw-mat-color-controls {
    flex: 1 1 130px;
    min-width: 0;
}

.sw-mat-color-brightness {
    display: grid;
    gap: 6px;
    font-size: 13px;
}

.sw-mat-color-brightness input {
    width: 100%;
    accent-color: var(--brand-primary);
}

.sw-mat-color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.sw-mat-color-preset {
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.sw-mat-color-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.sw-mat-color-hint {
    flex: 1 1 100%;
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.sw-mat-result {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px;
    text-align: left;
    background: var(--sw-white);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
}

.sw-mat-result:hover,
.sw-mat-result.active {
    border-color: var(--brand-primary);
}

.sw-mat-inactive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sw-mat-note {
    margin: 8px 0 0 0;
    font-size: 11px;
}

.sw-mat-actions .sw-chip {
    border-color: rgba(var(--sw-shadow-rgb), 0.2);
}

.sw-setup-mat-row {
    margin-top: 12px;
}

.sw-setup-mat-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sw-setup-mat-head .sw-setup-row-k {
    flex: 1 1 100%;
}

.sw-setup-mat-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
}

.sw-setup-mat-name {
    overflow-wrap: anywhere;
}

.sw-setup-mat-none {
    color: var(--brand-primary);
}

.sw-setup-mat-note {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.sw-setup-mat-panel {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--sw-n-150);
    border-radius: 8px;
}

.sw-module-card .sw-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sw-admission-row{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;padding:1rem 0;border-bottom:1px solid #ddd;overflow-wrap:anywhere}
.sw-admission-row select{width:100%;min-width:0;max-width:100%;padding:.65rem;font:inherit}
.sw-admission-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}
.sw-admission-swatch{display:inline-block;width:1.5rem;height:1.5rem;background:#b8b8b8;border:1px solid #888;border-radius:4px}
#sw-admission-errors{color:#a02b25;overflow-wrap:anywhere}

.sw-history-copy {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 8px;
}
.sw-history-copy label {
	display: grid;
	gap: 4px;
	min-width: 0;
}
.sw-history-copy input {
	width: 100%;
}
.sw-batch-readiness {
	margin: 4px 0 0;
	font-size: 14px;
	text-align: right;
}
.sw-batch-admission .sw-btn:disabled,
.sw-mgr .sw-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.sw-batch-admission .sw-admission-errors {
	color: var(--sw-danger-700);
	padding-left: 18px;
}
.sw-batch-admission .sw-admission-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}
.sw-batch-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 10px;
}
.sw-bp-card {
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	padding: 10px 12px;
	background: var(--sw-white);
	min-width: 0;
	overflow-wrap: anywhere;
}
.sw-bp-card .sw-batch-badge {
	margin: 2px 4px 2px 0;
}
.sw-bp-meta {
	margin: 4px 0 8px;
	font-size: 13px;
}
.sw-bp-card .sw-batch-row-actions {
	justify-content: flex-start;
}
.sw-batch-sub {
	margin-bottom: 12px;
}
.sw-batch-title-h {
	margin: 0;
}
.sw-batch-title {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	max-width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	overflow-wrap: anywhere;
}
.sw-batch-pencil {
	font-size: 0.7em;
	color: var(--sw-ink-600);
	opacity: 0.55;
}
.sw-batch-title:hover .sw-batch-pencil,
.sw-batch-title:focus-visible .sw-batch-pencil {
	opacity: 1;
}
.sw-batch-title-edit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.sw-batch-name-input {
	font-size: 1.4rem;
	font-weight: 600;
	padding: 4px 8px;
	max-width: 100%;
	width: 28ch;
}
.sw-batch-name-err {
	color: var(--sw-danger-700);
	font-size: 14px;
}
.sw-fold > summary {
	cursor: pointer;
	margin-bottom: 8px;
}
.sw-fold-tools {
	margin-bottom: 10px;
}
.sw-iconbtn {
	border: 1px solid var(--sw-n-200);
	border-radius: 6px;
	background: var(--sw-white);
	color: var(--sw-danger-700);
	padding: 4px 9px;
	cursor: pointer;
}
.sw-iconbtn:hover,
.sw-iconbtn:focus-visible {
	border-color: var(--sw-danger-500);
}
.sw-batch-bar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	margin-top: 16px;
	padding: 10px 12px;
	border-top: 1px solid var(--sw-n-200);
	background: var(--sw-white);
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}
.sw-batch-bar-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.sw-save-state {
	font-size: 13px;
}
.sw-batch-send-primary {
	padding: 10px 22px;
	font-size: 1.05rem;
	font-weight: 600;
}
.sw-btn.sw-btn-danger {
	color: var(--sw-danger-700);
	border: 1px solid var(--sw-danger-500);
}
.sw-btn.sw-btn-danger:not(.secondary) {
	background: var(--sw-danger-600);
	border-color: var(--sw-danger-600);
	color: var(--sw-white);
}
.sw-mgr {
	margin-top: 14px;
	padding: 12px;
	border: 1px solid var(--sw-n-200);
	border-radius: 10px;
	background: var(--sw-n-50);
	min-width: 0;
}
.sw-mgr-h {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.sw-mgr-h .sw-prod-subheading {
	margin: 0;
}
.sw-mgr-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.sw-mgr-col {
	min-width: 0;
	padding: 10px;
	border: 2px solid var(--sw-n-200);
	border-radius: 8px;
	background: var(--sw-white);
}
.sw-mgr-col.is-over {
	border-color: var(--sw-ink-600);
	background: var(--sw-ink-50);
}
.sw-mgr-col-h {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.sw-mgr-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.sw-mgr-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.sw-mgr-search {
	flex: 1 1 180px;
	min-width: 0;
	padding: 6px 8px;
}
.sw-mgr-only {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}
.sw-mgr-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sw-mgr-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--sw-n-200);
	overflow-wrap: anywhere;
}
.sw-mgr-row[draggable="true"] {
	cursor: grab;
}
.sw-mgr-row.is-unavailable {
	opacity: 0.6;
}
.sw-mgr-name {
	flex: 1 1 160px;
	min-width: 0;
}
.sw-mgr-reason {
	font-size: 13px;
	color: var(--sw-ink-600);
}
.sw-mgr-acts {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.sw-instance-pieces {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    margin-top: 12px;
    padding: 12px;
    border-top: 1px solid var(--sw-n-200);
}
.sw-instance-pieces h5 { margin: 0 0 8px; }
.sw-instance-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sw-instance-toolbar label { display: flex; align-items: center; gap: 8px; }
.sw-instance-copies { width: 76px; padding: 6px; }
.sw-instance-checklist { margin: 12px 0; max-height: 340px; overflow-y: auto; }
.sw-instance-part { display: flex; align-items: center; gap: 10px; padding: 8px 0; overflow-wrap: anywhere; }
.sw-instance-part small { display: block; }
.sw-instance-part input { flex-shrink: 0; }
.sw-instance-summary { flex-basis: 100%; margin: 8px 0; }
.sw-mgr-pieces {
	font-size: 13px;
}
.sw-mgr-admission:not(:empty) {
	margin-bottom: 10px;
}
@media (max-width: 768px) {
	.sw-batch-cards {
		grid-template-columns: 1fr;
	}
	.sw-mgr-cols {
		grid-template-columns: 1fr;
	}
	.sw-batch-readiness {
		text-align: left;
	}
	.sw-batch-bar {
		bottom: 70px;
		padding: 8px 10px;
	}
	.sw-batch-bar-row .sw-grp-sp {
		display: none;
	}
	.sw-batch-send-primary {
		flex: 1 1 100%;
	}
}

.sw-import-totals { font-weight: 600; line-height: 1.6; }
.sw-import-active { border-color: var(--brand-primary); box-shadow: inset 3px 0 var(--brand-primary); }
.sw-import-members { margin-top: 12px; }
.sw-import-members > summary { cursor: pointer; padding: 6px 0; }
.sw-import-cutting { margin-top: 10px; }
.sw-import-cutting .sw-mat-actions { flex-wrap: wrap; }
.sw-import-state { display: block; font-size: 12px; margin-bottom: 6px; }
.sw-import-members .sw-mat-label, .sw-import-members .sw-mat-name { overflow-wrap: anywhere; }
@media (max-width: 720px) {
 .sw-import-cutting .sw-chip { white-space: normal; text-align: left; }
 .sw-import-totals { font-size: 13px; }
}
.sw-sim-badge strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.sw-sim-badge-kind { color: #526772; font-size: 9px; }
.sw-sim-badge.sw-sim-selected { border-color: #536ba8; box-shadow: 0 0 0 2px #536ba830; }

.sw-sim-camera { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 10px; border: 1px solid var(--sw-n-200); border-radius: 8px; background: #fff; }
.sw-sim-camera label { display: flex; align-items: center; gap: 8px; margin: 0; }
.sw-sim-camera input { width: clamp(90px, 18vw, 220px); }
.sw-sim-camera output { min-width: 4em; font-variant-numeric: tabular-nums; }
.sw-sim-camera button { min-height: 36px; padding: 6px 12px; }

.sw-sim-part-label { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%,-50%); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 5px; border-radius: 3px; background: #fff8e8e8; color: #342819; font-size: 10px; box-shadow: 0 1px 3px #0003; }

.sw-sim-video { margin:0 0 24px; padding:16px 20px; background:#fff; border:1px solid #e1ddd4; border-radius:10px; }
.sw-sim-video summary { cursor:pointer; font-weight:700; }
.sw-sim-video-form { display:flex; gap:12px; flex-wrap:wrap; align-items:end; }
.sw-sim-video-form label { display:flex; gap:6px; flex-direction:column; }
.sw-sim-video progress { display:block; width:min(100%,420px); margin:12px 0; }
@media(max-width:600px) { .sw-sim-video-form label { width:100%; } }

.sw-fp-expedition > g > rect { fill: #dfedda; stroke: #4a7950; stroke-dasharray: 80 40; }

.sw-material-alert {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #b45309;
    background: #fff7ed;
    color: #7c2d12;
}
.sw-material-alert > span { flex: 1 1 260px; }

.sw-labels-grid {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 16px;
	align-items: start;
}
.sw-labels-presets {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px;
	border: 0;
	padding: 0;
	margin: 0 0 12px;
}
.sw-labels-presets legend {
	font-weight: 600;
	margin-bottom: 6px;
}
.sw-labels-preset {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 10px;
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	background: var(--sw-white);
	cursor: pointer;
}
.sw-labels-preset.is-selected {
	border-color: var(--sw-ink-600);
	box-shadow: inset 0 0 0 1px var(--sw-ink-600);
}
.sw-labels-preset input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.sw-labels-preset:focus-within {
	outline: 2px solid var(--sw-ink-600);
	outline-offset: 2px;
}
.sw-labels-preset-shape {
	width: 30px;
	height: 18px;
	border: 1.5px solid var(--sw-ink-600);
	border-radius: 3px;
}
.sw-labels-preset-shape.is-square {
	width: 20px;
	height: 20px;
}
.sw-labels-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.sw-labels-size {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 10px 16px;
	margin-bottom: 12px;
}
.sw-labels-size label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}
.sw-labels-size .sw-input {
	width: 110px;
}
.sw-labels-toggle {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 6px;
}
.sw-labels-fields {
	width: 100%;
	border-collapse: collapse;
}
.sw-labels-fields caption {
	text-align: left;
	font-weight: 600;
	margin-bottom: 6px;
}
.sw-labels-fields td {
	padding: 4px 6px 4px 0;
	border-bottom: 1px solid var(--sw-n-200);
	vertical-align: middle;
}
.sw-labels-chars {
	width: 70px;
}
.sw-labels-move {
	white-space: nowrap;
}
.sw-labels-preview {
	padding: 12px;
	background: var(--sw-n-50);
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	overflow: auto;
}
.sw-labels-preview svg {
	display: block;
	max-width: 100%;
	height: auto;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.sw-labels-warnings {
	padding-left: 18px;
	font-size: 13px;
	color: var(--sw-ink-600);
}
.sw-labels-warnings .is-issue {
	color: var(--sw-danger-700);
	font-weight: 600;
}
@media (max-width: 768px) {
	.sw-labels-grid {
		grid-template-columns: 1fr;
	}
}

.sw-pieces-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 8px 0;
}
.sw-pieces-filters input[type="search"] {
	flex: 1 1 200px;
	min-width: 0;
}
.sw-pieces-scroll {
	overflow-x: auto;
	max-width: 100%;
}
table.sw-pieces {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
table.sw-pieces th,
table.sw-pieces td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid #e3e7ef;
	vertical-align: top;
}
table.sw-pieces .sw-piece-code {
	font-family: ui-monospace, Menlo, monospace;
	white-space: nowrap;
}
table.sw-pieces .sw-piece-actions .sw-btn {
	display: block;
	margin: 2px 0;
	white-space: nowrap;
	text-align: center;
}
.sw-label-modal {
	max-width: 640px;
}
.sw-label-img {
	display: block;
	max-width: 100%;
	margin: 8px auto;
	border: 1px solid #e3e7ef;
	background: #fff;
}

.sw-mat-compact-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.sw-mat-compact-row .sw-mat-label {
	font-size: 13px;
}
.sw-mat-open {
	width: 100%;
	margin-top: 8px;
}
.sw-mat-dialog {
	margin: auto;
	width: min(1200px, calc(100vw - 32px));
	height: min(900px, calc(100dvh - 48px));
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(20, 29, 51, 0.28);
}
.sw-mat-dialog::backdrop {
	background: rgba(20, 29, 51, 0.35);
}
.sw-mat-panel {
	position: relative;
	width: 100%;
	height: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(20, 29, 51, 0.28);
	overflow: hidden;
}
.sw-mat-panel-head,
.sw-mat-panel-foot {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(20, 29, 51, 0.08);
}
.sw-mat-panel-head h3 {
	margin: 0;
	flex: 1;
}
.sw-mat-panel-foot {
	justify-content: flex-end;
	border-bottom: 0;
	border-top: 1px solid rgba(20, 29, 51, 0.08);
}
.sw-mat-panel-body {
	flex: 1;
	overflow: auto;
	padding: 16px;
}
.sw-mat-panel .sw-mat-results {
	max-height: 50vh;
}
.sw-mat-assignment {
	display: grid;
	grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
	gap: 24px;
}
.sw-mat-targets h4 {
	margin: 0 0 8px;
	font-size: 13px;
}
.sw-mat-targets h4:not(:first-child) {
	margin-top: 20px;
}
.sw-mat-target {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	margin-bottom: 8px;
	padding: 12px;
	border: 1px solid var(--sw-n-200);
	border-radius: 8px;
	background: #fff;
	color: var(--sw-n-800);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.sw-mat-target.on {
	border-color: var(--brand-primary);
	background: var(--sw-n-100);
}
.sw-mat-target-product {
	font-size: 12px;
	overflow-wrap: anywhere;
}
.sw-mat-target.is-ok,
.sw-mat-target.is-todo {
	position: relative;
	padding-right: 40px;
}
.sw-mat-target > .sw-mat-target-state {
	position: absolute;
	top: 12px;
	right: 12px;
}
.sw-mat-target-state {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}
.sw-mat-target-state.is-ok {
	border-radius: 50%;
	background: #229a54;
	color: #fff;
}
.sw-mat-target-state.is-todo {
	height: 19px;
	padding-top: 5px;
	box-sizing: border-box;
	clip-path: polygon(50% 0, 100% 100%, 0 100%);
	background: #f2b705;
	color: #3a2a00;
	font-size: 12px;
}
.sw-mat-all-set {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #1d7a45;
	font-weight: 600;
}
.sw-mat-color-actions {
	display: flex;
	flex: 1 1 100%;
	justify-content: flex-end;
}
.sw-mat-assignment-detail > .sw-mat-row {
	margin-top: 0;
	padding: 16px;
}
.sw-mat-compact-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.sw-mat-compact-row .sw-mat-head {
	min-width: 0;
}
.sw-mat-compact-row .sw-mat-actions {
	flex-shrink: 0;
	margin: 0;
}
@media (max-width: 720px) {
	.sw-mat-dialog {
		width: calc(100vw - 16px);
		height: calc(100dvh - 16px);
	}
	.sw-mat-assignment {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
	.sw-mat-panel-head {
		flex-wrap: wrap;
	}
}

.sw-material-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:24px 0 16px; }
.sw-material-filters label { display:flex; flex-direction:column; gap:6px; min-width:140px; flex:1; font-size:.85rem; }
.sw-material-filters .sw-material-search { flex:2; min-width:240px; }
.sw-material-filters .sw-input { width:100%; min-width:0; min-height:42px; padding:9px 12px; border:1px solid #cfc9bd; border-radius:10px; background:#fff; color:inherit; font:inherit; box-sizing:border-box; }
.sw-material-filters select { max-width:100%; }
.sw-material-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:20px; }
.sw-material-card { min-width:0; background:var(--surface,#fff); border:1px solid #ddd8cd; border-radius:16px; overflow:hidden; }
.sw-material-swatch { height:160px; overflow:hidden; background:#e7e4dd; display:grid; place-items:center; color:#6b665e; }
.sw-material-swatch img { display:block; width:100%; height:160px; object-fit:cover; }
.sw-material-card-body { padding:16px; display:flex; flex-direction:column; gap:8px; }
.sw-material-card-body p, .sw-material-card-body h4 { margin:0; overflow-wrap:anywhere; }
.sw-material-card-body h4 { font-size:1.14rem; }
.sw-material-brand { font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; color:#5c6380; }
.sw-material-dimensions { font-size:.83rem; line-height:1.6; }
.sw-material-status { font-size:.78rem; line-height:1.5; color:#565c6c; padding-top:6px; }
.sw-material-source { font-size:.85rem; margin-top:8px; }
.sw-material-pagination { display:flex; justify-content:center; align-items:center; gap:20px; margin:24px 0; }
.sw-material-results { margin:16px 0; }
.sw-material-private { margin-top:32px; border-top:1px solid #d4cfc5; padding-top:20px; }
.sw-material-private > summary { font-size:1.2rem; font-weight:650; cursor:pointer; }
@media (max-width:600px) { .sw-material-grid { grid-template-columns:1fr; } .sw-material-filters label { min-width:120px; } .sw-material-filters .sw-material-search { flex-basis:100%; min-width:0; } }

.sw-batch-material-search { display:flex; flex-direction:column; gap:6px; margin:16px 0; }
.sw-batch-material-search input { width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #cfc9bd; border-radius:10px; font:inherit; }
.sw-batch-material-swatch { flex:0 0 60px; height:40px; border-radius:6px; overflow:hidden; }
.sw-batch-material-swatch img { display:block; width:60px; height:40px; object-fit:cover; }
.sw-pick-name { flex:1; min-width:0; overflow-wrap:anywhere; }

.sw-ribbon-editor { font-size:13px; }
.sw-ribbon-editor .sw-workspace-hidden { display:none !important; }
.sw-ribbon-editor .sw-mat-thickness-scope { display:none !important; }
.sw-ribbon-editor[data-workspace="materials"][data-wood-section=""] #sw-materials { display:none !important; }
.sw-ribbon-editor .sw-shell { position:relative; min-width:0; }
.sw-ribbon-editor .sw-shell-top { flex-wrap:wrap; padding:10px 14px; }
.sw-ribbon-editor .sw-crumb { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
.sw-context-breadcrumb { display:flex; gap:5px; align-items:center; flex-wrap:wrap; }
.sw-context-crumb { background:transparent; border:0; color:var(--sw-n-500); cursor:pointer; font:inherit; padding:5px; border-radius:5px; }
.sw-context-crumb:hover { background:var(--sw-n-100); }
.sw-ribbon-editor .sw-crumb-title { font-size:16px; overflow-wrap:anywhere; }
.sw-ribbon-editor .sw-crumb-title.is-clickable { cursor:pointer; }
.sw-ribbon-editor .sw-crumb-title.is-clickable:hover { text-decoration:underline; }
.sw-ribbon-editor .sw-crumb-name { max-width:300px; }
.sw-ribbon-editor .sw-header-save { position:static; transform:none; border:0; box-shadow:none; padding:0; background:transparent; margin:0; gap:8px; flex-wrap:wrap; }
.sw-header-save .sw-savebar-text { font-size:11px; }
.sw-header-save button { font-size:12px; padding:7px 12px; }
.sw-workspace-tabs { display:flex; align-items:center; gap:1px; flex-wrap:wrap; padding:0 12px; border-bottom:1px solid var(--sw-n-150); }
.sw-workspace-tabs > button, .sw-workspace-tabs .sw-menu-btn { border:0; border-bottom:2px solid transparent; background:transparent; padding:10px 14px; border-radius:0; font:inherit; color:var(--sw-n-700); cursor:pointer; }
.sw-workspace-tabs > button[aria-pressed="true"] { border-bottom-color:var(--sw-ink-600); color:var(--sw-ink-600); font-weight:700; }
.sw-ribbon { border-bottom:1px solid var(--sw-n-150); padding:6px 12px; min-height:66px; }
.sw-ribbon-editor .sw-eng-rail { position:static; flex-direction:row; align-items:stretch; flex-wrap:wrap; width:auto; padding:0; border:0; gap:3px; background:transparent; }
.sw-ribbon-editor .sw-eng-rail-btn { width:auto; min-width:80px; height:auto; min-height:55px; flex-direction:column; gap:4px; padding:6px 12px; border-radius:6px; font:inherit; }
.sw-ribbon-editor .sw-eng-tip { position:static; display:block; opacity:1; visibility:visible; transform:none; background:transparent; color:inherit; box-shadow:none; font-size:11px; line-height:1.3; max-width:140px; white-space:normal; padding:0; }
.sw-ribbon-editor .sw-eng-rail-btn.on { background:var(--sw-n-100); color:var(--sw-ink-600); }
.sw-ribbon-editor .sw-eng-count { top:1px; right:2px; }
.sw-ribbon-editor .sw-shell-notices { padding:6px 12px; }
.sw-ribbon-editor .sw-notice { font-size:11px; margin:0; padding:5px 8px; }
.sw-ribbon-editor .sw-shell-body { grid-template-columns:280px minmax(0,1fr); }
.sw-ribbon-editor .sw-shell-body > .sw-parts { height:calc(100vh - 300px); min-height:420px; max-height:none; padding:12px; }
.sw-ribbon-editor .sw-shell-body > .sw-inspector { display:none; }
.sw-ribbon-editor.sw-pieces-open .sw-shell-body { grid-template-columns:280px minmax(0,1fr) 320px; }
.sw-ribbon-editor.sw-pieces-open .sw-shell-body > .sw-inspector { display:block; height:calc(100vh - 300px); min-height:420px; max-height:none; }
.sw-ribbon-editor[data-workspace="piece"] .sw-shell-body { grid-template-columns:minmax(0,1fr); }
.sw-ribbon-editor[data-workspace="piece"] .sw-shell-body > .sw-parts { display:none; }
.sw-ribbon-editor[data-workspace="piece"].sw-pieces-open .sw-shell-body { grid-template-columns:minmax(0,1fr) 320px; }
.sw-ribbon-editor[data-workspace="production"] .sw-shell-body { grid-template-columns:350px minmax(0,1fr); }
.sw-ribbon-editor[data-workspace="production"].sw-pieces-open .sw-shell-body { grid-template-columns:350px minmax(0,1fr) 320px; }
.sw-ribbon-editor .sw-viewport { height:calc(100vh - 344px); min-height:400px; }
.sw-ribbon-editor .sw-eng-flyout { position:static; width:auto; max-width:100%; max-height:none; box-shadow:none; border:0; border-radius:0; background:transparent; margin-bottom:10px; }
.sw-ribbon-editor .sw-eng-fly-head { padding:0 0 10px; flex-wrap:wrap; }
.sw-ribbon-editor .sw-eng-fly-head h3 { font-size:14px; }
.sw-ribbon-editor .sw-eng-fly-head span { font-size:11px; overflow-wrap:anywhere; }
.sw-ribbon-editor .sw-eng-fly-body { padding:0; }
.sw-ribbon-editor .sw-eng-row { flex-wrap:wrap; }
.sw-ribbon-editor .sw-eng-dims { max-width:100%; }
.sw-ribbon-editor .sw-eng-stage .sw-dim-layer { left:0; }
.sw-ribbon-editor .sw-eng-stage .sw-nav-hint { left:12px; }
.sw-ribbon-editor #sw-document-tools { padding:4px; border:0; gap:1px; flex-wrap:wrap; background:transparent; }
.sw-ribbon-editor #sw-document-tools .sw-tool { font-size:11px; padding:5px 7px; }
.sw-piece-panel-head { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.sw-piece-panel-head h3 { font-size:14px; margin:0; }
.sw-piece-panel-head .sw-icon-btn { margin-left:auto; }
.sw-piece-panel-tabs { display:flex; border-bottom:1px solid var(--sw-n-150); margin-bottom:12px; }
.sw-piece-panel-tabs button { background:transparent; color:var(--sw-n-700); border:0; border-bottom:2px solid transparent; padding:9px 8px; font:inherit; font-size:12px; cursor:pointer; }
.sw-piece-panel-tabs button[aria-selected="true"] { border-bottom-color:var(--sw-ink-600); color:var(--sw-ink-600); font-weight:600; }
.sw-piece-panel-tabs button:disabled { opacity:.45; cursor:default; }
.sw-ribbon-editor #sw-piece-panel .sw-parts-search { margin-bottom:8px; }
.sw-ribbon-editor #sw-piece-panel .sw-part-list { max-height:none; overflow:visible; }
.sw-ribbon-editor .sw-parts-head { margin:8px 0; }
.sw-ribbon-editor .sw-parts-head h3 { font-size:12px; }
.sw-ribbon-editor .sw-part-item { font-size:12px; }
.sw-ribbon-editor .sw-part-group { list-style:none; }
.sw-part-group > details > summary { padding:8px 2px; font-weight:600; font-size:12px; cursor:pointer; }
.sw-part-group ul { padding:0; list-style:none; }
.sw-ribbon-editor #sw-menu-history { position:absolute; top:48px; left:12px; z-index:20; }
.sw-ribbon-editor #sw-menu-history > .sw-menu-btn { display:none; }
.sw-ribbon-editor #sw-menu-history .sw-menu-pop { position:static; max-width:calc(100vw - 50px); }
.sw-ribbon-editor .sw-project-label-fields { display:flex; gap:12px; flex-wrap:wrap; padding:12px; background:var(--sw-n-50); }
.sw-project-label-fields label { display:flex; flex-direction:column; gap:4px; }
.sw-project-label-fields input { padding:7px; max-width:100%; border:1px solid var(--sw-n-200); color:var(--sw-n-700); background:var(--sw-white); }
.sw-context-switcher { position:absolute; top:54px; left:12px; right:12px; z-index:30; padding:14px; border:1px solid var(--sw-n-200); border-radius:10px; background:var(--sw-white); box-shadow:0 12px 34px rgba(var(--sw-shadow-rgb),.2); max-height:75vh; overflow:auto; }
.sw-switch-head { display:flex; align-items:center; flex-wrap:wrap; gap:12px; border-bottom:1px solid var(--sw-n-150); padding-bottom:10px; }
.sw-switch-head h3 { font-size:14px; margin:0; }
.sw-switch-head input { margin-left:auto; min-width:0; padding:8px; max-width:100%; border:1px solid var(--sw-n-200); border-radius:6px; color:var(--sw-n-700); background:var(--sw-white); }
.sw-switch-columns { display:grid; grid-template-columns:1fr 1.4fr; gap:16px; }
.sw-switch-columns.has-rooms { grid-template-columns:1fr 1fr 1.4fr; }
.sw-switch-column { min-width:0; max-height:48vh; overflow:auto; }
.sw-switch-column h4 { font-size:12px; color:var(--sw-n-500); margin:14px 0 6px; }
.sw-switch-row { display:flex; flex-direction:column; align-items:flex-start; width:100%; padding:9px; border:0; border-radius:6px; background:transparent; color:var(--sw-n-700); font:inherit; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.sw-switch-row small { color:var(--sw-n-500); }
.sw-switch-row[aria-pressed="true"], .sw-switch-row[aria-current="page"], .sw-switch-row:hover { background:var(--sw-n-100); color:var(--sw-ink-600); }
.sw-switch-pending { padding:12px; margin-top:12px; border-top:1px solid var(--sw-n-200); }
.sw-switch-pending button { margin-right:8px; }
.sw-ribbon-editor .sw-mat-chooser, .sw-ribbon-editor .sw-mat-chooser .sw-mat-results { max-width:100%; }
.sw-ribbon-editor .sw-mat-grid { grid-template-columns:minmax(0,1fr); }
.sw-production-check { border-bottom:1px solid var(--sw-n-150); padding:9px 0; font-size:12px; }
.sw-check-head { display:flex; gap:8px; align-items:center; }
.sw-production-check .sw-chip { margin-left:auto; font-size:11px; padding:4px 7px; }
.sw-production-check .sw-check-action { margin-left:auto; flex:0 0 auto; }
.sw-production-check:not(.is-pass) .sw-check-symbol { color:var(--sw-danger-600,#b3261e); }
.sw-check-symbol { font-size:18px; color:var(--sw-n-400); }
.sw-production-check.is-pass .sw-check-symbol { color:var(--sw-success-600); }
.sw-production-check.is-pending .sw-check-symbol { color:var(--sw-n-400); }
.sw-check-issues { list-style:none; margin:6px 0 0 26px; padding:0; display:flex; flex-direction:column; gap:4px; }
.sw-check-issue { display:block; width:100%; text-align:left; border:1px solid var(--sw-danger-200,#f1c2bf); border-radius:6px; background:var(--sw-danger-50,#fdf1f0); color:var(--sw-danger-700,#8c1d18); padding:6px 8px; font:inherit; cursor:pointer; }
.sw-check-issue:hover, .sw-check-issue:focus-visible { border-color:var(--sw-danger-600,#b3261e); }
.sw-check-note { margin:6px 0 0 26px; color:var(--text-muted); }
.sw-validation-guide { position:absolute; z-index:6; top:36px; left:12px; width:min(340px, calc(100% - 24px)); max-height:calc(100% - 48px); display:flex; flex-direction:column; border:1px solid var(--sw-n-300); border-left:4px solid var(--sw-danger-600,#b3261e); border-radius:10px; background:var(--sw-white); box-shadow:0 6px 22px rgba(0,0,0,0.2); overflow:hidden; font-size:13px; }
.sw-validation-guide header { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; padding:10px 10px 8px 14px; border-bottom:1px solid var(--sw-n-200); }
.sw-validation-guide header small { color:var(--text-muted); font-size:11px; text-transform:uppercase; letter-spacing:0.04em; }
.sw-validation-guide h3 { margin:2px 0 0; font-size:14px; }
.sw-validation-guide h4 { margin:10px 0 4px; font-size:12px; }
.sw-validation-guide-body { padding:10px 14px 12px; overflow:auto; }
.sw-validation-guide-count { color:var(--text-muted); }
.sw-validation-guide-problem { margin:4px 0 0; font-weight:600; color:var(--sw-danger-700,#8c1d18); }
.sw-validation-guide-steps { margin:0; padding-left:20px; display:flex; flex-direction:column; gap:4px; }
.sw-validation-guide.is-done { border-left-color:var(--sw-success-600); }
.sw-validation-guide-done { margin:0; font-weight:600; color:var(--sw-success-600); }
.sw-validation-guide-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.sw-production-field { display:flex; flex-direction:column; gap:5px; margin:12px 0; font-size:12px; }
.sw-production-pieces, .sw-production-simulation { border-bottom:1px solid var(--sw-n-150); padding:10px 0; }
.sw-production-pieces summary, .sw-production-simulation summary { cursor:pointer; font-weight:600; }
.sw-production-piece-list { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.sw-production-piece { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid var(--sw-n-200); border-radius:8px; background:var(--sw-white); }
.sw-production-piece.is-out { opacity:0.5; }
.sw-production-piece-name { display:flex; flex-direction:column; min-width:0; font-size:12px; }
.sw-production-piece-name span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.sw-production-piece-name small { color:var(--text-muted); }
.sw-qty { display:inline-flex; align-items:center; flex:0 0 auto; border:1px solid var(--sw-n-300); border-radius:999px; overflow:hidden; }
.sw-qty-btn { width:30px; height:30px; border:0; background:var(--sw-n-100); color:var(--sw-ink-600); font-size:16px; line-height:1; cursor:pointer; }
.sw-qty-btn:hover:not(:disabled) { background:var(--sw-n-200); }
.sw-qty-btn:disabled { color:var(--sw-n-400); cursor:default; }
.sw-qty-value { width:38px; height:30px; border:0; text-align:center; font:inherit; font-size:13px; -moz-appearance:textfield; appearance:textfield; }
.sw-qty-value::-webkit-outer-spin-button, .sw-qty-value::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.sw-production-export { width:100%; margin-top:10px; }
.sw-production-verify { width:100%; margin-top:10px; }
.sw-production-simulation .sw-btn { margin-top:8px; }
.sw-hardware-project-default { border-bottom:1px solid var(--sw-n-150); margin-bottom:16px; padding-bottom:14px; }
.sw-hardware-project-default .sw-eng-sel { width:100%; }
.sw-hardware-project-default h4 { margin-top:0; }
.sw-ribbon-editor .sw-production-warning { display:block; width:100%; margin-bottom:12px; padding:12px; border:1px solid var(--sw-danger-600); border-radius:8px; background:var(--sw-white); color:var(--sw-danger-600); font:inherit; font-size:12px; line-height:1.5; text-align:left; cursor:pointer; }
.sw-ribbon-editor .sw-production-warning:hover { background:var(--sw-n-50); }
.sw-ribbon-editor .sw-eng-rail-btn { position:relative; }
.sw-validation-pending { position:absolute; top:2px; right:2px; display:flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 4px; box-sizing:border-box; border-radius:50%; background:var(--sw-danger-600); color:var(--sw-white); font-size:11px; font-weight:700; }
.sw-ribbon-editor button:focus-visible, .sw-ribbon-editor [role="button"]:focus-visible { outline:2px solid var(--sw-ink-600); outline-offset:2px; }
.sw-ribbon-editor .sw-eng-input, .sw-ribbon-editor select { max-width:100%; }
@media (max-width:1000px) {
  .sw-ribbon-editor .sw-shell-body, .sw-ribbon-editor[data-workspace="production"] .sw-shell-body { grid-template-columns:250px minmax(0,1fr); }
  .sw-ribbon-editor.sw-pieces-open .sw-shell-body, .sw-ribbon-editor[data-workspace="production"].sw-pieces-open .sw-shell-body { grid-template-columns:220px minmax(0,1fr) 280px; }
  .sw-ribbon-editor[data-workspace="piece"].sw-pieces-open .sw-shell-body { grid-template-columns:minmax(0,1fr) 280px; }
}
@media (max-width:700px) {
  .sw-ribbon-editor .sw-shell-body, .sw-ribbon-editor[data-workspace="piece"] .sw-shell-body, .sw-ribbon-editor[data-workspace="production"] .sw-shell-body { grid-template-columns:minmax(0,1fr); }
  .sw-ribbon-editor.sw-pieces-open .sw-shell-body, .sw-ribbon-editor[data-workspace="piece"].sw-pieces-open .sw-shell-body, .sw-ribbon-editor[data-workspace="production"].sw-pieces-open .sw-shell-body { grid-template-columns:minmax(0,1fr); }
  .sw-ribbon-editor.sw-pieces-open .sw-shell-body > .sw-inspector { height:auto; min-height:0; max-height:60vh; border-left:0; border-top:1px solid var(--sw-n-150); }
  .sw-ribbon-editor .sw-shell-body > .sw-parts { height:auto; min-height:0; max-height:420px; border:0; }
  .sw-ribbon-editor .sw-viewport-wrap { grid-row:1; }
  .sw-ribbon-editor .sw-viewport { min-height:300px; height:45vh; }
  .sw-ribbon-editor .sw-header-save { margin-left:auto; }
  .sw-header-save .sw-savebar-text { display:none; }
  .sw-workspace-tabs > button, .sw-workspace-tabs .sw-menu-btn { padding:8px; }
  .sw-switch-columns, .sw-switch-columns.has-rooms { grid-template-columns:minmax(0,1fr); }
  .sw-switch-column { max-height:200px; }
  .sw-switch-head input { width:100%; }
  .sw-ribbon-editor .sw-eng-rail-btn { min-width:65px; padding:5px; }
}

body.sw-simulator-layout .main-container { padding: 16px 18px 20px; min-height: 100dvh; }
.sw-sim.sw-page { gap: 12px; }
.sw-sim-stage { position: relative; display: block; isolation: isolate; }
.sw-sim-view { height: max(520px, calc(100dvh - 84px)); max-height: none; aspect-ratio: auto; border-radius: 14px; }
.sw-sim-header { position: absolute; inset: 0 0 auto; z-index: 8; height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: rgba(var(--sw-white-rgb), .95); border-bottom: 1px solid var(--sw-n-200); border-radius: 14px 14px 0 0; }
.sw-sim-heading { min-width: 0; flex: 1; }
.sw-sim-heading h1 { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 16px; line-height: 1.3; }
.sw-sim-heading > span, .sw-sim-total { font-size: 12px; color: var(--text-muted); }
.sw-sim-total { font-variant-numeric: tabular-nums; }
.sw-sim-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-dark); text-decoration: none; font: inherit; cursor: pointer; }
.sw-sim-icon:hover, .sw-sim-toolbar-btn:hover { background: var(--sw-n-100); }
.sw-sim-toolbar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; min-height: 32px; border: 1px solid var(--sw-n-200); border-radius: 8px; background: var(--sw-white); color: var(--text-dark); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.sw-sim-toolbar-btn:disabled, .sw-sim-icon:disabled { opacity: .45; cursor: not-allowed; }
.sw-sim-menu { position: relative; }
.sw-sim-menu > summary { list-style: none; }
.sw-sim-menu > summary::-webkit-details-marker { display: none; }
.sw-sim-menu-content { position: absolute; top: 40px; right: 0; width: 260px; max-width: calc(100vw - 56px); padding: 14px; border: 1px solid var(--sw-n-200); border-radius: 12px; box-shadow: 0 8px 28px rgba(var(--sw-shadow-rgb), .15); background: var(--sw-white); }
.sw-sim-menu-content .sw-sim-speed { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 12px; }
.sw-sim-menu-content .sw-prod-select { min-height: 32px; padding: 4px 6px; max-width: 100%; }
.sw-sim-menu-content .sw-sim-video { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.sw-sim-video-form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.sw-sim-video-form .sw-muted, .sw-sim-video [data-video="expiry"] { font-size: 12px; line-height: 1.5; }
.sw-sim-video [data-video="status"] { margin: 8px 0 0; font-size: 13px; }
.sw-sim-controls { position: absolute; z-index: 4; bottom: 18px; left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 40px)); display: block; margin: 0; padding: 10px 14px; border: 1px solid var(--sw-n-200); border-radius: 12px; background: rgba(var(--sw-white-rgb), .96); box-shadow: 0 5px 20px rgba(var(--sw-shadow-rgb), .08); }
.sw-sim-transport { display: flex; align-items: center; gap: 8px; }
.sw-sim-transport .sw-btn { min-height: 34px; font-size: 13px; padding: 6px 16px; }
.sw-sim-dock-speed { flex: 0 0 auto; width: 64px; min-height: 32px; padding: 4px 5px; border: 1px solid var(--border-color, #dedbd3); border-radius: 8px; background: var(--surface, #fff); color: var(--text-color, #382a1e); font: inherit; font-size: 12px; cursor: pointer; }
.sw-sim-dock-speed-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; font-size: 12px; }
.sw-sim-time { margin-left: auto; font-size: 12px; }
.sw-sim-scrub { display: block; width: 100%; min-width: 0; margin: 8px 0 0; height: 16px; accent-color: var(--brand-primary); }
.sw-sim-camera { position: absolute; top: 78px; right: 16px; z-index: 4; flex-wrap: nowrap; gap: 5px; margin: 0; padding: 4px 7px; border-radius: 8px; background: rgba(var(--sw-white-rgb), .95); }
.sw-sim-camera input { width: 92px; margin: 0; accent-color: var(--brand-primary); }
.sw-sim-camera .sw-sim-icon { flex-basis: 26px; width: 26px; height: 26px; min-height: 26px; padding: 0; }
.sw-sim-panel, .sw-sim-piece, .sw-sim-pieces { position: absolute; z-index: 6; top: 124px; bottom: 118px; width: min(360px, calc(100% - 28px)); max-height: none; box-sizing: border-box; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--sw-n-200); border-radius: 12px; padding: 12px; background: var(--sw-white); box-shadow: 0 6px 24px rgba(var(--sw-shadow-rgb), .12); }
.sw-sim-panel, .sw-sim-piece { left: 14px; }
.sw-sim-piece { margin-top: 0; }
.sw-sim-pieces { right: 14px; display: flex; flex-direction: column; overflow: hidden; }
.sw-sim-panel-head h2, .sw-sim-panel-head h3 { margin: 0; font-size: 16px; }
.sw-sim-panel-help { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin: 8px 0 12px; }
.sw-sim-piece-list { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.sw-sim-piece-row { border-top: 1px solid var(--sw-n-200); }
.sw-sim-piece-row > summary { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; position: relative; padding: 12px 18px 12px 2px; cursor: pointer; list-style: none; }
.sw-sim-piece-row > summary::after { content: '⌄'; position: absolute; right: 1px; top: 12px; color: var(--text-muted); }
.sw-sim-piece-row[open] > summary::after { content: '⌃'; }
.sw-sim-piece-row > summary::-webkit-details-marker { display: none; }
.sw-sim-piece-name { grid-column: 1 / -1; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.sw-sim-piece-state { font-size: 12px; color: var(--text-muted); }
.sw-sim-piece-count { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sw-sim-piece-row[data-state="AWAITING_CUT"] .sw-sim-piece-label, .sw-sim-piece-row[data-state="UNPLANNED"] .sw-sim-piece-label { opacity: .65; }
.sw-sim-piece-row[data-state="EXPEDITION"] .sw-sim-piece-state, .sw-sim-piece-row[data-state="READY"] .sw-sim-piece-state { color: var(--sw-success-700); font-weight: 600; }
.sw-sim-piece-row[data-state="WORKING"] .sw-sim-piece-state, .sw-sim-piece-row[data-state="TRANSPORT"] .sw-sim-piece-state { color: var(--brand-primary); font-weight: 600; }
.sw-sim-piece-detail { padding: 0 2px 12px; }
.sw-sim-piece-detail > .sw-muted { font-size: 12px; }
.sw-sim-piece-identity { font-size: 10px; overflow-wrap: anywhere; color: var(--text-muted); margin: 4px 0 12px; }
.sw-sim-actions { margin: 0 0 12px; padding: 0; list-style: none; }
.sw-sim-actions li { display: flex; gap: 8px; padding: 8px 0; color: var(--text-muted); }
.sw-sim-action-mark { flex: 0 0 16px; }
.sw-sim-actions strong { display: block; font-size: 12px; font-weight: 600; }
.sw-sim-action-detail, .sw-sim-action-status { display: block; font-size: 11px; line-height: 1.45; }
.sw-sim-actions [data-state="DONE"] .sw-sim-action-mark { color: var(--sw-success-700); }
.sw-sim-actions [data-state="ACTIVE"] { color: var(--brand-primary); }
.sw-sim-actions [data-state="DONE"] strong { color: var(--text-dark); }
.sw-sim-piece-buttons { display: flex; gap: 6px; }
.sw-sim-findings { margin: 0; color: var(--text-muted); font-size: 12px; }
.sw-sim-findings > summary { cursor: pointer; padding: 4px; }
.sw-sim-badge { font-size: 11px; }
.sw-sim-badge-kind { font-size: 10px; }
@media (max-width: 700px) {
    body.sw-simulator-layout .main-container { padding: 8px 8px 82px; margin-left: 0; }
    .sw-sim-view { height: max(520px, calc(100dvh - 114px)); }
    .sw-sim-header { padding: 0 8px; gap: 6px; }
    .sw-sim-total { display: none; }
    .sw-sim-controls { bottom: 12px; width: calc(100% - 24px); padding: 8px 10px; }
    .sw-sim-transport { gap: 4px; flex-wrap: wrap; }
    .sw-sim-transport .sw-btn { flex: 0 0 auto; padding: 6px 10px; }
    .sw-sim-time { font-size: 11px; }
    .sw-sim-piece-count { font-size: 11px; }
    .sw-sim-panel, .sw-sim-piece, .sw-sim-pieces { top: 124px; bottom: 112px; }
}

.sw-sim-wood-label { position: absolute; z-index: 2; pointer-events: none; box-sizing: border-box; padding: 2px 4px; color: #382a1e; font-family: Arial, sans-serif; font-size: 10px; line-height: 12px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sw-sim-sheet-label strong, .sw-sim-sheet-label > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.sw-sim-sheet-label strong { font-size: 10px; font-weight: 600; }
.sw-sim-sheet-label > span { font-size: 9px; }

.sw-sim-piece-swatch { display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.3); border-radius: 2px; }
.sw-sim-piece-swatch.sw-sim-swatch-unknown { border-style: dashed; }
.sw-sim-piece-source { font-size: 12px; }

.sw-sim-machine-select { display: grid; gap: 5px; }
.sw-sim-machine-current { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.sw-sim-machine-state { font-size: 12px; }
.sw-sim-machine-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sw-sim-machine-progress progress { width: 100%; min-width: 0; height: 10px; accent-color: var(--brand-primary); }
.sw-sim-command-percent { font-size: 12px; min-width: 32px; }
.sw-sim-panel h4 { font-size: 13px; margin: 14px 0 6px; }
.sw-sim-command { border-top: 1px solid var(--sw-n-200); font-size: 12px; }
.sw-sim-command > summary { cursor: pointer; padding: 9px 0; display: grid; grid-template-columns: 44px 1fr auto; gap: 4px 6px; list-style: none; }
.sw-sim-command > summary::after { content: '⌄'; grid-column: 3; grid-row: 1; }
.sw-sim-command[open] > summary::after { content: '⌃'; }
.sw-sim-command > summary::-webkit-details-marker { display: none; }
.sw-sim-command time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sw-sim-command-target { grid-column: 2 / -1; overflow-wrap: anywhere; }
.sw-sim-command-status { grid-column: 2 / -1; color: var(--text-muted); }
.sw-sim-command[data-state="ACTIVE"] > summary { color: var(--brand-primary); background: var(--sw-n-50); }
.sw-sim-command-detail { padding: 0 6px 9px; overflow-wrap: anywhere; }
.sw-sim-command-detail h5 { font-size: 12px; margin: 8px 0; }
.sw-sim-command-params { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4px 10px; margin: 0; }
.sw-sim-command-params dt, .sw-sim-command-params dd { margin: 0; overflow-wrap: anywhere; }


.sw-sim-label-preview { margin: 10px 0; display: grid; gap: 6px; }
.sw-sim-label-preview img { width: 100%; max-width: 280px; height: auto; background: #fff; border: 1px solid var(--sw-n-200); border-radius: 4px; }
.sw-sim-label-preview figcaption { color: var(--text-muted); font: 10px monospace; overflow-wrap: anywhere; }

.sw-sim-piece-pick { flex: 0 0 auto; width: 100%; font-size: 12px; margin-top: 8px; }
.sw-sim-inline-preview { margin: 8px 0; }
.sw-sim-inline-preview .sw-sim-piece-view { height: 210px; background: var(--sw-n-50); border-radius: 6px; overflow: hidden; }
.sw-sim-inspection-status { margin: 6px 0; font-size: 11px; }
.sw-sim-piece-row[data-selected="true"] > summary { background: rgba(var(--sw-shadow-rgb), .04); }
.sw-sim-pieces > .sw-sim-panel-head { flex-shrink: 0; }
@media (max-width: 680px) { .sw-sim-inline-preview .sw-sim-piece-view { height: 160px; } }

.sw-sim-transport .sw-sim-toggle { flex-basis: 42px; width: 42px; height: 42px; border-radius: 50%; background: var(--sw-brand-500, #354777); color: #fff; font-size: 19px; box-shadow: 0 2px 5px #0002; }
.sw-sim-transport .sw-sim-toggle:hover { background: #29395f; }

.sw-sim-zone-label {
 position:absolute;transform:translateX(-50%);pointer-events:none;
 padding:2px 5px;border-radius:3px;background:rgba(255,250,235,.92);
 color:var(--sw-ink-800,#243640);font:700 10px/14px sans-serif;letter-spacing:.08em;
}

.sw-sim-completion { margin: 3px 0 4px; font-size: 11px; line-height: 1.3; color: var(--sw-n-600); }
.sw-sim-completion[data-state="COMPLETE"] { color: #27704a; }
.sw-sim-completion[data-state="BLOCKED"], .sw-sim-completion[data-state="INCOMPLETE"] { color: #9b402d; font-weight: 600; }

.sw-production-return { margin:8px 0 14px; }

.sw-production-export:disabled { opacity:.5; cursor:not-allowed; }


.sw-piece-cmds { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }

.sw-hardware-nav { display:flex; align-items:center; gap:8px; }
.sw-hardware-nav select { min-width:0; flex:1; }
.sw-hardware-mode { display:flex; gap:10px; align-items:center; margin:10px 0; cursor:pointer; }
.sw-hardware-mode input { flex:0 0 auto; accent-color:var(--sw-ink-600); }
.sw-hardware-stock-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.sw-hardware-page-head { display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.sw-hardware-page-head .sw-home-title { margin:0; }
.sw-hardware-page-head .sw-muted { max-width:840px; line-height:1.55; }
.sw-hardware-back { display:inline-flex; align-items:center; gap:8px; color:var(--text-muted); font-size:13px; text-decoration:none; }
.sw-hardware-back:hover { color:var(--sw-ink-600); }
.sw-hardware-filters { padding:20px; border:1px solid var(--sw-n-200); border-radius:14px; background:var(--sw-white); box-shadow:0 2px 8px rgba(var(--sw-shadow-rgb),.025); }
.sw-hardware-filter-row { display:grid; grid-template-columns:minmax(240px,2fr) minmax(180px,1fr) minmax(200px,1.2fr); gap:16px; align-items:end; }
.sw-hardware-filter-row > label { display:flex; flex-direction:column; gap:7px; min-width:0; }
.sw-hardware-filter-row > label > span:first-child { color:var(--text-muted); font-size:12px; font-weight:600; line-height:1.4; }
.sw-hardware-filter-row select, .sw-hardware-search-box { box-sizing:border-box; width:100%; height:44px; border:1px solid var(--sw-n-300); border-radius:9px; background:var(--sw-white); transition:border-color .15s,box-shadow .15s; }
.sw-hardware-filter-row select { padding:0 12px; color:var(--text-dark); font:inherit; font-size:14px; cursor:pointer; }
.sw-hardware-search-box { display:flex; align-items:center; gap:10px; padding:0 13px; }
.sw-hardware-search-box i { color:var(--text-muted); font-size:14px; flex:0 0 auto; }
.sw-hardware-search-box input { box-sizing:border-box; width:100%; min-width:0; height:100%; padding:0; margin:0; border:0; border-radius:0; outline:none; background:transparent; color:var(--text-dark); font:inherit; font-size:14px; }
.sw-hardware-search-box input::placeholder { color:var(--text-muted); }
.sw-hardware-search-box:focus-within, .sw-hardware-filter-row select:focus-visible { border-color:var(--sw-ink-500); outline:none; box-shadow:0 0 0 3px rgba(var(--sw-ink-rgb),.10); }
.sw-hardware-scope { margin-top:16px; padding-top:14px; border-top:1px solid var(--sw-n-100); }
.sw-hardware-scope label { display:inline-flex; align-items:center; gap:9px; margin:0; color:var(--text-dark); font-size:13px; font-weight:500; cursor:pointer; }
.sw-hardware-scope input { appearance:none; position:relative; flex:0 0 auto; width:34px; height:20px; margin:0; border:1px solid var(--sw-n-300); border-radius:20px; background:var(--sw-n-200); cursor:pointer; transition:background .15s,border-color .15s; }
.sw-hardware-scope input::after { content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:var(--sw-white); box-shadow:0 1px 2px rgba(var(--sw-shadow-rgb),.12); transition:transform .15s; }
.sw-hardware-scope input:checked { background:var(--sw-ink-600); border-color:var(--sw-ink-600); }
.sw-hardware-scope input:checked::after { transform:translateX(14px); }
.sw-hardware-scope input:focus-visible { outline:3px solid rgba(var(--sw-ink-rgb),.18); outline-offset:3px; }
.sw-hardware-catalog { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; }
.sw-hardware-catalog li { border:1px solid var(--sw-n-200); border-radius:11px; padding:14px 16px; background:var(--sw-white); }
.sw-hardware-catalog li:has(input:checked) { border-color:var(--sw-ink-200); }
.sw-hardware-catalog .sw-hardware-mode { margin:0; align-items:flex-start; }
.sw-hardware-catalog input { width:17px; height:17px; margin-top:2px; }
.sw-hardware-catalog strong { color:var(--text-dark); font-size:14px; font-weight:600; line-height:1.45; }
.sw-hardware-catalog small { display:block; margin-top:6px; color:var(--text-muted); font-size:12px; }
.sw-hardware-catalog .sw-hardware-product { overflow-wrap:anywhere; }
.sw-hardware-evidence { margin:12px 0 0 27px; display:flex; flex-direction:column; align-items:flex-start; gap:9px; }
.sw-hardware-registration { color:var(--text-muted); font-size:12px; line-height:1.5; }
.sw-hardware-evidence a { color:var(--sw-ink-600); display:inline-flex; align-items:center; gap:7px; font-size:12px; }
.sw-hardware-kit { margin:10px 0 0 27px; font-size:12px; line-height:1.5; overflow-wrap:anywhere; min-width:0; }
.sw-hardware-kit summary { cursor:pointer; color:var(--sw-ink-600); }
.sw-hardware-kit h4 { margin:8px 0 2px; font-size:12px; font-weight:600; }
.sw-hardware-kit ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:3px; }
.sw-hardware-catalog .sw-hardware-kit li { border:0; border-radius:0; padding:0; background:none; }
.sw-hardware-kit a { color:var(--sw-ink-600); }
.sw-hardware-kit li > a:last-child:not(:first-child) { margin-left:4px; }
.sw-hardware-kit p { margin:6px 0 0; }
.sw-eng-fly-body .sw-hardware-kit { margin:8px 8px 0; }
.sw-hardware-unavailable { color:var(--text-dark); background:var(--sw-n-100); border:1px solid var(--sw-n-200); border-radius:8px; padding:12px 16px; }
.sw-hardware-save { position:sticky; bottom:0; display:flex; gap:18px; align-items:center; margin-top:20px; padding:14px 0; border-top:1px solid var(--sw-n-200); background:var(--sw-white); }
.sw-hardware-save .sw-btn:disabled { background:var(--sw-n-200); color:var(--text-muted); box-shadow:none; cursor:default; }
.sw-hardware-save p { margin:0; color:var(--text-muted); font-size:13px; }
@media (max-width:1000px) {
    .sw-hardware-filter-row { grid-template-columns:1fr 1fr; }
    .sw-hardware-search { grid-column:1 / -1; }
}
@media (max-width:640px) {
    .sw-hardware-filters { padding:16px; }
    .sw-hardware-filter-row { grid-template-columns:minmax(0,1fr); gap:13px; }
    .sw-hardware-search { grid-column:auto; }
    .sw-hardware-catalog { grid-template-columns:minmax(0,1fr); }
}

.sw-ws-subnav {
	display: none;
}
@media (max-width: 768px) {
	.sw-ws-subnav {
		display: flex;
		gap: 6px;
		align-items: center;
		overflow-x: auto;
		margin: 0 -20px 12px;
		padding: 4px 20px 8px;
		scrollbar-width: none;
	}
	.sw-ws-subnav a {
		flex: 0 0 auto;
		padding: 6px 12px;
		border-radius: 999px;
		background: var(--sw-white);
		border: 1px solid var(--sw-n-200);
		color: var(--sw-ink-700);
		font-size: 13px;
		text-decoration: none;
		white-space: nowrap;
	}
	.sw-ws-subnav a.active {
		background: var(--sw-ink-600);
		border-color: var(--sw-ink-600);
		color: var(--sw-white);
	}
	.sw-ws-subnav-group {
		flex: 0 0 auto;
		font-size: 10px;
		font-weight: 700;
		letter-spacing: .08em;
		text-transform: uppercase;
		color: var(--sw-n-500);
		padding-left: 6px;
	}
}
.sw-ws-crumbs {
	font-size: 13px;
	color: var(--sw-n-500);
	margin-bottom: 4px;
}
.sw-ws-crumbs a {
	color: var(--sw-n-500);
	text-decoration: none;
}
.sw-ws-crumbs span {
	color: var(--sw-ink-700);
}
.sw-ws-eyebrow {
	margin: 12px 0 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #b07a3a;
}
.sw-ws-head .sw-home-title {
	margin-top: 4px;
}
.sw-ws-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	margin: 16px 0 24px;
}
.sw-ws-group {
	background: var(--sw-white);
	border: 1px solid var(--sw-n-200);
	border-radius: 14px;
	padding: 22px;
}
.sw-ws-group-title {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
	margin: 0 0 6px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--sw-n-200);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--sw-n-900);
	cursor: default;
}
.sw-ws-group-title > span:last-child {
	min-width: 0;
	overflow-wrap: anywhere;
}
.sw-ws-title-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 4px;
}
.sw-ws-switcher {
	position: relative;
	min-width: 0;
}
.sw-ws-switcher-title {
	display: flex;
	align-items: center;
	gap: 10px;
	list-style: none;
	cursor: pointer;
	padding: 2px 10px 2px 2px;
	border-radius: 12px;
}
.sw-ws-switcher-title::-webkit-details-marker {
	display: none;
}
.sw-ws-switcher-title:hover,
.sw-ws-switcher[open] > .sw-ws-switcher-title {
	background: var(--sw-n-100, #ece9e2);
}
.sw-ws-switcher-title:focus-visible {
	outline: 3px solid #cc9656;
	outline-offset: 2px;
}
.sw-ws-switcher-title .sw-home-title {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}
.sw-ws-switcher-title .sw-chip,
.sw-ws-switcher-item .sw-chip {
	cursor: inherit;
	padding: 2px 10px;
}
.sw-ws-switcher-caret {
	font-size: 14px;
	color: var(--sw-n-500);
}
.sw-ws-switcher-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 40;
	width: max-content;
	min-width: 320px;
	max-width: min(520px, calc(100vw - 32px));
	padding: 8px;
	background: var(--sw-white);
	border: 1px solid var(--sw-n-200);
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
}
.sw-ws-switcher-menu form {
	margin: 0;
}
.sw-ws-switcher-heading {
	margin: 4px 10px 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--sw-n-500);
}
.sw-ws-switcher-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 10px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--sw-n-900);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.sw-ws-switcher-item:hover:not(:disabled),
.sw-ws-switcher-item:focus-visible {
	background: var(--sw-n-100, #f3f1ec);
}
.sw-ws-switcher-item:disabled {
	cursor: default;
	opacity: 1;
}
.sw-ws-switcher-item--current .sw-ws-switcher-name {
	font-weight: 700;
}
.sw-ws-switcher-check {
	flex: 0 0 16px;
	color: #b07a3a;
	font-weight: 700;
	text-align: center;
}
.sw-ws-switcher-name {
	min-width: 0;
	overflow-wrap: anywhere;
}
.sw-ws-switcher-pending {
	margin-left: auto;
	font-size: 12px;
	font-weight: 600;
	color: #8a5c24;
	white-space: nowrap;
}
.sw-ws-switcher-sep {
	border: 0;
	border-top: 1px solid var(--sw-n-200);
	margin: 6px 4px;
}
.sw-ws-switcher-setup {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 12px;
	border-radius: 999px;
	background: #f5e9d6;
	color: #8a5c24;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.sw-ws-switcher-setup::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #b07a3a;
}
.sw-ws-switcher-setup:hover {
	text-decoration: underline;
}
.sw-ws-registry {
	box-sizing: border-box;
	width: calc(100vw - 32px);
	max-width: 680px;
	max-height: 88vh;
	margin: auto;
	padding: 22px;
	border: 1px solid var(--sw-n-200);
	border-radius: 18px;
	background: var(--sw-white);
	color: var(--sw-n-900);
	overflow: auto;
}
.sw-ws-registry::backdrop {
	background: rgba(24, 31, 45, .45);
}
.sw-ws-registry-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}
.sw-ws-registry-head h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	color: var(--sw-n-900);
}
.sw-ws-registry-close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 18px;
	cursor: pointer;
}
.sw-ws-registry-close:hover {
	background: var(--sw-n-100, #f3f1ec);
}
.sw-ws-registry-add {
	padding-top: 14px;
	border-top: 1px solid var(--sw-n-200);
}
.sw-ws-registry-add h4 {
	margin: 0;
	font-size: 16px;
}
.sw-ws-registry > .sw-muted {
	margin: 0 0 12px;
	font-size: 13px;
}
.sw-ws-registry-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}
.sw-ws-registry-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--sw-n-200);
	border-radius: 10px;
	margin-bottom: 8px;
}
.sw-ws-registry-row--current {
	border-left: 3px solid #b07a3a;
}
.sw-ws-registry-name {
	min-width: 0;
	overflow-wrap: anywhere;
}
.sw-ws-registry-current {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #b07a3a;
}
.sw-ws-registry-row .sw-chip {
	cursor: default;
}
.sw-ws-registry-pending {
	font-size: 13px;
	font-weight: 600;
	color: #b07a3a;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.sw-ws-registry-pending:hover {
	color: #8a5c24;
}
.sw-ws-registry-switch {
	margin-left: auto;
}
.sw-ws-registry-form {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 640px;
}
.sw-ws-registry-form .sw-prod-field .sw-ws-registry-name-input {
	font-size: 18px;
	padding: 10px 12px;
}
.sw-ws-registry-code-row {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 12px;
}
.sw-ws-registry-code-field {
	flex: 0 0 auto;
}
.sw-ws-registry-form .sw-prod-field .sw-ws-registry-code-input {
	width: 8ch;
	min-width: 0;
	text-transform: uppercase;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 15px;
	letter-spacing: .06em;
}
.sw-ws-registry-code-row > small {
	flex: 1 1 220px;
	padding-bottom: 8px;
	font-size: 13px;
}
.sw-ws-registry-form > .sw-muted {
	margin: 0;
	font-size: 13px;
}
.header-workshop {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 3px;
	font-size: 13px;
	color: var(--sw-n-500);
}
@media (max-width: 600px) {
	.sw-ws-registry-switch {
		margin-left: 0;
		width: 100%;
	}
	.sw-ws-registry-switch .sw-btn {
		width: 100%;
	}
}
.sw-ws-group > .sw-muted {
	margin: 8px 0 4px;
	font-size: 13px;
	color: var(--sw-n-600);
}
.sw-ws-group-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: #f3e6d4;
	color: #b07a3a;
	font-size: 14px;
}
.sw-ws-subject {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 12px 0;
	border-top: 1px solid var(--sw-n-200);
	text-decoration: none;
	color: var(--sw-ink-700);
	position: relative;
}
.sw-ws-subject::after {
	content: '\2197';
	position: absolute;
	right: 2px;
	top: 14px;
	color: #b07a3a;
}
.sw-ws-subject span {
	font-size: 13px;
	color: var(--sw-n-600);
}
.sw-ws-subject:hover strong {
	text-decoration: underline;
}
.sw-ws-subject--missing {
    border-left: 3px solid var(--sw-danger-600);
    padding-left: 8px;
}

.sw-ws-subject--missing span {
    color: var(--sw-danger-600);
}

.sw-ws-missing-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--sw-danger-600);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.sw-ws-subject:focus-visible {
	outline: 2px solid var(--sw-ink-500);
	outline-offset: 2px;
	border-radius: 4px;
}
.sw-ws-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 260px;
	gap: 16px;
	align-items: start;
}
@media (max-width: 1068px) {
	.sw-ws-layout {
		grid-template-columns: minmax(0, 1fr);
	}
}
.sw-ws-inspector {
	border: 1px solid var(--sw-n-200);
	border-radius: 12px;
	padding: 14px;
	background: var(--sw-white);
}
.sw-ws-inspector h4 {
	margin: 0 0 8px;
}
.sw-ws-inspector .sw-prod-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 8px;
}
.sw-ws-inspector-title {
	display: block;
	margin-bottom: 8px;
}
.sw-ws-rotation {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 8px;
}
.sw-ws-configure {
	display: inline-block;
	text-decoration: none;
}
.sw-ws-code {
	display: inline-block;
	min-width: 38px;
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--sw-ink-600);
	color: var(--sw-white);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
	text-align: center;
}
.sw-fp-machine rect.sw-fp-body {
	fill: #35454f;
	stroke: #5b5446;
}
.sw-fp-machine rect.sw-fp-bed {
	fill: #d0dadb;
	stroke: none;
}
.sw-fp-svg .sw-fp-machine g.sw-fp-glyph rect,
.sw-fp-glyph polygon {
	fill: #718990;
	stroke: none;
}
.sw-fp-glyph circle.sw-fp-glyph-disc {
	fill: #e7a74c;
}
.sw-fp-machine.sw-fp-selected rect.sw-fp-body {
	stroke: #b07a3a;
}
.sw-fp-machine.sw-fp-bad rect.sw-fp-body {
	stroke: var(--sw-danger-600);
}
.sw-fp-machine.sw-fp-offline rect.sw-fp-body {
	fill: var(--sw-n-500);
}
.sw-fp-expedition rect.sw-fp-body {
	fill: #f3e6d4;
	stroke: #b07a3a;
	stroke-dasharray: 120 80;
}
.sw-fp-zone.sw-fp-zone-in {
	fill: rgba(156, 199, 232, 0.55);
	stroke: #7aa9cf;
}
.sw-fp-zone.sw-fp-zone-out {
	fill: rgba(242, 195, 139, 0.55);
	stroke: #d79a52;
}
.sw-fp-zone-word-in {
	fill: #3f6f96;
}
.sw-fp-zone-word-out {
	fill: #9a5e1c;
}
.sw-fp-size {
	fill: var(--sw-n-600);
	pointer-events: none;
}
.sw-fp-machine:not(.sw-fp-expedition) > .sw-fp-label {
	fill: var(--sw-white);
	stroke: #35454f;
	stroke-width: 60;
	paint-order: stroke;
	font-weight: 700;
}
.sw-ws-expedition-btn {
	align-self: flex-end;
}

.sw-me-back {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	margin: 8px 0 12px;
	font-size: 13px;
}
.sw-me-back .sw-back {
	color: #b07a3a;
	text-decoration: none;
}
.sw-me-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border-radius: 14px 14px 0 0;
	background: var(--sw-n-100);
}
.sw-me-code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	height: 64px;
	padding: 0 10px;
	border-radius: 12px;
	background: var(--sw-ink-600);
	color: var(--sw-white);
	font: 700 20px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sw-me-title {
	flex: 1 1 220px;
	min-width: 0;
}
.sw-me-title h2 {
	margin: 0 0 4px;
	font-size: 26px;
	color: var(--sw-ink-700);
}
.sw-me-title p {
	margin: 0;
}
.sw-me-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}
.sw-me-actions .sw-btn {
	margin-top: 0;
	text-decoration: none;
}
.sw-me-form .sw-me-new {
	margin-top: 12px;
}
.sw-me {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	padding: 16px;
	background: var(--sw-n-100);
	border-radius: 0 0 14px 14px;
}
.sw-me-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-self: start;
	position: sticky;
	top: 100px;
}
.sw-me-nav-caption {
	margin: 4px 12px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--sw-n-500);
}
.sw-me-nav button {
	position: relative;
	text-align: left;
	padding: 10px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--sw-n-600);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
}
.sw-me-nav button:hover {
	background: rgba(var(--sw-ink-rgb), .06);
}
.sw-me-nav button.is-active {
	background: rgba(var(--sw-ink-rgb), .12);
	color: var(--sw-ink-700);
	font-weight: 600;
}
.sw-me-nav button.has-issue::after {
	content: '';
	position: absolute;
	right: 10px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-radius: 50%;
	background: var(--sw-danger-600);
}
.sw-me-panels {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}
.sw-me-panel {
	background: var(--sw-white);
	border: 1px solid var(--sw-n-200);
	border-radius: 14px;
	padding: 20px 24px;
}
.sw-me-panel h3 {
	margin: 0 0 4px;
	font-size: 20px;
	color: var(--sw-ink-700);
}
.sw-me-panel > .sw-muted:first-of-type {
	margin-top: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--sw-n-200);
}
.sw-me-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.sw-me-remove-row {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--sw-n-200);
}
.sw-me.sw-offline .sw-me-panels {
	opacity: .75;
}
.sw-me-edit-floorplan {
	display: inline-block;
	margin-top: 8px;
	text-decoration: none;
}
@media (max-width: 768px) {
	.sw-me-head {
		padding: 12px;
	}
	.sw-me-code {
		min-width: 52px;
		height: 52px;
		font-size: 17px;
	}
	.sw-me-actions {
		margin-left: 0;
		width: 100%;
		justify-content: flex-end;
	}
	.sw-me {
		grid-template-columns: minmax(0, 1fr);
		padding: 12px;
	}
	.sw-me-nav {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}
	.sw-me-nav-caption {
		display: none;
	}
	.sw-me-nav button {
		padding: 8px 12px;
		font-size: 14px;
	}
	.sw-me-panel {
		padding: 16px;
	}
}

.sw-pieces { gap: 10px; min-height: calc(100vh - 90px); }
.sw-pieces-mode { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--sw-n-100, #f1f1ee); color: var(--text-dark); font-size: 12px; font-weight: 600; }
.sw-convert { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.sw-convert-counts { font-weight: 600; }
.sw-convert-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sw-pieces-conflict { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; background: var(--sw-danger-50, #fdecea); color: var(--sw-danger-600, #a33); font-size: 13px; }
.sw-pieces-tools { display: flex; gap: 4px; padding: 6px; border: 1px solid var(--border-light, var(--sw-n-150)); border-radius: 10px; background: var(--sw-white); overflow-x: auto; scrollbar-width: thin; }
.sw-pieces-tools button { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 7px 10px; font-size: 13px; cursor: pointer; color: var(--text-dark); }
.sw-pieces-tools button:hover:not(:disabled) { background: var(--sw-n-100); }
.sw-pieces-tools button.is-active { background: var(--sw-ink-600); color: var(--sw-white); }
.sw-pieces-tools button:disabled { opacity: 0.35; cursor: default; }
.sw-pieces-tools button .sw-tab-warn { margin-left: 2px; }
.sw-pieces-tool-gap { width: 1px; background: var(--border-light, var(--sw-n-150)); margin: 4px 6px; flex-shrink: 0; }
.sw-pieces-list, .sw-pieces-inspector { border: 1px solid var(--border-light, var(--sw-n-150)); border-radius: 10px; background: var(--sw-white); padding: 10px 12px; overflow: auto; min-height: 0; }
.sw-pieces-panel-heading { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.sw-pieces-panel-heading button { border: 0; background: transparent; font-size: 18px; cursor: pointer; }
#sw-pieces-list-items { display: flex; flex-direction: column; gap: 3px; }
.sw-pieces-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 6px; width: 100%; border: 1px solid transparent; border-radius: 7px; background: transparent; padding: 7px 8px; }
.sw-pieces-row-select { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; align-self: stretch; justify-content: center; border: 0; background: transparent; color: inherit; text-align: left; padding: 0 12px 0 0; cursor: pointer; }
.sw-pieces-row-select:focus-visible { outline: 2px solid var(--sw-ink-500); outline-offset: 3px; border-radius: 4px; }
.sw-pieces-row.is-material-dimmed > .sw-pieces-row-select, .sw-pieces-row.is-material-dimmed > .sw-piece-material { opacity: 0.4; }
.sw-piece-material { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; width: 64px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 3px; cursor: pointer; }
.sw-piece-material:hover, .sw-piece-material[aria-expanded="true"] { border-color: var(--sw-n-300); background: var(--sw-white); }
.sw-piece-material:focus-visible { outline: 2px solid var(--sw-ink-500); outline-offset: 2px; }
.sw-piece-material:disabled { cursor: default; }
.sw-piece-material-square { width: 27px; height: 27px; border: 1px solid var(--sw-n-300); border-radius: 4px; overflow: hidden; }
.sw-piece-material-square .sw-mat-swatch, .sw-piece-material-square img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sw-piece-material-short { display: block; width: 100%; font-size: 10px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.sw-piece-material-picker { grid-column: 1 / -1; min-width: 0; padding-top: 3px; }
.sw-piece-material-picker select { width: 100%; min-width: 0; max-width: 100%; font-size: 12px; }
.sw-new-material { display: grid; gap: 4px; min-width: 0; padding: 6px 0; font-size: 12px; }
.sw-new-material input[type="text"] { width: 100%; min-width: 0; font-size: 13px; }
.sw-new-material input[type="color"] { width: 48px; height: 28px; padding: 0; border: 1px solid var(--sw-n-300); border-radius: 4px; background: none; }
.sw-new-material small { color: var(--sw-n-600); }
.sw-new-material small.is-missing { color: #b42318; }
.sw-new-material-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sw-material-dialog { box-sizing: border-box; margin: auto; height: fit-content; max-height: calc(100dvh - 32px); overflow: auto; width: min(380px, calc(100vw - 32px)); padding: 16px 20px; border: 1px solid var(--sw-n-200); border-radius: 12px; background: var(--sw-white); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); }
.sw-material-dialog::backdrop { background: rgba(20, 24, 33, 0.35); }
.sw-material-dialog .sw-new-material { padding: 0; font-size: 13px; align-content: start; }
.sw-material-dialog h3 { margin: 0 0 8px; font-size: 16px; }
.sw-material-dialog.sw-material-dialog-edit { width: min(900px, calc(100vw - 32px)); padding: 0; border-radius: 18px; }
.sw-mat-editor { color: var(--text-dark); font-size: 14px; line-height: 1.45; }
.sw-me-header { padding: 24px 28px 20px; display: flex; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--sw-n-200); }
.sw-material-dialog .sw-me-header h3 { margin: 0 0 5px; font-size: 23px; letter-spacing: -.6px; }
.sw-me-header p, .sw-me-note, .sw-me-spec { margin: 0; color: var(--text-muted); font-size: 13px; }
.sw-me-close { margin-left: auto; padding: 0 5px; border: 0; background: none; color: var(--text-muted); font-size: 26px; cursor: pointer; }
.sw-me-mapping { display: grid; grid-template-columns: minmax(0,1fr) 48px minmax(0,1fr); }
.sw-me-column { padding: 28px; min-width: 0; }
.sw-me-real { background: #f8faf9; border-left: 1px solid var(--sw-n-200); }
.sw-me-eyebrow { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px; }
.sw-mat-editor h4 { margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.sw-me-sample { position: relative; height: 132px; margin: 18px 0 20px; border-radius: 10px; overflow: hidden; }
.sw-me-sample > .sw-mat-swatch { display: block; width: 100%; height: 100%; border-radius: inherit; }
.sw-me-sample > span:not(.sw-mat-swatch) { position: absolute; bottom: 10px; left: 12px; padding: 4px 7px; background: #ffffffdb; border-radius: 5px; font-size: 10px; color: #645763; }
.sw-me-column label { display: block; margin: 14px 0 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.sw-me-column input[type="text"] { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--sw-n-300); border-radius: 8px; background: var(--sw-white); color: var(--text-dark); font: inherit; }
.sw-me-color { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--sw-n-300); border-radius: 8px; }
.sw-me-color input { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.sw-me-color span { font-size: 12px; color: var(--text-muted); }
.sw-me-size { display: inline-block; margin-top: 12px; padding: 4px 8px; border-radius: 5px; background: var(--sw-n-100); color: var(--text-muted); font-size: 12px; }
.sw-me-bridge { display: grid; place-items: center; background: linear-gradient(90deg,white 50%,#f8faf9 50%); }
.sw-me-bridge span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #dce3df; border-radius: 50%; background: white; color: #80908a; font-size: 22px; }
.sw-me-spec { margin-top: 6px; }
.sw-me-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.sw-mat-editor .sw-btn { font-size: 13px; border-radius: 8px; padding: 10px 14px; }
.sw-me-note { margin-top: 18px; }
.sw-me-empty { margin-top: 18px; padding: 24px 18px; border: 1px dashed #d9c6a7; border-radius: 10px; background: #fffcf6; }
.sw-me-empty p { font-size: 13px; color: #84725a; }
.sw-me-summary { padding: 15px 28px; border-top: 1px solid var(--sw-n-200); background: #f8f9fb; color: var(--text-muted); font-size: 13px; }
.sw-me-usage { padding: 14px 28px; font-size: 13px; color: var(--text-muted); }
.sw-me-usage summary { cursor: pointer; }
.sw-me-usage ul { margin-bottom: 0; }
.sw-me-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 28px; border-top: 1px solid var(--sw-n-200); background: #fcfcfd; }
.sw-me-footer > div { display: flex; gap: 8px; }
.sw-me-footer > .sw-btn-danger { border: 0; background: transparent; padding-left: 0; font-size: 12px; }
.sw-me-remove, .sw-me-error { margin: 0; padding: 16px 28px; background: #fff3f0; color: #9d3029; }
.sw-me-remove p { margin: 0 0 10px; }
.sw-me-remove button + button { margin-left: 8px; }
@media(max-width:700px) {
 .sw-me-mapping { grid-template-columns: minmax(0,1fr); }
 .sw-me-bridge { display: none; }
 .sw-me-real { border-left: 0; border-top: 1px solid var(--sw-n-200); }
 .sw-me-column, .sw-me-header { padding: 20px; }
 .sw-me-sample { height: 90px; }
 .sw-me-footer { padding: 15px 20px; flex-wrap: wrap; }
 .sw-me-footer > div { margin-left: auto; }
 .sw-me-summary, .sw-me-usage { padding: 14px 20px; }
}
.sw-mat-editor-label { margin-top: 8px; font-weight: 600; }
.sw-mat-editor-sheet { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sw-mat-editor-sheet > :first-child { flex: none; width: 28px; height: 28px; }
.sw-mat-palette-edit { position: absolute; top: -7px; right: -7px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 1px solid var(--sw-n-200); border-radius: 50%; background: var(--sw-white); color: var(--text-dark); font-size: 11px; line-height: 1; cursor: pointer; }
.sw-mat-palette-edit:hover { background: var(--sw-n-100); }
.sw-mat-palette-edit:focus-visible { outline: 2px solid var(--sw-accent, #445987); outline-offset: 1px; }
.sw-mat-palette-swatch[aria-pressed="false"] ~ .sw-mat-palette-edit { display: none; }
.sw-mat-search-for { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--sw-n-50); font-size: 13px; }
.sw-mat-search-for-color { flex: none; width: 18px; height: 18px; border: 1px solid var(--sw-n-300); border-radius: 4px; }
.sw-mat-editor-uses { margin-top: 6px; }
.sw-mat-editor-remove-hint { margin-top: 8px; padding: 8px; border-radius: 8px; background: #fff4e5; }
.sw-pieces-row.is-material-drop-target { border-color: #229a54; background: #edf8f0; box-shadow: inset 0 0 0 1px #229a54; }
.sw-pieces.is-material-dragging .sw-pieces-view { outline: 2px dashed #229a54; outline-offset: -2px; }
.sw-pieces.is-material-dragging .sw-pieces-view-hint { opacity: 0.3; }
.sw-pieces-row:hover { background: var(--sw-n-50); }
.sw-pieces-row.is-selected { border-color: var(--sw-ink-500); background: var(--sw-n-100); }
.sw-pieces-row-name { font-size: 13px; font-weight: 600; }
.sw-pieces-row small { font-size: 11px; color: var(--text-muted); }
.sw-pieces-warn { position: absolute; top: 9px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #d9822b; }
.sw-pieces-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.sw-pieces-view { position: relative; border-radius: 10px; overflow: hidden; background: #eef1ec; min-height: 0; touch-action: none; }
.sw-pieces-view canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.sw-pieces[data-tool="board"] .sw-pieces-view canvas { cursor: crosshair; }
.sw-pieces[data-tool="move"] .sw-pieces-view canvas { cursor: move; }
.sw-pieces-view-hint { position: absolute; z-index: 1; top: 10px; left: 12px; right: 12px; margin: 0; font-size: 12px; color: #5f6d5a; pointer-events: none; }
.sw-pieces-orientation { position: absolute; top: 8px; right: 8px; width: 96px; height: 96px; z-index: 2; pointer-events: none; border-radius: 50%; background: rgba(var(--sw-white-rgb), 0.8); }
.sw-pieces-orientation line { stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.sw-pieces-orientation text { fill: currentColor; font-size: 12px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.sw-pieces-orientation [data-axis="x"] { color: var(--sw-danger-500); }
.sw-pieces-orientation [data-axis="y"] { color: var(--sw-success-500); }
.sw-pieces-orientation [data-axis="z"] { color: var(--sw-ink-500); }
.sw-pieces-view-hint { right: 112px; }
.sw-pieces-axis { position: absolute; z-index: 1; top: 34px; left: 12px; font-size: 11px; font-weight: 600; background: #ffffffcc; border-radius: 4px; padding: 3px 7px; }
.sw-pieces-info-chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: min(280px, calc(100% - 16px)); padding: 0 16px 0 12px; border: 1px solid var(--sw-n-300); border-radius: 22px; background: var(--sw-white); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); color: var(--text-dark); font-size: 14px; font-weight: 600; cursor: pointer; }
.sw-pieces-info-chip:hover { border-color: var(--sw-primary-600, #34487e); }
.sw-pieces-info-chip i { flex: 0 0 auto; font-size: 16px; color: var(--sw-primary-600, #34487e); }
.sw-pieces-info-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-pieces-nowebgl { position: absolute; z-index: 2; inset: 40% 20px auto; text-align: center; }
.sw-pieces-controls { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.sw-pieces-controls > * { pointer-events: auto; }
.sw-pieces-measure { align-self: flex-end; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; background: #fffffff2; border-radius: 7px; padding: 8px; box-sizing: border-box; }
.sw-pieces-measure-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.sw-pieces-measure label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.sw-pieces-measure input { width: 64px; min-width: 0; border: 1px solid var(--sw-n-300); border-radius: 5px; padding: 5px; font-size: 13px; box-sizing: border-box; }
.sw-pieces-measure input[aria-invalid="true"] { border-color: var(--sw-danger-600); }
.sw-pieces-measure small { color: var(--text-muted); }
.sw-pieces-measure .sw-btn { padding: 5px 8px; font-size: 12px; }
#sw-pieces-measure-apply { margin: 0 0 0 auto; border: 1px solid var(--sw-ink-500); }
.sw-pieces-measure.is-pending { box-shadow: 0 0 0 2px var(--sw-warning-500); }
.sw-pieces-measure.is-pending #sw-pieces-measure-apply { border-color: transparent; }
.sw-pieces-measure .sw-pieces-move-pending { flex-basis: 100%; order: 3; color: var(--sw-warning-700); font-weight: 600; }
.sw-pieces-measure.is-asking { animation: sw-move-ask 0.45s ease-out 2; }
@keyframes sw-move-ask { 50% { box-shadow: 0 0 0 7px rgba(var(--sw-warning-rgb), 0.45); } }
.sw-pieces-inspector h3 { font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 8px; }
.sw-pieces-inspector h4 { font-size: 12px; font-weight: 600; color: var(--text-dark); margin: 10px 0 6px; }
.sw-pieces-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; font-size: 12px; color: var(--text-muted); min-width: 0; }
.sw-pieces-field input, .sw-pieces-field select, .sw-pieces-field textarea { width: 100%; min-width: 0; border: 1px solid var(--sw-n-300); border-radius: 6px; padding: 7px 8px; font-size: 13px; color: var(--text-dark); background: var(--sw-white); }
#pi-name { box-sizing: border-box; font-family: inherit; line-height: 1.25; min-height: 0; max-height: none; resize: vertical; overflow-x: hidden; overflow-y: auto; overflow-wrap: anywhere; white-space: pre-wrap; }
.sw-pieces-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sw-pieces-fields.sw-pieces-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sw-pieces-panel-layer { border-top: 1px solid var(--sw-n-200); padding-top: 8px; margin-top: 8px; }
.sw-pieces-stock, .sw-pieces-rotation { font-size: 12px; color: var(--text-muted); margin: 2px 0 8px; }
.sw-pieces-geo { background: var(--sw-white); border: 1px solid var(--sw-n-300); border-radius: 10px; padding: 8px 10px 6px; margin-bottom: 10px; }
.sw-pieces-geo-unit { text-align: right; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.sw-pieces-geo-row { display: grid; grid-template-columns: 62px repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; margin-bottom: 6px; }
.sw-pieces-geo-row > span { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); overflow-wrap: anywhere; }
.sw-pieces-pf { display: flex; align-items: center; min-width: 0; height: 30px; border: 1px solid var(--sw-n-300); border-radius: 6px; background: var(--sw-white); padding-left: 6px; }
.sw-pieces-pf:focus-within { border-color: var(--accent, #34487e); box-shadow: 0 0 0 1px var(--accent, #34487e); }
.sw-pieces-pf i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-muted); width: 11px; flex: 0 0 auto; }
.sw-pieces-pf.is-x i { color: #c0504d; }
.sw-pieces-pf.is-y i { color: #4f9361; }
.sw-pieces-pf.is-z i { color: #4a62a8; }
.sw-pieces-pf input { flex: 1; width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 6px 0 2px; font-size: 13px; text-align: right; color: var(--text-dark); -moz-appearance: textfield; }
.sw-pieces-pf input::-webkit-outer-spin-button, .sw-pieces-pf input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sw-pieces-pf input:disabled { color: var(--text-muted); }
.sw-pieces-geo-pose { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--sw-n-200); padding-top: 6px; }
.sw-pieces-geo-pose svg { flex: 0 0 auto; }
.sw-pieces-geo-pose polygon { stroke: var(--sw-n-400, #a39d93); stroke-width: 1; }
.sw-pieces-geo-pose .is-top { fill: var(--sw-n-150, #efece6); }
.sw-pieces-geo-pose .is-front { fill: var(--sw-n-200, #e4e0d8); }
.sw-pieces-geo-pose .is-side { fill: var(--sw-n-300, #d6d1c7); }
.sw-pieces-geo-pose text { font-size: 7px; fill: var(--text-muted); }
.sw-pieces-geo-pose .sw-pieces-rotation { margin: 0; font-size: 11px; }
.sw-pieces-geo-pose .sw-pieces-rotation b { font-weight: 600; color: var(--text-dark); white-space: nowrap; }
.sw-pieces-geo-pose small { color: var(--text-muted); opacity: .8; }
.sw-pieces-mat-face { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--sw-n-300); border-radius: 10px; background: var(--sw-white); padding: 7px 8px; min-width: 0; }
.sw-pieces-mat-face:hover { border-color: var(--sw-n-400, #a39d93); }
.sw-pieces-mat-face:focus-within { border-color: var(--accent, #34487e); box-shadow: 0 0 0 1px var(--accent, #34487e); }
.sw-pieces-mat-face .sw-mat-swatch { width: 30px; height: 30px; border-radius: 6px; flex: 0 0 auto; }
.sw-pieces-mat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sw-pieces-mat-text b { font-size: 13px; font-weight: 600; color: var(--text-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-pieces-mat-text small { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-pieces-mat-text small.is-missing { color: #8a6d3b; }
.sw-pieces-mat-caret { color: var(--text-muted); font-size: 11px; }
.sw-pieces-field .sw-pieces-mat-face select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.sw-pieces-grain { display: flex; border: 1px solid var(--sw-n-300); border-radius: 7px; overflow: hidden; background: var(--sw-white); }
.sw-pieces-grain-choice { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 6px 4px; font-size: 12px; color: var(--text-muted); cursor: pointer; min-width: 0; }
.sw-pieces-grain-choice + .sw-pieces-grain-choice { border-left: 1px solid var(--sw-n-300); }
.sw-pieces-grain-choice span { font-size: 15px; line-height: 1; }
.sw-pieces-grain-choice.is-on { background: var(--sw-n-150, #e8ecf5); color: var(--text-dark); font-weight: 600; }
.sw-pieces-actions { display: flex; gap: 8px; margin-top: 14px; }
.sw-pieces-actions .sw-btn { flex: 1; }
.sw-pieces-check { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; font-size: 13px; color: var(--text-dark); }
.sw-pieces-check input { width: auto; height: auto; margin: 0; }
.sw-pieces-ops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-pieces-op { display: flex; flex-direction: column; gap: 4px; padding: 7px 8px; border: 1px solid var(--sw-n-200); border-radius: 6px; font-size: 12px; color: var(--text-dark); cursor: pointer; background: var(--sw-white); }
.sw-pieces-op.is-selected { border-color: #c0662a; box-shadow: 0 0 0 1px #c0662a inset; }
.sw-pieces-op small { color: var(--text-muted); }
.sw-pieces-op-actions { display: flex; gap: 6px; }
.sw-pieces-op-actions .sw-btn { flex: 1; padding: 4px 8px; font-size: 12px; }
.sw-pieces-owned { background: var(--sw-n-100, #f4f4f2); cursor: default; }
.sw-pieces-artwork-add { margin: 0 0 8px; }
.sw-pieces-surface-head label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sw-pieces-surface-line { font-size: 12px; margin: 0 0 6px; overflow-wrap: anywhere; }
.sw-pieces-section { border-top: 1px solid var(--sw-n-200); padding: 6px 0; }
.sw-pieces-section:first-of-type { border-top: 0; }
.sw-pieces-section-head { display: flex; align-items: center; gap: 4px; min-height: 30px; }
.sw-pieces-section-chevron { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; background: transparent; color: var(--text-dark); cursor: pointer; padding: 0; }
.sw-pieces-section-chevron span { width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent currentColor; transform: rotate(90deg); transition: transform 0.15s; }
.sw-pieces-section.is-collapsed .sw-pieces-section-chevron span { transform: none; }
.sw-pieces-section-chevron:hover:not(:disabled) { background: var(--sw-n-100, #f4f4f2); }
.sw-pieces-section-chevron:disabled { opacity: 0.25; cursor: default; }
.sw-pieces-section-title { flex: 1 1 auto; min-width: 0; font-size: 11px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
button.sw-pieces-section-title { border: 0; background: transparent; padding: 6px 0; text-align: left; cursor: pointer; font-family: inherit; }
.sw-pieces-section-title label:not(.sw-pieces-field) { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sw-pieces-section-title .sw-pieces-field { display: flex; width: 100%; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
.sw-pieces-section-head:has(.sw-pieces-field) { align-items: flex-end; }
.sw-pieces-section-head:has(.sw-pieces-field) .sw-pieces-section-chevron { margin-bottom: 6px; }
.sw-pieces-section-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--sw-n-200); color: var(--text-dark); font-size: 11px; text-align: center; letter-spacing: 0; }
.sw-pieces-section-summary { margin: 0 0 2px 28px; font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.sw-pieces-section-body { padding: 4px 0 4px 2px; }
.sw-pieces-section.is-off .sw-pieces-section-title { opacity: 0.85; }
.sw-pieces-nofn { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sw-pieces-nofn li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px dashed var(--sw-n-300); border-radius: 6px; font-size: 13px; color: var(--text-muted); }
.sw-pieces-nofn-help { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--sw-n-300); background: var(--sw-white); color: var(--text-dark); font-weight: 700; cursor: pointer; padding: 0; line-height: 1; }
.sw-pieces-nofn-help:hover { background: var(--sw-n-100, #f4f4f2); }
.sw-pieces-nofn-warning { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 8px; border-radius: 6px; background: #fff4e5; color: #8a4b00; font-size: 12px; }
.sw-pieces-op-nofn { display: block; flex-basis: 100%; color: #8a4b00; font-size: 11px; }
.sw-pieces-nofn-coverage { color: var(--sw-muted, #555); font-size: 13px; }
.sw-pieces-nofn-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-pieces-steps { display: grid; gap: 6px; margin: 0 0 8px; }
.sw-pieces-step { border: 1px solid var(--sw-n-200); border-radius: 8px; background: var(--sw-white); min-width: 0; }
.sw-pieces-step.is-open { border-color: var(--sw-n-300); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.sw-pieces-step-head { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 0; }
.sw-pieces-step-toggle { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; gap: 6px; padding: 7px 4px 7px 8px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--text-dark); font: inherit; }
.sw-pieces-step-chevron { flex: none; width: 0; height: 0; margin-top: 5px; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent currentColor; transition: transform 0.15s; }
.sw-pieces-step.is-open .sw-pieces-step-chevron { transform: rotate(90deg); }
.sw-pieces-step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-pieces-step-title { font-size: 12px; font-weight: 600; }
.sw-pieces-step-summary { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.sw-pieces-step-tools { flex: none; display: inline-flex; gap: 2px; }
.sw-pieces-step-tool { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text-dark); cursor: pointer; font-size: 14px; }
.sw-pieces-step-tool:hover:not(:disabled) { background: var(--sw-n-100, #f4f4f2); border-color: var(--sw-n-200); }
.sw-pieces-step-tool:disabled { opacity: 0.35; cursor: default; }
.sw-pieces-step-tool.is-danger { color: var(--sw-danger-600, #b42318); }
.sw-pieces-step-body { padding: 4px 10px 10px; border-top: 1px solid var(--sw-n-200); }
.sw-pieces-treatments { position: sticky; top: -10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 6px 0; background: var(--sw-white); }
.sw-pieces-step-body .sw-pieces-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sw-pieces-treatment { position: relative; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--sw-n-300); border-radius: 8px; background: var(--sw-white); color: var(--text-muted); cursor: pointer; opacity: 0.45; padding: 0; }
.sw-pieces-treatment.is-active { opacity: 1; color: #fff; background: #3f5b46; border-color: #3f5b46; }
.sw-pieces-treatment:hover { opacity: 1; }
.sw-pieces-treatment-x { position: absolute; right: -5px; top: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--sw-n-300, #ccc); color: #fff; font-size: 12px; line-height: 14px; text-align: center; }
#pb-section, #pc-section, #ps-section, #pf-section { scroll-margin-top: 56px; border-radius: 8px; }
#pb-section.is-flash, #pc-section.is-flash, #ps-section.is-flash, #pf-section.is-flash { animation: sw-pieces-flash 1.2s ease-out; }
@keyframes sw-pieces-flash { from { background: rgba(245, 158, 11, 0.22); } to { background: transparent; } }
.sw-pieces-surface-labels { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.sw-pieces-surface-arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sw-pieces-surface-arrows line { stroke: currentColor; stroke-width: 1.6; opacity: 0.55; }
.sw-pieces-surface-arrows line.is-on { stroke-width: 2.2; opacity: 1; }
.sw-pieces-surface-arrows line.is-back { stroke-dasharray: 4 3; }
.sw-pieces-surface-label { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 5px; border: 1.5px solid var(--sw-surface-color); border-radius: 999px; background: #fffffff0; color: var(--text-dark); font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.sw-pieces-surface-label.is-on { background: var(--sw-surface-color); color: #fff; }
.sw-pieces-surface-label.is-back { opacity: 0.7; border-style: dashed; }
.sw-pieces-surface-label.is-hover, .sw-pieces-surface-label:hover { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.55); opacity: 1; }
.sw-pieces-surface-label-box { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 3px; font-style: normal; font-size: 11px; line-height: 1; background: #fff; color: var(--sw-surface-color); }
.sw-pieces-surface-label.is-on .sw-pieces-surface-label-box { border-color: #fff; }
.sw-pieces-surface-targets { min-width: 0; border: 1px solid var(--sw-n-200); border-radius: 8px; padding: 8px; margin: 0 0 8px; }
.sw-pieces-surface-targets legend { padding: 0 4px; font-size: 12px; }
.sw-pieces-surface-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: flex-end; }
.sw-pieces-surface-target { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px; border-radius: 4px; }
.sw-pieces-surface-target.is-hover { background: rgba(245, 158, 11, 0.2); }
.sw-pieces-surface-pick { margin-top: 6px; }
.sw-pieces-surface-pick[aria-pressed="true"] { background: #3b82f6; color: #fff; }
.sw-pieces-error { color: var(--sw-danger, #b42318); font-size: 12px; margin: 4px 0; }
.sw-pieces-artwork-dialog { box-sizing: border-box; margin: auto; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 16px; border: 1px solid var(--sw-n-200); border-radius: 10px; overflow: auto; }
.sw-pieces-artwork-dialog::backdrop { background: rgba(20, 24, 32, 0.35); }
.sw-pieces-artwork-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sw-pieces-artwork-dialog-head h3 { margin: 0; }
.sw-pieces-artwork { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-pieces-artwork-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 7px 8px; border: 1px solid var(--sw-n-200); border-radius: 6px; font: inherit; font-size: 12px; color: var(--text-dark); text-align: left; cursor: pointer; background: var(--sw-white); overflow-wrap: anywhere; }
.sw-pieces-artwork-row span { color: var(--text-muted); }
.sw-pieces-artwork-row em { font-style: normal; color: #c0662a; }
.sw-pieces-artwork-row.is-selected { border-color: #e8a33d; box-shadow: 0 0 0 1px #e8a33d inset; }
.sw-pieces-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--sw-primary-600, #1f5fbf); text-align: left; text-decoration: underline; cursor: pointer; }
.sw-pieces-joints, .sw-pieces-hw { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-pieces-joint { display: flex; flex-direction: column; gap: 4px; padding: 7px 8px; border: 1px solid var(--sw-n-200); border-left-width: 4px; border-radius: 6px; font-size: 12px; color: var(--text-dark); cursor: pointer; background: var(--sw-white); }
.sw-pieces-joint.is-ok { border-left-color: #3f7a4a; }
.sw-pieces-joint.is-blocked { border-left-color: var(--sw-danger-600, #a33); }
.sw-pieces-joint.is-blocked .sw-pieces-joint-status { color: var(--sw-danger-600, #a33); }
.sw-pieces-joint.is-selected { border-color: #c0662a; box-shadow: 0 0 0 1px #c0662a inset; }
.sw-pieces-joint small { color: var(--text-muted); }
.sw-pieces-joint-name { font-weight: 600; }
.sw-pieces-joint-pick { margin: 0 0 8px; font-weight: 600; font-size: 13px; }
.sw-pieces-hw-item { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--sw-n-200); border-radius: 6px; font-size: 12px; background: var(--sw-white); }
.sw-pieces-hw-item small { color: var(--text-muted); }
.sw-pieces-hw-item.is-unknown { border-style: dashed; }
.sw-pieces-status { flex: 1; min-width: 0; }
.sw-pieces-status.is-error { color: var(--sw-danger-600, #a33); }
.sw-pieces-report { position: absolute; z-index: 4; top: 112px; right: 12px; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid #b8323a; border-radius: 8px; background: #d12d36; color: #fff; font: inherit; font-size: 15px; font-weight: 700; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); cursor: pointer; }
.sw-pieces-report:hover { filter: brightness(1.06); }
.sw-pieces-report.is-warning { border-color: #c98a12; background: #f2a516; color: #3b2600; }
.sw-pieces-report.is-ready { border-color: #b9d3bd; background: var(--sw-white); color: #3f7a4a; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.sw-pieces-report[aria-expanded="true"] { outline: 2px solid var(--sw-white); outline-offset: -4px; }
.sw-pieces-problems { position: absolute; z-index: 5; top: 154px; right: 12px; bottom: 12px; width: min(320px, calc(100% - 24px)); display: flex; flex-direction: column; border: 1px solid var(--sw-n-300); border-radius: 10px; background: var(--sw-white); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2); overflow: hidden; }
.sw-pieces-problems header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--sw-n-200); }
.sw-pieces-problems header small { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.sw-pieces-problems h3 { margin: 2px 0 0; font-size: 14px; }
.sw-pieces-problems.is-error h3 { color: var(--sw-danger-600, #a33); }
.sw-pieces-problems.is-warning h3 { color: #8a5a00; }
.sw-pieces-problems.is-ready h3 { color: #3f7a4a; }
.sw-pieces-problems-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.sw-pieces-problems-list h4 { margin: 6px 0 0; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sw-pieces-problem { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--sw-n-200); border-left-width: 4px; border-radius: 6px; font-size: 13px; line-height: 1.35; color: var(--text-dark); overflow-wrap: anywhere; }
button.sw-pieces-problem { width: 100%; font-family: inherit; text-align: left; background: var(--sw-white); cursor: pointer; }
button.sw-pieces-problem:hover { background: var(--sw-n-100); }
button.sw-pieces-problem:focus-visible { outline: 2px solid var(--text-dark); outline-offset: 2px; }
.sw-pieces-problem i { margin-top: 2px; }
.sw-pieces-problem.is-error { border-left-color: #d12d36; }
.sw-pieces-problem.is-error i { color: #d12d36; }
.sw-pieces-problem.is-warning { border-left-color: #f2a516; }
.sw-pieces-problem.is-warning i { color: #c98a12; }
.sw-pieces-problems-none { margin: 0; color: #3f7a4a; font-size: 13px; }
.sw-pieces-help-toggle { border: 1px solid var(--sw-n-300); background: var(--sw-white); border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; }
.sw-pieces-operation-controls { display: flex; justify-content: flex-end; align-items: flex-end; gap: 8px; pointer-events: none; }
.sw-pieces-operation-controls > * { pointer-events: auto; }
.sw-pieces-operation-controls .sw-pieces-measure { min-width: 0; }
.sw-pieces-controls:has(> .sw-mat-palette.is-compact) { flex-direction: row; flex-wrap: wrap-reverse; align-items: flex-start; }
.sw-pieces-controls:has(> .sw-mat-palette.is-compact) > .sw-mat-palette { order: -1; }
.sw-pieces-controls:has(> .sw-mat-palette.is-compact) > .sw-pieces-operation-controls { flex: 1 1 0; min-width: min(100%, 36rem); }
.sw-pieces-operation-help { flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--sw-n-300); border-radius: 50%; background: var(--sw-white); color: var(--text-dark); font-size: 20px; font-weight: 700; cursor: pointer; }
.sw-pieces-operation-help:hover { background: var(--sw-n-100); }
.sw-pieces-operation-help:focus-visible, .sw-pieces-help button:focus-visible { outline: 2px solid var(--sw-ink-500); outline-offset: 3px; }
.sw-pieces-help { margin: auto; width: min(900px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; background: var(--sw-white); color: var(--text-dark); border: 1px solid var(--border-light, var(--sw-n-150)); border-radius: 16px; box-shadow: 0 20px 70px rgba(0,0,0,.25); padding: 28px 32px; font-size: 16px; line-height: 1.6; }
.sw-pieces-help::backdrop { background: rgba(25,32,46,.5); }
.sw-pieces-help-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sw-pieces-help-heading small { color: var(--text-muted); }
.sw-pieces-help-heading h2 { font-size: 26px; margin: 4px 0 0; line-height: 1.25; }
.sw-pieces-help-heading button { flex: 0 0 36px; height: 36px; border: 1px solid var(--sw-n-300); border-radius: 50%; background: var(--sw-white); color: var(--text-dark); font-size: 24px; cursor: pointer; }
.sw-pieces-help h3 { display: none; }
.sw-pieces-help p { margin: 0 0 18px; }
.sw-pieces-help-lead { font-weight: 600; }
.sw-pieces-help ul { margin: 0 0 18px; padding-left: 22px; line-height: 1.8; }
.sw-pieces-help-parameters { display: flex; flex-wrap: wrap; gap: 4px 24px; }
@media (max-width: 600px) { .sw-pieces-help { padding: 20px; font-size: 15px; } .sw-pieces-help-heading h2 { font-size: 22px; } }

.sw-pieces.is-busy .sw-pieces-view, .sw-pieces.is-locked .sw-pieces-view { cursor: progress; }
.sw-pieces.is-locked .sw-pieces-inspector { opacity: 0.6; pointer-events: none; }
.sw-pieces-editor .sw-shell-body > .sw-pieces-list { border-width: 0 1px 0 0; border-radius: 0; }
.sw-pieces-editor .sw-shell-body > .sw-pieces-inspector { border-width: 0 0 0 1px; border-radius: 0; }
.sw-pieces-editor #sw-pieces-view { height: calc(100vh - 344px); min-height: 400px; border-radius: 0; }
@media (min-width: 901px) {
  .sw-pieces-editor { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-bottom: 20px; }
  .sw-pieces-editor > .sw-shell { flex: 1 1 auto; }
  .sw-pieces-editor > .sw-shell > * { flex-shrink: 0; }
  .sw-pieces-editor > .sw-shell > .sw-shell-body { flex: 1 1 auto; min-height: 400px; grid-template-rows: minmax(0, 1fr); contain: size; }
  .sw-pieces-editor #sw-pieces-list, .sw-pieces-editor #sw-pieces-inspector,
  .sw-pieces-editor #sw-pieces-view, .sw-pieces-editor #sw-pieces-chat { height: auto; min-height: 0; }
}
.sw-pieces-editor .sw-ribbon #sw-pieces-tools { border: 0; padding: 0; background: transparent; }
.sw-pieces-editor .sw-ribbon { min-height: 0; }
.sw-pieces-editor #sw-document-tools { display: none; }
.sw-pieces-editor .sw-header-save .sw-savebar-text { color: var(--sw-n-600); font-size: 12px; }
.sw-pieces-editor .sw-crumb-title { cursor: text; }
.sw-pieces-editor.sw-pieces-list-hidden .sw-shell-body { grid-template-columns: minmax(0, 1fr) 320px; }
.sw-pieces-editor.sw-pieces-list-hidden #sw-pieces-list { display: none; }
.sw-pieces-editor .sw-statusbar .sw-pieces-status { flex: 1; }
.sw-eng-count.sw-eng-warn { background: var(--sw-warning-600, #b26a00); color: var(--sw-white); }
.sw-eng-treatment { min-width: 0; }
.sw-pieces-editor #sw-production-workspace { padding: 12px; }
.sw-pieces-editor[data-workspace="production"] #sw-pieces-list { overflow-y: auto; }
@media (max-width: 700px) {
    .sw-pieces-editor #sw-pieces-view { grid-row: 1; height: 55vh; min-height: 320px; }
    .sw-pieces-editor .sw-shell-body > .sw-pieces-list { border-width: 1px 0 0 0; }
    .sw-pieces-editor.sw-pieces-list-hidden .sw-shell-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
    .sw-pieces-tool-label { display: none; }
}

.sw-mat-palette { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; background: var(--sw-white); border: 1px solid var(--sw-n-200); border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.sw-mat-palette-title { flex: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.sw-mat-palette-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 5px; min-width: 0; flex: 1; padding: 8px 5px 5px; scrollbar-width: none; -ms-overflow-style: none; }
.sw-mat-palette-strip::-webkit-scrollbar { display: none; }
.sw-mat-palette-card { position: relative; flex: none; scroll-snap-align: start; }
.sw-mat-palette-card:has(.sw-mat-palette-remove) .sw-mat-palette-swatch { padding-right: 24px; opacity: 0.75; }
.sw-mat-palette-remove { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--sw-n-100); color: var(--text-dark); cursor: pointer; font-size: 16px; line-height: 18px; }
.sw-mat-palette-remove:hover { background: var(--sw-n-200); }
.sw-mat-palette-remove:focus-visible { outline: 2px solid var(--sw-accent, #445987); outline-offset: 1px; }
.sw-mat-palette-swatch { flex: none; scroll-snap-align: start; display: grid; grid-template-columns: 30px auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; max-width: 190px; padding: 4px 8px 4px 4px; border: 1px solid var(--sw-n-200); border-radius: 8px; background: var(--sw-white); cursor: pointer; text-align: left; }
.sw-mat-palette-swatch .sw-mat-swatch { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 6px; overflow: hidden; }
.sw-mat-palette-swatch .sw-mat-swatch img { width: 100%; height: 100%; object-fit: cover; }
.sw-mat-palette-label { font-size: 12px; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-mat-palette-swatch small { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-mat-palette-swatch.is-applicable { border-color: #2f8f5b; }
.sw-mat-palette-swatch.is-inspected { background: #edf8f0; box-shadow: 0 0 0 2px #229a54; }
.sw-mat-palette-swatch.is-draggable { cursor: grab; touch-action: none; user-select: none; }
.sw-mat-palette-swatch.is-draggable:active { cursor: grabbing; }
.sw-mat-palette-swatch.is-current { border-color: #2d426b; background: #eef3fb; box-shadow: inset 0 0 0 1px #2d426b; }
.sw-mat-palette-swatch:focus-visible { outline: 2px solid #445987; outline-offset: 2px; }
.sw-mat-palette-swatch:disabled { opacity: 0.55; cursor: default; }
.sw-mat-palette-hint { flex: none; max-width: 220px; font-size: 11px; color: var(--text-muted); }
.sw-mat-palette-color { position: absolute; left: 4px; bottom: 2px; display: inline-flex; align-items: center; gap: 2px; }
.sw-mat-palette-color-input { width: 16px; height: 16px; padding: 0; border: 1px solid var(--sw-n-200); border-radius: 4px; background: var(--sw-white); cursor: pointer; }
.sw-mat-palette-color-input::-webkit-color-swatch-wrapper { padding: 1px; }
.sw-mat-palette-color-input::-webkit-color-swatch { border: 0; border-radius: 3px; }
.sw-mat-palette-color-input:disabled { opacity: 0.55; cursor: default; }
.sw-mat-palette-color-clear { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: var(--sw-n-100); color: var(--text-dark); cursor: pointer; font-size: 12px; line-height: 14px; }
.sw-mat-palette-color-clear:hover { background: var(--sw-n-200); }
.sw-mat-palette-color-clear:focus-visible, .sw-mat-palette-color-input:focus-visible { outline: 2px solid var(--sw-accent, #445987); outline-offset: 1px; }
.sw-mat-palette-card:has(.sw-mat-palette-color) .sw-mat-palette-swatch { padding-bottom: 20px; }
.sw-pieces-view .sw-mat-palette { position: relative; }
.sw-editor-page .sw-mat-palette { margin: 0 0 8px; }
.sw-mat-palette.is-materials-only .sw-mat-palette-title,
.sw-mat-palette.is-materials-only .sw-mat-palette-hint { display: none; }
.sw-mat-palette-toggle { flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid var(--sw-n-200); border-radius: 6px; background: var(--sw-white); color: var(--text-dark); font-size: 14px; line-height: 1; cursor: pointer; }
.sw-mat-palette-toggle:hover { background: var(--sw-n-100); }
.sw-mat-palette-toggle:focus-visible { outline: 2px solid var(--sw-accent, #445987); outline-offset: 1px; }
.sw-mat-palette-swatch { position: relative; }
.sw-mat-palette-badge { display: none; }
.sw-mat-palette.is-compact { align-self: flex-start; max-width: 100%; gap: 6px; padding: 4px 6px; }
.sw-mat-palette.is-compact .sw-mat-palette-title,
.sw-mat-palette.is-compact .sw-mat-palette-hint,
.sw-mat-palette.is-compact .sw-mat-palette-label,
.sw-mat-palette.is-compact .sw-mat-palette-swatch small,
.sw-mat-palette.is-compact .sw-mat-palette-color { display: none; }
.sw-mat-palette.is-compact .sw-mat-palette-strip { flex: 0 1 auto; gap: 4px; padding: 6px 4px 4px; }
.sw-mat-palette.is-compact .sw-mat-palette-swatch { display: block; padding: 2px; }
.sw-mat-palette.is-compact .sw-mat-palette-card .sw-mat-palette-swatch { padding: 2px; }
.sw-mat-palette.is-compact .sw-mat-palette-swatch .sw-mat-swatch { display: block; width: 34px; height: 34px; }
.sw-mat-palette.is-compact .sw-mat-palette-badge { display: block; position: absolute; right: 3px; bottom: 3px; padding: 0 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.85); color: var(--text-dark); font-size: 9px; font-weight: 700; line-height: 13px; pointer-events: none; }

.sw-identification-dialog { margin:auto; box-sizing:border-box; width:calc(100vw - 32px); max-width:960px; max-height:85vh; padding:24px; border:1px solid #ded8cf; border-radius:20px; color:#332f2a; background:#fff; overflow:auto; }
.sw-identification-dialog::backdrop { background:rgba(24,31,45,.45); }
.sw-identification-dialog header, .sw-identification-dialog footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.sw-identification-dialog h2 { margin:0; font-size:1.4rem; }
.sw-identification-dialog > p { margin:12px 0 20px; }
.sw-identification-dialog footer { justify-content:flex-end; margin-top:20px; }
.sw-identification-columns { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.sw-identification-columns section { min-width:0; }
.sw-identification-columns label { display:block; margin-bottom:8px; font-weight:600; }
.sw-identification-columns input { width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #d6cfc5; border-radius:10px; font-size:1rem; }
.sw-identification-list { margin-top:12px; max-height:40vh; min-height:160px; overflow:auto; border:1px solid #e5dfd7; border-radius:12px; padding:8px; }
.sw-identification-list .sw-switch-row { width:100%; text-align:left; overflow-wrap:anywhere; }
.sw-identification-list .sw-switch-row[aria-pressed=true] { background:#eef3fb; border-color:#445987; }
@media(max-width:640px) { .sw-identification-dialog { padding:16px; } .sw-identification-columns { grid-template-columns:1fr; gap:16px; } .sw-identification-list { min-height:80px; max-height:22vh; } }

.sw-conversion-dialog { box-sizing:border-box; margin:auto; width:calc(100vw - 32px); max-width:900px; max-height:85vh; padding:28px; border:1px solid #ded8cf; border-radius:20px; background:#fff; color:#332f2a; overflow:auto; }
.sw-conversion-dialog::backdrop { background:rgba(24,31,45,.45); }
.sw-conversion-dialog header, .sw-conversion-dialog footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.sw-conversion-dialog h2 { margin:0; font-size:1.4rem; }
.sw-conversion-dialog p { margin:16px 0; line-height:1.5; }
.sw-conversion-dialog footer { justify-content:flex-end; flex-wrap:wrap; margin-top:24px; }
@media(max-width:640px) { .sw-conversion-dialog { padding:18px; } .sw-conversion-dialog header { align-items:flex-start; } }
.sw-model-export { max-width:620px; }
.sw-model-export-list { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.sw-model-export-list li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px; border:1px solid #e6e0d6; border-radius:12px; }
.sw-model-export-list li > span { display:flex; flex-direction:column; gap:3px; min-width:0; }
.sw-model-export-list small { color:#6b655c; line-height:1.4; }
.sw-model-export-list .sw-btn { flex:0 0 auto; margin-top:0; text-decoration:none; }
@media(max-width:480px) { .sw-model-export-list li { flex-direction:column; align-items:stretch; } .sw-model-export-list .sw-btn { text-align:center; } }

.sw-pieces-measure input[type="checkbox"] { width: 14px; height: 14px; margin: 0; accent-color: var(--sw-ink-500); }
.sw-pieces-reference { flex-basis: 100%; order: 2; white-space: normal; overflow-wrap: anywhere; }

.sw-pieces-vector-field { display: flex; align-items: center; gap: 4px; white-space: nowrap; }

.sw-pieces-reference-pin { position: absolute; z-index: 4; pointer-events: none; transform: translate(-50%, -50%); font-size: 20px; line-height: 1; color: #9c5110; background: #fff; border-radius: 50%; box-shadow: 0 0 0 1px #9c5110; }

.sw-hole-waiting { position: absolute; z-index: 2; top: 45%; left: 12%; right: 12%; text-align: center; padding: 22px; border-radius: 12px; background: #fffffff0; font-size: 18px; font-weight: 600; pointer-events: none; }
.sw-hole-focus-info { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; font-size: 12px; }
.sw-hole-focus-info strong, .sw-hole-focus-info small { display: block; overflow-wrap: anywhere; }
.sw-hole-focus-info small { margin-top: 5px; color: var(--text-muted); }

.sw-sim[data-demo="true"] .sw-sim-view { height: max(420px, calc(100dvh - 114px)); }
@media (max-width: 680px) {
    .sw-sim[data-demo="true"] .sw-sim-view { height: max(420px, calc(100dvh - 210px)); }
}

.sw-hole-focus-info label { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sw-hole-focus-info label > span { font-size: 10px; color: var(--text-muted); }
.sw-hole-focus-info input:not([type=checkbox]), .sw-hole-focus-info select { width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 6px; border: 1px solid #cfc8be; border-radius: 5px; font: inherit; background: white; }
.sw-hole-profiles { margin-top: 6px; }
.sw-hole-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 6px; }
.sw-hole-fields label:has(select) { grid-column: span 2; }
.sw-hole-options { display: flex; gap: 12px; margin-top: 6px; }
.sw-hole-options label { flex-direction: row; align-items: center; }
.sw-hole-options label span { order: 2; }
.sw-hole-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 6px; }
.sw-hole-actions .sw-btn { padding: 5px 10px; align-self: flex-end; }
.sw-hole-actions .is-error, .sw-hole-focus-info [aria-invalid=true] { color: #b72732; border-color: #b72732; }
.sw-laser-config { display: grid; gap: 16px; }
.sw-laser-sources { display: grid; gap: 12px; }
.sw-laser-source { min-width: 0; border: 1px solid var(--sw-n-200); border-radius: 8px; padding: 12px; }
.sw-laser-source legend { padding: 0 6px; font-weight: 600; }
.sw-process-config, .sw-process-config > div { display: grid; gap: 16px; }
.sw-process-heads { display: grid; gap: 12px; }
.sw-process-head, .sw-process-nested { min-width: 0; border: 1px solid var(--sw-n-200); border-radius: 8px; padding: 12px; }
.sw-process-head legend, .sw-process-nested legend { padding: 0 6px; font-weight: 600; }
.sw-process-refs { display: grid; gap: 4px; }
.sw-reserved { color: var(--sw-n-500); }
.sw-surface-recipes { display: grid; gap: 16px; }
.sw-recipe-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.sw-recipe-card, .sw-recipe-draft { min-width: 0; border: 1px solid var(--sw-n-200); border-radius: 8px; padding: 12px; display: grid; gap: 12px; }
.sw-recipe-draft legend { padding: 0 6px; font-weight: 600; }
.sw-recipe-summary { display: grid; gap: 4px; }
.sw-recipe-line { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sw-recipe-key { color: var(--sw-n-500); }
.sw-recipe-value { overflow-wrap: anywhere; }
.sw-recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-recipe-earlier summary { cursor: pointer; }

.sw-artwork-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:18px 0}.sw-artwork-fields label,.sw-artwork-file{display:flex;flex-direction:column;gap:6px}.sw-artwork-fields input,.sw-artwork-fields select,.sw-artwork-group select{width:100%;min-width:0;padding:9px;border:1px solid var(--sw-line,#d8d2c8);border-radius:8px;background:white;color:inherit}.sw-artwork-confirm{display:flex;align-items:center;gap:8px;margin:12px 0}.sw-artwork-actions{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0}.sw-artwork-group{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,1fr);gap:8px;padding:14px;border-bottom:1px solid #ddd}.sw-artwork-group span{overflow-wrap:anywhere}.sw-artwork-group label{display:flex;flex-direction:column;gap:6px;grid-column:2;grid-row:1/3}.sw-artwork input[type=file]{max-width:100%}@media(max-width:600px){.sw-artwork-group{grid-template-columns:minmax(0,1fr)}.sw-artwork-group label{grid-column:1;grid-row:auto}.sw-artwork-fields{grid-template-columns:minmax(0,1fr)}}


.sw-batch-prep-refusal { margin: 2px 0; color: var(--sw-danger-600); font-size: 13px; }
.sw-batch-purpose select { max-width: 100%; }
.sw-batch-cost-scroll { overflow-x: auto; max-width: 100%; }
.sw-batch-costs input, .sw-batch-costs select { width: 100%; min-width: 64px; box-sizing: border-box; }
.sw-batch-cost-currency { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.sw-batch-cost-currency input { width: 88px; text-transform: uppercase; }
.sw-batch-cost-sub { margin: 12px 0 4px; font-size: 14px; }
.sw-batch-cost-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sw-batch-cost-rates label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sw-batch-personal input[data-personal] { width: 100%; min-width: 120px; box-sizing: border-box; }
.sw-batch-personal-fill { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 8px 0; }
.sw-batch-personal-fill label, .sw-batch-personal-paste { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.sw-batch-personal-fill input[data-personal-start] { width: 88px; }
.sw-batch-personal-paste { margin-bottom: 6px; max-width: 480px; }
.sw-batch-personal-paste textarea { width: 100%; box-sizing: border-box; }
.sw-pieces.sw-batch-costs, .sw-pieces.sw-batch-personal { min-height: 0; }
.sw-wt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sw-wt-row { display: grid; grid-template-columns: minmax(160px, 220px) 1fr auto; gap: 8px 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--sw-border, #e2e2e2); border-radius: 8px; }
.sw-wt-check { margin: 0; }
.sw-wt-cover { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.sw-wt-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #e8f3ea; color: #1f6b33; }
.sw-wt-chip.is-none { background: #fff4e5; color: #8a4b00; }
.sw-wt-hints { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.sw-wt-hints li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 6px; background: #f4f6fb; font-size: 13px; }
.sw-recipe-other { margin-top: 12px; }
.sw-recipe-other > summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
@media (max-width: 640px) { .sw-wt-row { grid-template-columns: 1fr; } .sw-wt-cover { justify-content: flex-start; } }
.sw-labels-output { display: flex; flex-wrap: wrap; gap: 6px 16px; border: 0; padding: 0; margin: 12px 0 0; }
.sw-labels-output legend { font-weight: 600; margin-bottom: 4px; }
.sw-labels-output .sw-muted { flex-basis: 100%; margin: 0; font-size: 12px; }

.sw-flagged-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.sw-file-status { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sw-file-status.is-not-generated { background: #f3e1e1; color: #8a2a2a; }
.sw-file-status.is-incomplete { background: #f6ecd2; color: #7a5200; }
.sw-flagged-affected { font-size: 12px; }


.sw-bf-box { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--sw-n-200); border-radius: 10px; background: var(--sw-white); }
.sw-bf-box.needs-ack { border-color: #c9952b; box-shadow: 0 0 0 2px rgba(201, 149, 43, .18); }
.sw-bf-box-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sw-bf-box-zip { margin-left: auto; }
.sw-bf-files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-bf-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sw-bf-include { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.sw-bf-file-name { font-family: var(--font-mono, monospace); font-size: 13px; overflow-wrap: anywhere; }
.sw-bf-size { font-size: 12px; }
.sw-bf-omitted { margin-top: 10px; font-size: 13px; }
.sw-bf-omitted ul { margin: 4px 0 0; padding-left: 18px; }
.sw-bf-ack { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-weight: 600; }
.sw-bf-blockers { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: #f8e8e8; }
.sw-bf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 32px; }
.sw-bf-actions .is-disabled { opacity: .5; pointer-events: none; }
.sw-file-status.is-ok { background: #e3f1e6; color: #2f6b3c; }
.sw-file-status.is-manual { background: #e7ecf5; color: #36507a; }
.sw-bf-dialog { width: min(900px, 94vw); max-height: 88vh; padding: 0; border: 1px solid var(--sw-n-300); border-radius: 10px; }
.sw-bf-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--sw-n-200); }
.sw-bf-dialog-body { padding: 12px 14px; overflow: auto; max-height: calc(88vh - 60px); }
.sw-bf-dialog-body pre { margin: 0; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sw-bf-dialog-body iframe { width: 100%; height: 70vh; border: 0; }
.sw-bf-dialog-body img { max-width: 100%; height: auto; }
.sw-bf-dxf { width: 100%; max-height: 70vh; }
.sw-focus-3d .sw-shell-body { grid-template-columns:minmax(0,1fr) !important; }
.sw-focus-3d.sw-chat-open .sw-shell-body { grid-template-columns:minmax(0,1fr) var(--sw-chat-width, 380px) !important; }
.sw-focus-3d .sw-shell-body > .sw-parts, .sw-focus-3d .sw-shell-body > .sw-inspector, .sw-focus-3d #sw-pieces-list, .sw-focus-3d #sw-pieces-inspector, .sw-focus-3d #sw-ribbon .sw-eng-rail { display:none !important; }
.sw-editing-modes { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:12px 0; }
.sw-editing-mode { position:relative; padding:12px; border:1px solid var(--sw-n-150); border-radius:8px; background:var(--sw-white); }
.sw-editing-mode h3 { margin:0 0 6px; font-size:14px; }
.sw-editing-mode p { margin:0; font-size:12px; line-height:1.5; color:var(--sw-n-600); }
.sw-editing-mode.is-current { border-color:var(--sw-ink-600); box-shadow:0 0 0 1px var(--sw-ink-600); }
.sw-editing-mode-current { display:inline-block; margin-top:8px; padding:2px 8px; border-radius:999px; background:var(--sw-ink-600); color:var(--sw-white); font-size:11px; font-weight:600; }
.sw-convert-changes, .sw-convert-losses { margin:6px 0 10px; padding-left:18px; font-size:13px; line-height:1.6; }
.sw-convert-one-way { font-size:12px; font-weight:600; }
@media (max-width:600px) { .sw-editing-modes { grid-template-columns:1fr; } }
.sw-tab-warn { display: inline-flex; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--sw-warning-600, #b26a00); color: var(--sw-white); font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }
.sw-pieces-hw-placements { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sw-pieces-hw-placements li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--sw-border, #e2e2e2); border-radius: 8px; }
.sw-pieces-hw-placements li.on { border-color: var(--sw-primary-600, #2f3a6b); }
.sw-pieces-hw-placements li > span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sw-pieces-hw-placements small { color: var(--text-muted); }
.sw-pieces-hw-placements .sw-btn { padding: 4px 8px; font-size: 12px; }
.sw-pieces-hw-form { display: flex; flex-direction: column; gap: 8px; }

.sw-ribbon-editor.sw-pieces-open.sw-chat-open .sw-shell-body { grid-template-columns: minmax(0, 1fr) var(--sw-chat-width, 380px); }
.sw-pieces-editor.sw-chat-open #sw-pieces-list,
.sw-pieces-editor.sw-chat-open #sw-pieces-inspector,
.sw-pieces-editor.sw-chat-open #sw-pieces-measure,
.sw-pieces-editor.sw-chat-open #sw-material-palette,
.sw-pieces-editor.sw-chat-open #sw-pieces-hint { display: none !important; }
.sw-pieces-chat { position: relative; display: flex; flex-direction: column; min-height: 0; height: calc(100vh - 300px); min-height: 420px; border: 1px solid var(--border-light, var(--sw-n-150)); border-radius: 10px; background: var(--sw-white); padding: 10px 12px 10px 16px; }
.sw-chat-resize { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; cursor: col-resize; touch-action: none; }
.sw-chat-resize:hover { background: var(--sw-n-100, rgba(0, 0, 0, 0.05)); }
.sw-chat-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sw-chat-head h3 { flex: 1; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-dark); }
.sw-chat-agent { font-size: 11px; border-radius: 999px; padding: 2px 8px; background: var(--sw-n-100, #eef0f2); color: var(--text-muted); white-space: nowrap; }
.sw-chat-agent[data-agent-status="IDLE"] { background: #e6f4ea; color: #1e6b35; }
.sw-chat-agent[data-agent-status="WORKING"], .sw-chat-agent[data-agent-status="REPLYING"] { background: #e7f0fd; color: #1b4f9c; }
.sw-chat-agent[data-agent-status="NOT_CONFIGURED"] { background: #fdecea; color: #9b2c1f; }
.sw-chat-older { align-self: center; margin-bottom: 6px; }
.sw-chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.sw-chat-turn { display: flex; flex-direction: column; gap: 4px; }
.sw-chat-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.sw-chat-user { flex-direction: column; align-items: flex-end; }
.sw-chat-reply { align-items: flex-start; }
.sw-chat-bubble { margin: 0; max-width: 92%; padding: 7px 10px; border-radius: 10px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-dark); }
.sw-chat-user .sw-chat-bubble { background: #e7f0fd; border-bottom-right-radius: 3px; }
.sw-chat-reply .sw-chat-bubble { background: var(--sw-n-100, #f1f2f4); border-bottom-left-radius: 3px; }
.sw-chat-reply[data-outcome="WARNING"] .sw-chat-bubble { background: #fff6e0; }
.sw-chat-reply[data-outcome="ERROR"] .sw-chat-bubble, .sw-chat-reply[data-outcome="DECLINED"] .sw-chat-bubble { background: #fdecea; }
.sw-chat-reply[data-outcome="CLARIFICATION"] .sw-chat-bubble { background: #f3ecfd; }
.sw-chat-receipt { font-size: 10px; color: var(--text-muted); }
.sw-chat-state { flex-wrap: wrap; row-gap: 4px; }
.sw-chat-state .sw-chat-stage::before { content: "\2026 "; }
.sw-chat-attempt, .sw-chat-remaining { font-size: 11px; white-space: nowrap; }
.sw-chat-attempt::before, .sw-chat-remaining::before { content: "\00b7 "; }
.sw-chat-elapsed { font-size: 11px; white-space: nowrap; }
.sw-chat-elapsed::before { content: "\00b7 "; }
.sw-chat-steps { flex-basis: 100%; margin: 4px 0 0; padding-left: 20px; font-size: 12px; color: var(--text-muted); }
.sw-chat-steps li { margin: 1px 0; }
.sw-chat-steps li.done { text-decoration: line-through; }
.sw-chat-steps li.current { color: inherit; font-weight: 600; }
.sw-chat-bar { flex-basis: 100%; height: 4px; border-radius: 2px; background: var(--sw-n-150, #e3e6ea); overflow: hidden; }
.sw-chat-bar-fill { height: 100%; background: #1b4f9c; border-radius: 2px; transition: width 0.4s ease; }
.sw-chat-outcome { font-weight: 600; }
.sw-chat-outcome[data-outcome="SUCCESS"] { color: #1e6b35; }
.sw-chat-outcome[data-outcome="WARNING"] { color: #8a5a00; }
.sw-chat-outcome[data-outcome="ERROR"], .sw-chat-outcome[data-outcome="DECLINED"] { color: #9b2c1f; }
.sw-chat-outcome[data-outcome="CLARIFICATION"] { color: #5b2c9b; }
.sw-chat-cancelled, .sw-chat-reverted { font-style: italic; }
.sw-chat-empty { color: var(--text-muted); font-size: 12px; text-align: center; margin: 12px 0; }
.sw-chat-notice { margin: 6px 0 0; font-size: 12px; color: #9b2c1f; }
.sw-chat-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px; border-radius: 8px; background: #fff6e0; font-size: 12px; }
.sw-chat-composer { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sw-chat-composer textarea { width: 100%; resize: vertical; min-height: 60px; max-height: 40vh; font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--sw-n-300); border-radius: 8px; background: var(--sw-white); color: var(--text-dark); }
.sw-chat-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.sw-chat-mode { display: inline-flex; border: 1px solid var(--sw-n-300, #c9ced6); border-radius: 999px; overflow: hidden; }
.sw-chat-mode button { border: 0; background: var(--sw-white); color: var(--text-muted); font: inherit; font-size: 11px; font-weight: 600; padding: 4px 10px; cursor: pointer; }
.sw-chat-mode button + button { border-left: 1px solid var(--sw-n-300, #c9ced6); }
.sw-chat-mode button[aria-pressed="true"] { background: var(--sw-primary-600, #34487e); color: #fff; }
.sw-chat-mode button:disabled { cursor: default; opacity: 0.6; }
.sw-chat-images { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 92%; margin-bottom: 4px; }
.sw-chat-images a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-light, var(--sw-n-150)); }
.sw-chat-images img { display: block; width: 96px; height: 96px; object-fit: cover; }
.sw-chat-tray { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-chat-tray-item { position: relative; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-light, var(--sw-n-150)); }
.sw-chat-tray-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-chat-tray-item[data-status="uploading"] img { opacity: 0.45; }
.sw-chat-tray-busy { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.2); border-top-color: var(--sw-primary-600, #34487e); border-radius: 50%; animation: sw-chat-spin 0.8s linear infinite; }
@keyframes sw-chat-spin { to { transform: rotate(360deg); } }
.sw-chat-tray-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; font-size: 13px; line-height: 18px; cursor: pointer; }
.sw-chat-drop { display: none; }
.sw-pieces-chat.is-dropping { position: relative; }
.sw-pieces-chat.is-dropping .sw-chat-drop { display: flex; position: absolute; inset: 6px; z-index: 5; align-items: center; justify-content: center; border: 2px dashed var(--sw-primary-600, #34487e); border-radius: 10px; background: rgba(231, 240, 253, 0.92); font-size: 14px; font-weight: 600; color: var(--text-dark); pointer-events: none; }
.sw-chat-counter { margin-right: auto; font-size: 11px; color: var(--text-muted); }
.sw-chat-counter.is-over { color: #9b2c1f; font-weight: 600; }
.sw-pieces-chat .sw-btn { margin-top: 0; padding: 6px 12px; font-size: 12px; }
.sw-pieces-chat .sw-btn:disabled { background: var(--sw-n-200); color: var(--text-muted); box-shadow: none; cursor: default; }
.sw-chat-log .sw-btn.secondary { border-color: var(--sw-n-300, #c9ced6); }
.sw-chat-row .sw-chat-cancel { margin-left: auto; }
@media (max-width:700px) {
  .sw-ribbon-editor.sw-pieces-open.sw-chat-open .sw-shell-body { grid-template-columns: minmax(0, 1fr); }
  .sw-pieces-chat { height: auto; min-height: 320px; max-height: 70vh; padding-left: 12px; }
  .sw-chat-resize { display: none; }
}

.sw-setup { max-width: 860px; }
.sw-setup .sw-ws-eyebrow { margin: 0 0 4px; }
.sw-setup-card { margin-top: 16px; }
.sw-setup-fields { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sw-setup-field-wide { grid-column: 1 / -1; }
.sw-setup-wt .sw-wt-row { grid-template-columns: minmax(180px, 240px) 1fr; }
.sw-setup-panel { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 10px; border: 1.5px solid var(--sw-n-200); border-radius: 14px; background: var(--sw-n-50); color: var(--text-dark); cursor: auto; }
.sw-wt-row--pick { display: block; padding: 0; transition: border-color .15s ease, background-color .15s ease; }
.sw-wt-row--pick .sw-wt-pick { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 8px 12px; align-items: center; margin: 0; padding: 10px 12px; cursor: pointer; }
.sw-wt-row--pick .sw-wt-pick > * { cursor: pointer; }
.sw-wt-row--pick:hover { border-color: var(--sw-ink-200); background: var(--sw-n-50); }
.sw-wt-row--pick:has(input:checked) { border-color: #b07a3a; background: var(--sw-white); }
.sw-wt-row--pick:focus-within { outline: 2px solid var(--sw-ink-200); outline-offset: 2px; }
.sw-setup-h2 { font-size: 16px; margin: 0 0 10px; }
.sw-setup-added { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sw-setup-added-row { display: grid; grid-template-columns: auto minmax(140px, 1fr) auto minmax(140px, 1.4fr) auto; gap: 8px 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--sw-border, #e2e2e2); border-radius: 8px; }
.sw-setup-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 4px 0 16px; }
.sw-setup-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; text-align: left; border: 1.5px solid var(--sw-n-200, #d9dce1); border-radius: 12px; background: var(--sw-n-50, #fafafa); color: var(--text-dark); cursor: pointer; font: inherit; transition: border-color .15s ease, background-color .15s ease; }
.sw-setup-kind:hover, .sw-setup-kind:focus-visible { border-color: #b07a3a; background: var(--sw-white, #fff); }
.sw-setup-kind > span { font-size: 13px; }
.sw-setup-kind-img { display: block; width: 100%; max-width: 320px; aspect-ratio: 3 / 2; object-fit: contain; border-radius: 8px; background: var(--sw-n-100, #f1f2f4); }
.sw-setup-machine-img { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--sw-n-100, #f1f2f4); flex: 0 0 auto; }
.sw-setup-family-img { width: 120px; height: 120px; max-width: 100%; }
.sw-wt-desc-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.sw-wt-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e8f3ea; color: #1f6b33; white-space: nowrap; }
.sw-wt-badge--manual { background: #fff4e5; color: #8a4b00; }
.sw-setup-added-model { overflow-wrap: anywhere; }
.sw-setup-added-remove { margin: 0; }
.sw-setup-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--sw-n-100, #f1f2f4); color: var(--text-dark); white-space: nowrap; }
.sw-setup-families { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.sw-setup-family { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1.5px solid var(--sw-n-200, #d9dce1); border-radius: 10px; background: var(--sw-n-50, #fafafa); color: var(--text-dark); text-decoration: none; }
.sw-setup-family:hover { border-color: var(--sw-ink-200, #b9c0cc); text-decoration: none; }
.sw-setup-family.on { border-color: var(--sw-ink-600, #2f3a4c); background: var(--sw-white, #fff); box-shadow: 0 0 0 3px rgba(var(--sw-ink-rgb, 47, 58, 76), 0.12); }
.sw-setup-family-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.sw-setup-model-label { margin-top: 4px; }
.sw-setup-models { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 6px; }
.sw-setup-models .sw-prod-check { margin: 0; }
.sw-setup-add-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.sw-setup-machines-foot { margin-top: 16px; }
.sw-setup .sw-new-foot > span { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 720px) { .sw-setup-added-row { grid-template-columns: auto 1fr auto; } .sw-setup-wt .sw-wt-row { grid-template-columns: 1fr; } .sw-wt-row--pick .sw-wt-pick { grid-template-columns: 1fr; } .sw-setup-family-img { width: 72px; height: 72px; } }

.sw-chat-clarification { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--sw-border, #d5d9df); border-radius: 8px; }
.sw-chat-question { display: grid; gap: 5px; min-width: 0; }
.sw-chat-question label { font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.sw-chat-question input, .sw-chat-question select { box-sizing: border-box; width: 100%; min-width: 0; padding: 7px; border: 1px solid #aeb8c5; border-radius: 5px; background: #fff; color: #172335; }
.sw-chat-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-chat-swatch { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border: 1px solid #aeb8c5; border-radius: 6px; background: #fff; color: #172335; cursor: pointer; font-size: .8rem; line-height: 1.2; }
.sw-chat-swatch.is-selected { border-color: #2d426b; background: #eef3fb; box-shadow: inset 0 0 0 1px #2d426b; }
.sw-chat-swatch:focus-visible { outline: 2px solid #445987; outline-offset: 1px; }
.sw-chat-swatch:disabled { opacity: .55; cursor: default; }
.sw-chat-swatch-color, .sw-chat-select-color { flex: none; display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .18); }
.sw-chat-select-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sw-chat-select-row select { flex: 1; }
.sw-chat-draft p { font-size: .85rem; }

.sw-sim-badge { flex-direction: row; align-items: stretch; max-width: 210px; padding: 0; cursor: default; }
.sw-sim-badge-select { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 1px; border: 0; padding: 4px 6px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.sw-sim-badge-select strong { max-width: 160px; }
.sw-sim-machine-focus { flex: 0 0 32px; border: 0; border-left: 1px solid var(--sw-n-200); background: transparent; color: var(--brand-primary); cursor: pointer; }
.sw-sim-machine-focus:hover, .sw-sim-badge-select:hover { background: var(--sw-n-100); }
.sw-sim-detail-bar { position: absolute; top: 74px; left: 14px; right: 14px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--sw-n-200); border-radius: 10px; background: rgba(var(--sw-white-rgb), .96); box-shadow: 0 3px 12px rgba(var(--sw-shadow-rgb), .08); }
.sw-sim-detail-heading { display: flex; flex: 1; flex-direction: column; min-width: 0; font-size: 12px; gap: 3px; }
.sw-sim-detail-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.sw-sim-detail-heading span { color: var(--text-muted); }
.sw-sim-detail .sw-sim-camera { top: 172px; }
.sw-sim-detail .sw-sim-panel, .sw-sim-detail .sw-sim-pieces { top: 212px; }
@media (max-width: 680px) {
    .sw-sim-detail-bar { left: 8px; right: 8px; gap: 3px; padding: 6px; }
    .sw-sim-detail-bar [data-detail="close"] span { display: none; }
    .sw-sim-detail-bar [data-detail="close"] { width: 36px; height: 36px; padding: 0; justify-content: center; }
    .sw-sim-detail-heading strong { font-size: 13px; }
    .sw-sim-detail-heading { font-size: 10px; }
}
.sw-sim-bander-detail { position:absolute; inset:0; z-index:3; pointer-events:none; background:#f4f3ef; }
.sw-sim-bander-detail canvas { width:100%; height:100%; }
.sw-sim-bander-caption { position:absolute; left:20px; right:20px; bottom:126px; text-align:center; font-size:12px; line-height:1.5; color:#394850; margin:0; padding:6px; background:rgba(255,255,255,.85); border-radius:6px; }
@media(max-width:600px) { .sw-sim-bander-caption { left:8px; right:8px; bottom:134px; font-size:11px; } }
.sw-sim-roll-settings { margin:12px 0; padding:12px; background:var(--sw-white); border:1px solid var(--sw-n-200); border-radius:10px; }
.sw-sim-roll-settings fieldset { border:0; padding:0; }
.sw-sim-roll-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:10px 0; }
.sw-sim-roll-row strong { flex:1 1 220px; }
.sw-sim-roll-settings label { display:inline-flex; flex-direction:column; gap:4px; margin:6px; font-size:12px; }
.sw-sim-roll-settings input { padding:7px; max-width:220px; border:1px solid var(--sw-n-200); border-radius:5px; }
.sw-sim-roll-pool { position:absolute; top:160px; left:18px; max-width:calc(100% - 170px); max-height:80px; overflow:auto; padding:8px 12px; background:rgba(255,255,255,.93); border:1px solid #d4dadd; border-radius:8px; font-size:12px; line-height:1.6; pointer-events:auto; }
@media(max-width:600px) { .sw-sim-roll-pool { top:176px; left:8px; max-width:calc(100% - 20px); max-height:64px; font-size:11px; } }

.sw-sim-magazine { color:var(--sw-n-800); min-width:0; }
.sw-sim-magazine h4 { font-size:14px; margin:0 0 4px; }
.sw-sim-magazine-hint { font-size:11px; margin:0 0 9px; }
.sw-sim-magazine-floating { position:absolute; top:212px; right:16px; z-index:4; width:300px; max-width:calc(100% - 32px); max-height:calc(100% - 352px); overflow:auto; padding:12px; background:rgba(var(--sw-white-rgb),.97); border:1px solid var(--sw-n-200); border-radius:12px; box-shadow:0 4px 16px rgba(var(--sw-shadow-rgb),.1); }
.sw-sim-magazine-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(66px,1fr)); gap:6px; max-height:170px; overflow:auto; padding:2px; }
.sw-sim-magazine-slot { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-height:72px; min-width:0; border:1px solid var(--sw-n-200); border-radius:8px; padding:6px 3px; background:var(--sw-n-50); color:inherit; cursor:pointer; font:inherit; }
.sw-sim-magazine-slot strong { font-size:15px; }
.sw-sim-magazine-slot small { font-size:10px; }
.sw-sim-magazine-name { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.sw-sim-magazine-slot.sw-sim-current { border-color:var(--brand-primary,#354777); background:#e8eef9; box-shadow:inset 0 -3px var(--brand-primary,#354777); }
.sw-sim-magazine-slot[aria-pressed="true"] { outline:2px solid var(--sw-n-700); outline-offset:-3px; }
.sw-sim-magazine-slot:focus-visible { outline:3px solid #5169b3; outline-offset:1px; }
.sw-sim-magazine-info h5 { margin:10px 0 5px; }
.sw-sim-magazine-info .sw-sim-command-params { font-size:11px; }
.sw-sim-panel .sw-sim-magazine { margin:16px 0; padding:12px; border:1px solid var(--sw-n-200); border-radius:10px; }
@media(max-width:600px) { .sw-sim-magazine-floating { top:212px; right:8px; max-height:calc(100% - 352px); width:270px; padding:8px; } .sw-sim-magazine-grid { max-height:120px; } }

.sw-batch-stages { position:sticky; top:90px; z-index:4; background:var(--sw-n-50); display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:16px 0; }
.sw-batch-stages a { display:flex; align-items:center; gap:9px; padding:14px 12px; border:1px solid var(--sw-n-200); border-radius:12px; background:var(--sw-n-0); color:var(--text-dark); text-decoration:none; font-weight:600; }
.sw-batch-stages a[aria-current="step"] { background:var(--main-gradient); color:var(--sw-n-0); border-color:var(--brand-primary); }
.sw-stage-number { display:grid; place-items:center; flex-shrink:0; width:26px; height:26px; border:1px solid currentColor; border-radius:50%; font-size:13px; }
.sw-batch-stage-notice { display:flex; flex-wrap:wrap; gap:8px 20px; justify-content:space-between; padding:12px 16px; border:1px solid var(--sw-oak-200); background:var(--sw-n-50); border-radius:12px; margin-bottom:18px; }
.sw-batch-stage-notice a { color:var(--brand-primary); font-weight:600; }
[data-batch-stage] { scroll-margin-top:180px; outline:none; }
.sw-batch-input-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,1fr); gap:20px; align-items:start; }
.sw-batch-output-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr); gap:20px; align-items:start; }
.sw-batch-input-layout > div,.sw-batch-output-layout > div { min-width:0; }
.sw-batch-requirements,.sw-batch-inspector { padding:20px; border:1px solid var(--sw-n-200); border-radius:12px; background:var(--sw-n-0); margin-top:20px; min-width:0; }
.sw-batch-requirements ul { padding-left:20px; line-height:1.8; }
.sw-batch-inspector > label { display:block; font-weight:600; margin-bottom:10px; }
.sw-batch-inspector select { max-width:100%; width:100%; }
.sw-inspected-piece h3 { font-size:18px; margin:20px 0 6px; }
.sw-inspected-piece h4 { margin:18px 0 8px; }
.sw-inspect-facts { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 14px; font-size:13px; }
.sw-inspect-facts dt { color:var(--text-muted); }
.sw-inspect-facts dd { margin:0; overflow-wrap:anywhere; }
.sw-inspect-drawing { background:var(--sw-n-50); border-radius:8px; margin-top:14px; }
.sw-inspect-drawing svg { width:100%; max-height:260px; display:block; }
.sw-inspect-drawing .piece-outline { fill:var(--sw-oak-200); stroke:var(--sw-oak-500); stroke-width:1; }
.sw-inspect-drawing text { fill:var(--sw-ink-800); stroke:none; }
.sw-inspect-drawing .piece-feature { fill:none; stroke:var(--brand-primary); stroke-width:1.5; cursor:pointer; }
.sw-inspect-drawing .back-face { stroke-dasharray:5 3; }
.sw-inspect-drawing .feature-badge { fill:var(--sw-n-0); stroke:var(--brand-primary); }
.sw-inspect-drawing .piece-feature.is-selected { stroke:var(--sw-oak-500); stroke-width:3; }
.sw-inspect-features,.sw-inspect-source { padding-left:22px; font-size:13px; overflow-wrap:anywhere; }
.sw-inspect-features li { margin:10px 0; }
.sw-inspect-features button { text-align:left; color:var(--text-dark); }
.sw-inspect-features button[aria-pressed="true"] { color:var(--brand-primary); background:var(--sw-n-100); }
.sw-input-kind,.sw-input-catalog { display:block; margin-bottom:6px; }
.sw-plan-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:16px; }
.sw-plan-card { padding:16px; border:1px solid var(--sw-n-200); border-radius:12px; background:var(--sw-n-0); }
.sw-plan-card h4 { margin:0 0 12px; font-size:14px; }
.sw-plan-card .sw-thumbbtn { width:100%; }
.sw-plan-card .sw-thumb { width:100%; height:180px; }
.sw-batch-stage-footer { display:flex; align-items:center; gap:12px; padding:20px 0; }
.sw-batch-stage-footer p { flex:1; }
@media(max-width:1200px) { .sw-batch-output-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:1000px) {
  .sw-batch-input-layout { grid-template-columns:minmax(0,1fr); }
  .sw-batch-stages { grid-template-columns:repeat(5,minmax(125px,1fr)); overflow-x:auto; padding-bottom:6px; }
}
@media(max-width:600px) {
  .sw-batch-stage-footer { flex-wrap:wrap; } .sw-batch-stage-footer p { flex-basis:100%; }
  .sw-batch-requirements,.sw-batch-inspector { padding:14px; }
  .sw-batch-input-layout .sw-sheet-table { display:block; overflow-x:auto; }
}

.sw-mat-search-dialog {
    box-sizing: border-box;
    margin: auto;
    width: min(820px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid var(--sw-n-200);
    border-radius: 16px;
    background: var(--sw-white);
    color: var(--text-dark);
    box-shadow: 0 18px 48px rgba(20, 29, 51, .28);
    overflow: auto;
}
.sw-mat-search-dialog::backdrop { background: rgba(20, 29, 51, .35); }
.sw-mat-search-head {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sw-n-200);
    background: var(--sw-white);
}
.sw-mat-search-head h3 { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.sw-mat-search-head button { flex: none; }
.sw-mat-search-body { padding: 12px 20px 20px; }
.sw-mat-search-dialog .sw-mat-chooser { margin: 0; min-width: 0; }
.sw-mat-search-dialog .sw-mat-results { max-height: 40dvh; }
.sw-mat-search-dialog .sw-mat-result { min-height: 48px; }
.sw-mat-search-dialog .sw-mat-name { min-width: 0; overflow-wrap: anywhere; }
.sw-mat-search-dialog .sw-mat-color-head { position: static; }
.sw-mat-search-dialog .sw-mat-color-panel { gap: 16px; }
.sw-mat-search-dialog .sw-mat-color-wheel { width: 198px; height: 198px; }
.sw-mat-search-dialog .sw-mat-color-controls { flex-basis: 180px; }
.sw-mat-search-dialog .sw-mat-color-hint,
.sw-mat-search-dialog .sw-mat-color-actions { flex-basis: 100%; }
@media (max-width: 480px) {
    .sw-mat-search-head { padding: 12px; }
    .sw-mat-search-body { padding: 12px; }
    .sw-mat-search-dialog .sw-mat-color-wheel { margin-inline: auto; }
    .sw-mat-search-dialog .sw-mat-color-controls { flex-basis: 100%; }
}

.sw-mat-project-colors { margin: 12px 0; padding: 12px; border: 1px solid var(--sw-n-200); border-radius: 10px; background: #eef3fb; }
.sw-mat-project-colors h4 { margin: 0 0 8px; font-size: 14px; }
.sw-mat-search-dialog .sw-mat-project-colors .sw-mat-results { max-height: none; margin: 0; }
.sw-mat-project-colors .sw-mat-result { border-radius: 6px; }
.sw-mat-project-source { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }

.sw-bf-machine-code { display:grid; place-items:center; min-width:44px; height:40px; padding:0 8px; border-radius:8px; background:var(--sw-n-100); font:700 13px monospace; }
.sw-bf-file { padding:10px 8px; border-top:1px solid var(--sw-n-100); }
.sw-bf-file-name { flex:1; min-width:180px; }
.sw-bf-format { min-width:48px; padding:4px 6px; border:1px solid var(--sw-n-200); border-radius:5px; font:600 10px monospace; text-align:center; }
.sw-bf-dialog { width:min(1200px,96vw); }
.sw-bf-dialog-head strong { overflow-wrap:anywhere; min-width:0; }
.sw-program { position:relative; min-width:0; color:#d9e4f0; background:#14202e; border-radius:8px; overflow:hidden; }
.sw-program-toolbar,.sw-program-pager { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:10px 12px; background:#1d2d3f; }
.sw-program-toolbar .sw-linkbtn { color:#96caff; }
.sw-program-meta { font:12px monospace; margin-right:auto; }
.sw-program input.sw-program-search { width:230px; max-width:100%; padding:7px 10px; background:#101a26; color:#eef5ff; border:1px solid #53677f; border-radius:5px; }
.sw-program-pager { padding-top:0; font-size:12px; }
.sw-program-status { margin-left:auto; }
.sw-program-viewport { max-height:58vh; overflow:auto; overscroll-behavior:contain; padding:8px 0; }
.sw-program-line { display:flex; align-items:baseline; min-height:25px; width:max-content; min-width:100%; font:13px/25px ui-monospace,SFMono-Regular,Consolas,monospace; }
.sw-program-number { flex:0 0 56px; text-align:right; padding-right:12px; color:#95a6bb; user-select:none; }
.sw-program-help { flex:0 0 28px; border:0; color:#96caff; background:transparent; cursor:pointer; font-size:15px; padding:0 5px; }
.sw-program-code { white-space:pre; padding-right:20px; }
.sw-program-command { color:#8fcaff; font-weight:700; }
.sw-program-parameter { color:#ffd28d; }
.sw-program-comment { color:#8fbe9c; }
.sw-program-line.is-active { background:#214f64; box-shadow:inset 3px 0 #67d9e3; }
.sw-program-line.is-match { background:#654b20; }
.sw-program-info { box-sizing:border-box; position:absolute; right:12px; bottom:12px; width:min(480px,calc(100% - 24px)); max-height:75%; overflow:auto; border:1px solid #7189a3; border-radius:8px; padding:16px; color:#edf5ff; background:#23364c; box-shadow:0 8px 30px #0007; z-index:2; }
.sw-program-info>button { float:right; }
.sw-program-info p { font-size:13px; line-height:1.5; margin:10px 0; }
.sw-program-info pre { color:#ffd28d; padding-top:16px; white-space:pre-wrap; overflow-wrap:anywhere; }
.sw-program button:focus-visible,.sw-program input:focus-visible,.sw-program-viewport:focus-visible { outline:2px solid #7bc7ff; outline-offset:-2px; }
@media(max-width:600px) { .sw-program-toolbar { align-items:stretch; } .sw-program-meta { width:100%; } .sw-program input.sw-program-search { width:100%; } .sw-bf-dialog-body { padding:6px; } .sw-bf-size { margin-left:auto; } .sw-bf-file-name { min-width:calc(100% - 80px); } }

.sw-program-value { color:#f4eddb; }

.sw-program-code { grid-column:3; }

.sw-sim-panel:has(.sw-sim-source) { width:min(680px, calc(100% - 28px)); }
.sw-sim-source { border-top:1px solid var(--sw-n-200); margin-top:14px; padding-top:8px; }
.sw-sim-source-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.sw-sim-source-controls select { width:100%; min-width:0; }
.sw-sim-source-follow { display:flex; gap:6px; align-items:center; }
.sw-sim-source-status, .sw-sim-source .sw-muted { overflow-wrap:anywhere; font-size:12px; }
.sw-sim-source .sw-program-viewport { height:300px; max-height:45vh; }

.sw-ribbon-editor[data-workspace="production"] .sw-shell-body,
.sw-ribbon-editor[data-workspace="production"].sw-pieces-open .sw-shell-body {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
.sw-ribbon-editor[data-workspace="production"] .sw-shell-body > :not(#sw-production-workspace) { display: none; }
.sw-ribbon-editor #sw-production-workspace.sw-export-workspace {
    padding: clamp(18px, 3vw, 42px); overflow: auto; min-height: 0; background: var(--sw-white);
}
.sw-ribbon-editor[data-workspace="quote"] .sw-shell-body,
.sw-ribbon-editor[data-workspace="quote"].sw-pieces-open .sw-shell-body {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
.sw-ribbon-editor[data-workspace="quote"] .sw-shell-body > :not(#sw-quote-workspace) { display: none; }
.sw-ribbon-editor #sw-quote-workspace.sw-export-workspace {
    padding: clamp(18px, 3vw, 42px); overflow: hidden; min-height: 0; background: var(--sw-white);
    display: flex; flex-direction: column;
}
.sw-quote-workspace .sw-export-header { margin-bottom: 10px; }
.sw-export-layout.sw-quote-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; flex: 1; min-height: 0; }
.sw-export-layout.sw-quote-layout .sw-export-steps { flex-direction: row; gap: 8px; border-right: 0; border-bottom: 1px solid var(--sw-n-200); padding: 0 0 10px; }
.sw-export-layout.sw-quote-layout .sw-export-step { padding: 8px 14px; }
.sw-ribbon-editor #sw-quote-workspace.sw-export-workspace { padding: 14px clamp(12px, 2vw, 28px) 0; }
.sw-quote-workspace .sw-export-header h1 { font-size: 20px; }
.sw-quote-frame { display: block; width: 100%; height: 100%; min-height: 480px; border: 0; background: var(--sw-white); }
.sw-export-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.sw-export-header h1 { margin: 0; font-size: 26px; }
.sw-export-header p { margin: 6px 0 0; }
.sw-export-layout { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: 36px; }
.sw-export-steps { display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--sw-n-200); padding-right: 24px; }
.sw-export-step { background: transparent; color: var(--sw-n-600); border: 0; border-radius: 8px; padding: 14px; text-align: left; font: inherit; cursor: pointer; }
.sw-export-step[aria-current="step"] { color: var(--sw-ink-600); background: var(--sw-n-100); font-weight: 700; }
.sw-export-step:disabled { opacity: .5; cursor: not-allowed; }
.sw-export-destination-group { display: flex; flex-direction: column; gap: 4px; }
.sw-export-substeps { display: flex; flex-direction: column; gap: 4px; margin-left: 14px; padding-left: 8px; border-left: 1px solid var(--sw-n-200); }
.sw-export-substep { padding: 10px 12px; font-size: 14px; }
.sw-export-body { min-width: 0; }
.sw-export-body h2 { margin: 0 0 12px; font-size: 23px; }
.sw-export-body section > .sw-chip:first-child { margin-bottom: 20px; }
.sw-export-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.sw-export-choices { display: grid; gap: 18px; margin-top: 24px; }
.sw-export-choice { border: 1px solid var(--sw-n-200); border-radius: 12px; padding: 24px; }
.sw-export-choice > i { color: var(--sw-ink-600); font-size: 22px; float: right; }
.sw-export-choice h3 { margin: 0; font-size: 19px; }
.sw-export-choice p { line-height: 1.6; }
.sw-export-workspace .sw-production-check { padding: 14px 0; font-size: 14px; }
.sw-export-workspace .sw-send-inline .sw-send { width: 100%; max-width: none; max-height: none; padding: 20px 0; box-shadow: none; border: 0; }
.sw-export-workspace .sw-production-export { width: auto; margin: 12px 12px 12px 0; }
.sw-export-workspace .sw-btn:disabled { opacity: .5; cursor: not-allowed; }
@media(max-width:700px) {
    .sw-export-header { align-items: flex-start; flex-wrap: wrap; }
    .sw-export-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .sw-export-steps { align-items: flex-start; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--sw-n-200); padding: 0 0 14px; gap: 8px; }
    .sw-quote-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .sw-ribbon-editor #sw-quote-workspace.sw-export-workspace { padding: 12px; }
}

body.sw-sim-generating .sw-sim-stage { visibility:hidden;pointer-events:none; }
body.sw-sim-hydration-failed .sw-sim-stage { display:none; }

.sw-sim[data-source-stop="true"] .sw-sim-view { display: grid; place-items: center; padding: 96px 24px 140px; box-sizing: border-box; cursor: default; }
.sw-sim[data-source-stop="true"] .sw-sim-view > p { max-width: 720px; padding: 20px; border-radius: 12px; border: 1px solid var(--sw-danger-100); background: var(--sw-danger-50); color: var(--sw-danger-700); }

.sw-mat-search-dialog { width: min(1040px, calc(100vw - 24px)); }
.sw-mat-search-dialog[open] { display: flex; flex-direction: column; height: min(820px, calc(100dvh - 24px)); overflow: hidden; }
.sw-mat-search-dialog .sw-mat-search-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.sw-mat-search-dialog .sw-mat-search-head, .sw-mat-search-dialog .sw-mat-search-footer { flex: none; }
.sw-mat-search-dialog .sw-mat-chooser { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 24px; }
.sw-mat-search-dialog .sw-mat-chooser { flex: 1; min-height: 0; }
.sw-mat-search-dialog .sw-mat-chooser--no-facets { grid-template-columns: minmax(0, 1fr); }
.sw-mat-common-facts { font-size: 11px; color: var(--text-muted); line-height: 1.6; margin: 8px 0 12px; }
.sw-mat-facet-sidebar { background: var(--sw-n-25); border-right: 1px solid var(--sw-n-200); padding-right: 20px; min-width: 0; overflow-y: auto; }
.sw-mat-facet-sidebar > summary { font-size: 14px; font-weight: 650; padding: 8px 0 14px; cursor: pointer; }
.sw-mat-facet-group { border: 0; border-top: 1px solid var(--sw-n-200); padding: 12px 0 14px; margin: 0; min-width: 0; }
.sw-mat-facet-group legend { font-size: 12px; font-weight: 650; padding: 8px 0 0; color: var(--text-dark); }
.sw-mat-facet-options { max-height: 190px; overflow-y: auto; }
.sw-mat-facet-option { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; cursor: pointer; }
.sw-mat-facet-option input { flex: 0 0 auto; accent-color: var(--sw-ink-600); }
.sw-mat-facet-option > span { overflow-wrap: anywhere; min-width: 0; }
.sw-mat-facet-option small { margin-left: auto; color: var(--text-muted); font-size: 11px; }
.sw-mat-facet-option:has(input:disabled:not(:checked)) { opacity: .45; cursor: default; }
.sw-mat-search-main { min-width: 0; overflow-y: auto; padding-right: 4px; }
.sw-mat-search-main > .sw-mat-search { width: 100%; padding: 11px 13px; border: 1px solid var(--sw-ink-200); border-radius: 8px; }
.sw-mat-filter-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.sw-mat-filter-chip { background: var(--sw-ink-50); color: var(--sw-ink-600); border: 1px solid var(--sw-ink-200); border-radius: 6px; padding: 5px 8px; font-size: 11px; overflow-wrap: anywhere; text-align: left; }
.sw-mat-filters-clear { margin-left: auto; border: 0; background: transparent; color: var(--sw-ink-600); font-size: 12px; cursor: pointer; }
.sw-mat-match-count { color: var(--text-muted); font-size: 12px; margin: 14px 0; }
.sw-mat-search-dialog .sw-mat-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-height: none; overflow: visible; }
.sw-mat-search-dialog .sw-mat-result { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; text-align: left; border: 1px solid var(--sw-n-200); border-radius: 9px; overflow: hidden; background: var(--sw-white); }
.sw-mat-search-dialog .sw-mat-result .sw-mat-swatch { width: 100%; height: 92px; flex: none; border-radius: 0; border: 0; }
.sw-mat-search-dialog .sw-mat-swatch img { width: 100%; height: 100%; object-fit: cover; }
.sw-mat-search-dialog .sw-mat-result.active { border-color: var(--sw-ink-600); outline: 1px solid var(--sw-ink-600); background: var(--sw-ink-50); }
.sw-mat-search-dialog .sw-mat-name { padding: 11px; font-size: 12px; }
.sw-mat-product-facts { display: block; color: var(--text-muted); font-size: 10px; margin-top: 5px; line-height: 1.6; }
.sw-mat-product-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.sw-mat-product-tags > span { background: var(--sw-n-100); color: var(--text-muted); border-radius: 3px; font-size: 9px; padding: 3px 5px; }
.sw-mat-empty { grid-column: 1 / -1; border: 1px dashed var(--sw-n-200); border-radius: 9px; padding: 30px 20px; text-align: center; font-size: 13px; }
.sw-mat-empty p { color: var(--text-muted); font-size: 12px; margin: 10px 0 0; }
.sw-mat-search-footer { position: sticky; bottom: 0; display: flex; gap: 20px; align-items: center; justify-content: space-between; border-top: 1px solid var(--sw-n-200); background: var(--sw-white); padding: 14px 20px; z-index: 3; }
.sw-mat-selection-label { font-size: 12px; overflow-wrap: anywhere; margin: 0; }
.sw-mat-selection-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 700px) {
    .sw-mat-search-dialog .sw-mat-search-body { display: block; overflow-y: auto; }
    .sw-mat-search-dialog .sw-mat-chooser { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .sw-mat-search-main { overflow: visible; padding-right: 0; }
    .sw-mat-facet-sidebar { border-right: 0; border-bottom: 1px solid var(--sw-n-200); padding: 0; max-height: 45dvh; }
    .sw-mat-facet-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
    .sw-mat-search-dialog .sw-mat-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sw-mat-search-footer { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
    .sw-mat-selection-actions { justify-content: flex-end; }
}
@media (max-width: 360px) { .sw-mat-search-dialog .sw-mat-results { grid-template-columns: 1fr; } }

.sw-material-weights{scroll-margin-top:100px;margin:1.5rem 0;padding:1.25rem;border:1px solid var(--border,#d7ded8);border-radius:12px;background:var(--panel,#fff)}
.sw-weight-row{display:grid;grid-template-columns:minmax(80px,.7fr) minmax(90px,.8fr) minmax(150px,1.4fr) minmax(160px,2fr);gap:12px;padding:10px 0;border-bottom:1px solid #e6ebe7}
.sw-weight-row label{display:flex;flex-direction:column;gap:5px;font-size:.85rem;min-width:0}
.sw-weight-row input,.sw-weight-row select{width:100%;min-width:0;box-sizing:border-box;padding:9px;border:1px solid #bfcac2;border-radius:6px;background:#fff;color:#223b2b}
@media(max-width:650px){.sw-weight-row{grid-template-columns:1fr 1fr;gap:12px;padding:14px 0}.sw-weight-row label:last-child{grid-column:1/-1}.sw-material-weights{padding:14px}.sw-weight-row select{max-width:100%}}
