:root {
    --ink: #17202a;
    --muted: #657083;
    --line: #d8dee9;
    --panel: #ffffff;
    --surface: #f4f7fb;
    --panel-glass: rgba(255, 255, 255, 0.94);
    --control-bg: #f9fbfd;
    --topbar: #17202a;
    --viewport-bg: #e9eef6;
    --blue: #2f80ed;
    --teal: #00897b;
    --orange: #f2994a;
    --danger: #c94c4c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--surface);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--app-bg, var(--surface));
}

body.theme-studio {
    --app-bg:
        linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(0, 137, 123, 0.1) 42%, rgba(242, 153, 74, 0.08)),
        repeating-linear-gradient(90deg, rgba(23, 32, 42, 0.04) 0 1px, transparent 1px 42px),
        #f4f7fb;
}

body.theme-future {
    --ink: #e9f4ff;
    --muted: #9fb5c9;
    --line: rgba(112, 226, 255, 0.24);
    --panel: rgba(10, 20, 31, 0.9);
    --panel-glass: rgba(10, 20, 31, 0.9);
    --control-bg: rgba(255, 255, 255, 0.08);
    --topbar: #08111d;
    --surface: #09131f;
    --viewport-bg: #07111c;
    --blue: #65a9ff;
    --teal: #38d9c8;
    --orange: #ffb56b;
    --app-bg:
        linear-gradient(125deg, #07111c 0%, #101f32 38%, #0a332f 70%, #19182c 100%),
        repeating-linear-gradient(45deg, rgba(101, 169, 255, 0.1) 0 1px, transparent 1px 34px);
}

body.theme-neon {
    --ink: #f4f8ff;
    --muted: #bac5d6;
    --line: rgba(255, 255, 255, 0.18);
    --panel: rgba(15, 14, 29, 0.9);
    --panel-glass: rgba(15, 14, 29, 0.9);
    --control-bg: rgba(255, 255, 255, 0.08);
    --topbar: #120f23;
    --surface: #110f20;
    --viewport-bg: #121225;
    --blue: #6aa9ff;
    --teal: #30e2bb;
    --orange: #ff9867;
    --app-bg:
        linear-gradient(140deg, #111426 0%, #22204a 34%, #113f4c 68%, #2a1727 100%),
        repeating-linear-gradient(0deg, rgba(48, 226, 187, 0.12) 0 1px, transparent 1px 28px);
}

body.theme-carbon {
    --ink: #edf1f5;
    --muted: #a8b1bd;
    --line: rgba(217, 226, 237, 0.18);
    --panel: rgba(25, 29, 36, 0.92);
    --panel-glass: rgba(25, 29, 36, 0.92);
    --control-bg: rgba(255, 255, 255, 0.08);
    --topbar: #11151b;
    --surface: #161a20;
    --viewport-bg: #1a2028;
    --blue: #8fb8ff;
    --teal: #61d6c5;
    --orange: #ffc071;
    --app-bg:
        linear-gradient(135deg, #11151b, #242a33 48%, #151b21),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.055) 0 2px, transparent 2px 12px);
}

body.theme-workshop {
    --ink: #222831;
    --muted: #5f6874;
    --line: #ccd6df;
    --panel: rgba(252, 253, 255, 0.95);
    --panel-glass: rgba(252, 253, 255, 0.95);
    --control-bg: #f9fbfd;
    --topbar: #26313d;
    --surface: #eef3f7;
    --viewport-bg: #e7edf3;
    --blue: #2468d8;
    --teal: #007c73;
    --orange: #d97925;
    --app-bg:
        linear-gradient(135deg, #e9eef4 0%, #dfe7ef 44%, #f3f5f6 100%),
        repeating-linear-gradient(90deg, rgba(38, 49, 61, 0.055) 0 1px, transparent 1px 22px);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(90deg, var(--topbar), rgba(23, 32, 42, 0.94));
    border-bottom: 4px solid var(--teal);
}

.brand-mark {
    font-size: 20px;
    font-weight: 700;
}

.brand-subtitle {
    color: #b7c4d6;
    font-size: 12px;
}

.top-actions,
.button-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-picker label {
    color: #d8e3ef;
    font-size: 12px;
    font-weight: 700;
}

.theme-picker .form-select {
    width: 132px;
    border-color: rgba(255, 255, 255, 0.28);
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.theme-picker .form-select option {
    color: #17202a;
}

.workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 290px minmax(420px, 1fr) 360px;
    min-height: 0;
}

.side-panel {
    background: var(--panel-glass);
    overflow: auto;
    padding: 14px;
    backdrop-filter: blur(12px);
}

.left-panel {
    border-right: 1px solid var(--line);
}

.right-panel {
    border-left: 1px solid var(--line);
}

.panel-block {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.panel-block:first-child {
    padding-top: 0;
}

.panel-block h2,
.section-heading h2 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

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

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

.tool-button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--control-bg);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    display: inline-grid;
    place-items: center;
    gap: 6px;
    padding: 6px 8px;
}

.tool-button:hover,
.tool-button.active {
    border-color: var(--blue);
    color: var(--blue);
    background: #eef6ff;
}

.tool-button.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #fff1f1;
}

.tool-button.primary-action {
    border-color: color-mix(in srgb, var(--blue) 56%, var(--line));
    color: #fff;
    background: linear-gradient(145deg, var(--blue), var(--teal));
}

.tool-button.primary-action:hover {
    color: #fff;
    background: linear-gradient(145deg, color-mix(in srgb, var(--blue) 82%, #fff), color-mix(in srgb, var(--teal) 82%, #fff));
}

.icon-button {
    min-height: 44px;
    aspect-ratio: 1;
    padding: 0;
}

.tool-action {
    grid-auto-flow: column;
    justify-content: center;
    min-height: 42px;
}

.tool-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: inline-block;
    flex: 0 0 24px;
}

.tool-icon::before,
.tool-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.icon-select::before {
    left: 5px;
    top: 3px;
    width: 0;
    height: 0;
    border-left: 6px solid currentColor;
    border-top: 10px solid transparent;
    border-bottom: 4px solid transparent;
    transform: rotate(-12deg);
}

.icon-select::after {
    left: 11px;
    top: 13px;
    width: 8px;
    height: 3px;
    background: currentColor;
    transform: rotate(45deg);
    border-radius: 2px;
}

.icon-line::before {
    left: 3px;
    top: 11px;
    width: 19px;
    height: 3px;
    background: currentColor;
    border-radius: 999px;
    transform: rotate(-32deg);
}

.icon-line::after {
    left: 3px;
    top: 15px;
    width: 5px;
    height: 5px;
    border: 2px solid currentColor;
    background: var(--control-bg);
}

.icon-rect::before {
    inset: 5px 3px;
    border: 2px solid currentColor;
}

.icon-circle::before {
    inset: 4px;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.icon-rounded::before {
    inset: 5px 3px;
    border: 2px solid currentColor;
    border-radius: 7px;
}

.icon-cancel::before,
.icon-clear::before,
.icon-delete::before {
    left: 4px;
    top: 11px;
    width: 16px;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(45deg);
}

.icon-cancel::after,
.icon-clear::after,
.icon-delete::after {
    left: 4px;
    top: 11px;
    width: 16px;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(-45deg);
}

.icon-clear::before {
    width: 18px;
}

.icon-undo::before {
    left: 5px;
    top: 6px;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    transform: rotate(45deg);
}

.icon-undo::after {
    left: 1px;
    top: 4px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 7px solid currentColor;
    transform: rotate(20deg);
}

.icon-redo::before {
    right: 5px;
    top: 6px;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    transform: rotate(-45deg);
}

.icon-redo::after {
    right: 1px;
    top: 4px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid currentColor;
    transform: rotate(-20deg);
}

.icon-measure::before {
    left: 3px;
    top: 6px;
    width: 18px;
    height: 10px;
    border: 2px solid currentColor;
    transform: rotate(-8deg);
}

.icon-measure::after {
    left: 7px;
    top: 7px;
    width: 2px;
    height: 8px;
    background: currentColor;
    box-shadow: 5px 0 0 currentColor, 10px 0 0 currentColor;
    transform: rotate(-8deg);
}

.icon-extrude::before {
    left: 5px;
    bottom: 3px;
    width: 13px;
    height: 10px;
    border: 2px solid currentColor;
}

.icon-extrude::after {
    left: 11px;
    top: 2px;
    width: 2px;
    height: 14px;
    background: currentColor;
    box-shadow: 0 -1px 0 currentColor;
}

.icon-cut::before {
    left: 4px;
    bottom: 4px;
    width: 16px;
    height: 12px;
    border: 2px solid currentColor;
}

.icon-cut::after {
    left: 5px;
    top: 4px;
    width: 18px;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(-28deg);
    box-shadow: 0 6px 0 rgba(201, 76, 76, 0.58);
}

.icon-box::before {
    left: 5px;
    top: 7px;
    width: 14px;
    height: 12px;
    border: 2px solid currentColor;
    transform: skewY(-12deg);
}

.icon-cylinder::before {
    left: 5px;
    top: 5px;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50% / 28%;
}

.icon-sphere::before {
    inset: 4px;
    border: 2px solid currentColor;
    border-radius: 999px;
}

.icon-sphere::after {
    left: 5px;
    top: 11px;
    width: 14px;
    height: 2px;
    background: currentColor;
    opacity: 0.75;
}

.icon-move::before {
    left: 11px;
    top: 3px;
    width: 2px;
    height: 18px;
    background: currentColor;
}

.icon-move::after {
    left: 3px;
    top: 11px;
    width: 18px;
    height: 2px;
    background: currentColor;
}

.icon-rotate::before {
    inset: 4px;
    border: 2px solid currentColor;
    border-left-color: transparent;
    border-radius: 999px;
    transform: rotate(-20deg);
}

.icon-rotate::after {
    right: 2px;
    top: 4px;
    width: 0;
    height: 0;
    border-left: 6px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.object-list {
    display: grid;
    gap: 8px;
    min-height: 42px;
}

.object-row {
    display: grid;
    grid-template-columns: 1fr 34px 34px;
    gap: 6px;
}

.object-item {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--control-bg);
    padding: 8px 10px;
    color: var(--ink);
    font-size: 13px;
}

.object-item small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.object-item.active {
    border-color: var(--teal);
    box-shadow: inset 3px 0 0 var(--teal);
}

.eye-button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--control-bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1;
}

.eye-button.is-hidden {
    color: var(--muted);
    background: #f2f4f7;
}

.delete-row-button {
    border: 1px solid rgba(201, 76, 76, 0.42);
    border-radius: 6px;
    background: rgba(201, 76, 76, 0.12);
    color: var(--danger);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.delete-row-button:hover {
    background: #fff1f1;
    border-color: var(--danger);
}

.viewport-panel {
    position: relative;
    min-width: 0;
    min-height: calc(100vh - 64px);
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(56, 217, 200, 0.2), transparent 30%),
        radial-gradient(circle at 82% 26%, rgba(101, 169, 255, 0.22), transparent 28%),
        linear-gradient(135deg, color-mix(in srgb, var(--viewport-bg) 92%, #29c7bd 8%), var(--viewport-bg) 52%, color-mix(in srgb, var(--viewport-bg) 86%, #7b61ff 14%));
}

.viewport-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(79, 216, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 216, 255, 0.1) 1px, transparent 1px),
        linear-gradient(120deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 49%, transparent 51%);
    background-size: 46px 46px, 46px 46px, 180px 180px;
    mask-image: radial-gradient(circle at center, black 0 60%, transparent 100%);
}

.viewport-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 18%, rgba(0, 0, 0, 0.18));
}

.viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.viewport canvas {
    display: block;
}

.viewport-status {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.view-cube {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 166px;
    min-height: 204px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 12px 12px;
    border: 1px solid rgba(135, 222, 255, 0.34);
    border-radius: 8px;
    background: rgba(7, 17, 28, 0.72);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), inset 0 0 32px rgba(56, 217, 200, 0.12);
    backdrop-filter: blur(12px);
}

.view-cube-title {
    width: 100%;
    color: #e9f4ff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72);
}

.cube-scene {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    perspective: 560px;
    cursor: grab;
    touch-action: none;
}

.cube-scene:active {
    cursor: grabbing;
}

.cube3d {
    position: relative;
    width: 84px;
    height: 84px;
    transform-style: preserve-3d;
    transform: rotateX(-28deg) rotateY(38deg);
    transition: transform 120ms ease-out;
}

.cube3d-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(120, 230, 255, 0.42);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(48, 226, 187, 0.18));
    color: #eefcff;
    padding: 5px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
    backface-visibility: hidden;
    overflow: hidden;
}

