:root {
    --bg: #0a0c10;
    --bg-soft: #12161d;
    --bg-panel: #f3f5f9;
    --surface: rgba(18, 22, 29, 0.82);
    --surface-strong: rgba(24, 29, 37, 0.95);
    --surface-light: #ffffff;
    --surface-light-soft: #f7f9fc;
    --surface-sidebar: #10141c;
    --text: #f4f7fb;
    --text-soft: rgba(244, 247, 251, 0.68);
    --text-dark: #121826;
    --text-dark-soft: #64748b;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --line-light: rgba(15, 23, 42, 0.08);
    --primary: #ff7a45;
    --primary-dark: #ff5d22;
    --secondary: #41c3a5;
    --secondary-dark: #21967c;
    --success: #16a34a;
    --warning: #c7861e;
    --danger: #e11d48;
    --info: #2563eb;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shadow-xl: 0 40px 120px rgba(2, 6, 23, 0.38);
    --shadow-lg: 0 24px 70px rgba(2, 6, 23, 0.18);
    --shadow-md: 0 18px 36px rgba(2, 6, 23, 0.1);
    --font-ui: "Segoe UI Variable Display", "Bahnschrift", "Trebuchet MS", sans-serif;
    --font-heading: "Aptos Display", "Segoe UI Variable Display", "Bahnschrift", sans-serif;
}

/* Desktop case designer V3 */
.designer-body {
    --designer-ink: #151b24;
    --designer-muted: #6f7b89;
    --designer-line: #e3e8eb;
    --designer-soft: #f4f7f7;
    --designer-canvas: #e9eeef;
    --designer-teal: #19aaa5;
    --designer-teal-dark: #0c807c;
    --designer-coral: #ff7a55;
    min-width: 320px;
    margin: 0;
    overflow: hidden;
    color: var(--designer-ink);
    background: var(--designer-canvas);
    font-family: "DM Sans", sans-serif;
}

.designer-body *,
.designer-body *::before,
.designer-body *::after {
    box-sizing: border-box;
}

.designer-body button,
.designer-body input,
.designer-body textarea,
.designer-body select {
    font: inherit;
}

.designer-body button,
.designer-body a {
    -webkit-tap-highlight-color: transparent;
}

.desktop-studio {
    min-height: 100svh;
    background: var(--designer-canvas);
}

.designer-header {
    position: relative;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(300px, 1fr);
    gap: 24px;
    align-items: center;
    height: 76px;
    padding: 0 24px;
    border-bottom: 1px solid var(--designer-line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 rgba(20, 29, 38, 0.02);
    backdrop-filter: blur(16px);
}

.designer-brand {
    display: inline-flex;
    gap: 11px;
    align-items: center;
    width: fit-content;
    color: var(--designer-ink);
    text-decoration: none;
}

.designer-brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    border-radius: 13px;
    background: var(--designer-ink);
    box-shadow: inset -8px -8px 18px rgba(25, 170, 165, 0.26);
    font-family: "Manrope", sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
}

.designer-brand > span:last-child,
.designer-device-copy,
.designer-project-name > span:last-child {
    display: grid;
}

.designer-brand strong {
    font-family: "Manrope", sans-serif;
    font-size: 0.93rem;
    letter-spacing: -0.025em;
}

.designer-brand small,
.designer-device-copy small,
.designer-project-name small {
    color: var(--designer-muted);
    font-size: 0.66rem;
}

.designer-device-button {
    display: grid;
    grid-template-columns: 34px minmax(150px, auto) 18px;
    gap: 10px;
    align-items: center;
    min-width: 300px;
    min-height: 52px;
    padding: 6px 13px;
    color: var(--designer-ink);
    text-align: left;
    border: 1px solid var(--designer-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(30, 42, 52, 0.06);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.designer-device-button:hover {
    border-color: rgba(25, 170, 165, 0.5);
    box-shadow: 0 10px 28px rgba(25, 170, 165, 0.12);
    transform: translateY(-1px);
}

.designer-device-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--designer-teal-dark);
    border-radius: 10px;
    background: #e9f8f7;
}

.designer-device-icon svg,
.designer-header-actions svg,
.designer-model-search svg,
.designer-toolrail svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.designer-device-copy strong {
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.designer-chevron {
    color: #89949f;
    font-size: 1.15rem;
}

.designer-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    align-items: center;
}

.designer-quiet-link {
    padding: 9px;
    color: var(--designer-muted);
    font-size: 0.76rem;
    font-weight: 650;
    text-decoration: none;
}

.designer-ghost-button,
.designer-save-button,
.designer-primary-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.designer-ghost-button {
    color: #424d59;
    border: 1px solid var(--designer-line);
    background: #fff;
}

.designer-save-button,
.designer-primary-button {
    color: #fff;
    border: 1px solid var(--designer-teal);
    background: linear-gradient(135deg, #24bbb1, #11978f);
    box-shadow: 0 10px 24px rgba(17, 151, 143, 0.2);
}

.designer-save-button svg {
    width: 16px;
    height: 16px;
}

.designer-ghost-button:hover,
.designer-save-button:hover,
.designer-primary-button:hover {
    transform: translateY(-1px);
}

.designer-form {
    display: block;
}

.designer-workspace {
    display: grid;
    grid-template-columns: 88px minmax(520px, 1fr) 372px;
    height: calc(100svh - 76px);
    overflow: hidden;
}

.designer-toolrail {
    position: relative;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 18px 10px;
    border-right: 1px solid var(--designer-line);
    background: #fff;
}

.designer-toolrail button {
    display: grid;
    width: 68px;
    min-height: 64px;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 8px 4px;
    color: #707b88;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.designer-toolrail button span {
    font-size: 0.63rem;
    font-weight: 700;
}

.designer-toolrail button:hover {
    color: var(--designer-ink);
    background: #f4f7f7;
    transform: translateY(-1px);
}

.designer-toolrail button.is-active {
    color: var(--designer-teal-dark);
    border-color: #c9eeeb;
    background: #eaf8f7;
}

.designer-toolrail-divider {
    width: 42px;
    height: 1px;
    margin: 4px 0;
    background: var(--designer-line);
}

.designer-stage-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255,255,255,0.95) 0 7%, rgba(255,255,255,0) 45%),
        radial-gradient(circle, rgba(58, 75, 84, 0.08) 1px, transparent 1px),
        var(--designer-canvas);
    background-size: auto, 22px 22px, auto;
}

.designer-stage-toolbar {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(209, 218, 222, 0.85);
    background: rgba(245, 248, 248, 0.82);
    backdrop-filter: blur(12px);
}

.designer-project-name {
    display: flex;
    gap: 9px;
    align-items: center;
}

.designer-project-name strong {
    font-size: 0.72rem;
}

.designer-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--designer-teal);
    box-shadow: 0 0 0 5px rgba(25, 170, 165, 0.12);
}

.designer-body .pro-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
}

.designer-body .pro-toolbar-group,
.designer-body .pro-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.designer-body .pro-toolbar-group,
.designer-body .pro-view-switch {
    padding: 3px;
    border: 1px solid #dce3e6;
    border-radius: 11px;
    background: rgba(255,255,255,0.84);
}

.designer-body .pro-icon-button,
.designer-body .pro-view-switch button,
.designer-body .pro-guide-button {
    min-height: 32px;
    padding: 0 10px;
    color: #66727f;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.designer-body .pro-icon-button {
    min-width: 32px;
    padding: 0;
    font-size: 1rem;
}

.designer-body .pro-view-switch button.is-active,
.designer-body .pro-guide-button.is-active {
    color: #087b75;
    background: #e8f7f5;
}

.designer-body .pro-icon-button:disabled {
    opacity: 0.3;
    cursor: default;
}

.designer-body .pro-guide-button {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    min-height: 38px;
    border: 1px solid #dce3e6;
    background: rgba(255,255,255,0.84);
}

.designer-body .pro-guide-button span {
    width: 12px;
    height: 12px;
    border: 1px dashed currentColor;
    border-radius: 3px;
}

.designer-canvas-workspace {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px 12px;
    overflow: auto;
}

