/* ===== CSS Variables ===== */
:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-surface: #1e2a4a;
    --bg-hover: #253559;
    --text-primary: #e8e8e8;
    --text-secondary: #a0aec0;
    --text-muted: #6b7280;
    --accent: #4f8cff;
    --accent-hover: #3d7bf7;
    --accent-light: rgba(79, 140, 255, 0.15);
    --success: #48bb78;
    --warning: #ecc94b;
    --danger: #fc5c65;
    --border: #2d3748;
    --border-light: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --header-height: 52px;
    --sidebar-width: 240px;
    --right-sidebar-width: 280px;
}

/* ===== Custom Object Library ===== */
.furniture-toolbar {
    margin-bottom: 10px;
}

.furniture-toolbar .btn {
    width: 100%;
    justify-content: center;
    border-color: var(--accent);
    color: var(--accent);
}

.furniture-toolbar .btn:hover {
    background: var(--accent-light);
    color: #7aa7ff;
}

.custom-item .furniture-thumb.custom {
    background: linear-gradient(135deg, #253559, #0f3460);
}

.custom-item-size {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.custom-item-btn {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.custom-item-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.custom-item-btn.danger:hover {
    background: rgba(252, 92, 101, 0.15);
    color: var(--danger);
}

.custom-empty {
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* placement hint chip */
.custom-placement-hint {
    position: absolute;
    left: 50%;
    bottom: 44px;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    display: none;
    pointer-events: none;
    z-index: 20;
    box-shadow: var(--shadow);
}

/* ===== Object Builder Modal ===== */
.modal-content.builder {
    width: 900px;
    max-width: 94vw;
}

.builder-body {
    padding: 16px 20px;
}

.builder-top {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.builder-name,
.builder-tpl {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.builder-name label,
.builder-tpl label,
.builder-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.builder-name input,
.builder-tpl select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 13px;
}

.builder-name input:focus,
.builder-tpl select:focus {
    outline: none;
    border-color: var(--accent);
}

.builder-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 16px;
    align-items: start;
}

.builder-left,
.builder-right {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px;
}

.builder-right {
    position: relative;
}

.builder-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.builder-add-row {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.obj-type-btn {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.obj-type-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.obj-type-btn.box { color: #f6ad55; }
.obj-type-btn.cyl { color: #63b3ed; }
.obj-type-btn.sph { color: #68d391; }
.obj-type-btn.glyph { min-width: 28px; padding: 6px 5px; }
.obj-type-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.builder-parts {
    max-height: 168px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    background: var(--bg-secondary);
}

.builder-part-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    transition: background 0.15s;
}

.builder-part-item:last-child { border-bottom: none; }

.builder-part-item:hover {
    background: var(--bg-hover);
}

.builder-part-item.active {
    background: var(--accent-light);
    color: var(--text-primary);
}

.bp-badge {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}

.bp-badge.bp-box { background: linear-gradient(135deg, #f6ad55, #c9903d); }
.bp-badge.bp-cyl { background: linear-gradient(135deg, #63b3ed, #3182ce); }
.bp-badge.bp-sph { background: linear-gradient(135deg, #68d391, #2f855a); }

.bp-name { font-weight: 600; }
.bp-dim { margin-left: auto; font-family: var(--font-mono); font-size: 10px; }

.builder-params {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    padding: 10px;
}

.bp-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.bp-field:last-child { margin-bottom: 0; }

.bp-field label {
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 60px;
}

.bp-field input[type="number"],
.bp-field select {
    width: 90px;
    padding: 5px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    text-align: right;
}

.bp-field input[type="number"]:focus,
.bp-field select:focus {
    outline: none;
    border-color: var(--accent);
}

.bp-shape select { width: 110px; text-align: left; }

.bp-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 14px;
}

.bp-field.bp-color input[type="color"] {
    width: 46px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    cursor: pointer;
}

.builder-preview {
    width: 100%;
    height: 300px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #16213e;
    position: relative;
}

.builder-preview canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.builder-metrics {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.builder-hint {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-muted);
}

.obj-reset {
    border: none;
    background: transparent;
    color: var(--danger);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 2px 4px;
}

.obj-reset:hover { text-decoration: underline; }

.modal-footer.builder-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

@media (max-width: 820px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ===== Layout ===== */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ===== Header ===== */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 180px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.3px;
}

.logo svg { color: var(--accent); }

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-toggle {
    display: flex;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
}

.view-toggle button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle button:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.view-toggle button.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 140, 255, 0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
    justify-content: flex-end;
}

.project-name input {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    width: 180px;
    transition: border-color 0.2s;
}

.project-name input:focus {
    outline: none;
    border-color: var(--accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.separator {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 4px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 10px rgba(79, 140, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
    background: var(--bg-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
    gap: 5px;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.icon-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ===== Main Layout ===== */
#main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ===== Sidebars ===== */
#sidebar-left, #sidebar-right {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    flex-shrink: 0;
}

#sidebar-right {
    width: var(--right-sidebar-width);
    border-right: none;
    border-left: 1px solid var(--border);
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ===== Tool Grid ===== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 10px;
}

.tool-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--border);
}

.tool-btn.active {
    color: var(--accent);
    background: var(--accent-light);
    border-color: var(--accent);
}

/* ===== Quick Elements ===== */
.element-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.element-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: background 0.15s;
    font-size: 12px;
    color: var(--text-secondary);
}

.element-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.element-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stairs-icon { background: linear-gradient(135deg, var(--bg-tertiary) 25%, var(--accent) 25%, var(--accent) 50%, var(--bg-tertiary) 50%, var(--bg-tertiary) 75%, var(--accent) 75%); background-size: 8px 8px; }
.column-icon { background: var(--bg-tertiary); border: 2px solid var(--accent); }

/* ===== Settings Form ===== */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-row label {
    font-size: 12px;
    color: var(--text-secondary);
}

.form-row input[type="number"],
.form-row select {
    width: 80px;
    padding: 5px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    text-align: right;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 36px;
    height: 20px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: 0.2s;
}

.toggle input:checked + .toggle-slider {
    background: var(--accent-light);
    border-color: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    background: var(--accent);
    transform: translateX(16px);
}

/* ===== Canvas Area ===== */
#canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0d1117;
}

.canvas-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
}

.canvas-wrapper.active {
    display: block;
}

#canvas2d {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#canvas3d {
    width: 100%;
    height: 100%;
}

#canvas-info {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(22, 33, 62, 0.9);
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    z-index: 10;
}

/* ===== Properties Panel ===== */
.properties-panel {
    min-height: 100px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    text-align: center;
}

.empty-state p {
    font-size: 12px;
    color: var(--text-muted);
}

.prop-group {
    margin-bottom: 12px;
}

.prop-group-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.prop-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

.prop-label {
    width: 60px;
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.prop-input {
    flex: 1;
    padding: 5px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
}

.prop-input:focus {
    outline: none;
    border-color: var(--accent);
}

.prop-color {
    width: 32px;
    height: 28px;
    padding: 2px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.prop-btn-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.prop-btn {
    flex: 1;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.prop-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.prop-btn.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.prop-btn.danger:hover {
    background: rgba(252, 92, 101, 0.15);
}

/* ===== Furniture Library ===== */
.furniture-search {
    margin-bottom: 12px;
}

.furniture-search input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 12px;
}

.furniture-search input:focus {
    outline: none;
    border-color: var(--accent);
}

.furniture-category {
    margin-bottom: 8px;
}

.category-header {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-header:hover {
    background: var(--bg-hover);
}

.category-header::after {
    content: '\25B6';
    font-size: 8px;
    transition: transform 0.2s;
}

.category-header.open::after {
    transform: rotate(90deg);
}

.category-items {
    display: none;
    padding: 4px 0;
}

.category-items.open {
    display: block;
}

.furniture-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 20px;
    cursor: grab;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    font-size: 12px;
    color: var(--text-secondary);
}

.furniture-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.furniture-item:active {
    cursor: grabbing;
}

.furniture-thumb {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 480px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.export-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.export-option:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--text-primary);
}

.export-option span {
    font-size: 13px;
    font-weight: 600;
}

.export-option small {
    font-size: 10px;
    color: var(--text-muted);
}

/* ===== Context Menu ===== */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px;
    min-width: 180px;
    z-index: 500;
    display: none;
}

.context-menu.active {
    display: block;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text-secondary);
    font-size: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.1s;
}

.context-menu-item:hover {
    background: var(--accent-light);
    color: var(--text-primary);
}

.context-menu-item.danger {
    color: var(--danger);
}

.context-menu-item.danger:hover {
    background: rgba(252, 92, 101, 0.15);
}

.context-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

/* ===== Drag Ghost ===== */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* ===== Tooltip ===== */
[title] {
    position: relative;
}

/* ===== Resize Handle ===== */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border: 2px solid white;
    border-radius: 50%;
    z-index: 10;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal.active .modal-content {
    animation: fadeIn 0.2s ease-out;
}

/* ===== Selection Highlight ===== */
.selected-outline {
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 5 3;
    fill: none;
    animation: dash 0.5s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -8; }
}

/* ===== Keyboard Shortcut Hint ===== */
.shortcut-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    font-family: var(--font-mono);
}