.cube3d-face:hover {
    background: linear-gradient(145deg, rgba(101, 169, 255, 0.38), rgba(48, 226, 187, 0.22));
}

.face-front {
    transform: translateZ(42px);
}

.face-back {
    transform: rotateY(180deg) translateZ(42px);
}

.face-right {
    transform: rotateY(90deg) translateZ(42px);
}

.face-left {
    transform: rotateY(-90deg) translateZ(42px);
}

.face-top {
    transform: rotateX(90deg) translateZ(42px);
}

.face-bottom {
    transform: rotateX(-90deg) translateZ(42px);
}

.cube-face,
.cube-home {
    border: 1px solid rgba(120, 230, 255, 0.38);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(48, 226, 187, 0.08));
    color: #e9f4ff;
    min-height: 30px;
    padding: 4px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.cube-face:hover,
.cube-home:hover {
    border-color: rgba(255, 255, 255, 0.86);
    background: linear-gradient(145deg, rgba(101, 169, 255, 0.32), rgba(48, 226, 187, 0.2));
}

.cube-top {
    grid-column: 1 / -1;
}

.cube-front {
    box-shadow: inset 0 -3px 0 rgba(48, 226, 187, 0.45);
}

.cube-right {
    box-shadow: inset -3px 0 0 rgba(101, 169, 255, 0.48);
}

