:root {
    --bg: #111216;
    --sidebar: #17181d;
    --panel: #1b1c21;
    --panel-2: #23242a;
    --fill: #26272e;
    --fill-2: #303138;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);
    --text: #f5f5f7;
    --dim: #98989f;
    --dim-2: #6e6e73;
    --accent: #2fbf8f;
    --accent-strong: #3dd6a1;
    --accent-soft: rgba(47, 191, 143, .14);
    --blue: #0a84ff;
    --amber: #ffd166;
    --danger: #ff453a;
    --focus: #0a84ff;
    --code: #0d0e11;
    --radius: 12px;
    --appbar-h: 54px;
    --tabbar-h: 56px;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

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

button {
    background: none;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .16);
    border: 3px solid transparent;
    border-radius: 10px;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .28); background-clip: content-box; }

#appbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--appbar-h);
    padding: 0 16px;
    background: rgba(23, 24, 29, .72);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--line);
}

.appbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.appbar-logo {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(160deg, #35dba6, #12805f);
    box-shadow: 0 4px 12px rgba(39, 161, 122, .3), inset 0 1px 0 rgba(255, 255, 255, .35);
    flex: none;
}

.appbar-logo::after {
    content: "L";
    color: #04150e;
    font-size: 13px;
    font-weight: 800;
}

.appbar-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
    min-width: 0;
}

.appbar-title strong {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.appbar-title small {
    font-family: var(--mono);
    font-size: 9.5px;
    color: var(--dim);
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .06);
}

.appbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: none;
}

.appbar-sep {
    width: 1px;
    height: 22px;
    background: var(--line-strong);
    margin: 0 6px;
}

.tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    padding: 6px 12px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: var(--fill);
    color: var(--text);
    font-size: 13.5px;
    transition: background .16s, color .16s, transform .1s, opacity .16s;
}

.tool:hover:not(:disabled) { background: var(--fill-2); }
.tool:active:not(:disabled) { transform: scale(.97); }
.tool:disabled { opacity: .32; cursor: default; }

.tool.primary {
    background: var(--accent);
    color: #04130d;
    font-weight: 600;
}

.tool.primary:hover:not(:disabled) { background: var(--accent-strong); }

.tool.danger {
    color: #ffb4ae;
    background: rgba(255, 69, 58, .14);
}

.tool.danger:hover:not(:disabled) { background: rgba(255, 69, 58, .22); }

.tool.wide { padding: 6px 14px; }

.tool.icon {
    width: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 50%;
}

.tool svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#appbar .tool { background: transparent; color: var(--dim); }
#appbar .tool:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: var(--text); }
#appbar .tool.primary { background: var(--accent); color: #04130d; }
#appbar .tool.primary:hover:not(:disabled) { background: var(--accent-strong); }
#appbar .tool:disabled { color: var(--dim-2); }

#workspace {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr) 320px;
    grid-template-rows: minmax(0, 1fr) auto;
    height: calc(100vh - var(--appbar-h));
}

.panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    background: var(--panel);
    overflow: hidden;
}

#palettePanel {
    grid-column: 1;
    grid-row: 1;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
}

#canvasPanel { grid-column: 2; grid-row: 1; background: var(--bg); }

#inspectorPanel {
    grid-column: 3;
    grid-row: 1;
    background: var(--sidebar);
    border-left: 1px solid var(--line);
}

#codePanel {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 238px;
    background: var(--code);
    border-top: 1px solid var(--line);
    transition: height .28s cubic-bezier(.32, .72, 0, 1);
}

#codePanel.collapsed { height: 46px; }

.panel-head {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dim);
    border-bottom: 1px solid var(--line);
}

.outline-head { border-top: 1px solid var(--line); }

#palette, #outline, #inspector, #canvasScroll, .block-palette, .block-workspace, .code-view {
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
    -webkit-overflow-scrolling: touch;
}

#palette { padding: 8px 12px 18px; }
#palette, #outline { flex: none; overflow: visible; }

.palette-group-title {
    grid-column: 1 / -1;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--dim-2);
    margin: 14px 4px 7px;
}

.palette-group-title:first-child { margin-top: 6px; }

.palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: grab;
    user-select: none;
    transition: background .16s, transform .1s;
}

.palette-item:hover { background: var(--fill); }
.palette-item:active { transform: scale(.98); cursor: grabbing; }

.palette-glyph {
    flex: none;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.palette-label {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#outline { padding: 4px 8px 16px; }

.outline-empty {
    padding: 26px 12px;
    color: var(--dim-2);
    font-size: 12.5px;
    text-align: center;
    line-height: 1.7;
}

.outline-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 4px 8px;
    border-radius: 9px;
    cursor: pointer;
    user-select: none;
}

.outline-row:hover { background: var(--fill); }
.outline-row.selected { background: rgba(10, 132, 255, .15); }

.outline-glyph {
    flex: none;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--fill);
    color: var(--dim);
    font-size: 11px;
    font-weight: 700;
}

.outline-row.selected .outline-glyph {
    background: rgba(10, 132, 255, .2);
    color: #69b4ff;
}

.outline-text {
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    opacity: .82;
}

.outline-row.selected .outline-text { opacity: 1; }

.canvas-head { justify-content: flex-start; gap: 12px; }

.canvas-title {
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#canvasScroll {
    display: grid;
    place-items: start center;
    padding: 30px 20px 40px;
    background:
        radial-gradient(900px 480px at 50% -10%, #1d1f26 0%, transparent 65%),
        var(--bg);
}

#canvas { width: 100%; max-width: 480px; }

.form-mock {
    background: #26272d;
    border: 1px solid rgba(0, 0, 0, .55);
    border-radius: 16px 16px 20px 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
    overflow: hidden;
}

.mock-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 40px;
    border-bottom: 1px solid rgba(0, 0, 0, .45);
    background: linear-gradient(#2e3037, #27282e);
}

.mock-title {
    font-weight: 600;
    font-size: 15px;
    color: #f2f5fa;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #98a1ae;
    font-size: 13px;
    border-radius: 7px;
}

.mock-body { padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 6px; }

.mock-actions {
    display: flex;
    gap: 8px;
    padding: 12px 14px 16px;
    border-top: 1px solid rgba(0, 0, 0, .35);
    background: rgba(0, 0, 0, .12);
}

.mock-actions.pager { gap: 6px; }

.widget {
    position: relative;
    border-radius: 9px;
    padding: 5px 6px;
    margin: 1px -4px;
    cursor: pointer;
    transition: outline-color .15s, background .15s;
}

.widget:hover { outline: 1px solid rgba(10, 132, 255, .35); }

.widget.selected {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    background: rgba(10, 132, 255, .08);
    box-shadow: 0 0 0 4px rgba(10, 132, 255, .1);
}

.widget.invalid { outline: 2px dashed var(--danger); outline-offset: 1px; }
.widget.drop-target { outline: 2px solid var(--amber); outline-offset: 1px; }

.mc-label { color: #b7c0cd; font-size: 13.5px; padding: 4px 2px; }

.mc-header {
    color: #f0f3f8;
    font-weight: 700;
    font-size: 14.5px;
    padding: 8px 2px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 4px;
}

.mc-body { color: #c9d2de; font-size: 13.5px; line-height: 1.65; padding: 6px 2px; }

.mc-divider { height: 1px; background: rgba(255, 255, 255, .12); margin: 10px 2px; }

.mc-spacer { height: 26px; position: relative; }

.mc-spacer::after {
    content: "···";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #555e6b;
    font-size: 10px;
    letter-spacing: 3px;
}

.mc-field-label { color: #aab4c2; font-size: 12.5px; margin: 6px 2px 5px; }

.mc-input, .mc-select {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 11px;
    border-radius: 7px;
    background: #12161b;
    border: 1px solid #454c57;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45);
    color: #d4dbe6;
    font-size: 13.5px;
}

.mc-input:empty::before, .mc-select-text:empty::before { content: "…"; color: #5b6470; }

.mc-select-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mc-select-caret { color: #7d8794; font-size: 12px; }

.mc-toggle { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px; }

.mc-toggle-label { color: #b7c0cd; font-size: 13.5px; }

.mc-switch {
    width: 42px;
    height: 24px;
    border-radius: 14px;
    background: #12161b;
    border: 1px solid #454c57;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45);
    position: relative;
    transition: background .18s;
    flex: none;
}

.mc-switch.on { background: var(--accent); border-color: #1c8264; }

.mc-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dfe5ee;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
    transition: left .18s;
}

.mc-switch.on .mc-knob { left: 20px; }

.mc-slider { position: relative; height: 26px; margin: 4px 2px 8px; }

.mc-slider::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 9px;
    height: 8px;
    border-radius: 6px;
    background: #12161b;
    border: 1px solid #454c57;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45);
}

.mc-slider-fill {
    position: absolute;
    left: 0; top: 9px;
    height: 8px;
    border-radius: 6px 0 0 6px;
    background: linear-gradient(90deg, #1c8264, var(--accent));
}

.mc-slider-knob {
    position: absolute;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e8edf5;
    border: 2px solid #97a1af;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
    transform: translateX(-50%);
}

.mc-button {
    display: block;
    text-align: center;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 7px;
    color: #f4f7fb;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    background: linear-gradient(#5b6570, #434b55);
    border: 1px solid #23272e;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), inset 0 -3px 0 rgba(0, 0, 0, .28), 0 2px 4px rgba(0, 0, 0, .35);
    user-select: none;
    transition: transform .1s, filter .15s;
}

.mc-button:hover { filter: brightness(1.06); }
.mc-button:active { transform: scale(.99); }

.mc-button.half { flex: 1; margin: 0; }
.mc-button.small { flex: 1; margin: 0; padding: 9px 6px; font-size: 13px; }
.mock-actions .mc-button { width: 100%; }

.mc-close-chip {
    text-align: center;
    padding: 8px;
    color: #98a1ae;
    font-size: 12.5px;
    border: 1px dashed #3c434e;
    border-radius: 7px;
    margin: 2px 0;
}

.mock-page-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .03);
    margin: 2px 0;
    border-left: 3px solid #3c434e;
}

.mock-page-bullet {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #323945;
    color: #aeb8c5;
    display: grid;
    place-items: center;
    font-size: 11.5px;
    flex: none;
}

.mock-page-text { color: #c9d2de; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mock-more { color: #7d8794; font-size: 12px; text-align: center; padding: 8px 0 2px; }

.mc-shop-page { color: #8e99a8; font-size: 12px; letter-spacing: .04em; padding: 2px 2px 6px; }

.mc-shop-content { color: #c9d2de; font-size: 13.5px; line-height: 1.6; padding: 0 2px 8px; }

.mc-shop-item {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
}

.mc-shop-title { color: #eef2f7; font-size: 13.5px; font-weight: 600; }

.mc-shop-meta { color: #7f8b9a; font-size: 11px; margin-top: 3px; text-transform: uppercase; letter-spacing: .04em; }

.mc-shop-desc { color: #aeb9c7; font-size: 12.5px; line-height: 1.55; margin-top: 6px; }

.selection-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    animation: bar-in .26s cubic-bezier(.32, .72, 0, 1) both;
}

.selection-title { font-size: 12px; color: var(--dim); margin-right: auto; }
.selection-bar .tool { min-height: 30px; padding: 4px 10px; font-size: 12px; }

.issues-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 209, 102, .08);
    border-top: 1px solid rgba(255, 209, 102, .18);
    color: var(--amber);
    font-size: 12.5px;
}

.issues-count { font-weight: 700; }
.issue-entry { color: #e8d9a8; }

#inspector { padding: 14px 16px 28px; }

.inspector-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--dim);
    margin: 6px 2px 12px;
}

.inspector-section-title.control-title { margin-top: 28px; color: #69b4ff; }

.inspector-hint {
    color: var(--dim);
    font-size: 12.5px;
    line-height: 1.65;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
}

.inspector-hint.accent {
    color: var(--amber);
    border-color: rgba(255, 209, 102, .22);
    background: rgba(255, 209, 102, .06);
}

.field {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
}

.field-name { font-size: 12.5px; color: var(--dim); }

.field-input {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--fill);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color .16s, box-shadow .16s, background .16s;
}

.field-input:hover { background: var(--fill-2); }

.field-input:focus {
    border-color: var(--blue);
    background: var(--fill-2);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, .22);
}

.field-input.area { resize: vertical; line-height: 1.5; }

.field-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    justify-self: start;
}

.code-head { padding: 0 8px 0 16px; }
.code-actions { display: flex; align-items: center; gap: 6px; }
.code-actions .tool { min-height: 30px; padding: 3px 10px; font-size: 12px; }
.code-actions .tool.icon { width: 30px; min-width: 30px; padding: 0; }
.code-actions .tool svg { width: 16px; height: 16px; transition: transform .24s cubic-bezier(.32, .72, 0, 1); }
#codePanel.collapsed #btnToggleCode svg { transform: rotate(180deg); }

.code-view {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 12px 18px 18px;
    overflow: auto;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.7;
    color: #c7cbd4;
    background: transparent;
    tab-size: 4;
}

#codePanel.collapsed .code-view { display: none; }

.token-string { color: #7ee2a8; }
.token-keyword { color: #6cb6ff; }
.code-pending { color: var(--dim); font-style: italic; }

#tabbar { display: none; }

dialog {
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: rgba(28, 29, 34, .96);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    color: var(--text);
    padding: 0;
    width: min(92vw, 540px);
    max-height: 86vh;
    overflow: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}

dialog::backdrop {
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
}

.dialog-form { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; }

.dialog-form h3 { margin: 0; font-size: 17px; font-weight: 600; }

.dialog-hint { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.6; }

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

.kind-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--fill);
    cursor: pointer;
    font-size: 13px;
    transition: border-color .16s, background .16s;
}

.kind-card small { color: var(--dim); font-size: 11px; line-height: 1.4; }
.kind-card.selected { border-color: var(--accent); background: var(--accent-soft); }

.field-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.field-row input {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--fill);
    color: var(--text);
    outline: none;
}

.field-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 132, 255, .22); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }

dialog input[type="file"] { color: var(--dim); font-size: 13px; }

dialog textarea {
    width: 100%;
    resize: vertical;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--fill);
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    outline: none;
}

dialog textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 132, 255, .22); }

