/* The workspace shell. The original canvas/picker styles live in base.css. */
:root { --bg-color:#eff1f4; --panel-color:#fff; --item-color:#fff; --text-color:#293342; --accent-color:#2769e8; --danger-color:#c84b4b; --border:#e7eaf0; --muted:#86909e; --soft:#f5f7fa; font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif; color-scheme:light; }
* { box-sizing:border-box; }
body { --header-row:72px; position:relative; display:grid; grid-template-columns:76px minmax(0,1fr) 292px; grid-template-rows:var(--header-row) minmax(0,1fr); font-family:inherit; color:var(--text-color); background:#fff; touch-action:auto; }
button,input,select { font:inherit; }
button,.btn-label { min-height:34px; font-size:12px; color:#566172; background:#f3f5f8; border:1px solid transparent; border-radius:7px; padding:6px 11px; line-height:20px; font-weight:500; flex:none; }
button:hover,.btn-label:hover { background:#e9eef5; color:#253449; }
button.active,.btn-label.active { background:#eaf1ff; color:#2263d9; font-weight:600; }
button:disabled { opacity:.35; cursor:not-allowed; }
button:focus-visible,input:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:2px solid #2769e8 !important; outline-offset:3px; }
button.primary-btn { width:auto; background:#2769e8; color:white; margin:0; padding:9px 22px; font-size:13px; }
button.primary-btn:hover { background:#1857cb; }
button.quiet-btn { background:transparent; }
button.quiet-btn:hover { background:#edf1f7; }
.app-header { grid-column:1/-1; grid-row:1; display:flex; align-items:center; gap:24px; padding:0 24px; border-bottom:1px solid var(--border); z-index:30; background:white; }
.header-toggle { width:30px;height:30px;min-height:30px;padding:0;border-radius:7px;background:transparent;color:var(--muted);font-size:16px;line-height:1; }
.header-toggle:hover { background:var(--soft);color:var(--text-color); }
body.header-collapsed .app-header { padding:0 8px;gap:0;justify-content:center; }
body.header-collapsed .app-header > :not(.header-toggle) { display:none !important; }
.brand { display:flex; align-items:center; gap:11px; color:#273347; text-decoration:none; font-weight:700; font-size:17px; letter-spacing:.7px; flex-shrink:0; }
.brand small { display:block; color:#8a94a4; font-size:8px; letter-spacing:1.7px; line-height:17px; font-weight:500; }
.brand-mark { display:grid; place-items:center; height:36px; width:36px; background:#edf3ff; color:#2769e8; font-size:34px; border-radius:10px; line-height:1; }
.header-divider { height:28px; width:1px; background:var(--border); }
.project-title { display:flex; align-items:center; min-width:70px; }
.project-title label { display:none; }
input[type=text] { background:#f5f7fa; color:#293342; border:1px solid var(--border); border-radius:6px; padding:8px 10px; min-width:0; font-size:12px; }
#projectNameInput { background:transparent; border-color:transparent; width:170px; font-size:13px; }
#projectNameInput:hover,#projectNameInput:focus { border-color:var(--border); background:#f5f7fa; }
.save-indicator { position:static; display:flex; align-items:center; gap:6px; color:#919aa7; font-size:11px; background:none; padding:0; pointer-events:none; }
.dot { height:5px; width:5px; }
.dot.saved { background:#95a1b2; }.dot.unsaved { background:#d79d49; }
.header-actions { margin-left:auto; display:flex; gap:8px; align-items:center; }
.tool-rail { grid-column:1; grid-row:2; display:flex; flex-direction:column; align-items:center; gap:7px; border-right:1px solid var(--border); padding:21px 9px 15px; background:#fff; z-index:10; }
.rail-caption { font-size:10px; color:#9aa2ad; letter-spacing:1px; margin-bottom:7px; }
.tool-button { position:relative; width:54px; min-height:62px; padding:7px 4px; background:transparent; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:10px; border-radius:10px; }
.tool-button.active { box-shadow:inset 0 0 0 1px #dce7ff; }
.tool-icon { font-size:26px; line-height:27px; font-weight:400; }
.tool-button kbd { position:absolute; right:5px; top:3px; font-size:8px; font-family:inherit; color:#99a7bb; }
.rail-separator { width:28px; height:1px; background:var(--border); margin:9px 0; }
.history-button { min-height:53px; }
.rail-bottom { margin-top:auto; }.rail-bottom button { width:30px; height:30px; min-height:30px; border-radius:50%; background:white; border:1px solid #dce2eb; }
.stage { --transport-row:77px; grid-column:2; grid-row:2; min-width:0; min-height:0; display:grid; grid-template-rows:51px minmax(0,1fr) 34px var(--transport-row); background:#f3f5f8; }
.stage.transport-collapsed { --transport-row:30px; }
.stage-toolbar { display:flex; align-items:center; justify-content:space-between; padding:0 24px; font-size:11px; border-bottom:1px solid #e6eaf0; }
.stage-toolbar>div { display:flex; align-items:center; gap:10px; }.stage-toolbar strong { font-weight:500; }.live-dot { width:5px;height:5px;border-radius:50%;background:#9ba8b9; }
.subtle { color:#99a2ae; font-size:10px; font-weight:400; }#zoomReadout { display:inline-block; margin-left:12px; color:#8a95a5; font-variant-numeric:tabular-nums; font-size:11px; }
.viewport,body.layout-left .viewport { position:relative; order:unset; width:auto; height:auto; min-width:0; min-height:0; overflow:hidden; background-color:#f3f5f8; background-image:radial-gradient(#d5dbe5 .7px,transparent .7px); background-size:18px 18px; touch-action:none; }
#mainCanvas { display:block; position:absolute; inset:0; }
.canvas-hint { position:absolute; top:17px; left:50%; transform:translateX(-50%); width:max-content; max-width:85%; text-align:center; pointer-events:none; color:#9aa4b2; font-size:11px; }.canvas-hint small { display:block; margin-top:5px; font-size:10px; color:#a7b0bc; }
.canvas-hint[hidden] { display:none; }
.rotation-control { right:23px; top:24px; width:34px;height:34px; background:#fff; border:1px solid #dce2eb; box-shadow:0 2px 5px #263b5810; cursor:grab; }
.rotation-control::before { background:#71829b; }.rotation-control::after { border-color:#b8c5d5; }
.canvas-corner { position:absolute; bottom:17px; right:25px; color:#8b96a8; font-size:11px; pointer-events:none; }
.context-strip { display:flex; align-items:center; justify-content:space-between; padding:0 24px; color:#8691a1; font-size:10px; gap:12px; }.context-strip span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.transport { position:relative; display:flex; align-items:center; justify-content:center; gap:14px; background:#fff; border-top:1px solid var(--border); padding:14px 20px; }
.playback-controls { display:flex; align-items:center; gap:7px; }.step-btn { background:transparent; font-size:25px; width:30px; padding:0; }.play-button { background:#263449; color:#fff; min-width:98px; height:39px; border-radius:8px; }.play-button:hover { background:#354963;color:#fff; }.play-button.active { background:#e9effb !important;color:#2769e8; }
.transport-divider { width:1px;height:24px;background:var(--border); }.speed-control { display:flex; align-items:center;gap:8px;font-size:11px;color:#8b95a3; }.speed-control label {color:#697586;}.speed-control input {width:83px;}.speed-control output {color:#33425a;min-width:18px;font-variant-numeric:tabular-nums; }
.transport .transport-toggle { width:30px;height:30px;min-height:30px;padding:0;border-radius:7px;background:transparent;color:var(--muted);font-size:16px;line-height:1; }
.transport .transport-toggle:hover { background:var(--soft);color:var(--text-color); }
.stage.transport-collapsed .transport { padding:0 8px;gap:0; }
.stage.transport-collapsed .transport > :not(.transport-toggle) { display:none !important; }
.stage.transport-collapsed .transport .transport-toggle { margin:0; }
.sidebar,body.layout-left .sidebar { grid-column:3;grid-row:2;order:unset; width:auto;min-width:0; min-height:0; background:#fff;box-shadow:none;border:0;border-left:1px solid var(--border);z-index:20; }
.inspector-heading { height:51px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 19px;border-bottom:1px solid var(--border);font-size:12px; }.eyebrow {font-size:8px;letter-spacing:1.4px;color:#a6adba; }
.scroll-area { padding:0; overscroll-behavior:contain; touch-action:pan-y; scrollbar-width:thin;scrollbar-color:#dfe4ec transparent; }.scroll-area::-webkit-scrollbar {background:transparent;width:4px; }.scroll-area::-webkit-scrollbar-thumb {background:#dfe4ec; }
.panel-section { margin:0; padding:18px 19px; background:none;border-bottom:1px solid var(--border);border-radius:0; }
.section-header {padding:0;margin:0 0 14px;border:0;color:#344156;font-size:12px;text-transform:none; gap:8px; }.section-header h2 {font-size:12px;font-weight:650;margin:0; }.badge {font-size:10px;background:#f0f4f9;color:#7a889d;padding:1px 7px;border-radius:4px;font-weight:400; }
.field-label {font-size:10px;color:#8c96a5;display:block;margin-bottom:6px; }.full-input {width:100%;height:33px; }
.property-row {display:flex;align-items:center;justify-content:space-between;margin:13px 0;font-size:11px;gap:8px; }.color-trigger {display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--border);padding:4px 7px;min-height:28px;font-size:10px;color:#7a8597;font-variant-numeric:tabular-nums; }.color-swatch {width:17px;height:17px;display:block;border-radius:4px;border:1px solid #00000012; }.bg-trigger {padding:4px; }
.range-caption {display:flex;justify-content:space-between;align-items:center;font-size:11px;margin-top:12px;color:#687589; }.range-caption output,.range-caption>span {font-size:10px;color:#7d8a9b;font-variant-numeric:tabular-nums; }
input[type=range] {height:22px;margin:2px 0;min-width:0;accent-color:#2769e8; }
input[type=range]::-webkit-slider-runnable-track {background:#e6ebf3;height:3px; }
input[type=range]::-webkit-slider-thumb {height:11px;width:11px;background:#fff;border:3px solid #4b7ede;margin-top:-4px;box-shadow:0 1px 3px #30486a18; }
input[type=range]::-moz-range-track {background:#e6ebf3;height:3px; }input[type=range]::-moz-range-thumb {height:8px;width:8px;background:white;border:3px solid #4b7ede; }
input[type=checkbox] {accent-color:#2769e8;width:14px;height:14px;cursor:pointer; }
.helper-text {font-size:10px;line-height:1.75;color:#929cab;margin:9px 0 0; }.count {font-size:10px;color:#9aa6b8;font-weight:400;margin-left:4px; }
.layer-add {display:flex;gap:4px;}.layer-add button {font-size:10px;min-height:27px;padding:2px 6px; }.layer-list {padding:0;background:none;max-height:212px;gap:5px; }.layer-item {background:#f8f9fb;color:#6a768a;min-height:42px;padding:6px;gap:5px;border-radius:6px;font-size:11px; }.layer-item.active {background:#eff4ff;border-color:#d7e4ff;color:#315a99; }.layer-item .layer-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0; }.layer-vis,.layer-pin {background:none;padding:0;min-height:24px;width:22px;font-size:12px;border-radius:4px;flex:none; }.layer-pin {opacity:.65; }.layer-pin.active {opacity:1;color:#2769e8;text-shadow:none; }.layer-move-btn {min-height:24px;width:16px;padding:0;font-size:12px;color:#a0acbd; }.layer-actions {display:flex;gap:4px;margin-top:9px; }.layer-actions button {flex:1;font-size:10px;background:transparent;padding:2px;min-height:27px;color:#8c97a9; }.layer-actions button:hover {background:#f3f5f8;color:#384961; }
details summary {font-size:12px;font-weight:600;cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center; }details summary::-webkit-details-marker {display:none; }details summary::after {content:'＋';color:#a2aaba;font-size:13px;font-weight:400; }details[open] summary::after {content:'−'; }.details-body {padding-top:3px; }.onion-frames {display:flex;gap:6px;margin:10px 0; }.onion-frames .btn-label {flex:1;font-size:10px;min-height:28px;padding:3px 9px; }.full-button {width:100%;font-size:10px;min-height:28px;text-align:left;padding:2px 0;color:#8290a6; }.preferences button {width:100%;font-size:11px;margin-top:10px; }.sidebar-footer {padding:15px 19px;display:flex;justify-content:space-between;border:0;margin:0;gap:12px; }.text-btn {background:none;font-size:10px;color:#8e99aa;padding:0; }.danger-text {color:#b57b7b; }
.shortcut-panel {bottom:13px;left:22px;right:auto;width:auto;max-width:calc(100% - 44px);min-width:115px;background:#ffffffeb;border:1px solid #e2e7ef;color:#8a96a8;border-radius:7px;padding:0;box-shadow:none;cursor:default; }.shortcut-header {padding:5px 9px;font-size:10px;gap:15px; }.shortcut-toggle {min-height:20px;padding:0;font-size:11px;color:#8493a9;background:transparent; }.shortcut-content {font-size:11px;color:#77849a;padding:0 12px; }.shortcut-panel.expanded .shortcut-content {padding:6px 12px 12px; }.shortcut-content strong {color:#455674; }
.toast-message {background:#27364beF;color:white;font-size:12px;border:0;border-radius:9px;padding:10px 18px;box-shadow:0 6px 25px #17294520; }
.export-panel {position:fixed;right:24px;top:64px;width:325px;max-width:calc(100vw - 32px);padding:20px;background:white;border:1px solid var(--border);border-radius:12px;box-shadow:0 15px 55px #24355023;z-index:100; }.export-panel[hidden] {display:none; }.export-panel .section-header {margin-bottom:8px; }.export-option {display:block;width:100%;white-space:normal;text-align:left;background:transparent;padding:12px 10px;margin-top:4px;border-radius:8px; }.export-option strong {display:flex;justify-content:space-between;font-size:12px;font-weight:550;color:#35465f; }.export-option strong span {font-size:10px;color:#6e88b4; }.export-option small {display:block;font-size:10px;font-weight:400;color:#8b98ab;margin-top:5px;line-height:1.6; }.transparent-option {display:flex;align-items:center;gap:6px;margin:0 10px 6px;font-size:10px;color:#8592a5; }
.modal-overlay {background:#23304e55;backdrop-filter:blur(4px);padding:20px; }.modal-content {background:white;border:1px solid #dfe5ef;color:#3d4c63;border-radius:14px;box-shadow:0 20px 70px #25334825;max-height:90dvh;overflow:auto; }.modal-header {color:#34445e;border-color:#e8ecf2; }.modal-body p {font-size:12px; }.modal-body a {color:#2769e8; }.disclaimer {background:#f6f8fb;color:#7c889c; }.close-modal {color:#93a0b1;min-height:22px; }.form-select,.form-input {background:#f5f7fa;border-color:#e0e5ed;color:#354762; }.form-group label {color:#718096; }
.color-picker-box {background:#fff;border-color:#dfe5ed;box-shadow:0 10px 40px #20314b25; }.cp-input {color:#263b59 !important; }.floating-bubble {background:white;border:1px solid var(--border);box-shadow:0 7px 25px #23344d20; }
body.layout-left {grid-template-columns:292px minmax(0,1fr) 76px; }body.layout-left .sidebar {grid-column:1;border-left:0;border-right:1px solid var(--border); }body.layout-left .tool-rail {grid-column:3;border-left:1px solid var(--border);border-right:0; }
.mobile-only {display:none; }
@media (min-width:1550px) {.stage {--transport-row:87px;grid-template-rows:57px minmax(0,1fr) 38px var(--transport-row); }.sidebar,body.layout-left .sidebar {width:auto; }body {grid-template-columns:84px minmax(0,1fr) 320px; }body.layout-left {grid-template-columns:320px minmax(0,1fr) 84px; }.panel-section {padding:21px 23px; }.tool-rail {padding-top:27px; }}
@media (max-width:1100px) {.app-header {gap:12px;padding:0 16px; }.save-indicator {font-size:10px; }.transport {gap:7px;padding:12px 9px; }.transport-divider {display:none; }.speed-control {gap:5px; }.speed-control input {width:58px; }body {grid-template-columns:64px minmax(0,1fr) 267px; }body.layout-left {grid-template-columns:267px minmax(0,1fr) 64px; }.stage-toolbar {padding:0 16px; }.panel-section {padding:16px; }.transport .quiet-btn {padding:5px 7px;font-size:11px; }}
@media (max-width:850px) {body,body.layout-left {--header-row:62px;grid-template-columns:62px minmax(0,1fr);grid-template-rows:var(--header-row) minmax(0,1fr); }.app-header {gap:8px;padding:0 12px; }.brand {font-size:14px;gap:8px; }.brand small {font-size:6px; }.brand-mark {width:30px;height:30px;font-size:28px; }.header-divider {display:none; }#projectNameInput {width:130px;font-size:12px; }.save-indicator {display:none; }.mobile-only {display:inline-block; }.sidebar,body.layout-left .sidebar {display:none;position:fixed;right:0;left:auto;top:var(--header-row);bottom:0;width:285px;box-shadow:-15px 0 40px #24385419; }.sidebar.is-open,body.layout-left .sidebar.is-open {display:flex; }body.layout-left .tool-rail {grid-column:1;border-right:1px solid var(--border);border-left:0; }.stage {grid-column:2; }.tool-rail {grid-column:1; }.stage-toolbar {padding:0 15px; }.transport {gap:10px; }.stage {--transport-row:76px;grid-template-rows:45px minmax(0,1fr) 30px var(--transport-row); }}
@media (max-width:560px) {.app-header {gap:3px; }.brand small {display:none; }.brand>span:last-child {font-size:13px; }.brand-mark {font-size:25px;width:26px;height:26px; }.project-title {flex:1; }#projectNameInput {width:100%;min-width:50px;max-width:105px;font-size:11px;padding:7px 5px; }.header-actions {gap:2px; }.header-actions button {font-size:10px;padding:5px 8px; }.header-actions .primary-btn {padding:5px 10px; }.tool-rail {padding:12px 4px;gap:4px; }.rail-caption {display:none; }.tool-button {width:48px;min-height:56px; }.stage-toolbar {padding:0 10px; }.stage-toolbar>div {gap:5px; }.stage-toolbar .subtle {display:none; }#resetViewBtn {font-size:10px;padding:4px; }#zoomReadout {margin-left:4px;font-size:9px; }.context-strip {padding:0 10px;font-size:9px; }.transport {flex-wrap:wrap;justify-content:center;gap:4px 9px;padding:8px 4px; }.stage {--transport-row:104px;grid-template-rows:42px minmax(0,1fr) 30px var(--transport-row); }.play-button {min-width:80px;height:34px; }.playback-controls {gap:3px; }.speed-control {order:4; }.speed-control input {width:75px; }#rotateDirBtn {order:5; }.canvas-hint {top:12px;font-size:9px; }.canvas-hint small {display:none; }.rotation-control {right:13px;top:38px;width:27px;height:27px; }.shortcut-panel {left:10px;bottom:10px;min-width:105px; }.canvas-corner {right:12px;bottom:17px; }.export-panel {right:10px;top:58px; }.brand {gap:5px; }.canvas-hint {max-width:95%; }}
@media (max-height:600px) and (min-width:561px) {.tool-rail {gap:2px;padding-top:10px; }.tool-button {min-height:45px;padding:3px; }.rail-caption {display:none; }.tool-icon {font-size:22px;line-height:23px; }.rail-separator {margin:3px 0; }.history-button {min-height:40px; }.canvas-hint {display:none; }.stage {--transport-row:60px;grid-template-rows:40px minmax(0,1fr) 26px var(--transport-row); }}
@media (prefers-reduced-motion:reduce) {* {animation:none !important;transition:none !important;}}

/* Keep supporting text readable at native desktop and tablet resolutions. */
@media (min-width:561px) {
  .property-row,.range-caption {font-size:12px;}
  .section-header h2,details summary,.inspector-heading {font-size:13px;}
  .field-label,.helper-text,.layer-actions button,.layer-add button,.onion-frames .btn-label {font-size:11px;}
  .helper-text,.field-label {color:#7c8798;}
  .context-strip {font-size:11px;}
}
.floating-bubble {max-width:calc(100% - 20px);bottom:55px;}
.floating-bubble button {background:#edf2fa;color:#536985;}
.floating-bubble button#selectionConfirmBtn {color:white;}
.stage {isolation:isolate;z-index:0;}
.canvas-hint {top:8px;}

body.header-collapsed { --header-row:30px; }
body.header-collapsed .export-panel { top:38px; }