.cube-home {
    width: 100%;
    min-height: 28px;
}

.axis-chip {
    position: absolute;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #07111c;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.26);
}

.axis-x {
    right: -5px;
    top: 74px;
    background: #ff9867;
}

.axis-y {
    left: -5px;
    bottom: 42px;
    background: #65a9ff;
}

.axis-z {
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    background: #38d9c8;
}

.measure-hud {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 5;
    min-width: 240px;
    max-width: min(420px, calc(100% - 36px));
    border: 1px solid rgba(135, 222, 255, 0.32);
    border-radius: 8px;
    background: rgba(7, 17, 28, 0.74);
    color: #dff8ff;
    padding: 10px 12px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.measure-hud strong {
    display: block;
    color: #5ce7d9;
    font-size: 12px;
    letter-spacing: 0;
    margin-bottom: 3px;
}

.measure-hud span {
    display: block;
    color: #e9f4ff;
    font-size: 13px;
    line-height: 1.35;
}

.measure-hud.is-idle {
    opacity: 0.78;
}

.dimension-entry {
    position: absolute;
    left: 18px;
    top: 92px;
    z-index: 6;
    width: min(270px, calc(100% - 36px));
    border: 1px solid rgba(92, 231, 217, 0.44);
    border-radius: 8px;
    background: rgba(7, 17, 28, 0.84);
    color: #e9f4ff;
    padding: 9px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

.dimension-entry.is-hidden {
    display: none;
}

.dimension-entry label,
.dimension-entry span {
    display: block;
    font-size: 11px;
    color: #93f0e7;
    font-weight: 800;
}

.dimension-entry input {
    width: 100%;
    height: 32px;
    margin: 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0 9px;
    font-weight: 800;
    outline: none;
}

.dimension-entry input:focus {
    border-color: #5ce7d9;
    box-shadow: 0 0 0 2px rgba(92, 231, 217, 0.18);
}

.measure-tag {
    position: absolute;
    z-index: 6;
    display: none;
    transform: translate(12px, -50%);
    border: 1px solid rgba(92, 231, 217, 0.42);
    border-radius: 6px;
    background: rgba(7, 17, 28, 0.84);
    color: #e9f4ff;
    padding: 5px 7px;
    font-size: 12px;
    font-weight: 800;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.snap-indicator {
    position: absolute;
    z-index: 7;
    display: none;
    width: 13px;
    height: 13px;
    transform: translate(-50%, -50%);
    border: 2px solid #ffffff;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 0 2px rgba(7, 17, 28, 0.75), 0 0 18px rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

.viewport-status span,
.mini-status {
    border: 1px solid rgba(23, 32, 42, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--muted);
    padding: 6px 8px;
    font-size: 12px;
}

.compact-label {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.three-col,
.two-col {
    display: grid;
    gap: 8px;
}

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

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

.three-col label,
.two-col label {
    color: var(--muted);
    font-size: 12px;
}

.unit-label {
    color: var(--teal);
    font-weight: 700;
}

.form-control,
.form-select,
.btn {
    border-radius: 6px;
}

body[class*="theme-"] .form-control,
body[class*="theme-"] .form-select {
    border-color: var(--line);
}

body.theme-future .form-control,
body.theme-future .form-select,
body.theme-neon .form-control,
body.theme-neon .form-select,
body.theme-carbon .form-control,
body.theme-carbon .form-select {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

body.theme-future .form-control:disabled,
body.theme-neon .form-control:disabled,
body.theme-carbon .form-control:disabled {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

body.theme-future .form-select option,
body.theme-neon .form-select option,
body.theme-carbon .form-select option {
    color: #17202a;
}

.form-control-color {
    width: 100%;
    min-height: 31px;
}

.gcode-block {
    border-bottom: 0;
}

.gcode-preview {
    height: 210px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.35;
    background: #101820;
    color: #d8f3dc;
}

.mini-status {
    margin-top: 8px;
}

@media (max-width: 1120px) {
    .workspace {
        grid-template-columns: 260px minmax(360px, 1fr);
    }

    .right-panel {
        grid-column: 1 / -1;
        border-left: 0;
        border-top: 1px solid var(--line);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }
}

@media (max-width: 760px) {
    .app-topbar {
        height: auto;
        min-height: 64px;
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
        padding: 12px;
    }

    .workspace,
    .right-panel {
        display: block;
    }

    .viewport-panel {
        min-height: 520px;
    }
}