.import-errors { display: flex; flex-direction: column; gap: 6px; }

.import-error-entry {
    padding: 9px 11px;
    border-radius: 10px;
    background: rgba(255, 69, 58, .12);
    border: 1px solid rgba(255, 69, 58, .22);
    color: #ffb4ae;
    font-size: 12px;
}

.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

.toast {
    position: fixed;
    top: calc(var(--appbar-h) + 14px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(38, 39, 46, .92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line-strong);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
    font-size: 13px;
    max-width: 86vw;
    animation: toast-in .24s cubic-bezier(.32, .72, 0, 1) both;
}

body.logic-open .toast { top: auto; bottom: 24px; }

#canvas { animation: canvas-in .42s cubic-bezier(.32, .72, 0, 1) both; }

@keyframes canvas-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: none; }
}

.widget-enter { animation: widget-enter .34s cubic-bezier(.32, .72, 0, 1) both; }

@keyframes widget-enter {
    from { opacity: 0; transform: translateY(-6px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@keyframes bar-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

dialog[open] { animation: dialog-in .24s cubic-bezier(.32, .72, 0, 1) both; }
dialog::backdrop { animation: backdrop-in .24s ease both; }

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mc-rich { white-space: pre-wrap; overflow-wrap: anywhere; }

.mc-label, .mc-header, .mc-body, .mc-input, .mc-select-text,
.mc-toggle-label, .mc-field-label, .mock-page-text,
.mc-button, .mc-close-chip, .mc-shop-content, .mc-shop-title,
.mc-shop-desc {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.mc-magic { animation: mc-magic .9s steps(1, end) infinite; }
.mc-magic::selection { background: transparent; }

@keyframes mc-magic {
    0%, 100% { opacity: 1; }
    20% { opacity: .5; }
    40% { opacity: .85; }
    60% { opacity: .4; }
    80% { opacity: .9; }
}

.logic-panel {
    position: fixed;
    top: calc(var(--appbar-h) + 8px);
    right: 8px;
    bottom: 8px;
    left: auto;
    width: min(880px, calc(100vw - 16px));
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: rgba(25, 26, 31, .94);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .06);
    overflow: hidden;
    animation: logic-in .28s cubic-bezier(.32, .72, 0, 1) both;
}

.logic-panel[hidden] { display: none; }

@keyframes logic-in {
    from { opacity: 0; transform: translateX(24px) scale(.99); }
    to { opacity: 1; transform: none; }
}

.logic-head { min-height: 60px; padding: 0 18px; justify-content: space-between; }

.logic-title { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }

.logic-title strong { font-size: 16px; font-weight: 600; color: var(--text); }

.logic-title small { font-size: 12px; color: var(--dim); font-weight: 400; }

#logicClose {
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
    background: var(--fill);
    color: var(--dim);
}

#logicClose:hover { background: var(--fill-2); color: var(--text); }
#logicClose svg { width: 15px; height: 15px; }

.logic-body {
    flex: 1;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 0;
}

.block-palette {
    border-right: 1px solid var(--line);
    overflow-y: auto;
    padding: 12px;
    background: rgba(255, 255, 255, .015);
    touch-action: pan-y;
}

.block-main { display: flex; flex-direction: column; min-height: 0; }

.block-workspace {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px 48px;
    background-color: #101116;
    background-image: radial-gradient(rgba(255, 255, 255, .065) 1px, transparent 1.4px);
    background-size: 20px 20px;
    touch-action: pan-y;
}

.bgroup-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--dim-2);
    margin: 14px 4px 7px;
}