.designer-canvas-caption {
    display: flex;
    width: min(100%, 520px);
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.designer-canvas-caption > div {
    display: grid;
    gap: 2px;
}

.designer-canvas-caption small {
    color: var(--designer-muted);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.designer-canvas-caption strong {
    font-family: "Manrope", sans-serif;
    font-size: 0.82rem;
}

.designer-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    color: #7d5c18;
    border: 1px solid #eddcae;
    border-radius: 999px;
    background: #fff8e5;
    font-size: 0.58rem;
    font-weight: 750;
}

.designer-template-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.designer-template-badge.is-calibrated {
    color: #087970;
    border-color: #bde7e2;
    background: #eaf8f6;
}

.designer-body .case-stage-shell {
    display: grid;
    width: auto;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
}

.designer-body .case-stage {
    position: relative;
    width: auto;
    height: min(680px, calc(100svh - 252px));
    min-height: 430px;
    aspect-ratio: 378 / 650;
    overflow: hidden;
    border: 1px solid rgba(131, 147, 155, 0.24);
    border-radius: 22px;
    background: #e7ecee;
    box-shadow: 0 28px 60px rgba(38, 53, 62, 0.18), 0 2px 8px rgba(38, 53, 62, 0.08);
}

.designer-body .case-stage-artboard {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    cursor: default;
    touch-action: none;
}

.designer-body .case-stage-artboard.has-photo {
    cursor: grab;
}

.designer-body .case-stage-artboard.has-photo:active {
    cursor: grabbing;
}

.designer-body .pro-editor-canvas {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    touch-action: none;
}

.designer-body .pro-stage-footer {
    display: flex;
    width: min(100%, 520px);
    min-height: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.designer-body .pro-quality {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #697582;
    font-size: 0.65rem;
    font-weight: 650;
}

.designer-body .pro-quality-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #89949f;
    box-shadow: 0 0 0 4px rgba(112, 124, 136, 0.1);
}

.designer-body .pro-quality.is-good { color: #087c72; }
.designer-body .pro-quality.is-good .pro-quality-dot { background: var(--designer-teal); box-shadow: 0 0 0 4px rgba(25,170,165,0.12); }
.designer-body .pro-quality.is-warning { color: #9a6816; }
.designer-body .pro-quality.is-warning .pro-quality-dot { background: #dca02b; }
.designer-body .pro-quality.is-poor { color: #b84343; }
.designer-body .pro-quality.is-poor .pro-quality-dot { background: #e75a5a; }

.designer-body .pro-stage-tip {
    color: #7c8792;
    font-size: 0.59rem;
}

.designer-body .pro-stage-tip kbd {
    padding: 2px 5px;
    color: #4b5661;
    border: 1px solid #d3dadd;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: rgba(255,255,255,0.75);
    font: inherit;
    font-weight: 700;
}

.designer-inspector {
    min-width: 0;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border-left: 1px solid var(--designer-line);
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #cad3d7 transparent;
}

.designer-body .pro-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.designer-body .pro-inspector-header small,
.designer-body .pro-export-panel span {
    color: var(--designer-teal-dark);
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.designer-body .pro-inspector-header h2 {
    margin: 2px 0 0;
    font-family: "Manrope", sans-serif;
    font-size: 1.22rem;
    letter-spacing: -0.04em;
}

.designer-body .pro-inspector-header button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #697582;
    border: 1px solid var(--designer-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.designer-body .pro-properties,
.designer-body .pro-layers-panel,
.designer-body .pro-export-panel {
    display: grid;
    gap: 14px;
    padding: 0 0 20px;
    border: 0;
    border-bottom: 1px solid var(--designer-line);
    border-radius: 0;
    background: transparent;
}

.designer-body .pro-properties[hidden] {
    display: none;
}

.designer-body .pro-layers-panel,
.designer-body .pro-export-panel {
    margin-top: 20px;
}

.designer-body .pro-properties-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.designer-body .pro-properties-head > div {
    display: grid;
    gap: 2px;
}

.designer-body .pro-properties-head span,
.designer-body .pro-field > span {
    color: #818c97;
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.designer-body .pro-properties-head strong {
    font-size: 0.8rem;
}

.pro-selection-chip {
    padding: 5px 7px;
    color: var(--designer-teal-dark) !important;
    border-radius: 999px;
    background: #e8f7f5;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.pro-upload-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 62px;
    padding: 10px;
    color: var(--designer-ink);
    text-align: left;
    border: 1px dashed #b9c8cc;
    border-radius: 13px;
    background: #f7f9f9;
    cursor: pointer;
}

.pro-upload-card:hover {
    border-color: var(--designer-teal);
    background: #f1fbfa;
}

.pro-upload-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    border-radius: 10px;
    background: var(--designer-teal);
    font-size: 1.2rem;
}

.pro-upload-card > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.pro-upload-card strong,
.pro-upload-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pro-upload-card strong { font-size: 0.72rem; }
.pro-upload-card small { color: var(--designer-muted); font-size: 0.59rem; }
.pro-upload-card em { color: var(--designer-teal-dark); font-size: 0.62rem; font-style: normal; font-weight: 750; }

.designer-body .pro-segmented,
.designer-body .pro-button-row,
.designer-body .pro-layer-actions,
.designer-body .pro-text-style-row,
.designer-body .pro-export-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.designer-body .pro-segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 3px;
    border: 1px solid var(--designer-line);
    border-radius: 10px;
    background: #f5f7f7;
}

.designer-body .pro-segmented button,
.designer-body .pro-small-button,
.designer-body .pro-layer-actions button,
.designer-body .pro-text-style-row button,
.designer-body .pro-export-actions button {
    min-height: 34px;
    padding: 0 8px;
    color: #64707c;
    border: 1px solid var(--designer-line);
    border-radius: 8px;
    background: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    cursor: pointer;
}

.designer-body .pro-segmented button {
    border: 0;
    background: transparent;
}

.designer-body .pro-segmented button.is-active,
.designer-body .pro-text-style-row button.is-active,
.designer-body .pro-accent-button,
.designer-body .pro-export-actions button.is-primary {
    color: #fff;
    border-color: var(--designer-teal);
    background: var(--designer-teal);
}

.designer-body .pro-range,
.designer-body .pro-field {
    display: grid;
    gap: 7px;
}

.designer-body .pro-range > span {
    display: flex;
    justify-content: space-between;
    color: #586470;
    font-size: 0.67rem;
    font-weight: 650;
}

.designer-body .pro-range output {
    color: #89939d;
    font-size: 0.62rem;
}

.designer-body .pro-range input[type="range"] {
    width: 100%;
    height: 4px;
    padding: 0;
    accent-color: var(--designer-teal);
    border: 0;
    background: transparent;
}

.designer-body .pro-field input,
.designer-body .pro-field select,
.designer-body .pro-field textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    color: var(--designer-ink);
    border: 1px solid var(--designer-line);
    border-radius: 9px;
    background: #f8fafa;
    box-shadow: none;
    font-size: 0.7rem;
}

.designer-body .pro-field input[type="color"] { padding: 4px; }
.designer-body .pro-two-columns { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }

.designer-body .pro-sticker-grid,
.designer-body .pro-background-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.designer-body .pro-sticker-grid button,
.designer-body .pro-background-grid button {
    display: grid;
    min-height: 62px;
    place-items: center;
    gap: 3px;
    padding: 6px;
    color: #596571;
    border: 1px solid var(--designer-line);
    border-radius: 10px;
    background: #f8fafa;
    cursor: pointer;
}

.designer-body .pro-sticker-grid button:hover,
.designer-body .pro-background-grid button:hover,
.designer-body .pro-background-grid button.is-active {
    border-color: var(--designer-teal);
    background: #effaf9;
}

.designer-body .pro-sticker-grid span { font-size: 1.15rem; line-height: 1; }
.designer-body .pro-sticker-grid small,
.designer-body .pro-background-grid small { font-size: 0.57rem; }
.designer-body .pro-background-grid span { width: 28px; height: 28px; border: 1px solid #d7dfe2; border-radius: 50%; }

.designer-body .pro-layer-list {
    display: grid;
    gap: 6px;
    max-height: 170px;
    overflow: auto;
}

.designer-body .pro-layer-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 6px 8px;
    color: #4f5a66;
    text-align: left;
    border: 1px solid var(--designer-line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.designer-body .pro-layer-item.is-active {
    color: var(--designer-teal-dark);
    border-color: #aedaD6;
    background: #effaf9;
}

.designer-body .pro-layer-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #eef3f3;
    font-weight: 800;
}

.designer-body .pro-layer-item > span:last-child { display: grid; min-width: 0; }
.designer-body .pro-layer-item strong,
.designer-body .pro-layer-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.designer-body .pro-layer-item strong { font-size: 0.66rem; }
.designer-body .pro-layer-item small { color: #8b959f; font-size: 0.55rem; }
.designer-body .pro-layer-actions { grid-template-columns: 34px 34px 1fr 1fr; }
.designer-body .pro-layer-actions button:disabled { opacity: 0.35; cursor: default; }
.designer-body .pro-layer-actions .is-danger { color: #bc4f4f; border-color: #f0d4d4; background: #fff8f8; }

.designer-body .pro-export-panel > div {
    display: grid;
    gap: 3px;
}

.designer-body .pro-export-panel strong { font-size: 0.72rem; }
.designer-body .pro-export-panel p { margin: 0; color: #75808b; font-size: 0.61rem; line-height: 1.5; }
.designer-body .pro-export-panel p.is-warning { color: #9a6816; }

.designer-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(19, 27, 35, 0.58);
    backdrop-filter: blur(8px);
    animation: designer-fade-in 160ms ease both;
}

.designer-modal[hidden] { display: none; }

.designer-modal-card {
    width: min(100%, 1040px);
    max-height: min(820px, calc(100svh - 48px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 34px 90px rgba(5, 14, 22, 0.3);
    animation: designer-rise-in 200ms ease both;
}

.designer-modal-header {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--designer-line);
}

.designer-modal-header small {
    color: var(--designer-coral);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.designer-modal-header h2 {
    margin: 3px 0 0;
    font-family: "Manrope", sans-serif;
    font-size: 1.45rem;
    letter-spacing: -0.045em;
}

.designer-modal-close {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #65717c;
    border: 1px solid var(--designer-line);
    border-radius: 12px;
    background: #f7f9f9;
    font-size: 1.25rem;
    cursor: pointer;
}

.designer-device-modal-body {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: 430px;
    max-height: calc(100svh - 310px);
}

.designer-brand-list {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 18px;
    border-right: 1px solid var(--designer-line);
    background: #f7f9f9;
}

.designer-brand-list button {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 7px 9px;
    color: #5c6874;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.designer-brand-list button > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(33,45,54,0.07);
    font-family: "Manrope", sans-serif;
}

.designer-brand-list button strong { font-size: 0.73rem; }
.designer-brand-list button.is-active { color: var(--designer-teal-dark); border-color: #bde5e1; background: #eaf8f6; }

.designer-model-browser {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    padding: 18px 20px;
    overflow: hidden;
}

.designer-model-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 0 13px;
    color: #7b8792;
    border: 1px solid var(--designer-line);
    border-radius: 12px;
    background: #f8fafa;
}

.designer-model-search input {
    width: 100%;
    padding: 0;
    color: var(--designer-ink);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.75rem;
}

.designer-model-list {
    display: block;
    min-height: 0;
    margin-top: 14px;
    padding-right: 6px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c4d0d3 transparent;
}

.designer-model-list .model-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.designer-model-list .model-group-year {
    grid-column: 1 / -1;
    padding: 3px 2px;
    color: #89949e;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.designer-model-list .model-option {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 13px;
    color: #47535f;
    text-align: left;
    border: 1px solid var(--designer-line);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
}

.designer-model-list .model-option span { font-size: 0.7rem; font-weight: 700; }
.designer-model-list .model-option small { color: #96a0aa; font-size: 0.57rem; }
.designer-model-list .model-option:hover { border-color: #acdcd7; background: #f3fbfa; }
.designer-model-list .model-option.is-active { color: #087b75; border-color: var(--designer-teal); background: #eaf8f6; box-shadow: 0 7px 18px rgba(25,170,165,0.1); }
.designer-model-list .model-picker-empty { color: #78838e; font-size: 0.72rem; }

.designer-device-modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    min-height: 118px;
    padding: 16px 22px;
    border-top: 1px solid var(--designer-line);
    background: #fff;
}

.designer-case-style-list {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.designer-case-style-list > span {
    align-self: center;
    margin-right: 4px;
    color: #828d97;
    font-size: 0.59rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.designer-case-style-list button {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    width: min(250px, 26vw);
    min-height: 62px;
    padding: 8px;
    color: #4f5b67;
    text-align: left;
    border: 1px solid var(--designer-line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.designer-case-style-list button > i {
    width: 36px;
    height: 46px;
    border-radius: 9px;
    background: linear-gradient(145deg, #172536, #405f78);
}

.designer-case-style-list button > i.style-sunset-bloom { background: linear-gradient(145deg, #fff1df, #ff9b78); }
.designer-case-style-list button > span { display: grid; min-width: 0; }
.designer-case-style-list button strong { font-size: 0.66rem; }
.designer-case-style-list button small { overflow: hidden; color: #8b959e; font-size: 0.52rem; text-overflow: ellipsis; white-space: nowrap; }
.designer-case-style-list button.is-active { border-color: var(--designer-teal); background: #effaf9; }
.designer-device-modal-footer .designer-primary-button { min-width: 150px; }

.designer-save-modal-card { width: min(100%, 820px); }
.designer-save-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 420px; }
.designer-save-summary { display: grid; align-content: start; gap: 10px; padding: 22px; background: #eef3f3; }
.designer-save-preview { display: grid; height: 270px; place-items: center; overflow: hidden; border-radius: 16px; background: #dfe6e8; box-shadow: inset 0 0 0 1px rgba(80,96,105,0.08); }
.designer-save-preview-canvas { display: block; width: auto; height: 100%; }
.designer-save-summary strong { font-family: "Manrope", sans-serif; font-size: 0.78rem; }
.designer-save-summary p { margin: 0; color: #74808b; font-size: 0.62rem; line-height: 1.55; }

.designer-save-fields {
    display: grid;
    align-content: start;
    gap: 15px;
    padding: 22px;
    overflow-y: auto;
}

.designer-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.designer-save-fields label { display: grid; gap: 6px; }
.designer-save-fields label > span { color: #596570; font-size: 0.63rem; font-weight: 700; }
.designer-save-fields input,
.designer-save-fields textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--designer-ink);
    border: 1px solid var(--designer-line);
    border-radius: 10px;
    outline: 0;
    background: #f8fafa;
    font-size: 0.72rem;
}
.designer-save-fields textarea { resize: vertical; }
.designer-save-fields input:focus,
.designer-save-fields textarea:focus { border-color: var(--designer-teal); box-shadow: 0 0 0 3px rgba(25,170,165,0.1); }
.designer-code-field { padding: 13px; border: 1px solid #bde5e1; border-radius: 12px; background: #effaf9; }
.designer-code-field small { color: #66817e; font-size: 0.57rem; }
.designer-signed-note { padding: 12px; color: #087970; border-radius: 10px; background: #eaf8f6; font-size: 0.67rem; font-weight: 650; }
.designer-save-footer { display: flex; min-height: 74px; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 22px; border-top: 1px solid var(--designer-line); }

.designer-result-toast {
    position: fixed;
    z-index: 70;
    right: 22px;
    bottom: 22px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    width: min(390px, calc(100vw - 44px));
    padding: 9px;
    border: 1px solid var(--designer-line);
    border-radius: 15px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 20px 50px rgba(25,39,47,0.18);
    backdrop-filter: blur(14px);
}

.designer-result-toast img { width: 46px; height: 58px; object-fit: cover; border-radius: 9px; }
.designer-result-toast > div:nth-child(2) { display: grid; min-width: 0; }
.designer-result-toast small { color: var(--designer-teal-dark); font-size: 0.56rem; font-weight: 750; text-transform: uppercase; }
.designer-result-toast strong { overflow: hidden; font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.designer-result-actions { display: flex; gap: 5px; }
.designer-result-actions a { padding: 7px 8px; color: #087970; border-radius: 7px; background: #eaf8f6; font-size: 0.58rem; font-weight: 750; text-decoration: none; }

.designer-flash {
    position: fixed;
    z-index: 80;
    top: 88px;
    right: 20px;
    max-width: min(380px, calc(100vw - 40px));
    padding: 12px 15px;
    color: #206158;
    border: 1px solid #b8e1dc;
    border-radius: 12px;
    background: #effaf8;
    box-shadow: 0 14px 34px rgba(24,49,50,0.12);
    font-size: 0.7rem;
}

.designer-login-card {
    width: min(460px, calc(100vw - 32px));
    padding: 28px;
    color: var(--designer-ink);
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 22px;
    background: #fff;
}

.designer-login-card .login-modal-close { color: #5f6a75; background: #f2f5f5; }

@keyframes designer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes designer-rise-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }

@media (max-width: 1240px) {
    .designer-header { grid-template-columns: minmax(170px, 1fr) auto minmax(255px, 1fr); gap: 14px; padding: 0 16px; }
    .designer-device-button { min-width: 260px; }
    .designer-workspace { grid-template-columns: 76px minmax(440px, 1fr) 330px; }
    .designer-toolrail button { width: 58px; }
    .designer-inspector { padding: 17px; }
    .designer-quiet-link { display: none; }
    .designer-body .pro-stage-tip { display: none; }
}

@media (max-width: 980px) {
    .designer-body { overflow: auto; }
    .designer-header { grid-template-columns: 1fr auto; height: auto; min-height: 68px; }
    .designer-brand small { display: none; }
    .designer-device-button { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; margin-bottom: 10px; }
    .designer-header-actions { grid-column: 2; grid-row: 1; }
    .designer-header-actions .nw-inline-form,
    .designer-header-actions .designer-ghost-button { display: none; }
    .designer-workspace { grid-template-columns: 1fr; height: auto; min-height: calc(100svh - 130px); padding-bottom: 78px; overflow: visible; }
    .designer-toolrail { position: fixed; z-index: 60; right: 10px; bottom: 10px; left: 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px; border: 1px solid rgba(218,225,228,0.9); border-radius: 18px; box-shadow: 0 15px 42px rgba(29,43,51,0.2); }
    .designer-toolrail button { width: auto; min-height: 54px; }
    .designer-toolrail-divider { display: none; }
    .designer-stage-toolbar { padding: 8px 12px; }
    .designer-project-name { display: none; }
    .designer-body .pro-editor-toolbar { width: 100%; justify-content: space-between; }
    .designer-canvas-workspace { min-height: 680px; padding: 14px 10px; }
    .designer-body .case-stage { height: min(650px, calc(100svh - 225px)); min-height: 520px; }
    .designer-inspector { border-top: 1px solid var(--designer-line); border-left: 0; }
    .designer-device-modal-body { grid-template-columns: 130px 1fr; }
    .designer-device-modal-footer { grid-template-columns: 1fr; }
    .designer-case-style-list button { width: min(240px, 38vw); }
}

@media (max-width: 640px) {
    .designer-header { padding: 8px 10px; }
    .designer-brand-mark { width: 36px; height: 36px; }
    .designer-header-actions .designer-save-button { min-width: 42px; padding: 0 12px; font-size: 0; }
    .designer-header-actions .designer-save-button svg { width: 18px; height: 18px; }
    .designer-canvas-caption { align-items: flex-start; }
    .designer-template-badge { max-width: 150px; text-align: right; }
    .designer-body .pro-guide-button { display: none; }
    .designer-canvas-workspace { min-height: 620px; }
    .designer-body .case-stage { height: min(600px, calc(100svh - 220px)); min-height: 470px; }
    .designer-body .pro-stage-footer { justify-content: center; }
    .designer-body .pro-stage-tip { display: none; }
    .designer-modal { padding: 8px; place-items: end center; }
    .designer-modal-card { max-height: calc(100svh - 16px); border-radius: 20px; }
    .designer-modal-header { min-height: 68px; padding: 13px 15px; }
    .designer-modal-header h2 { font-size: 1.15rem; }
    .designer-device-modal-body { grid-template-columns: 1fr; max-height: calc(100svh - 250px); }
    .designer-brand-list { display: grid; grid-template-columns: repeat(2, 1fr); padding: 10px; border-right: 0; border-bottom: 1px solid var(--designer-line); }
    .designer-brand-list button { min-height: 44px; }
    .designer-model-browser { min-height: 380px; padding: 12px; }
    .designer-model-list .model-group { grid-template-columns: 1fr; }
    .designer-device-modal-footer { padding: 11px; }
    .designer-case-style-list { overflow-x: auto; }
    .designer-case-style-list > span { display: none; }
    .designer-case-style-list button { min-width: 210px; width: 210px; }
    .designer-device-modal-footer .designer-primary-button { width: 100%; }
    .designer-save-layout { grid-template-columns: 1fr; max-height: calc(100svh - 210px); overflow-y: auto; }
    .designer-save-summary { grid-template-columns: 100px 1fr; }
    .designer-save-preview { grid-row: span 2; height: 140px; }
    .designer-field-grid { grid-template-columns: 1fr; }
    .designer-save-footer { padding: 10px; }
    .designer-save-footer button { flex: 1; }
}

/* Device picker: compact catalog layout with a real scrolling model list. */
.designer-body .designer-toolrail button.is-active {
    color: #087b77;
    background: #edf7f5;
    box-shadow: none;
}

.designer-body .designer-toolrail button.is-active::before {
    display: none;
    content: none;
}

.designer-body .designer-device-modal-card {
    display: grid;
    width: min(1120px, calc(100vw - 48px));
    height: min(780px, calc(100svh - 48px));
    max-height: none;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid #dce3e1;
    border-radius: 16px;
    background: #fff;
}

.designer-body .designer-device-modal-card .designer-modal-header {
    min-height: 88px;
    padding: 18px 24px;
}

.designer-body .designer-modal-intro {
    display: grid;
    gap: 4px;
}

.designer-body .designer-modal-intro h2 {
    margin: 0;
    color: #17262d;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.designer-body .designer-modal-intro p {
    margin: 0;
    color: #6d7a80;
    font-size: 14px;
}

.designer-body .designer-device-modal-card .designer-modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f1f4f3;
    box-shadow: none;
    transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.designer-body .designer-device-modal-card .designer-modal-close:hover {
    color: #17262d;
    background: #e5ebea;
    transform: rotate(4deg);
}

.designer-body .designer-device-modal-body {
    min-height: 0;
    max-height: none;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
}

.designer-body .designer-brand-list {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 4px;
    padding: 24px 16px;
    border-right: 1px solid #e2e8e6;
    background: #f7f9f8;
}

.designer-body .designer-brand-list-label {
    margin: 0 10px 10px;
    color: #7a878c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.designer-body .designer-brand-list button {
    display: grid;
    min-height: 58px;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    padding: 7px 10px;
    color: #536168;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    transition: color 150ms ease, background 150ms ease;
}

.designer-body .designer-brand-list button:hover {
    color: #17262d;
    background: #edf1f0;
}

.designer-body .designer-brand-list button.is-active {
    color: #0b756f;
    border: 0;
    background: #e4f2ef;
    box-shadow: none;
}

.designer-body .designer-brand-list button > .designer-brand-logo {
    display: grid;
    width: 54px;
    height: 36px;
    place-items: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.designer-body .designer-brand-logo-apple {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.designer-body .designer-brand-logo-samsung {
    font-family: "Manrope", sans-serif;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: -0.055em;
}

.designer-body .designer-brand-list button strong {
    font-size: 15px;
    font-weight: 700;
}

.designer-body .designer-model-browser {
    display: grid;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    padding: 22px 24px 0;
    overflow: hidden;
    background: #fff;
}

.designer-body .designer-model-search {
    min-height: 48px;
    border-color: #dce4e2;
    border-radius: 8px;
    background: #f7f9f8;
}

.designer-body .designer-model-search:focus-within {
    border-color: #8fcac5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21, 159, 151, 0.1);
}

.designer-body .designer-model-list {
    min-height: 0;
    margin-top: 16px;
    padding: 0 14px 24px 0;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #a9b8b5 #edf1f0;
}

.designer-body .designer-model-list::-webkit-scrollbar {
    width: 10px;
}

.designer-body .designer-model-list::-webkit-scrollbar-track {
    border-radius: 10px;
    background: #edf1f0;
}

.designer-body .designer-model-list::-webkit-scrollbar-thumb {
    border: 2px solid #edf1f0;
    border-radius: 10px;
    background: #9dadaa;
}

.designer-body .designer-model-list .model-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 0 0 24px;
}

.designer-body .designer-model-list .model-group-year {
    display: flex;
    grid-column: 1 / -1;
    gap: 12px;
    align-items: center;
    margin-bottom: 4px;
    padding: 0 0 9px;
    color: #7a878c;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.designer-body .designer-model-list .model-group-year::after {
    height: 1px;
    flex: 1;
    background: #e4e9e8;
    content: "";
}

.designer-body .designer-model-list .model-option {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    color: #3e4e55;
    border: 0;
    border-bottom: 1px solid #e6ebea;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: color 140ms ease, background 140ms ease, padding 140ms ease;
}

.designer-body .designer-model-list .model-option:hover {
    color: #0c766f;
    border-color: #e6ebea;
    background: #f4f8f7;
    padding-inline: 12px;
}

.designer-body .designer-model-list .model-option.is-active {
    color: #087b75;
    border-color: #cfe2df;
    background: #eaf5f3;
    box-shadow: none;
    font-weight: 700;
}

.designer-body .designer-model-list .model-option span {
    font-size: 14px;
    font-weight: 650;
}

.designer-body .designer-model-list .model-option small {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: #159f97;
    font-size: 13px;
    font-weight: 800;
}

.designer-body .designer-device-modal-footer {
    position: relative;
    z-index: 2;
    min-height: 112px;
    padding: 16px 24px;
    border-top-color: #e1e7e5;
    background: #fbfcfc;
    box-shadow: 0 -10px 30px rgba(28, 48, 55, 0.04);
}

@media (max-width: 760px) {
    .designer-body .designer-device-modal-card {
        width: calc(100vw - 20px);
        height: calc(100svh - 20px);
    }

    .designer-body .designer-device-modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .designer-body .designer-brand-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid #e2e8e6;
    }

    .designer-body .designer-brand-list-label {
        display: none;
    }

    .designer-body .designer-model-browser {
        min-height: 0;
        padding: 14px 14px 0;
    }

    .designer-body .designer-model-list .model-group {
        grid-template-columns: 1fr;
    }

    .designer-body .designer-device-modal-footer {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--text);
    background: var(--bg);
}

body.modal-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 15px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(244, 247, 251, 0.4);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 122, 69, 0.75);
    box-shadow: 0 0 0 4px rgba(255, 122, 69, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

label {
    display: grid;
    gap: 8px;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.04em;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    min-height: 56px;
    padding-inline: 26px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 18px 40px rgba(255, 93, 34, 0.28);
}

.btn-secondary {
    color: #fff;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    box-shadow: 0 18px 40px rgba(33, 150, 124, 0.24);
}

.btn-ghost,
.btn-copy,
.btn-outline {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.02);
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: min(100%, 640px);
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-md);
}

.flash-success {
    border-left: 4px solid var(--success);
}

.flash-error {
    border-left: 4px solid var(--danger);
}

.panel-body .flash {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(15, 23, 42, 0.08);
}

.nw-home-body {
    min-height: 100vh;
    color: #fafafa;
    background: #0a0a0a;
}

.nw-home-body h1,
.nw-home-body h2,
.nw-home-body h3 {
    font-family: var(--font-ui);
    font-weight: 600;
}

.nw-home-wrap {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 64px;
}

.nw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #27272a;
}

.nw-brand {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nw-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nw-header-note {
    font-size: 0.75rem;
    color: #a1a1aa;
}

.nw-header-link,
.nw-top-button,
.nw-primary-button,
.nw-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nw-header-link,
.nw-top-button,
.nw-secondary-button {
    color: #fafafa;
    border: 1px solid #27272a;
    background: #18181b;
}

.nw-top-button-ghost {
    background: transparent;
}

.nw-primary-button {
    color: #111827;
    border: 1px solid #fafafa;
    background: #fafafa;
}

.nw-header-link:hover,
.nw-top-button:hover,
.nw-primary-button:hover,
.nw-secondary-button:hover {
    transform: translateY(-1px);
}

.nw-inline-form {
    margin: 0;
}

.nw-flash {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    border: 1px solid #27272a;
    background: #18181b;
}

.nw-flash-success {
    border-color: rgba(34, 197, 94, 0.3);
}

.nw-flash-error {
    border-color: rgba(225, 29, 72, 0.3);
}

.nw-main {
    padding: 48px 0 0;
}

.nw-intro h1 {
    margin-bottom: 8px;
    font-size: clamp(2.5rem, 5vw, 3rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.nw-intro p {
    max-width: 40rem;
    color: #a1a1aa;
    font-size: 0.875rem;
    line-height: 1.7;
}

.nw-builder {
    display: grid;
    gap: 24px;
    margin-top: 40px;
}

.nw-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 420px minmax(0, 1fr);
}

.nw-form-column {
    display: grid;
    gap: 28px;
}

.nw-field-block {
    display: grid;
    gap: 12px;
}

.nw-field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #fafafa;
}

.nw-brand-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.nw-brand-button,
.nw-fit-button {
    min-height: 48px;
    padding: 0 16px;
    color: #fafafa;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: #18181b;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nw-brand-button.is-active {
    border-color: #fafafa;
    background: #27272a;
}

.nw-home-body .nw-input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    color: #fafafa;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

.nw-home-body .nw-input::placeholder {
    color: #71717a;
}

.nw-home-body .nw-input:focus {
    border-color: #52525b;
    box-shadow: 0 0 0 1px #52525b;
    background: transparent;
}

.nw-textarea {
    min-height: 88px;
    padding: 12px;
    resize: vertical;
}

.nw-model-picker {
    display: grid;
    gap: 12px;
}

.nw-model-list {
    max-height: 320px;
    overflow: auto;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: #18181b;
}

.nw-home-body .model-picker-empty {
    margin: 0;
    padding: 16px;
    color: #a1a1aa;
}

.nw-home-body .model-group {
    display: grid;
    gap: 0;
}

.nw-home-body .model-group-year {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #a1a1aa;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #18181b;
}

.nw-home-body .model-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    color: #fafafa;
    border: 0;
    border-top: 1px solid #232326;
    border-radius: 0;
    background: transparent;
    text-align: left;
}

.nw-home-body .model-option small {
    color: #71717a;
}

.nw-home-body .model-option.is-active {
    background: #202024;
}

.nw-style-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.nw-style-button {
    display: grid;
    gap: 8px;
    padding: 10px;
    color: #fafafa;
    text-align: left;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: #18181b;
    font-size: 0.875rem;
    font-weight: 500;
}

.nw-style-button.is-active {
    border-color: #fafafa;
}

.nw-style-preview {
    display: block;
    min-height: 72px;
    border-radius: 8px;
}

.nw-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nw-upload-text {
    color: #a1a1aa;
    font-size: 0.75rem;
    line-height: 1.6;
}

.nw-business-block {
    padding-top: 4px;
    border-top: 1px solid #27272a;
}

.nw-business-title {
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nw-business-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.nw-business-block label,
.nw-login-form label {
    display: grid;
    gap: 8px;
}

.nw-business-block label span,
.nw-login-form label span {
    color: #d4d4d8;
    font-size: 0.75rem;
    font-weight: 500;
}

.nw-editor-column {
    min-width: 0;
}

.nw-editor-card {
    padding: 24px;
    border: 1px solid #27272a;
    border-radius: 12px;
    background: #18181b;
}

.nw-editor-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.nw-editor-header h2 {
    margin: 0;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.nw-editor-header span {
    color: #a1a1aa;
    font-size: 0.75rem;
}

.nw-editor-separator {
    display: inline-block;
    margin: 0 6px;
}

.nw-editor-layout {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr);
    gap: 24px;
    align-items: start;
}

.nw-stage-column {
    min-width: 0;
}

.nw-editor-card .case-stage-shell {
    padding: 0;
    border: 0;
    background: transparent;
}

.nw-editor-card .case-stage {
    width: 360px;
}

.nw-control-column {
    display: grid;
    gap: 16px;
}

.nw-editor-hint {
    color: #a1a1aa;
    font-size: 0.75rem;
    line-height: 1.6;
}

.nw-fit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.nw-fit-button {
    min-height: 40px;
}

.nw-fit-button.is-active {
    color: #111827;
    border-color: #fafafa;
    background: #fafafa;
}

.nw-control-row {
    display: grid;
    gap: 8px;
}

.nw-control-row span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #fafafa;
    font-size: 0.8125rem;
    font-weight: 500;
}

.nw-control-row strong {
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 500;
}

.nw-submit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #27272a;
}

.nw-submit-copy {
    margin-right: auto;
    color: #a1a1aa;
    font-size: 0.75rem;
}

.nw-summary-card {
    display: grid;
    gap: 32px;
    grid-template-columns: 260px minmax(0, 1fr);
    margin-top: 40px;
}

.nw-summary-image {
    overflow: hidden;
    border: 1px solid #27272a;
    border-radius: 8px;
    background: #18181b;
}

.nw-summary-label {
    color: #a1a1aa;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nw-summary-copy h2 {
    margin: 8px 0 12px;
    font-size: 1.875rem;
    letter-spacing: -0.03em;
}

.nw-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nw-builder[data-editor-mode="advanced"] .case-stage-camera,
.nw-builder[data-editor-mode="advanced"] .case-stage-glass {
    display: none;
}

.nw-builder[data-editor-mode="advanced"] .case-stage-artboard {
    inset: 0;
    border-radius: 44px;
    background: transparent;
    border: 0;
    overflow: hidden;
    cursor: default;
}

.nw-builder[data-editor-mode="advanced"] .case-stage {
    width: 360px;
    aspect-ratio: 360 / 740;
    background: transparent;
}

.ae-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.ae-stage-empty {
    position: absolute;
    inset: 20px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(17, 24, 39, 0.18);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.82);
    text-align: center;
    pointer-events: none;
}

.ae-stage-empty strong {
    display: block;
    margin-bottom: 8px;
    color: #18181b;
    font-size: 1rem;
}

.ae-stage-empty span {
    color: #52525b;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.ae-tools {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ae-tool-btn,
.ae-chip,
.ae-action-button,
.ae-danger-button,
.ae-layer-item,
.ae-preset {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(24, 24, 27, 0.9);
    color: #fafafa;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ae-tool-btn:hover,
.ae-chip:hover,
.ae-action-button:hover,
.ae-danger-button:hover,
.ae-layer-item:hover,
.ae-preset:hover {
    transform: translateY(-1px);
}

.ae-tool-btn.is-active,
.ae-chip.is-active,
.ae-preset.is-active,
.ae-layer-item.is-active {
    background: #fafafa;
    border-color: #fafafa;
    color: #111827;
}

.ae-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(24, 24, 27, 0.88);
}

.ae-panel-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fafafa;
}

.ae-upload-note {
    color: #a1a1aa;
    font-size: 0.75rem;
    line-height: 1.7;
}

.ae-fit-grid,
.ae-inline-grid,
.ae-preset-grid {
    display: grid;
    gap: 8px;
}

.ae-fit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ae-inline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ae-preset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ae-control {
    display: grid;
    gap: 8px;
}

.ae-control span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #fafafa;
    font-size: 0.8rem;
}

.ae-control strong {
    color: #a1a1aa;
    font-weight: 500;
}

.ae-textarea,
.ae-select,
.ae-color {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(9, 9, 11, 0.9);
    color: #fafafa;
}

.ae-textarea {
    resize: vertical;
}

.ae-color {
    padding: 4px;
}

.ae-action-button {
    background: #41c3a5;
    border-color: #41c3a5;
    color: #08141a;
    font-weight: 700;
}

.ae-danger-button {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.22);
    color: #fecaca;
}

.ae-preset {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.ae-swatch {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, 0.08);
}

.ae-layer-list {
    display: grid;
    gap: 8px;
}

.ae-layer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.ae-layer-item small {
    color: inherit;
    opacity: 0.72;
}

.nw-summary-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.nw-summary-list div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #27272a;
}

.nw-summary-list dt {
    color: #a1a1aa;
}

.nw-summary-list dd {
    margin: 0;
    font-weight: 500;
}

.nw-summary-button {
    margin-top: 16px;
}

.nw-login-card {
    width: min(420px, 100%);
    padding: 24px;
    color: #fafafa;
    border: 1px solid #27272a;
    border-radius: 12px;
    background: #18181b;
    box-shadow: none;
}

.nw-login-copy {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.nw-login-copy h2 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.nw-login-copy p {
    color: #a1a1aa;
    line-height: 1.6;
}

.nw-login-form {
    display: grid;
    gap: 16px;
}

.nw-home-body .case-stage-placeholder {
    color: #d4d4d8;
    border-color: #3f3f46;
    background: rgba(255, 255, 255, 0.03);
}

.nw-home-body .case-stage-placeholder p {
    margin-bottom: 6px;
    font-weight: 500;
}

.nw-home-body .case-stage-placeholder span {
    color: #a1a1aa;
    font-size: 0.75rem;
}

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

    .nw-editor-layout {
        grid-template-columns: 1fr;
    }

    .nw-editor-card .case-stage {
        width: min(100%, 360px);
    }
}

@media (max-width: 760px) {
    .nw-home-wrap {
        width: min(100% - 24px, 100%);
    }

    .nw-header {
        flex-direction: column;
        align-items: stretch;
    }

    .nw-header-right {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .nw-business-grid,
    .nw-style-grid,
    .nw-summary-card,
    .nw-fit-grid {
        grid-template-columns: 1fr;
    }

    .nw-upload-row,
    .nw-submit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .nw-submit-copy {
        margin-right: 0;
    }

    .nw-editor-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.section-kicker,
.eyebrow,
.studio-label,
.block-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
}

.section-kicker,
.eyebrow,
.studio-label {
    color: #ffb089;
}

.public-home-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 122, 69, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(65, 195, 165, 0.16), transparent 24%),
        linear-gradient(180deg, #08090c 0%, #10141c 46%, #0b0e13 100%);
}

.public-home-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

.public-home-shell {
    position: relative;
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 48px;
}

.site-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(10, 12, 16, 0.58);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}

.site-brand,
.brandmark,
.dashboard-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.site-brand strong,
.brandmark strong,
.dashboard-brand strong {
    display: block;
}

.site-brand small,
.brandmark small,
.dashboard-brand small {
    color: var(--text-soft);
}

.site-brand-mark,
.brandmark-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ffca7d);
    box-shadow: 0 0 0 8px rgba(255, 122, 69, 0.12);
}

.site-topbar-actions,
.public-header-side,
.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.session-chip,
.session-pill,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.session-chip,
.session-pill {
    background: rgba(65, 195, 165, 0.14);
    color: #b6ffe8;
    border: 1px solid rgba(65, 195, 165, 0.2);
}

.public-home-content {
    display: grid;
    gap: 24px;
}

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

.studio-heading h1 {
    max-width: 12ch;
    margin-bottom: 12px;
    font-size: clamp(3rem, 6vw, 5.4rem);
    line-height: 0.94;
}

.studio-heading p {
    max-width: 58ch;
    color: var(--text-soft);
    line-height: 1.7;
}

.studio-heading-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.studio-heading-badges span {
    padding: 12px 16px;
    border-radius: 999px;
    color: #d9e2ef;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.case-studio {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.studio-panel {
    display: grid;
    gap: 20px;
}

.studio-block,
.save-result-card,
.panel-card,
.panel-surface,
.metric-card,
.panel-inline-banner,
.auth-topbar {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.studio-block,
.save-result-card,
.panel-card,
.panel-surface,
.metric-card {
    padding: 26px;
}

.studio-block-head,
.section-heading,
.panel-section-head,
.builder-section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.block-step {
    width: fit-content;
    color: #ffc2a6;
}

.studio-block-head h2,
.panel-section-head h2,
.builder-section-head h2,
.section-heading h2,
.dashboard-header h1,
.auth-card h1 {
    margin-bottom: 0;
    font-size: clamp(1.6rem, 2vw, 2.25rem);
}

.studio-block-head p,
.panel-section-head p,
.builder-section-head p,
.section-heading p,
.dashboard-header p,
.editor-hint,
.upload-copy span,
.mini-stat-list span,
.table-muted,
th,
td {
    color: var(--text-soft);
    line-height: 1.6;
}

.brand-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.brand-toggle-item,
.fit-mode-button {
    min-height: 52px;
    padding: 0 16px;
    color: #d9e2ef;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.brand-toggle-item:hover,
.fit-mode-button:hover,
.model-option:hover,
.style-card-modern:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 122, 69, 0.3);
}

.brand-toggle-item.is-active,
.fit-mode-button.is-active {
    color: #fff;
    border-color: rgba(255, 122, 69, 0.5);
    background: rgba(255, 122, 69, 0.16);
}

.model-picker-card {
    display: grid;
    gap: 14px;
}

.studio-field span {
    color: #d8dfeb;
    font-size: 0.9rem;
    font-weight: 600;
}

.model-picker-list {
    max-height: 360px;
    overflow: auto;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
}

.model-picker-empty {
    margin: 0;
    padding: 18px 12px;
    color: var(--text-soft);
}

.model-group {
    display: grid;
    gap: 8px;
}

.model-group + .model-group {
    margin-top: 12px;
}

.model-group-year {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ffbb9a;
    background: rgba(10, 12, 16, 0.92);
}

.model-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
}

.model-option small {
    color: var(--text-soft);
}

.model-option.is-active {
    border-color: rgba(65, 195, 165, 0.32);
    background: rgba(65, 195, 165, 0.12);
}

.style-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.style-card-modern {
    display: grid;
    gap: 12px;
    padding: 16px;
    color: var(--text);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.style-card-modern strong {
    font-size: 1.02rem;
}

.style-card-modern small {
    color: var(--text-soft);
    line-height: 1.6;
}

.style-card-modern.is-active {
    border-color: rgba(255, 122, 69, 0.4);
    background: rgba(255, 122, 69, 0.12);
}

.style-card-visual {
    display: block;
    min-height: 116px;
    border-radius: 18px;
}

.style-midnight-grid,
.case-stage-shell.style-midnight-grid .case-stage {
    background:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(180deg, #101421, #183a56 60%, #136a71 100%);
    background-size: 18px 18px, 18px 18px, auto;
}

.style-sunset-bloom,
.case-stage-shell.style-sunset-bloom .case-stage {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.46), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 122, 69, 0.24), transparent 32%),
        linear-gradient(180deg, #fce9d8 0%, #ffbf9e 100%);
}

.studio-grid {
    display: grid;
    gap: 14px;
}

.studio-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-card,
.inline-status,
.inline-alert,
.panel-inline-banner,
.code-preview-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.upload-copy {
    display: grid;
    gap: 4px;
}

.upload-copy strong {
    font-size: 0.96rem;
}

.modern-inline-status {
    color: #dff9f1;
    border-color: rgba(65, 195, 165, 0.24);
    background: rgba(65, 195, 165, 0.1);
}

.studio-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.04);
}

.studio-submit p {
    margin: 0;
    max-width: 36ch;
    color: var(--text-soft);
    line-height: 1.7;
}

.editor-block {
    position: sticky;
    top: 22px;
}

.editor-topbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.editor-device {
    display: grid;
    gap: 4px;
}

.editor-device span {
    color: #ffbe9e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.editor-device strong {
    font-size: 1.2rem;
}

.case-stage-shell {
    padding: 26px;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.case-stage {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 360 / 740;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 44px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 30px 70px rgba(2, 6, 23, 0.28);
}

.case-stage-camera {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 102px;
    aspect-ratio: 1;
    border-radius: 30px;
    background: rgba(5, 9, 15, 0.8);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    z-index: 3;
}

.case-stage-camera::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #01050c;
    box-shadow: 36px 0 0 #01050c, 0 36px 0 #01050c;
}

.case-stage-artboard {
    position: absolute;
    inset: 148px 30px 54px;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    cursor: grab;
}

.case-stage-artboard.is-dragging {
    cursor: grabbing;
}

.case-stage-artboard.has-image {
    background: transparent;
}

.case-stage-image {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-origin: center center;
    pointer-events: none;
    user-select: none;
}

.case-stage-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.7;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 28px;
}

.case-stage-glass {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 18%, rgba(0, 0, 0, 0.08) 100%);
}

.editor-controls {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.fit-mode-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.fit-mode-reset {
    color: #ffe0d3;
}

.control-row {
    display: grid;
    gap: 10px;
}

.control-row span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #dbe3ef;
    font-size: 0.92rem;
    font-weight: 600;
}

.control-row strong {
    color: var(--text-soft);
    font-size: 0.84rem;
}

input[type="range"] {
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: var(--primary);
}

.modern-save-result {
    background: rgba(18, 22, 29, 0.82);
}

.save-result-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.save-result-grid img {
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.login-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 7, 12, 0.72);
    backdrop-filter: blur(14px);
    z-index: 30;
}

.login-modal-card {
    position: relative;
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 18, 26, 0.94);
    box-shadow: var(--shadow-xl);
}

.login-modal-copy {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.login-modal-copy h2 {
    margin-bottom: 0;
    font-size: 2rem;
}

.login-modal-copy p {
    color: var(--text-soft);
    line-height: 1.7;
}

.login-modal-close,
.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.auth,
.panel-body {
    min-height: 100vh;
}

.auth {
    background:
        radial-gradient(circle at top left, rgba(255, 122, 69, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(65, 195, 165, 0.14), transparent 24%),
        linear-gradient(180deg, #0a0c10 0%, #12161d 100%);
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.auth-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 48px;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 20px;
}

.auth-content {
    display: grid;
    gap: 24px;
}

.auth-wrapper {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 180px);
}

.panel-card.auth-card {
    width: min(560px, 100%);
}

.stack-form {
    display: grid;
    gap: 16px;
}

.stack-form label span,
.checkbox-row span {
    color: #d7e0eb;
    font-size: 0.9rem;
    font-weight: 600;
}

.inline-alert {
    display: block;
    line-height: 1.7;
}

.inline-alert a {
    color: #ffd0bc;
    text-decoration: underline;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.panel-body {
    color: var(--text-dark);
    background: linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

.dashboard-sidebar {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 28px;
    padding: 28px 22px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 122, 69, 0.14), transparent 28%),
        linear-gradient(180deg, #0d1118, #151b24 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-brand small,
.sidebar-user-card span {
    color: var(--text-soft);
}

.dashboard-nav {
    display: grid;
    align-content: start;
    gap: 10px;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    color: rgba(244, 247, 251, 0.76);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-sidebar-footer {
    display: grid;
    gap: 12px;
}

.sidebar-user-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-card strong {
    word-break: break-word;
}

.sidebar-logout {
    width: 100%;
}

.dashboard-main {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
    padding: 28px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-header p {
    margin-bottom: 0;
    max-width: 54ch;
    color: var(--text-dark-soft);
}

.dashboard-content {
    display: grid;
    align-content: start;
    gap: 20px;
}

.panel-surface,
.metric-card,
.panel-inline-banner {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
}

.panel-body input,
.panel-body select,
.panel-body textarea {
    color: var(--text-dark);
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.panel-body input::placeholder,
.panel-body textarea::placeholder {
    color: rgba(15, 23, 42, 0.38);
}

.panel-body input:focus,
.panel-body select:focus,
.panel-body textarea:focus {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(255, 122, 69, 0.12);
}

.panel-body .stack-form label span,
.panel-body .checkbox-row span {
    color: var(--text-dark);
}

.panel-body .btn-copy {
    color: var(--text-dark);
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.08);
}

.panel-section-head p,
.panel-surface p,
.metric-card span,
.table-muted,
tbody td,
tbody th {
    color: var(--text-dark-soft);
}

.panel-highlight {
    background:
        radial-gradient(circle at top right, rgba(255, 122, 69, 0.12), transparent 30%),
        rgba(255, 255, 255, 0.9);
}

.panel-highlight .mini-stat-list span {
    color: var(--text-dark);
}

.metric-grid,
.panel-grid {
    display: grid;
    gap: 18px;
}

.metric-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(2rem, 3vw, 2.6rem);
    line-height: 1;
    color: var(--text-dark);
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    vertical-align: middle;
}

th {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dark-soft);
}

.thumb {
    width: 82px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.table-link {
    color: var(--primary-dark);
    font-weight: 700;
}

.badge {
    min-height: 34px;
    padding-inline: 12px;
}

.badge-success {
    color: #116d39;
    background: rgba(22, 163, 74, 0.12);
}

.badge-warning {
    color: #956113;
    background: rgba(199, 134, 30, 0.12);
}

.badge-info {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
}

.badge-muted {
    color: #52607a;
    background: rgba(100, 116, 139, 0.12);
}

.code-preview-box,
.mini-stat-list {
    display: grid;
    gap: 12px;
}

.mini-stat-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.mini-stat-list div:last-child {
    border-bottom: 0;
}

.mini-stat-list strong {
    color: var(--text-dark);
}

.mini-stat-list span {
    color: var(--text-dark-soft);
}

.panel-surface .mini-stat-list + .btn {
    margin-top: 28px;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(9, 12, 16, 0.56);
    z-index: 32;
}

.modal-card {
    position: relative;
    width: min(520px, 100%);
    padding: 28px;
    color: var(--text);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 18, 26, 0.95);
    box-shadow: var(--shadow-xl);
}

.modal-card h3 {
    margin-bottom: 18px;
    font-size: 1.8rem;
}

.modal-card dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.modal-card dt {
    color: var(--text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.modal-card dd {
    margin: 6px 0 0;
    line-height: 1.7;
}

@media (max-width: 1180px) {
    .case-studio {
        grid-template-columns: 1fr;
    }

    .editor-block {
        position: static;
    }

    .studio-heading {
        grid-template-columns: 1fr;
    }

    .studio-heading-badges {
        justify-content: flex-start;
    }

    .metric-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        grid-template-rows: auto auto auto;
    }

    .dashboard-main {
        padding: 22px 16px 32px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-grid-2,
    .metric-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .public-home-shell,
    .auth-shell {
        width: min(100% - 20px, 100%);
    }

    .site-topbar,
    .auth-topbar {
        flex-direction: column;
        align-items: stretch;
        border-radius: 28px;
    }

    .site-topbar-actions,
    .public-header-side,
    .dashboard-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .site-topbar-actions .btn,
    .dashboard-header-actions .btn {
        flex: 1 1 auto;
    }

    .studio-heading h1 {
        font-size: clamp(2.4rem, 12vw, 4rem);
    }

    .style-switcher,
    .studio-grid-2,
    .save-result-grid,
    .metric-grid-4,
    .fit-mode-group {
        grid-template-columns: 1fr;
    }

    .studio-submit {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-card {
        flex-direction: column;
        align-items: stretch;
    }

    .case-stage-shell {
        padding: 18px;
    }

    .case-stage {
        width: min(100%, 330px);
    }

    .case-stage-artboard {
        inset: 136px 24px 48px;
    }
}

[hidden] {
    display: none !important;
}

.case-stage-artboard {
    touch-action: none;
}

.case-stage-artboard:not(.has-image) {
    cursor: pointer;
}

.case-stage-artboard.has-image {
    cursor: grab;
}

.case-stage-artboard.has-image.is-dragging {
    cursor: grabbing;
}

.case-stage-image {
    max-width: none;
    will-change: transform;
}

.nw-home-body {
    background:
        radial-gradient(circle at top left, rgba(255, 122, 69, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 22%),
        linear-gradient(180deg, #09090b 0%, #0f1115 100%);
}

.nw-home-wrap {
    width: min(1160px, calc(100% - 48px));
    padding-bottom: 72px;
}

.nw-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 22px 0;
    background: rgba(9, 9, 11, 0.88);
    backdrop-filter: blur(18px);
}

.nw-main {
    padding-top: 56px;
}

.nw-intro {
    max-width: 720px;
}

.nw-intro p {
    max-width: 56ch;
    font-size: 0.95rem;
    line-height: 1.75;
}

.nw-grid {
    gap: 48px;
    align-items: start;
}

.nw-form-column {
    gap: 32px;
}

.nw-field-block {
    gap: 14px;
}

.nw-upload-row,
.nw-business-block,
.nw-editor-hint,
.nw-control-row,
.nw-submit-row {
    border: 1px solid #27272a;
    background: rgba(17, 19, 24, 0.9);
}

.nw-upload-row {
    justify-content: space-between;
    padding: 16px 18px;
    border-radius: 16px;
}

.nw-upload-text {
    max-width: 240px;
    text-align: right;
}

.nw-business-block {
    gap: 18px;
    padding: 24px;
    border-radius: 18px;
}

.nw-editor-column {
    position: sticky;
    top: 108px;
    align-self: start;
}

.nw-editor-card {
    padding: 28px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.98), rgba(14, 15, 19, 0.98));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.nw-editor-layout {
    grid-template-columns: minmax(0, 360px) minmax(240px, 1fr);
    gap: 28px;
}

.nw-editor-hint {
    padding: 14px 16px;
    border-radius: 14px;
    color: #d4d4d8;
}

.nw-control-column {
    gap: 14px;
}

.nw-control-row {
    padding: 14px 16px;
    border-radius: 14px;
}

.nw-control-row input[type="range"] {
    margin-top: 4px;
}

.nw-submit-row {
    margin-top: 4px;
    padding: 24px 28px;
    border-radius: 20px;
    align-items: flex-end;
}

.nw-submit-copy {
    display: grid;
    gap: 14px;
    max-width: 540px;
}

.nw-submit-copy p {
    margin: 0;
    color: #a1a1aa;
    font-size: 0.86rem;
    line-height: 1.7;
}

.nw-access-panel {
    display: grid;
    gap: 8px;
}

.nw-access-label {
    color: #d4d4d8;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nw-access-input {
    width: min(360px, 100%);
    background: #09090b !important;
}

.login-modal,
.modal {
    background: rgba(5, 8, 12, 0.72);
    backdrop-filter: blur(18px);
}

.login-modal-card,
.modal-card {
    width: min(560px, 100%);
    padding: 30px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(18, 22, 29, 0.98), rgba(12, 15, 20, 0.98));
    box-shadow: 0 36px 120px rgba(0, 0, 0, 0.38);
}

.login-modal-close,
.modal-close {
    display: inline-grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 52px;
}

.modal-copy h3 {
    margin: 10px 0 8px;
}

.modal-copy p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.modal-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-row {
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.modal-row-full {
    grid-column: 1 / -1;
}

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

.panel-body {
    background:
        radial-gradient(circle at top left, rgba(255, 122, 69, 0.09), transparent 24%),
        linear-gradient(180deg, #f3f6fb 0%, #e9eff6 100%);
}

.dashboard-shell {
    grid-template-columns: 292px minmax(0, 1fr);
}

.dashboard-sidebar {
    gap: 24px;
    padding: 24px 20px;
    background:
        radial-gradient(circle at top left, rgba(255, 122, 69, 0.14), transparent 26%),
        linear-gradient(180deg, #0f1520 0%, #161e2b 100%);
}

.dashboard-brand,
.sidebar-user-card {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-nav {
    gap: 12px;
}

.dashboard-nav-link {
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid transparent;
    font-weight: 600;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.is-active {
    border-color: rgba(255, 255, 255, 0.08);
}

.dashboard-main {
    gap: 22px;
    padding: 24px;
}

.dashboard-header {
    padding: 24px 26px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.dashboard-content,
.panel-grid,
.metric-grid {
    gap: 22px;
}

.panel-surface,
.metric-card,
.panel-inline-banner {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
}

.metric-card {
    min-height: 140px;
}

.table-wrap {
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: #fff;
}

table {
    min-width: 860px;
}

thead th {
    background: rgba(248, 250, 252, 0.96);
}

tbody tr:hover {
    background: rgba(255, 122, 69, 0.04);
}

.thumb {
    border-radius: 18px;
}

.thumb-case {
    width: 104px;
    aspect-ratio: 378 / 650;
    object-fit: contain;
    background: #eef6fb;
}

.panel-body .btn-copy,
.panel-body .btn-outline,
.panel-body .btn-ghost {
    border-radius: 14px;
}

@media (max-width: 1100px) {
    .nw-editor-column {
        position: static;
    }
}

@media (max-width: 980px) {
    .dashboard-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .nw-home-wrap {
        width: min(100% - 24px, 100%);
    }

    .nw-grid,
    .nw-editor-layout,
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .nw-upload-row,
    .nw-submit-row {
        align-items: stretch;
    }

    .nw-upload-text {
        max-width: none;
        text-align: left;
    }

    .nw-submit-row,
    .dashboard-main {
        padding: 18px;
    }

    .dashboard-header {
        padding: 20px;
    }

    .dashboard-nav {
        grid-template-columns: 1fr;
    }
}

/* Professional case editor */
.pro-editor-card {
    --pro-panel: #15181e;
    --pro-panel-soft: #1c2028;
    --pro-border: rgba(255, 255, 255, 0.09);
    --pro-muted: #9ba4b2;
    --pro-accent: #16b89a;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #101319;
}

.pro-editor-card .nw-editor-header {
    align-items: center;
    margin: 0;
    padding: 22px 24px;
    border-bottom: 1px solid var(--pro-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 60%);
}

.pro-editor-card .nw-editor-header h2 {
    margin-top: 4px;
    font-size: 1.25rem;
}

.pro-editor-kicker {
    display: block;
    color: #ff9c74 !important;
    font-size: 0.66rem !important;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.pro-editor-model {
    display: grid;
    justify-items: end;
    gap: 5px;
    text-align: right;
}

.pro-editor-model strong {
    color: #f8fafc;
    font-size: 0.82rem;
}

.pro-editor-model > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f5b34f;
    font-size: 0.67rem;
}

.pro-editor-model > span::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.pro-editor-model > span.is-calibrated {
    color: #41d6b8;
}

.pro-editor-card .nw-editor-layout {
    grid-template-columns: minmax(320px, 378px) minmax(270px, 1fr);
    gap: 0;
    align-items: stretch;
}

.pro-editor-card .nw-stage-column {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 18px;
    border-right: 1px solid var(--pro-border);
    background:
        radial-gradient(circle at 20% 0%, rgba(22, 184, 154, 0.08), transparent 35%),
        #0c0f14;
}

.pro-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
}

.pro-toolbar-group,
.pro-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pro-icon-button,
.pro-view-switch button {
    display: inline-grid;
    min-width: 38px;
    min-height: 38px;
    place-items: center;
    padding: 0 10px;
    color: #cdd4df;
    border: 1px solid var(--pro-border);
    border-radius: 10px;
    background: #171b22;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.pro-view-switch {
    padding: 4px;
    border: 1px solid var(--pro-border);
    border-radius: 12px;
    background: #0b0e13;
}

.pro-view-switch button {
    min-height: 30px;
    border: 0;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 700;
}

.pro-icon-button:hover,
.pro-view-switch button:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.pro-icon-button.is-active,
.pro-view-switch button.is-active {
    color: #06231d;
    border-color: var(--pro-accent);
    background: var(--pro-accent);
}

.pro-icon-button:disabled {
    opacity: 0.32;
    cursor: default;
    transform: none;
}

.pro-editor-card .case-stage-shell {
    display: grid;
    width: 100%;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
}

.pro-editor-card .case-stage {
    width: min(100%, 378px);
    aspect-ratio: 378 / 650;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: #e5e9ef;
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
}

.pro-editor-card .case-stage-artboard {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    background: #e5e9ef;
    cursor: crosshair;
    touch-action: none;
}

.pro-editor-card .case-stage-artboard.is-sheet-view {
    cursor: default;
}

.pro-editor-canvas {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    touch-action: none;
}

.pro-editor-loading,
.pro-editor-fatal {
    display: grid;
    min-height: 120px;
    place-items: center;
    padding: 24px;
    color: var(--pro-muted);
    text-align: center;
}

.pro-editor-fatal {
    min-height: 360px;
    color: #fecaca;
}

.pro-stage-footer {
    display: grid;
    gap: 7px;
}

.pro-quality {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #9ba4b2;
    font-size: 0.7rem;
    font-weight: 650;
}

.pro-quality-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12);
}

.pro-quality.is-good { color: #51dfbd; }
.pro-quality.is-good .pro-quality-dot { background: #28c9a6; box-shadow: 0 0 0 4px rgba(40, 201, 166, 0.13); }
.pro-quality.is-warning { color: #f8c45e; }
.pro-quality.is-warning .pro-quality-dot { background: #e9a72b; box-shadow: 0 0 0 4px rgba(233, 167, 43, 0.14); }
.pro-quality.is-poor { color: #ff8c8c; }
.pro-quality.is-poor .pro-quality-dot { background: #ef5b5b; box-shadow: 0 0 0 4px rgba(239, 91, 91, 0.14); }

.pro-stage-tip {
    color: #727d8d;
    font-size: 0.66rem;
    line-height: 1.5;
}

.pro-editor-card .nw-control-column {
    align-content: start;
    gap: 0;
    min-width: 0;
    padding: 18px;
    background: var(--pro-panel);
}

.pro-editor-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 14px;
    padding: 4px;
    border: 1px solid var(--pro-border);
    border-radius: 13px;
    background: #0e1116;
}

.pro-editor-tabs button {
    min-width: 0;
    min-height: 34px;
    padding: 0 6px;
    overflow: hidden;
    color: #8f99a8;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-size: 0.67rem;
    font-weight: 750;
    text-overflow: ellipsis;
}

.pro-editor-tabs button.is-active {
    color: #ffffff;
    background: #2a303a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.pro-properties,
.pro-layers-panel {
    display: grid;
    gap: 13px;
    padding: 15px;
    border: 1px solid var(--pro-border);
    border-radius: 15px;
    background: var(--pro-panel-soft);
}

.pro-properties[hidden] {
    display: none;
}

.pro-layers-panel {
    margin-top: 14px;
}

.pro-properties-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pro-properties-head > div {
    display: grid;
    gap: 2px;
}

.pro-properties-head span,
.pro-field > span {
    color: #838e9d;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pro-properties-head strong {
    color: #f8fafc;
    font-size: 0.84rem;
}

.pro-small-button,
.pro-layer-actions button {
    min-height: 32px;
    padding: 0 10px;
    color: #d8dee8;
    border: 1px solid var(--pro-border);
    border-radius: 9px;
    background: #262c35;
    font-size: 0.67rem;
    font-weight: 700;
}

.pro-accent-button {
    color: #06231d;
    border-color: var(--pro-accent);
    background: var(--pro-accent);
}

.pro-segmented,
.pro-button-row,
.pro-layer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.pro-segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pro-segmented button {
    min-height: 34px;
    padding: 0 5px;
    color: #9ba4b2;
    border: 1px solid var(--pro-border);
    border-radius: 9px;
    background: #12161c;
    font-size: 0.64rem;
    font-weight: 700;
}

.pro-segmented button.is-active {
    color: #ffffff;
    border-color: rgba(22, 184, 154, 0.52);
    background: rgba(22, 184, 154, 0.17);
}

.pro-range,
.pro-field {
    display: grid;
    gap: 7px;
}

.pro-range > span {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: #d8dee8;
    font-size: 0.7rem;
    font-weight: 650;
}

.pro-range output {
    color: #8691a1;
    font-size: 0.65rem;
}

.pro-range input[type="range"] {
    height: 4px;
    padding: 0;
    accent-color: var(--pro-accent);
    border: 0;
    background: transparent;
}

.pro-field input,
.pro-field select,
.pro-field textarea {
    min-height: 38px;
    padding: 8px 10px;
    color: #f8fafc;
    border: 1px solid var(--pro-border);
    border-radius: 9px;
    background: #10141a;
    box-shadow: none;
    font-size: 0.72rem;
}

.pro-field input[type="color"] {
    padding: 4px;
}

.pro-field input:disabled {
    color: #838e9d;
}

.pro-two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 9px;
}

.pro-sticker-grid,
.pro-background-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.pro-sticker-grid button,
.pro-background-grid button {
    display: grid;
    min-width: 0;
    min-height: 58px;
    place-items: center;
    gap: 3px;
    padding: 6px;
    color: #d8dee8;
    border: 1px solid var(--pro-border);
    border-radius: 10px;
    background: #11151b;
}

.pro-sticker-grid button:hover,
.pro-background-grid button:hover,
.pro-background-grid button.is-active {
    border-color: rgba(22, 184, 154, 0.62);
}

.pro-sticker-grid span {
    font-size: 1.22rem;
    line-height: 1;
}

.pro-sticker-grid small,
.pro-background-grid small {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.59rem;
    text-overflow: ellipsis;
}

.pro-background-grid span {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.pro-layer-list {
    display: grid;
    gap: 6px;
    max-height: 170px;
    overflow: auto;
}

.pro-layer-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 6px 8px;
    color: #d8dee8;
    text-align: left;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #12161c;
}

.pro-layer-item.is-active {
    border-color: rgba(22, 184, 154, 0.52);
    background: rgba(22, 184, 154, 0.1);
}

.pro-layer-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--pro-border);
    border-radius: 8px;
    background: #202630;
    font-weight: 800;
}

.pro-layer-item > span:last-child {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.pro-layer-item strong,
.pro-layer-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pro-layer-item strong { font-size: 0.69rem; }
.pro-layer-item small { color: #7f8a99; font-size: 0.58rem; }

.pro-layer-actions {
    grid-template-columns: 34px 34px 1fr 1fr;
}

.pro-layer-actions button:disabled {
    opacity: 0.35;
    cursor: default;
}

.pro-layer-actions .is-danger {
    color: #ffaaaa;
    border-color: rgba(239, 91, 91, 0.2);
    background: rgba(239, 91, 91, 0.08);
}

@media (max-width: 1180px) {
    .pro-editor-card .nw-editor-layout {
        grid-template-columns: minmax(300px, 378px) minmax(250px, 1fr);
    }
}

@media (max-width: 1100px) {
    .pro-editor-card .nw-editor-layout {
        grid-template-columns: minmax(320px, 430px) minmax(280px, 1fr);
    }

    .pro-editor-card .case-stage {
        width: min(100%, 400px);
    }
}

@media (max-width: 760px) {
    .pro-editor-card .nw-editor-header {
        align-items: flex-start;
        padding: 18px;
    }

    .pro-editor-model {
        justify-items: start;
        text-align: left;
    }

    .pro-editor-card .nw-editor-layout {
        grid-template-columns: 1fr;
    }

    .pro-editor-card .nw-stage-column {
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--pro-border);
    }

    .pro-editor-card .nw-control-column {
        padding: 12px;
    }

    .pro-editor-tabs {
        position: sticky;
        top: 0;
        z-index: 3;
    }

    .pro-stage-tip {
        display: none;
    }
}

/* Late overrides for legacy modal and model-list styles. */
.designer-body .designer-model-list .model-group-year {
    padding: 5px 8px;
    color: #78848f;
    border-radius: 7px;
    background: #f0f4f4;
}

.designer-body .login-modal-card.designer-login-card {
    width: min(460px, calc(100vw - 32px));
    padding: 28px;
    color: #151b24;
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(5, 14, 22, 0.3);
}

.designer-body .designer-login-card h2 {
    color: #151b24;
    font-family: "Manrope", sans-serif;
}

.designer-body .designer-login-card p,
.designer-body .designer-login-card label > span {
    color: #65717c;
}

.designer-body .designer-login-card .nw-business-title {
    color: #0c807c;
}

.designer-body .designer-login-card input {
    color: #151b24;
    border: 1px solid #e3e8eb;
    background: #f7f9f9;
}

.designer-body .designer-login-card .login-modal-close {
    color: #5f6a75;
    border: 1px solid #e3e8eb;
    background: #f2f5f5;
}

/* Readable, restrained editor skin. */
.designer-body {
    --designer-ink: #172026;
    --designer-muted: #64717a;
    --designer-line: #dce3e5;
    --designer-soft: #f5f7f7;
    --designer-canvas: #f0f3f3;
    --designer-teal: #149f9a;
    --designer-teal-dark: #087b77;
    font-size: 16px;
}

.designer-body .designer-header {
    grid-template-columns: minmax(220px, 1fr) 350px minmax(360px, 1fr);
    height: 80px;
    padding: 0 28px;
    box-shadow: none;
}

.designer-body .designer-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: #17252c;
    box-shadow: none;
    font-size: 18px;
}

.designer-body .designer-brand strong {
    font-size: 16px;
}

.designer-body .designer-brand small,
.designer-body .designer-device-copy small,
.designer-body .designer-project-name small {
    font-size: 12px;
}

.designer-body .designer-device-button {
    min-width: 350px;
    min-height: 56px;
    padding: 7px 14px;
    border-radius: 10px;
    box-shadow: none;
}

.designer-body .designer-device-button:hover {
    box-shadow: none;
    transform: none;
}

.designer-body .designer-device-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.designer-body .designer-device-copy strong {
    font-size: 14px;
}

.designer-body .designer-quiet-link,
.designer-body .designer-ghost-button,
.designer-body .designer-save-button,
.designer-body .designer-primary-button {
    min-height: 44px;
    padding: 0 17px;
    border-radius: 8px;
    font-size: 14px;
}

.designer-body .designer-save-button,
.designer-body .designer-primary-button {
    background: var(--designer-teal);
    box-shadow: none;
}

.designer-body .designer-ghost-button:hover,
.designer-body .designer-save-button:hover,
.designer-body .designer-primary-button:hover {
    transform: none;
}

.designer-body .designer-workspace {
    grid-template-columns: 104px minmax(560px, 1fr) 420px;
    height: calc(100svh - 80px);
}

.designer-body .designer-toolrail {
    gap: 6px;
    padding: 18px 9px;
}

.designer-body .designer-toolrail button {
    position: relative;
    width: 86px;
    min-height: 72px;
    gap: 7px;
    padding: 9px 5px;
    border: 0;
    border-radius: 8px;
}

.designer-body .designer-toolrail button svg {
    width: 23px;
    height: 23px;
}

.designer-body .designer-toolrail button span {
    font-size: 13px;
    font-weight: 650;
}

.designer-body .designer-toolrail button:hover {
    transform: none;
}

.designer-body .designer-toolrail button.is-active {
    color: var(--designer-teal-dark);
    border: 0;
    background: #e8f5f4;
}

.designer-body .designer-toolrail button.is-active::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: -9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--designer-teal);
    content: "";
}

.designer-body .designer-stage-panel {
    background: #f0f3f3;
}

.designer-body .designer-stage-toolbar {
    min-height: 68px;
    padding: 0 24px;
    background: #f8fafa;
    backdrop-filter: none;
}

.designer-body .designer-project-name strong {
    font-size: 14px;
}

.designer-body .designer-live-dot {
    width: 9px;
    height: 9px;
    box-shadow: none;
}

.designer-body .pro-editor-toolbar {
    gap: 12px;
    min-height: 44px;
}

.designer-body .pro-toolbar-group,
.designer-body .pro-view-switch {
    padding: 3px;
    border-radius: 8px;
}

.designer-body .pro-icon-button,
.designer-body .pro-view-switch button,
.designer-body .pro-guide-button {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 6px;
    font-size: 13px;
}

.designer-body .pro-icon-button {
    min-width: 38px;
    font-size: 19px;
}

.designer-body .pro-guide-button {
    min-height: 44px;
}

.designer-body .designer-canvas-workspace {
    gap: 12px;
    padding: 20px 28px 16px;
}

.designer-body .designer-canvas-caption {
    width: min(100%, 620px);
}

.designer-body .designer-canvas-caption small {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.designer-body .designer-canvas-caption strong {
    font-size: 16px;
}

.designer-body .designer-template-badge {
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 650;
}

.designer-body .case-stage {
    height: min(700px, calc(100svh - 290px));
    min-height: 500px;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(39, 53, 61, 0.12);
}

.designer-body .pro-stage-footer {
    width: min(100%, 620px);
    min-height: 40px;
}

.designer-body .pro-quality {
    font-size: 13px;
}

.designer-body .pro-stage-tip {
    font-size: 12px;
}

.designer-body .pro-stage-tip kbd {
    padding: 3px 6px;
    border-radius: 4px;
}

.designer-body .designer-inspector {
    padding: 28px 26px 36px;
}

.designer-body .pro-inspector-header {
    align-items: flex-start;
    margin-bottom: 28px;
}

.designer-body .pro-inspector-header > div {
    display: grid;
    gap: 4px;
}

.designer-body .pro-inspector-header small,
.designer-body .pro-export-panel span {
    color: var(--designer-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.designer-body .pro-inspector-header h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.035em;
}

.designer-body .pro-inspector-header p {
    max-width: 310px;
    margin: 2px 0 0;
    color: var(--designer-muted);
    font-size: 14px;
    line-height: 1.5;
}

.designer-body .pro-inspector-header button {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 18px;
}

.designer-body .pro-properties,
.designer-body .pro-layers-panel,
.designer-body .pro-export-panel {
    gap: 18px;
    padding-bottom: 26px;
}

.designer-body .pro-layers-panel,
.designer-body .pro-export-panel {
    margin-top: 26px;
}

.designer-body .pro-properties-head span,
.designer-body .pro-field > span {
    color: var(--designer-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.designer-body .pro-properties-head strong {
    color: var(--designer-ink);
    font-size: 16px;
}

.designer-body .pro-upload-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: 76px;
    padding: 12px;
    border-radius: 9px;
    background: #fafbfb;
}

.designer-body .pro-upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 7px;
    font-size: 22px;
}

.designer-body .pro-upload-card strong {
    font-size: 15px;
}

.designer-body .pro-upload-card small,
.designer-body .pro-upload-card em {
    font-size: 13px;
}

.designer-body .pro-segmented {
    padding: 3px;
    border-radius: 8px;
}

.designer-body .pro-segmented button,
.designer-body .pro-small-button,
.designer-body .pro-layer-actions button,
.designer-body .pro-text-style-row button,
.designer-body .pro-export-actions button {
    min-height: 42px;
    padding: 0 11px;
    border-radius: 7px;
    font-size: 13px;
}

.designer-body .pro-range {
    gap: 10px;
}

.designer-body .pro-range > span {
    font-size: 14px;
}

.designer-body .pro-range output {
    font-size: 13px;
}

.designer-body .pro-range input[type="range"] {
    height: 6px;
}

.designer-body .pro-field {
    gap: 8px;
}

.designer-body .pro-field input,
.designer-body .pro-field select,
.designer-body .pro-field textarea {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 14px;
}

.designer-body .pro-sticker-grid,
.designer-body .pro-background-grid {
    gap: 9px;
}

.designer-body .pro-sticker-grid button,
.designer-body .pro-background-grid button {
    min-height: 76px;
    border-radius: 8px;
}

.designer-body .pro-sticker-grid span {
    font-size: 24px;
}

.designer-body .pro-sticker-grid small,
.designer-body .pro-background-grid small {
    font-size: 12px;
}

.designer-body .pro-layer-list {
    gap: 8px;
    max-height: 240px;
}

.designer-body .pro-layer-item {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 56px;
    padding: 8px 10px;
    border-radius: 8px;
}

.designer-body .pro-layer-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.designer-body .pro-layer-item strong {
    font-size: 14px;
}

.designer-body .pro-layer-item small {
    font-size: 12px;
}

.designer-body .pro-export-panel strong {
    font-size: 15px;
}

.designer-body .pro-export-panel p {
    font-size: 13px;
    line-height: 1.55;
}

.designer-body .designer-modal-card {
    border-radius: 14px;
}

.designer-body .designer-modal-header h2 {
    font-size: 24px;
}

.designer-body .designer-modal-header small {
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.designer-body .designer-brand-list button strong,
.designer-body .designer-model-list .model-option span {
    font-size: 14px;
}

.designer-body .designer-model-list .model-option {
    min-height: 54px;
}

.designer-body .designer-model-list .model-option small,
.designer-body .designer-model-list .model-group-year {
    font-size: 12px;
}

.designer-body .designer-case-style-list button strong {
    font-size: 14px;
}

.designer-body .designer-case-style-list button small {
    font-size: 12px;
}

.designer-body .designer-case-style-list > span {
    font-size: 13px;
    letter-spacing: 0;
    text-transform: none;
}

.designer-body .designer-case-style-list button small {
    overflow: hidden;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.designer-body .designer-model-search input::placeholder {
    color: #7a858d;
    opacity: 1;
}

.designer-body button:focus-visible,
.designer-body a:focus-visible,
.designer-body input:focus-visible,
.designer-body textarea:focus-visible,
.designer-body select:focus-visible {
    outline: 3px solid rgba(20, 159, 154, 0.24);
    outline-offset: 2px;
}

.designer-body .designer-save-fields label > span,
.designer-body .designer-save-fields input,
.designer-body .designer-save-fields textarea {
    font-size: 14px;
}

.designer-body .designer-save-summary strong {
    font-size: 15px;
}

.designer-body .designer-save-summary p {
    font-size: 13px;
    line-height: 1.55;
}

.designer-body .designer-code-field small {
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1380px) {
    .designer-body .designer-header {
        grid-template-columns: minmax(190px, 1fr) 310px minmax(300px, 1fr);
        padding: 0 18px;
    }

    .designer-body .designer-device-button {
        min-width: 310px;
    }

    .designer-body .designer-workspace {
        grid-template-columns: 92px minmax(480px, 1fr) 380px;
    }

    .designer-body .designer-toolrail button {
        width: 74px;
    }

    .designer-body .designer-inspector {
        padding: 24px 22px 32px;
    }
}

@media (max-width: 980px) {
    .designer-body .designer-header {
        grid-template-columns: 1fr auto;
        height: auto;
        min-height: 72px;
    }

    .designer-body .designer-device-button {
        min-width: 0;
    }

    .designer-body .designer-workspace {
        grid-template-columns: 1fr;
        height: auto;
    }

    .designer-body .designer-toolrail {
        grid-template-columns: repeat(5, 1fr);
    }

    .designer-body .designer-toolrail button {
        width: auto;
        min-height: 58px;
    }

    .designer-body .designer-toolrail button.is-active::before {
        display: none;
    }

    .designer-body .designer-canvas-workspace {
        min-height: 710px;
    }

    .designer-body .case-stage {
        height: min(650px, calc(100svh - 225px));
        min-height: 520px;
    }
}

@media (max-width: 640px) {
    .designer-body .designer-brand strong {
        font-size: 15px;
    }

    .designer-body .designer-device-copy strong {
        font-size: 13px;
    }

    .designer-body .designer-stage-toolbar {
        min-height: 58px;
    }

    .designer-body .pro-view-switch button {
        padding: 0 10px;
        font-size: 12px;
    }

    .designer-body .designer-canvas-caption strong {
        font-size: 14px;
    }

    .designer-body .designer-template-badge {
        font-size: 11px;
    }

    .designer-body .designer-canvas-workspace {
        min-height: 640px;
        padding: 14px 10px;
    }

    .designer-body .case-stage {
        height: min(600px, calc(100svh - 220px));
        min-height: 470px;
    }

    .designer-body .designer-inspector {
        padding: 24px 18px 100px;
    }

    .designer-body .designer-save-summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px 20px;
    }

    .designer-body .designer-save-preview {
        display: none;
    }

    .designer-body .pro-inspector-header h2 {
        font-size: 24px;
    }
}

/* Creative studio skin: motion follows actions instead of floating decorative copy. */
.designer-body {
    --studio-ink: #102127;
    --studio-paper: #f8f6f0;
    --studio-mint: #bdece4;
    --studio-teal: #0eaaa2;
    --studio-coral: #ff7658;
    --studio-lime: #d9f879;
    --studio-line: rgba(16, 33, 39, 0.18);
    background: var(--studio-paper);
}

.designer-body .designer-live-dot,
.designer-body .pro-quality,
.designer-body .pro-quality-dot {
    display: none !important;
}

.designer-body .designer-header {
    border-bottom: 1px solid var(--studio-ink);
    background: rgba(251, 250, 246, 0.92);
    box-shadow: 0 8px 30px rgba(16, 33, 39, 0.05);
}

.designer-body .designer-brand-mark {
    border: 1px solid var(--studio-ink);
    border-radius: 11px;
    background: var(--studio-ink);
    box-shadow: 4px 4px 0 var(--studio-mint);
    transition: box-shadow 220ms ease, transform 220ms ease;
}

.designer-body .designer-brand:hover .designer-brand-mark {
    box-shadow: 6px 6px 0 var(--studio-coral);
    transform: translate(-1px, -1px) rotate(-2deg);
}

.designer-body .designer-device-button {
    border: 1px solid var(--studio-ink);
    border-radius: 12px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--studio-lime);
    transition: box-shadow 220ms ease, transform 220ms ease;
}

.designer-body .designer-device-button:hover {
    border-color: var(--studio-ink);
    box-shadow: 7px 7px 0 var(--studio-mint);
    transform: translate(-2px, -2px);
}

.designer-body .designer-save-button,
.designer-body .designer-primary-button {
    border: 1px solid var(--studio-ink);
    border-radius: 10px;
    background: var(--studio-teal);
    box-shadow: 4px 4px 0 var(--studio-ink);
    transition: box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.designer-body .designer-save-button:hover,
.designer-body .designer-primary-button:hover {
    background: #12bbb1;
    box-shadow: 6px 6px 0 var(--studio-ink);
    transform: translate(-2px, -2px);
}

.designer-body .designer-ghost-button {
    border-color: var(--studio-ink);
    border-radius: 10px;
}

.designer-body .designer-workspace {
    grid-template-columns: 108px minmax(560px, 1fr) 420px;
}

.designer-body .designer-toolrail {
    gap: 10px;
    padding: 20px 10px;
    border-right: 1px solid var(--studio-ink);
    background: #fbfaf6;
}

.designer-body .designer-toolrail button {
    width: 82px;
    min-height: 74px;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.designer-body .designer-toolrail button:hover {
    color: var(--studio-ink);
    border-color: var(--studio-line);
    background: #fff;
    box-shadow: 3px 3px 0 var(--studio-mint);
    transform: translateX(3px);
}

.designer-body .designer-toolrail button.is-active {
    color: #fff;
    border-color: var(--studio-ink);
    background: var(--studio-ink);
    box-shadow: 5px 5px 0 var(--studio-coral);
    transform: translateX(3px);
}

.designer-body .designer-toolrail button.is-active::before {
    display: none;
}

.designer-body .designer-toolrail button.is-active svg {
    animation: studio-tool-pop 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.designer-body .designer-toolrail-divider {
    width: 54px;
    background: var(--studio-line);
}

.designer-body .designer-stage-panel {
    position: relative;
    background: #edf1ef;
}

.designer-body .designer-stage-toolbar {
    position: relative;
    z-index: 5;
    min-height: 72px;
    border-bottom: 1px solid var(--studio-line);
    background: rgba(248, 249, 246, 0.82);
    backdrop-filter: blur(18px) saturate(1.15);
}

.designer-body .designer-project-name {
    gap: 11px;
}

.designer-body .designer-project-name > span:last-child {
    gap: 2px;
}

.designer-body .designer-project-name strong {
    color: var(--studio-ink);
    font-size: 14px;
    letter-spacing: -0.01em;
}

.designer-body .designer-project-name small {
    color: #69797e;
    font-size: 12px;
}

.designer-body .designer-autosave-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--studio-ink);
    border: 1px solid var(--studio-ink);
    border-radius: 50%;
    background: var(--studio-lime);
}

.designer-body .designer-autosave-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.designer-body .pro-toolbar-group,
.designer-body .pro-view-switch {
    border: 1px solid var(--studio-ink);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 3px 3px 0 rgba(16, 33, 39, 0.1);
}

.designer-body .pro-icon-button,
.designer-body .pro-view-switch button,
.designer-body .pro-guide-button {
    border-radius: 7px;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.designer-body .pro-icon-button:not(:disabled):hover,
.designer-body .pro-view-switch button:hover,
.designer-body .pro-guide-button:hover {
    color: var(--studio-ink);
    transform: translateY(-1px);
}

.designer-body .pro-view-switch button.is-active,
.designer-body .pro-guide-button.is-active {
    color: var(--studio-ink);
    background: var(--studio-mint);
}

.designer-body .pro-guide-button {
    border: 1px solid var(--studio-ink);
    border-radius: 10px;
    background: #fff;
}

.designer-body .designer-canvas-workspace {
    --pointer-x: 50%;
    --pointer-y: 42%;
    position: relative;
    isolation: isolate;
    gap: 18px;
    padding: 24px 34px 18px;
    background:
        linear-gradient(rgba(16, 33, 39, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 33, 39, 0.055) 1px, transparent 1px),
        #edf1ef;
    background-size: 34px 34px;
}

.designer-body .designer-canvas-workspace::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(440px circle at var(--pointer-x) var(--pointer-y), rgba(189, 236, 228, 0.78), transparent 68%),
        radial-gradient(360px circle at 18% 78%, rgba(255, 118, 88, 0.13), transparent 72%);
    content: "";
    pointer-events: none;
    transition: background-position 120ms linear;
}

.designer-body .designer-canvas-workspace::after {
    position: absolute;
    z-index: -1;
    top: -50%;
    left: 50%;
    width: 1px;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.8), transparent);
    content: "";
    opacity: 0.55;
    pointer-events: none;
    transform: rotate(24deg);
    animation: studio-light-sweep 14s ease-in-out infinite;
}

.designer-body .designer-canvas-caption {
    position: relative;
    z-index: 4;
    width: min(100%, 720px);
    align-items: end;
}

.designer-body .designer-canvas-caption > div {
    gap: 3px;
    animation: none;
}

.designer-body .designer-canvas-caption small {
    color: #5f7076;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.designer-body .designer-canvas-caption strong {
    color: var(--studio-ink);
    font-size: 20px;
    letter-spacing: -0.04em;
}

.designer-body .designer-template-badge {
    max-width: 290px;
    padding: 8px 11px;
    color: var(--studio-ink);
    border: 1px solid var(--studio-ink);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 3px 3px 0 rgba(16, 33, 39, 0.09);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
    animation: none;
}

.designer-body .designer-template-badge::before {
    display: none;
    content: none;
}

.designer-body .designer-template-badge.is-calibrated {
    color: var(--studio-ink);
    border-color: var(--studio-ink);
    background: var(--studio-lime);
}

.designer-body .case-stage-shell {
    position: relative;
    isolation: isolate;
    perspective: 1200px;
}

.designer-body .case-stage-shell::before,
.designer-body .case-stage-shell::after {
    position: absolute;
    z-index: 0;
    inset: 3% -8%;
    border: 1px solid var(--studio-ink);
    border-radius: 22px;
    content: "";
    pointer-events: none;
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 300ms ease;
}

.designer-body .case-stage-shell::before {
    background: rgba(255, 118, 88, 0.48);
    transform: translate(-22px, 8px) rotate(-5.5deg);
}

.designer-body .case-stage-shell::after {
    background: rgba(189, 236, 228, 0.88);
    transform: translate(24px, 10px) rotate(4.5deg);
}

.designer-body .case-stage {
    position: relative;
    z-index: 2;
    border: 1px solid var(--studio-ink);
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(16, 33, 39, 0.22), 0 8px 18px rgba(16, 33, 39, 0.1);
    transition: box-shadow 260ms ease, transform 260ms ease;
}

.designer-body .is-studio-ready .case-stage-shell {
    animation: studio-stage-arrive 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.designer-body .case-stage-shell.is-interacting::before {
    transform: translate(-10px, 4px) rotate(-2.5deg);
}

.designer-body .case-stage-shell.is-interacting::after {
    transform: translate(12px, 5px) rotate(2deg);
}

.designer-body .case-stage-shell.is-interacting .case-stage {
    box-shadow: 0 15px 34px rgba(16, 33, 39, 0.18), 0 4px 10px rgba(16, 33, 39, 0.08);
    transform: scale(0.995);
}

.designer-body .case-stage-shell.is-sheet-mode::before,
.designer-body .case-stage-shell.is-sheet-mode::after {
    opacity: 0.35;
    transform: translate(0, 6px) rotate(0deg) scale(0.96);
}

.designer-body .case-stage-shell.is-mode-changing .case-stage {
    animation: studio-view-switch 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.designer-body .pro-stage-footer {
    position: relative;
    z-index: 4;
    width: min(100%, 720px);
    min-height: 54px;
    justify-content: center;
}

.designer-body .pro-stage-tip {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    color: var(--studio-ink);
    border: 1px solid var(--studio-ink);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 4px 4px 0 rgba(16, 33, 39, 0.1);
    backdrop-filter: blur(12px);
    font-size: 12px;
}

.designer-body .pro-stage-tip span {
    display: grid;
    min-width: 145px;
    gap: 1px;
    padding: 8px 14px;
    line-height: 1.2;
    animation: none;
    transition: background 160ms ease;
}

.designer-body .pro-stage-tip span + span {
    border-left: 1px solid var(--studio-line);
}

.designer-body .pro-stage-tip span:hover {
    background: var(--studio-lime);
}

.designer-body .pro-stage-tip strong {
    font-size: 12px;
    font-weight: 800;
}

.designer-body .pro-stage-tip small {
    color: #617177;
    font-size: 11px;
}

.designer-body .designer-inspector {
    --panel-accent: var(--studio-mint);
    border-left: 1px solid var(--studio-ink);
    background: #fbfaf6;
}

.designer-body .designer-inspector[data-active-panel="text"] { --panel-accent: #ffd4c8; }
.designer-body .designer-inspector[data-active-panel="sticker"] { --panel-accent: var(--studio-lime); }
.designer-body .designer-inspector[data-active-panel="background"] { --panel-accent: #cce5ff; }

.designer-body .pro-inspector-header {
    position: relative;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--studio-line);
}

.designer-body .pro-inspector-header::after {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 74px;
    height: 4px;
    background: var(--panel-accent);
    content: "";
    transform-origin: left;
}

.designer-body .pro-inspector-header h2 {
    color: var(--studio-ink);
    font-size: 30px;
}

.designer-body .pro-inspector-header > button {
    color: var(--studio-ink);
    border: 1px solid var(--studio-ink);
    background: var(--panel-accent);
    box-shadow: 3px 3px 0 rgba(16, 33, 39, 0.12);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.designer-body .pro-inspector-header > button:hover {
    box-shadow: 5px 5px 0 rgba(16, 33, 39, 0.18);
    transform: translate(-1px, -1px);
}

.designer-body .pro-upload-card {
    border: 1px dashed var(--studio-ink);
    background: color-mix(in srgb, var(--panel-accent) 32%, white);
    transition: box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.designer-body .pro-upload-card:hover {
    background: color-mix(in srgb, var(--panel-accent) 55%, white);
    box-shadow: 5px 5px 0 var(--studio-ink);
    transform: translate(-2px, -2px);
}

.designer-body .pro-upload-icon {
    color: #fff;
    border: 1px solid var(--studio-ink);
    background: var(--studio-ink);
}

.designer-body .pro-segmented,
.designer-body .pro-layer-item,
.designer-body .pro-sticker-grid button,
.designer-body .pro-background-grid button {
    border-color: var(--studio-line);
    background: rgba(255, 255, 255, 0.72);
}

.designer-body .pro-segmented button.is-active,
.designer-body .pro-layer-item.is-active,
.designer-body .pro-background-grid button.is-active {
    color: var(--studio-ink);
    border-color: var(--studio-ink);
    background: var(--panel-accent);
}

.designer-body .pro-sticker-grid button:hover,
.designer-body .pro-background-grid button:hover,
.designer-body .pro-layer-item:hover {
    border-color: var(--studio-ink);
    box-shadow: 3px 3px 0 rgba(16, 33, 39, 0.12);
    transform: translate(-1px, -1px);
}

.designer-body .pro-range input[type="range"] {
    accent-color: var(--studio-ink);
}

.designer-body .designer-inspector.is-panel-changing .pro-inspector-header {
    animation: studio-panel-header 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.designer-body .designer-inspector.is-panel-changing .pro-inspector-header::after {
    animation: studio-accent-line 480ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > * {
    animation: studio-panel-item 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > *:nth-child(2) { animation-delay: 45ms; }
.designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > *:nth-child(3) { animation-delay: 80ms; }
.designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > *:nth-child(4) { animation-delay: 115ms; }
.designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > *:nth-child(5) { animation-delay: 150ms; }
.designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > *:nth-child(6) { animation-delay: 185ms; }

.designer-body .designer-modal:not([hidden]) {
    animation: studio-modal-backdrop 220ms ease both;
}

.designer-body .designer-modal:not([hidden]) .designer-modal-card {
    border: 1px solid var(--studio-ink);
    box-shadow: 12px 12px 0 rgba(16, 33, 39, 0.16), 0 35px 90px rgba(16, 33, 39, 0.22);
    animation: studio-modal-card 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes studio-stage-arrive {
    from { opacity: 0; transform: translateY(34px) scale(0.94) rotateX(7deg); }
    to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); }
}

@keyframes studio-tool-pop {
    0% { transform: scale(0.72) rotate(-8deg); }
    70% { transform: scale(1.12) rotate(2deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes studio-view-switch {
    0% { opacity: 0.6; transform: scale(0.94) rotateY(-4deg); }
    100% { opacity: 1; transform: scale(1) rotateY(0); }
}

@keyframes studio-panel-header {
    from { opacity: 0; transform: translateX(22px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes studio-accent-line {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes studio-panel-item {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes studio-light-sweep {
    0%, 18% { translate: -42vw 0; opacity: 0; }
    42%, 58% { opacity: 0.55; }
    82%, 100% { translate: 42vw 0; opacity: 0; }
}

@keyframes studio-modal-backdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes studio-modal-card {
    from { opacity: 0; transform: translateY(28px) scale(0.965); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1380px) {
    .designer-body .designer-workspace {
        grid-template-columns: 94px minmax(480px, 1fr) 390px;
    }

    .designer-body .designer-toolrail button {
        width: 74px;
    }

    .designer-body .designer-canvas-workspace {
        padding-inline: 24px;
    }
}

@media (max-width: 980px) {
    .designer-body .designer-workspace {
        grid-template-columns: 1fr;
    }

    .designer-body .designer-toolrail {
        border: 1px solid var(--studio-ink);
        background: rgba(251, 250, 246, 0.94);
        box-shadow: 6px 6px 0 rgba(16, 33, 39, 0.16);
        backdrop-filter: blur(16px);
    }

    .designer-body .designer-toolrail button {
        width: auto;
    }

    .designer-body .designer-toolrail button.is-active {
        box-shadow: 0 4px 0 var(--studio-coral);
        transform: translateY(-2px);
    }

    .designer-body .designer-inspector {
        border-top: 1px solid var(--studio-ink);
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .designer-body .designer-project-name {
        display: none;
    }

    .designer-body .designer-canvas-workspace {
        gap: 12px;
        padding: 14px 12px 20px;
        background-size: 26px 26px;
    }

    .designer-body .designer-canvas-caption {
        align-items: center;
    }

    .designer-body .designer-canvas-caption small {
        font-size: 10px;
    }

    .designer-body .designer-canvas-caption strong {
        font-size: 15px;
    }

    .designer-body .designer-template-badge {
        max-width: 160px;
        padding: 6px 8px;
        font-size: 10px;
    }

    .designer-body .case-stage-shell::before,
    .designer-body .case-stage-shell::after {
        inset: 4% -3%;
    }

    .designer-body .case-stage-shell::before {
        transform: translate(-8px, 5px) rotate(-2.5deg);
    }

    .designer-body .case-stage-shell::after {
        transform: translate(8px, 6px) rotate(2deg);
    }

    .designer-body .pro-stage-footer {
        display: none;
    }

    .designer-body .pro-inspector-header h2 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .designer-body .designer-canvas-workspace::after,
    .designer-body .is-studio-ready .case-stage-shell,
    .designer-body .case-stage-shell.is-mode-changing .case-stage,
    .designer-body .designer-toolrail button.is-active svg,
    .designer-body .designer-inspector.is-panel-changing .pro-inspector-header,
    .designer-body .designer-inspector.is-panel-changing .pro-inspector-header::after,
    .designer-body .designer-inspector.is-panel-changing .pro-properties:not([hidden]) > *,
    .designer-body .designer-modal:not([hidden]),
    .designer-body .designer-modal:not([hidden]) .designer-modal-card {
        animation: none;
    }
}

/* Professional refinement: quiet surfaces, one accent and action-led motion. */
.designer-body {
    --studio-ink: #17252c;
    --studio-paper: #f7f9f8;
    --studio-mint: #e2f4f1;
    --studio-teal: #159f97;
    --studio-coral: #159f97;
    --studio-lime: #e2f4f1;
    --studio-line: #dde5e3;
    --designer-teal: #159f97;
    --designer-teal-dark: #0c766f;
    --designer-coral: #159f97;
    background: #eef2f1;
}

.designer-body .designer-header {
    border-bottom-color: #e1e7e5;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(23, 37, 44, 0.03);
}

.designer-body .designer-brand-mark {
    border: 0;
    border-radius: 10px;
    background: #17282f;
    box-shadow: none;
}

.designer-body .designer-brand:hover .designer-brand-mark {
    box-shadow: none;
    transform: none;
}

.designer-body .designer-device-button {
    border-color: #d9e2df;
    border-radius: 12px;
    box-shadow: 0 7px 22px rgba(30, 55, 62, 0.07);
}

.designer-body .designer-device-button:hover {
    border-color: rgba(21, 159, 151, 0.55);
    box-shadow: 0 10px 28px rgba(21, 159, 151, 0.1);
    transform: translateY(-1px);
}

.designer-body .designer-save-button,
.designer-body .designer-primary-button {
    border-color: var(--studio-teal);
    border-radius: 10px;
    background: var(--studio-teal);
    box-shadow: 0 9px 22px rgba(21, 159, 151, 0.18);
}

.designer-body .designer-save-button:hover,
.designer-body .designer-primary-button:hover {
    background: #118d86;
    box-shadow: 0 12px 28px rgba(21, 159, 151, 0.22);
    transform: translateY(-1px);
}

.designer-body .designer-ghost-button {
    border-color: #d8e1df;
    box-shadow: none;
}

.designer-body .designer-workspace {
    grid-template-columns: 100px minmax(560px, 1fr) 420px;
}

.designer-body .designer-toolrail {
    gap: 8px;
    padding: 18px 9px;
    border-right-color: #e0e7e5;
    background: #fff;
}

.designer-body .designer-toolrail button {
    width: 80px;
    min-height: 70px;
    color: #6a787e;
    border: 0;
    border-radius: 11px;
}

.designer-body .designer-toolrail button:hover {
    color: #21343b;
    border-color: transparent;
    background: #f2f6f5;
    box-shadow: none;
    transform: translateY(-1px);
}

.designer-body .designer-toolrail button.is-active {
    color: #0b756f;
    border-color: transparent;
    background: #e5f5f2;
    box-shadow: inset 3px 0 0 var(--studio-teal);
    transform: none;
}

.designer-body .designer-toolrail button.is-active svg {
    animation: studio-tool-pop 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.designer-body .designer-toolrail-divider {
    background: #e5eae9;
}

.designer-body .designer-stage-panel {
    background: #eef2f1;
}

.designer-body .designer-stage-toolbar {
    min-height: 70px;
    border-bottom-color: #dfe6e4;
    background: rgba(248, 250, 249, 0.88);
    box-shadow: 0 7px 24px rgba(31, 51, 58, 0.035);
}

.designer-body .designer-autosave-icon {
    width: 32px;
    height: 32px;
    color: #0d827b;
    border: 0;
    background: #def2ef;
}

.designer-body .designer-project-name strong {
    color: #27383e;
    font-size: 14px;
}

.designer-body .designer-project-name small {
    color: #7a878c;
}

.designer-body .pro-toolbar-group,
.designer-body .pro-view-switch {
    border-color: #d8e1df;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 5px 18px rgba(28, 48, 55, 0.05);
}

.designer-body .pro-guide-button {
    border-color: #d8e1df;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
}

.designer-body .pro-view-switch button.is-active,
.designer-body .pro-guide-button.is-active {
    color: #0b756f;
    background: #e2f4f1;
}

.designer-body .designer-canvas-workspace {
    gap: 17px;
    padding: 24px 34px 20px;
    background: linear-gradient(145deg, #f2f5f4 0%, #e9efed 100%);
    background-size: auto;
}

.designer-body .designer-canvas-workspace::before {
    background:
        radial-gradient(520px circle at var(--pointer-x) var(--pointer-y), rgba(144, 220, 211, 0.2), transparent 70%),
        radial-gradient(360px circle at 12% 86%, rgba(255, 255, 255, 0.76), transparent 72%);
}

.designer-body .designer-canvas-workspace::after {
    display: none;
    animation: none;
}

.designer-body .designer-canvas-caption {
    width: min(100%, 680px);
}

.designer-body .designer-canvas-caption small {
    color: #7a888d;
    font-size: 11px;
    letter-spacing: 0.07em;
}

.designer-body .designer-canvas-caption strong {
    color: #1b2c33;
    font-size: 18px;
    letter-spacing: -0.03em;
}

.designer-body .designer-template-badge,
.designer-body .designer-template-badge.is-calibrated {
    max-width: 280px;
    padding: 7px 10px;
    color: #647278;
    border-color: #d7e0de;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 5px 18px rgba(28, 48, 55, 0.05);
    font-weight: 650;
}

.designer-body .case-stage-shell::before,
.designer-body .case-stage-shell::after {
    display: none;
}

.designer-body .case-stage {
    border-color: #c5d0ce;
    border-radius: 18px;
    box-shadow: 0 24px 58px rgba(31, 50, 57, 0.14), 0 6px 16px rgba(31, 50, 57, 0.07);
}

.designer-body .case-stage-shell.is-interacting .case-stage {
    box-shadow: 0 15px 34px rgba(31, 50, 57, 0.14), 0 3px 10px rgba(31, 50, 57, 0.06);
    transform: scale(0.997);
}

.designer-body .pro-stage-footer {
    display: none;
}

.designer-body .designer-inspector,
.designer-body .designer-inspector[data-active-panel="text"],
.designer-body .designer-inspector[data-active-panel="sticker"],
.designer-body .designer-inspector[data-active-panel="background"] {
    --panel-accent: #dff3ef;
    border-left-color: #dfe6e4;
    background: #fff;
}

.designer-body .pro-inspector-header {
    border-bottom-color: #e4e9e8;
}

.designer-body .pro-inspector-header::after {
    width: 48px;
    height: 3px;
    background: var(--studio-teal);
}

.designer-body .pro-inspector-header h2 {
    color: #17272e;
    font-size: 28px;
}

.designer-body .pro-inspector-header > button {
    color: #0d7f78;
    border-color: #d5e5e2;
    background: #e5f5f2;
    box-shadow: none;
}

.designer-body .pro-inspector-header > button:hover {
    border-color: rgba(21, 159, 151, 0.45);
    box-shadow: 0 7px 18px rgba(21, 159, 151, 0.1);
    transform: translateY(-1px);
}

.designer-body .pro-upload-card {
    border-color: #b9cac7;
    background: #f6faf9;
}

.designer-body .pro-upload-card:hover {
    border-color: var(--studio-teal);
    background: #eff9f7;
    box-shadow: 0 10px 24px rgba(21, 159, 151, 0.1);
    transform: translateY(-1px);
}

.designer-body .pro-upload-icon {
    border: 0;
    background: var(--studio-teal);
}

.designer-body .pro-segmented,
.designer-body .pro-layer-item,
.designer-body .pro-sticker-grid button,
.designer-body .pro-background-grid button {
    border-color: #e0e7e5;
    background: #fff;
}

.designer-body .pro-segmented button.is-active,
.designer-body .pro-layer-item.is-active,
.designer-body .pro-background-grid button.is-active {
    color: #0b756f;
    border-color: #b9ddd8;
    background: #e6f5f2;
}

.designer-body .pro-sticker-grid button:hover,
.designer-body .pro-background-grid button:hover,
.designer-body .pro-layer-item:hover {
    border-color: #b7ccc8;
    box-shadow: 0 7px 18px rgba(29, 49, 56, 0.07);
    transform: translateY(-1px);
}

.designer-body .pro-range input[type="range"] {
    accent-color: var(--studio-teal);
}

.designer-body .designer-modal:not([hidden]) .designer-modal-card {
    border-color: #d9e1df;
    box-shadow: 0 32px 90px rgba(23, 40, 47, 0.22);
}

@keyframes studio-stage-arrive {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes studio-tool-pop {
    from { opacity: 0.45; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes studio-view-switch {
    from { opacity: 0.55; transform: scale(0.975); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1380px) {
    .designer-body .designer-workspace {
        grid-template-columns: 92px minmax(480px, 1fr) 390px;
    }

    .designer-body .designer-toolrail button {
        width: 74px;
    }
}

@media (max-width: 980px) {
    .designer-body .designer-workspace {
        grid-template-columns: 1fr;
        height: auto;
    }

    .designer-body .designer-toolrail {
        border-color: #dce4e2;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 18px 45px rgba(26, 45, 52, 0.16);
    }

    .designer-body .designer-toolrail button.is-active {
        box-shadow: inset 0 -3px 0 var(--studio-teal);
        transform: translateY(-1px);
    }

    .designer-body .designer-inspector {
        border-top: 1px solid #dfe6e4;
        border-left: 0;
    }
}

@media (max-width: 640px) {
    .designer-body .designer-canvas-caption {
        display: grid;
        width: calc(100% - 24px);
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: start;
    }

    .designer-body .designer-template-badge,
    .designer-body .designer-template-badge.is-calibrated {
        max-width: 100%;
        justify-self: start;
        text-align: left;
    }
}

/* A5 is the working page itself, not a page nested inside an editor card. */
.designer-body .case-stage-shell.is-sheet-mode .case-stage {
    height: min(780px, calc(100svh - 220px));
    min-height: 620px;
    aspect-ratio: 148 / 210;
    border-color: #d8e0de;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(29, 48, 55, 0.14), 0 2px 8px rgba(29, 48, 55, 0.06);
}

.designer-body .case-stage-shell.is-sheet-mode .case-stage-artboard {
    border-radius: 3px;
}

@media (max-width: 640px) {
    .designer-body .case-stage-shell.is-sheet-mode .case-stage {
        width: min(100%, 430px);
        height: auto;
        min-height: 0;
    }
}

/* The object sits directly on the workspace; only A5 has a page surface. */
.designer-body .designer-canvas-workspace::before {
    display: none;
    background: none;
}

.designer-body .designer-canvas-caption {
    width: min(100%, 720px);
    justify-content: center;
    text-align: center;
}

.designer-body .designer-canvas-caption > div {
    width: 100%;
    justify-items: center;
}

.designer-body .designer-canvas-workspace.is-sheet-mode {
    justify-content: flex-start;
    padding-top: 24px;
}

.designer-body .case-stage-shell:not(.is-sheet-mode) .case-stage {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.designer-body .case-stage-shell:not(.is-sheet-mode) .case-stage-artboard {
    overflow: visible;
    border-radius: 0;
}

.designer-body .case-stage-shell:not(.is-sheet-mode).is-interacting .case-stage {
    box-shadow: none;
}

.designer-body .case-stage-shell.is-sheet-mode .case-stage {
    height: min(820px, calc(100svh - 190px));
    min-height: 660px;
    box-shadow: 0 26px 68px rgba(29, 48, 55, 0.13), 0 2px 7px rgba(29, 48, 55, 0.05);
}

@media (max-width: 640px) {
    .designer-body .designer-canvas-caption {
        width: 100%;
        text-align: center;
    }

    .designer-body .case-stage-shell.is-sheet-mode .case-stage {
        width: min(100%, 430px);
        height: auto;
        min-height: 0;
    }
}

/* Keep the refined navigation above older skin overrides. */
.designer-body .designer-toolrail button.is-active {
    box-shadow: none;
}

.designer-body .designer-toolrail button.is-active::before {
    display: none !important;
    content: none !important;
}

.designer-body .designer-toolrail button:focus-visible,
.designer-body .designer-brand-list button:focus-visible {
    outline: 0;
    outline-offset: 0;
}

.designer-body .designer-toolrail button:focus-visible {
    color: #087b77;
    background: #edf7f5;
}

.designer-body .designer-brand-list button:focus-visible {
    color: #0b756f;
    background: #e4f2ef;
    box-shadow: none;
}

.designer-body .designer-model-search input:focus-visible {
    outline: 0;
    outline-offset: 0;
}

.designer-body .designer-brand-list button strong {
    font-size: 15px;
}

.designer-body .designer-model-list .model-group-year {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 4px;
    padding: 0 0 9px;
    border-radius: 0;
    background: transparent;
    letter-spacing: 0.08em;
}

.designer-body .designer-model-list .model-group-year::after {
    height: 1px;
    flex: 1;
    background: #e4e9e8;
    content: "";
}

.designer-body .designer-model-list .model-option {
    min-height: 52px;
    border: 0;
    border-bottom: 1px solid #e6ebea;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.designer-body .designer-model-list .model-option:hover {
    border-color: #e6ebea;
    background: #f4f8f7;
    box-shadow: none;
}

.designer-body .designer-model-list .model-option.is-active {
    border-color: #cfe2df;
    background: #eaf5f3;
    box-shadow: none;
}

@media (max-width: 980px) {
    .designer-body .designer-toolrail button.is-active {
        box-shadow: none;
    }
}