.bgroup-title:first-child { margin-top: 0; }

.bgroup { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.bchip {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .045);
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
    transition: background .16s, border-color .16s, transform .1s;
}

.bchip::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cat, #8e8e93);
}

.bchip:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .12); }
.bchip:active { transform: scale(.98); cursor: grabbing; }

.bchip-cat-nav { --cat: #2fd39a; }
.bchip-cat-data { --cat: #0a84ff; }
.bchip-cat-flow { --cat: #ff9f0a; }
.bchip-cat-ops { --cat: #bf5af2; }
.bchip-cat-var { --cat: #ffd60a; }

.block {
    position: relative;
    margin: 0;
    border-radius: 10px;
    padding: 7px 10px;
    color: #fff;
    font-size: 13px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.block-stack { display: flex; flex-direction: column; align-items: stretch; }

.block-reporter {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.block-reporter .block-head { gap: 4px; flex-wrap: nowrap; }

.block.dragging { opacity: .3; }

.block-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: .95;
    max-width: 72vw;
    transform: rotate(-1.2deg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}

.block-dragging, .block-dragging * { cursor: grabbing !important; }
.block-dragging { user-select: none; }

.block-cat-nav { background: #1f8f68; }
.block-cat-data { background: #2f6fd0; }
.block-cat-flow { background: #9a4a0a; }
.block-cat-ops { background: #7c3aed; }
.block-cat-var { background: #a16207; }

.block.selected {
    outline: 2px solid var(--blue);
    outline-offset: 1px;
    box-shadow: 0 0 0 4px rgba(10, 132, 255, .18), 0 2px 5px rgba(0, 0, 0, .3);
}

.block:active { cursor: grabbing; }

.block-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.block-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.block-input { display: inline-flex; }

.block-field, .block-select {
    font: inherit;
    font-size: 12px;
    color: #11161d;
    background: #f3f6fb;
    border: 1px solid rgba(0, 0, 0, .22);
    border-radius: 6px;
    padding: 2px 6px;
    min-height: 26px;
    max-width: 180px;
}

.block-select { min-width: 40px; }
.block-input-text .block-field, .block-input-number .block-field { min-width: 64px; }
.block-reporter .block-field, .block-reporter .block-select { min-height: 24px; font-size: 11.5px; }

.block-body {
    margin: 6px 0 2px 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, .32);
}

.block-slot { margin: 6px 0; }
.block-slot-label { display: block; font-size: 10.5px; opacity: .82; margin-bottom: 4px; }

.block-socket {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 2px;
    border-radius: 7px;
    background: rgba(0, 0, 0, .24);
    vertical-align: middle;
}

.block-socket.hot { box-shadow: inset 0 0 0 2px var(--blue); background: rgba(10, 132, 255, .3); }
.block-socket .block { display: inline-block; vertical-align: middle; margin: 0; }
.block-socket-empty { border: 1px dashed rgba(255, 255, 255, .25); }

.socket-ph { color: rgba(255, 255, 255, .72); font-size: 10.5px; padding: 0 8px; }

.block-gap {
    position: relative;
    flex: none;
    height: 8px;
    margin: 0;
    border-radius: 5px;
    transition: background .12s, box-shadow .12s;
}

.block-gap::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }

.block-gap.hot {
    background: rgba(10, 132, 255, .45);
    box-shadow: 0 0 0 2px rgba(10, 132, 255, .85);
}

.block-gap-empty {
    height: 34px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    padding: 0 9px;
    border: 1px dashed rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: rgba(0, 0, 0, .08);
}

.block-gap-empty::after { content: "拖入语句"; color: rgba(255, 255, 255, .42); font-size: 11px; }
.block-gap-empty.hot::after { color: #fff; }

.block-dropzone {
    margin: 8px 0;
    padding: 44px 18px;
    border: 1.5px dashed rgba(255, 255, 255, .16);
    border-radius: 16px;
    color: var(--dim);
    font-size: 13px;
    text-align: center;
    line-height: 1.7;
    background: rgba(255, 255, 255, .015);
    transition: border-color .12s, background .12s, color .12s;
}

.block-dropzone.hot { border-color: var(--blue); background: rgba(10, 132, 255, .08); color: var(--text); }

.block-btn {
    font: inherit;
    font-size: 10.5px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, .3);
    color: #fff;
    padding: 2px 7px;
    margin-left: 4px;
    cursor: pointer;
}

.block-btn:hover { background: rgba(0, 0, 0, .5); }
.block-btn.danger { background: rgba(255, 69, 58, .8); }

.block-empty { color: var(--dim); font-size: 13px; padding: 28px 12px; text-align: center; line-height: 1.8; }

.block-ctx {
    color: var(--dim-2);
    font-size: 11.5px;
    padding: 14px 2px 0;
    border-top: 1px solid var(--line);
    margin-top: 18px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.block-enter { animation: block-in .3s cubic-bezier(.32, .72, 0, 1) both; }

@keyframes block-in {
    from { opacity: 0; transform: translateY(-5px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.logic-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
}

.block-bar-title { font-size: 12px; font-weight: 600; color: var(--accent); margin-right: auto; }
.logic-bar .tool { min-height: 30px; padding: 4px 10px; font-size: 12px; }

@media (max-width: 920px) {
    :root {
        --appbar-h: 50px;
        --tabbar-h: 56px;
    }

    body.logic-open { overflow: hidden; }
    body.logic-open .toast { top: auto; bottom: calc(104px + env(safe-area-inset-bottom)); }

    #appbar { padding: 0 10px; gap: 6px; }
    #appbar #btnProject { display: none; }

    .appbar-brand { gap: 8px; }
    .appbar-logo { width: 26px; height: 26px; border-radius: 8px; }
    .appbar-title strong { font-size: 14px; white-space: nowrap; }
    .appbar-title small { display: none; }    .appbar-actions { gap: 2px; }
    .appbar-sep { display: none; }

    #appbar .tool { height: 32px; min-height: 32px; padding: 0 8px; font-size: 12.5px; }
    #appbar .tool.icon { width: 32px; min-width: 32px; padding: 0; }
    #appbar .tool.wide { padding: 0 9px; }
    #appbar .tool.primary { padding: 0 12px; }

    #workspace {
        display: block;
        height: auto;
        min-height: calc(100vh - var(--appbar-h));
        padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
    }

    .panel { display: none; height: auto; }
    .panel.active { display: flex; height: auto; animation: panel-in .22s ease both; }

    #canvasPanel.active, #codePanel.active, #palettePanel.active, #inspectorPanel.active {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - var(--appbar-h) - var(--tabbar-h));
    }

    #codePanel.active { height: auto; }

    .panel.active #palette, .panel.active #outline, .panel.active #inspector {
        overflow: visible;
        flex: none;
    }

    .panel.active #canvasScroll { overflow: visible; flex: none; }

    #canvasScroll { padding: 20px 12px 26px; }
    #inspector { padding: 12px 16px 28px; }

    .selection-bar {
        position: sticky;
        bottom: 8px;
        z-index: 5;
        background: rgba(30, 31, 37, .88);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    #tabbar {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(20, 21, 26, .82);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        backdrop-filter: blur(24px) saturate(180%);
        border-top: 1px solid var(--line);
    }

    #tabbar .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 10px;
        color: var(--dim);
        min-height: var(--tabbar-h);
    }

    .tab-icon {
        display: grid;
        place-items: center;
        width: 38px;
        height: 26px;
        border-radius: 8px;
        transition: background .16s, color .16s;
    }

    .tab-icon svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    #tabbar .tab.active { color: var(--accent); }
    #tabbar .tab.active .tab-icon { background: rgba(47, 191, 143, .15); }

    .kind-list { grid-template-columns: 1fr; }
    .field { grid-template-columns: 84px minmax(0, 1fr); }
    .mock-body { gap: 5px; }
    .issues-bar { position: static; }

    .logic-panel {
        top: calc(var(--appbar-h) + 6px);
        left: 6px;
        right: 6px;
        bottom: 0;
        width: auto;
        height: auto;
        display: flex;
        border-radius: 22px 22px 0 0;
        border-bottom: none;
        box-shadow: 0 -20px 70px rgba(0, 0, 0, .6);
        animation: logic-in-mobile .28s cubic-bezier(.32, .72, 0, 1) both;
    }

    .logic-head { position: relative; min-height: 56px; padding: 14px 16px 8px; }

    .logic-head::before {
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        transform: translateX(-50%);
        width: 38px;
        height: 4px;
        border-radius: 2px;
        background: rgba(255, 255, 255, .18);
    }

    .logic-title strong { font-size: 15.5px; }
    .logic-body { display: flex; flex-direction: column-reverse; min-height: 0; }
    .block-main { flex: 1; min-height: 0; }
    .block-workspace { padding: 14px 12px 24px; }

    .block-palette {
        flex: none;
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, 34px);
        grid-auto-columns: max-content;
        gap: 6px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, .03);
        touch-action: pan-x;
        scrollbar-width: none;
    }

    .block-palette::-webkit-scrollbar { display: none; }
    .block-palette .bgroup { display: contents; }
    .block-palette .bgroup-title { display: none; }

    .block-palette .bchip {
        min-height: 34px;
        padding: 0 10px;
        white-space: nowrap;
        touch-action: pan-x;
    }

    .logic-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 7px 10px;
        scrollbar-width: none;
    }

    .logic-bar::-webkit-scrollbar { display: none; }
    .logic-bar .tool { flex: none; min-height: 30px; padding: 3px 10px; font-size: 12px; }
    .block-bar-title { flex: none; }

    @keyframes panel-in {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: none; }
    }

    @keyframes logic-in-mobile {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: none; }
    }
}

@media (min-width: 921px) {
    #palettePanel > .panel-head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--sidebar);
    }
}

@media (max-width: 360px) {
    .brand-suffix { display: none; }
    #appbar .tool { padding: 0 7px; }
    #appbar .tool.icon { width: 30px; min-width: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    #canvas, .widget, .widget-enter, .mc-button, .selection-bar,
    .toast, dialog[open], dialog::backdrop, .panel.active,
    .mc-magic, .logic-panel, .block-enter {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

#projectPanel {
    position: fixed;
    top: var(--appbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: none;
    background: var(--bg);
    overflow-y: auto;
    overscroll-behavior: contain;
}

#projectPanel.active { display: flex; }

.project-head { position: sticky; top: 0; z-index: 2; background: var(--panel); }
.project-head .tool.icon { width: 32px; min-width: 32px; }
.project-head .tool.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.project-summary { font-weight: 400; font-size: 12px; color: var(--dim); margin-left: auto; margin-right: 8px; }

.project-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.project-toolbar .tool { height: 30px; font-size: 12px; }

.project-docs-head {
    padding: 14px 16px 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--dim-2);
    letter-spacing: .04em;
}

.project-docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
    padding: 0 16px 8px;
}

.project-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    cursor: pointer;
    transition: border-color .16s, background .16s, transform .16s;
}

.project-doc:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .04); }
.project-doc.active { border-color: var(--accent); background: rgba(47, 191, 143, .08); }

.project-doc-kind {
    flex: none;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: #0b2219;
    background: var(--accent);
}

.project-doc-kind.enum { background: #d9a441; }
.project-doc-kind.component { background: #69b4ff; color: #071b2c; }

.project-doc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.project-doc-text strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-doc-text small { font-size: 11px; color: var(--dim-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.project-doc-badge {
    margin-left: auto;
    flex: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    color: #fff;
    background: #c0392b;
}

.project-graph { padding: 0 16px 10px; min-height: 120px; }
.project-graph:empty { min-height: 0; }
.graph-svg { width: 100%; height: auto; display: block; overflow: visible; }
.graph-edge { stroke: #5f6b7a; stroke-width: 1.4; opacity: .75; }
.graph-edge.cycle { stroke: #ef5350; stroke-width: 1.8; opacity: 1; }
.graph-node rect { fill: #23252c; stroke: #3a3d47; stroke-width: 1; transition: fill .16s, stroke .16s; }
.graph-node:hover rect { stroke: #6f7684; }
.graph-node.active rect { fill: rgba(47, 191, 143, .14); stroke: var(--accent); }
.graph-node { cursor: pointer; }
.graph-node-title { fill: #e6e9ee; font-size: 12px; font-weight: 600; }
.graph-node-file { fill: #8b93a1; font-size: 10px; }
.graph-node-badge { fill: #c0392b; }
.graph-node-badge-text { fill: #fff; font-size: 9px; font-weight: 700; text-anchor: middle; }

.project-issues { padding: 0 16px 28px; display: flex; flex-direction: column; gap: 6px; }
.project-ok { font-size: 12px; color: #61c99a; }
.project-issue { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.55; padding: 8px 10px; border-radius: 8px; background: rgba(192, 57, 43, .1); border: 1px solid rgba(192, 57, 43, .25); }
.project-issue.warning { background: rgba(217, 164, 65, .1); border-color: rgba(217, 164, 65, .28); color: #e6c27a; }
.project-issue.error { color: #f0a6a0; }
.project-issue-level { flex: none; font-weight: 600; font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: rgba(192, 57, 43, .2); }
.project-issue.warning .project-issue-level { background: rgba(217, 164, 65, .2); }

.declaration-card {
    margin: 26px auto;
    max-width: 480px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.declaration-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.declaration-kind { font-family: var(--mono); font-size: 11px; font-weight: 600; color: #d9a441; text-transform: uppercase; letter-spacing: .08em; }
.declaration-name { font-size: 20px; font-weight: 650; color: var(--text); }
.declaration-variants { display: flex; flex-direction: column; gap: 6px; }
.declaration-variant { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.declaration-variant.invalid { border-color: rgba(239, 83, 80, .55); }
.variant-name { font-family: var(--mono); font-size: 12.5px; color: #f0c674; }
.variant-params { font-family: var(--mono); font-size: 11.5px; color: #8b93a1; }
.declaration-empty { font-size: 12px; color: var(--dim); }
.declaration-file { margin-top: 16px; font-family: var(--mono); font-size: 11px; color: var(--dim-2); }

.mock-subtitle { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }

.mc-component-call { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; border: 1px dashed rgba(105, 180, 255, .5); background: rgba(105, 180, 255, .08); color: #9ecbff; font-family: var(--mono); font-size: 12px; }
.mc-component-glyph { font-size: 14px; }
.mc-component-name { font-weight: 600; }
.mc-component-args { color: #8b93a1; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.palette-hint { padding: 18px 8px; font-size: 12px; line-height: 1.65; color: var(--dim); }
.issue-entry.warning { color: #e6c27a; }

.import-file-list { display: flex; flex-direction: column; gap: 4px; }
.import-file-entry { font-family: var(--mono); font-size: 11.5px; color: var(--dim); padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .035); }

@media (max-width: 920px) {
    #projectPanel { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
    #projectPanel.active { display: block; overflow-y: auto; }
    .project-docs { grid-template-columns: 1fr; }
    .project-head .tool.icon { display: none; }
    .project-toolbar { padding: 10px 12px; }
}
