
  #cro-prototype { --cro-bg:light-dark(#f4f5f7,#191c22);--cro-panel:light-dark(#fff,#242831);--cro-ink:light-dark(#20232a,#f1f2f4);--cro-muted:light-dark(#646a76,#b1b8c5);--cro-line:light-dark(#e1e4e9,#424854);--cro-soft:light-dark(#eef0f4,#343a46);--cro-active:light-dark(#242a37,#e8edf6);--cro-on-active:light-dark(#fff,#202633);--cro-accent:light-dark(#3c5790,#96b6fa);--cro-accent-soft:light-dark(#edf2fc,#303f59);--cro-paper:light-dark(#fff,#f8f8f7);--cro-paper-ink:#242a37;--cro-shadow:0 12px 36px #0002;font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--cro-ink);width:100%; }
  #cro-prototype * { box-sizing:border-box; }
  #cro-prototype button,#cro-prototype input,#cro-prototype select,#cro-prototype textarea { font:inherit;color:inherit; }
  #cro-prototype button { display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 10px;background:var(--cro-panel);border:1px solid var(--cro-line);border-radius:7px;white-space:nowrap; }
  #cro-prototype button:hover:not(:disabled) { background:var(--cro-soft);color:var(--cro-ink); }
  #cro-prototype button:disabled, #cro-prototype button[aria-disabled="true"] { opacity:.42; }
  #cro-prototype button[aria-pressed="true"],#cro-prototype button[aria-current="page"],#cro-prototype .cro-primary { background:var(--cro-active);color:var(--cro-on-active);border-color:var(--cro-active); }
  #cro-prototype button.cro-primary:hover { filter:brightness(1.15);background:var(--cro-active);color:var(--cro-on-active); }
  #cro-prototype input,#cro-prototype select,#cro-prototype textarea { background:var(--cro-panel);border:1px solid var(--cro-line);border-radius:6px;padding:8px;min-width:0;width:100%; }
  #cro-prototype input[type="range"] { padding:0;accent-color:var(--cro-accent); }
  #cro-prototype svg[data-lucide],#cro-prototype button>svg { width:18px;height:18px;flex:none;display:block;stroke-width:1.7; }
  #cro-prototype .cro-icon { width:36px;padding:7px;flex:none;gap:0; }
  #cro-prototype .cro-review { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;flex-wrap:wrap;color:var(--cro-muted);font-size:12px; }
  #cro-prototype .cro-review-note { margin-left:4px; }
  #cro-prototype .cro-devices { display:flex;gap:4px; }
  #cro-prototype .cro-devices button { font-size:12px;min-height:30px;padding:4px 9px; }
  #cro-prototype .cro-frame { width:100%;max-width:1100px;margin:auto;container-type:inline-size;container-name:cro; }
  #cro-prototype .cro-frame[data-device="tablet"] { max-width:760px; }
  #cro-prototype .cro-frame[data-device="phone"] { max-width:390px; }
  #cro-prototype .cro-app { background:var(--cro-bg);border:1px solid var(--cro-line);border-radius:12px;position:relative;isolation:isolate; }
  #cro-prototype .cro-header { display:flex;align-items:center;gap:16px;padding:12px 16px;border-bottom:1px solid var(--cro-line);background:var(--cro-panel);border-radius:12px 12px 0 0; }
  #cro-prototype .cro-brand { display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:17px;font-weight:650;letter-spacing:-.5px; }
  #cro-prototype .cro-brand svg { width:31px;height:31px; }
  #cro-prototype .cro-workspaces,#cro-prototype .cro-global { display:flex;align-items:center;gap:4px; }
  #cro-prototype .cro-workspaces { margin-left:4px; }
  #cro-prototype .cro-global { margin-left:auto; }
  #cro-prototype .cro-header button { border-color:transparent;background:transparent;padding:8px; }
  #cro-prototype .cro-header button[aria-current="page"] { background:var(--cro-soft);color:var(--cro-ink); }
  #cro-prototype .cro-avatar { border-radius:50%;border:1px solid var(--cro-line)!important;width:34px;height:34px;min-height:34px;background:var(--cro-soft)!important; }
  #cro-prototype .cro-account-link { display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:7px;color:inherit;text-decoration:none; }
  #cro-prototype .cro-docbar { padding:12px 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--cro-line);background:var(--cro-panel); }
  #cro-prototype .cro-title-wrap { flex:1;min-width:90px; }
  #cro-prototype .cro-title { font-weight:600;width:100%;border:0;padding:0;background:transparent;max-width:290px; }
  #cro-prototype .cro-save-status { color:var(--cro-muted);font-size:12px;margin-top:2px; }
  #cro-prototype .cro-actions { display:flex;flex-wrap:wrap;align-items:center;gap:5px; }
  #cro-prototype .cro-separator { width:1px;background:var(--cro-line);height:22px;margin:0 4px; }
  #cro-prototype .cro-editor { display:grid;grid-template-columns:54px minmax(0,1fr) 224px;min-height:530px;position:relative; }
  #cro-prototype .cro-rail { display:flex;align-items:center;flex-direction:column;gap:8px;padding:12px 7px;background:var(--cro-panel);border-right:1px solid var(--cro-line); }
  #cro-prototype .cro-rail button { border-color:transparent; }
  #cro-prototype .cro-rail button[aria-pressed="true"] { background:var(--cro-accent-soft);color:var(--cro-accent); }
  #cro-prototype .cro-work { display:flex;flex-direction:column;min-width:0; }
  #cro-prototype .cro-context { min-height:49px;padding:7px 12px;border-bottom:1px solid var(--cro-line);display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--cro-panel); }
  #cro-prototype .cro-context-label { margin-right:auto;font-size:12px;color:var(--cro-muted); }
  #cro-prototype .cro-context button { min-height:30px;padding:4px 8px;font-size:12px; }
  #cro-prototype .cro-props-trigger { display:none; }
  #cro-prototype .cro-paintbar { display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 12px;background:var(--cro-panel);border-bottom:1px solid var(--cro-line); }
  #cro-prototype .cro-paintbar .cro-swatches { margin:0;gap:6px; }
  #cro-prototype .cro-paintbar .cro-paint-tools { display:flex;gap:3px; }
  #cro-prototype .cro-paintbar select { width:auto;max-width:145px; }
  #cro-prototype .cro-paintbar .cro-paint-label { font-size:12px;color:var(--cro-muted); }
  #cro-prototype .cro-context select { width:auto;max-width:155px;padding:5px;font-size:12px; }
  #cro-prototype .cro-context .cro-inline-field { display:flex;align-items:center;gap:6px;font-size:12px;color:var(--cro-muted); }
  #cro-prototype .cro-stage { position:relative;flex:1;display:flex;align-items:center;justify-content:center;min-height:395px;padding:22px;background:var(--cro-bg); }
  #cro-prototype .cro-stage[data-stage="motif"] { background-image:radial-gradient(var(--cro-line) .8px,transparent .8px);background-size:18px 18px; }
  #cro-prototype .cro-drawing { position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;overflow:hidden; }
  #cro-prototype .cro-stage-shell {position:relative;display:grid;grid-template-rows:minmax(0,1fr);flex:1;min-width:0;min-height:0;}
  #cro-prototype .cro-stage-shell>.cro-stage {grid-area:1/1;}
  #cro-prototype .cro-empty-motif {grid-area:1/1;align-self:center;justify-self:center;z-index:1;max-width:calc(100% - 32px);margin:16px;padding:20px;border:1px solid var(--cro-line);border-radius:10px;background:var(--cro-panel);color:var(--cro-ink);text-align:center;pointer-events:none;}
  #cro-prototype .cro-empty-motif h2 {margin:0;font-size:18px;font-weight:600;}
  #cro-prototype .cro-empty-motif p {margin:6px 0 16px;color:var(--cro-muted);}
  #cro-prototype .cro-empty-motif-actions {display:flex;justify-content:center;flex-wrap:wrap;gap:8px;}
  #cro-prototype .cro-empty-motif button {pointer-events:auto;min-height:40px;}
  #cro-prototype .cro-motif-mark { color:var(--cro-ink); }
  #cro-prototype .cro-stage[data-stage="motif"],#cro-prototype .cro-stage[data-stage="chart"] { padding:0;overflow:hidden; }
  #cro-prototype .cro-chart { position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none;overflow:hidden; }
  #cro-prototype .cro-canvas-tools { display:flex;align-items:center;gap:6px;padding:8px 12px;border-top:1px solid var(--cro-line);background:var(--cro-panel); }
  #cro-prototype .cro-canvas-tools span { color:var(--cro-muted);font-size:12px;min-width:0; }
  #cro-prototype .cro-canvas-tools .cro-spacer { flex:1; }
  #cro-prototype .cro-canvas-tools button { min-height:28px;padding:3px 6px;font-size:12px; }
  #cro-prototype .cro-zoom { display:inline-flex;align-items:center;gap:3px;flex:none; }
  #cro-prototype .cro-zoom input { width:78px;min-height:28px;padding:3px 5px;font-size:12px; }
  #cro-prototype .cro-zoom input[aria-invalid="true"] { border-color:var(--cro-ink);border-style:dashed; }
  #cro-prototype .cro-inspector { padding:17px 16px;border-left:1px solid var(--cro-line);background:var(--cro-panel); }
  #cro-prototype .cro-inspector-header { display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:18px; }
  #cro-prototype .cro-inspector h3 { font-family:inherit;font-size:14px;font-weight:600;line-height:1.4;margin:0; }
  #cro-prototype .cro-inspector .cro-close-props { display:none; }
  #cro-prototype .cro-field { display:block;margin:0 0 14px; }
  #cro-prototype .cro-field>span { display:block;font-size:12px;color:var(--cro-muted);margin-bottom:6px; }
  #cro-prototype .cro-field-row { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
  #cro-prototype .cro-inspector hr { border:0;border-top:1px solid var(--cro-line);margin:20px 0; }
  #cro-prototype .cro-muted { color:var(--cro-muted);font-size:12px; }
  #cro-prototype .cro-stepper { display:flex;gap:4px; }
  #cro-prototype .cro-stepper input { text-align:center; }
  #cro-prototype .cro-stepper button { padding:5px;min-width:30px; }
  #cro-prototype .cro-swatches { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px; }
  #cro-prototype .cro-swatches button { width:34px;height:34px;min-height:34px;padding:5px;border-radius:50%;background:var(--cro-panel); }
  #cro-prototype .cro-swatches button[aria-pressed="true"] { outline:2px solid var(--cro-accent);outline-offset:2px;border-color:transparent; }
  #cro-prototype .cro-swatch { display:block;width:22px;height:22px;border-radius:50%;border:1px solid #0002; }
  #cro-prototype .cro-full { width:100%; }
  #cro-prototype .cro-page-wrap { width:100%;max-width:460px; }
  #cro-prototype .cro-page { background:var(--cro-paper);color:var(--cro-paper-ink);box-shadow:0 1px 7px #0002;padding:30px;min-height:460px; }
  #cro-prototype .cro-page .cro-page-eyebrow { font-size:10px;letter-spacing:2px;text-transform:uppercase;color:#676c75; }
  #cro-prototype .cro-page h2 { font:500 28px/1.15 Georgia,serif;letter-spacing:-.5px;margin:12px 0 18px;color:var(--cro-paper-ink); }
  #cro-prototype .cro-page h4 { font:600 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;margin:18px 0 5px;color:var(--cro-paper-ink); }
  #cro-prototype .cro-page textarea { background:transparent;border:1px solid transparent;color:var(--cro-paper-ink);resize:vertical;padding:4px 0;font-size:12px;line-height:1.7;min-height:55px; }
  #cro-prototype .cro-page textarea:hover { border-color:#ccd1d8; }
  #cro-prototype .cro-page .cro-empty-design { display:flex;align-items:center;justify-content:center;min-height:110px;border:1px dashed #c6cbd3;border-radius:5px; }
  #cro-prototype .cro-page .cro-empty-design button { background:#f4f5f7;color:#333b49;border-color:#d8dce3; }
  #cro-prototype .cro-page-design { position:relative;text-align:center; }
  #cro-prototype .cro-page-design svg { width:100%;height:145px; }
  #cro-prototype .cro-page .cro-motif-mark { color:var(--cro-paper-ink); }
  #cro-prototype .cro-page-design .cro-muted { color:#646a76; }
  #cro-prototype .cro-page-remove { position:absolute;right:0;top:0; }
  #cro-prototype .cro-page-footer { border-top:1px solid #dddfe3;margin-top:20px;padding-top:8px;display:flex;justify-content:space-between;font-size:10px;color:#676c75; }
  #cro-prototype .cro-library { padding:24px;min-height:592px; }
  #cro-prototype .cro-library-head { display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:20px; }
  #cro-prototype .cro-library h2 { margin:0 0 4px;font-size:23px;letter-spacing:-.6px;font-weight:600; }
  #cro-prototype .cro-library-controls { display:flex;gap:10px;margin-bottom:22px; }
  #cro-prototype .cro-library-controls input { flex:1; }
  #cro-prototype .cro-library-controls select { max-width:170px; }
  #cro-prototype .cro-items { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px; }
  #cro-prototype .cro-item { background:var(--cro-panel);border:1px solid var(--cro-line);border-radius:9px;min-width:0; }
  #cro-prototype .cro-thumbnail { display:flex;align-items:center;justify-content:center;width:100%;height:150px;background:var(--cro-bg);border:0;border-bottom:1px solid var(--cro-line);border-radius:8px 8px 0 0;padding:12px; }
  #cro-prototype .cro-thumbnail svg { width:100%;height:120px; }
  #cro-prototype .cro-item-info { padding:13px; }
  #cro-prototype .cro-item-info h3 { font-size:14px;margin:0 0 4px;font-weight:600;overflow-wrap:anywhere; }
  #cro-prototype .cro-item-actions { display:flex;gap:6px;flex-wrap:wrap;margin-top:13px; }
  #cro-prototype .cro-item-actions button { min-height:32px;font-size:12px;padding:5px 7px; }
  #cro-prototype .cro-announcement { color:var(--cro-muted);font-size:12px;padding:7px 16px;min-height:32px;border-top:1px solid var(--cro-line);background:var(--cro-panel);border-radius:0 0 12px 12px; }
  #cro-prototype .cro-modal-layer { position:absolute;inset:0;z-index:10;background:#151b295e;padding:40px 20px;display:flex;align-items:flex-start;justify-content:center;border-radius:12px; }
  #cro-prototype [hidden] { display:none!important; }
  #cro-prototype .cro-dialog { background:var(--cro-panel);color:var(--cro-ink);box-shadow:var(--cro-shadow);border:1px solid var(--cro-line);border-radius:12px;padding:22px;width:100%;max-width:520px; }
  #cro-prototype .cro-dialog-head { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px; }
  #cro-prototype .cro-dialog h2 { margin:0;font-size:20px;font-weight:600; }
  #cro-prototype .cro-dialog h3 { font-size:14px;margin:18px 0 10px; }
  #cro-prototype .cro-dialog p { margin:8px 0 17px; }
  #cro-prototype .cro-dialog-actions { display:flex;justify-content:flex-end;gap:8px;margin-top:20px;flex-wrap:wrap; }
  #cro-prototype .cro-tool-option { width:100%;justify-content:flex-start;padding:12px;margin-bottom:8px;white-space:normal;text-align:left; }
  #cro-prototype .cro-tool-option span { display:block; }
  #cro-prototype .cro-tool-option small { display:block;color:var(--cro-muted);font-size:12px; }
  #cro-prototype .cro-starter-dialog {display:flex;flex-direction:column;max-width:640px;max-height:calc(100dvh - 100px);overflow:hidden;}
  #cro-prototype .cro-starter-dialog>[data-new-design-type] {min-height:0;overflow:auto;padding:6px;margin:0 -6px;}
  #cro-prototype .cro-starter-dialog>.cro-dialog-head,#cro-prototype .cro-starter-dialog>.cro-dialog-actions,#cro-prototype .cro-starter-dialog>[data-new-status] {flex-shrink:0;}
  #cro-prototype .cro-starter-dialog>[data-new-status] {margin:12px 0 0;}
  #cro-prototype .cro-starter-dialog>.cro-dialog-actions {margin-top:12px;}
  #cro-prototype .cro-starter-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0;padding:0;margin:12px 0 18px;min-width:0;}
  #cro-prototype .cro-starter-choices legend {font-weight:600;margin-bottom:10px;}
  #cro-prototype .cro-starter-card {display:flex;flex-direction:column;position:relative;gap:6px;padding:12px;border:2px solid var(--cro-line);border-radius:9px;cursor:pointer;min-width:0;}
  #cro-prototype .cro-starter-card:has(input:checked) {border-color:var(--cro-accent);background:var(--cro-accent-soft);}
  #cro-prototype .cro-starter-card:has(input:focus-visible) {outline:2px solid var(--cro-accent);outline-offset:3px;}
  #cro-prototype .cro-starter-card input {position:absolute;top:10px;left:10px;width:18px;height:18px;margin:0;accent-color:var(--cro-accent);}
  #cro-prototype .cro-starter-preview {display:block;background:#fff;border-radius:5px;padding:8px 26px;}
  #cro-prototype .cro-starter-preview svg {display:block;width:100%;height:92px;}
  #cro-prototype .cro-starter-card strong {font-size:14px;line-height:1.3;}
  #cro-prototype .cro-starter-description {font-size:12px;line-height:1.45;color:var(--cro-muted);}
  @container cro (max-width:480px) {#cro-prototype .cro-starter-choices {grid-template-columns:minmax(0,1fr);}}
  #cro-prototype .cro-check { display:flex;align-items:flex-start;gap:8px;margin:12px 0; }
  #cro-prototype .cro-check input { width:17px;height:17px;flex:none;margin-top:3px; }
  #cro-prototype .cro-output-preview { padding:12px;background:var(--cro-bg);border:1px solid var(--cro-line);border-radius:6px;text-align:center; }
  #cro-prototype .cro-output-preview svg { max-width:100%;height:230px; }
  @container cro (max-width:960px) { #cro-prototype .cro-global button span { display:none; } #cro-prototype .cro-header { gap:10px; } }
  @container cro (max-width:820px) {
    #cro-prototype .cro-editor { grid-template-columns:54px minmax(0,1fr); }
    #cro-prototype .cro-inspector { display:none;position:absolute;right:0;top:0;bottom:0;width:250px;z-index:3;box-shadow:-8px 0 22px #0001;overflow:auto; }
    #cro-prototype .cro-editor.cro-props-open .cro-inspector { display:block; }
    #cro-prototype .cro-inspector .cro-close-props,#cro-prototype .cro-props-trigger { display:inline-flex; }
    #cro-prototype .cro-items { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #cro-prototype .cro-header { gap:7px;padding:10px 12px; }
    #cro-prototype .cro-workspaces { gap:2px;margin-left:0; }
    #cro-prototype .cro-workspaces button { padding:7px; }
  }
  @container cro (max-width:580px) {
    #cro-prototype .cro-header { display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px 12px 8px; }
    #cro-prototype .cro-global { grid-column:2;grid-row:1; }
    #cro-prototype .cro-workspaces { grid-column:1 / -1;grid-row:2;display:grid;grid-template-columns:1fr 1.25fr 1fr 36px; }
    #cro-prototype .cro-workspaces button { font-size:12px; }
    #cro-prototype .cro-brand { font-size:16px; }
    #cro-prototype .cro-brand svg { width:28px;height:28px; }
    #cro-prototype .cro-docbar { flex-wrap:wrap;padding:10px 12px;gap:10px; }
    #cro-prototype .cro-title-wrap { flex-basis:calc(100% - 64px);order:0; }
    #cro-prototype .cro-save-button { order:1;margin-left:auto; }
    #cro-prototype .cro-actions { order:2;width:100%; }
    #cro-prototype .cro-actions .cro-output { margin-left:auto; }
    #cro-prototype .cro-editor { grid-template-columns:minmax(0,1fr);min-height:475px; }
    #cro-prototype .cro-rail { grid-row:2;flex-direction:row;justify-content:center;padding:6px;border-right:0;border-top:1px solid var(--cro-line);gap:10px; }
    #cro-prototype .cro-rail button { width:44px;height:42px; }
    #cro-prototype .cro-context { padding:8px 10px;gap:6px; }
    #cro-prototype .cro-context-label { width:100%; }
    #cro-prototype .cro-context .cro-props-trigger { margin-left:auto; }
    #cro-prototype .cro-context button { min-height:36px; }
    #cro-prototype .cro-paintbar { padding:8px 10px;gap:8px; }
    #cro-prototype .cro-paintbar .cro-swatches button { width:40px;height:40px;min-height:40px; }
    #cro-prototype .cro-paintbar .cro-paint-tools button { width:40px;height:40px;min-height:40px; }
    #cro-prototype .cro-stage { min-height:290px;padding:12px; }
    #cro-prototype .cro-inspector { top:auto;bottom:0;width:100%;max-height:395px;border:1px solid var(--cro-line);border-radius:12px 12px 0 0;padding:14px 16px;box-shadow:0 -8px 22px #0002; }
    #cro-prototype .cro-inspector-header { margin-bottom:12px; }
    #cro-prototype .cro-canvas-tools { padding:8px 10px; }
    #cro-prototype .cro-canvas-tools .cro-long-status { display:none; }
    #cro-prototype .cro-library { padding:18px 14px;min-height:600px; }
    #cro-prototype .cro-library-head { align-items:flex-start; }
    #cro-prototype .cro-library-head h2 { font-size:22px; }
    #cro-prototype .cro-items { gap:10px; }
    #cro-prototype .cro-thumbnail { height:115px; }
    #cro-prototype .cro-thumbnail svg { height:100px; }
    #cro-prototype .cro-item-info { padding:10px; }
    #cro-prototype .cro-item-actions { flex-direction:column; }
    #cro-prototype .cro-page { padding:22px; }
    #cro-prototype .cro-page h2 { font-size:25px; }
    #cro-prototype .cro-modal-layer { padding:18px 10px; }
    #cro-prototype .cro-dialog { padding:18px; }
    #cro-prototype input,#cro-prototype select,#cro-prototype textarea { font-size:16px; }
  }
  @container cro (max-width:350px) { #cro-prototype .cro-workspaces svg { display:none; } #cro-prototype .cro-library-controls { flex-wrap:wrap; } #cro-prototype .cro-library-controls select { max-width:none; } }

html,body{margin:0;min-height:100%;background:#f4f5f7;color-scheme:light dark}body{font-family:system-ui,sans-serif}
#cro-prototype{min-height:100dvh}
#cro-prototype .cro-review{margin:0;padding:7px 14px;min-height:36px;background:var(--cro-panel);border-bottom:1px solid var(--cro-line)}
#cro-prototype .cro-original-link{color:var(--cro-accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}
#cro-prototype .cro-frame{max-width:none!important}
#cro-prototype .cro-app{border:0;border-radius:0;min-height:calc(100dvh - 36px)}
#cro-prototype .cro-header{border-radius:0}
#cro-prototype .cro-editor{grid-template-columns:54px minmax(0,1fr);min-height:calc(100dvh - 205px)}
#cro-prototype .cro-stage{min-height:320px;flex:1}
#cro-prototype .cro-context{flex-wrap:wrap;min-height:48px}
#cro-prototype .cro-edit-controls{display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:8px 12px;border-bottom:1px solid var(--cro-line);background:var(--cro-panel)}
#cro-prototype .cro-control>button{gap:7px;min-height:36px;padding:5px 8px}
#cro-prototype .cro-control-label{font-size:11px;color:var(--cro-muted)}
#cro-prototype .cro-control-value{font-size:12px;font-weight:600;max-width:155px;overflow:hidden;text-overflow:ellipsis}
#cro-prototype .cro-control>button svg{width:12px;height:12px}
#cro-prototype .cro-control-panel{position:fixed;z-index:9;background:var(--cro-panel);border:1px solid var(--cro-line);padding:16px;border-radius:8px;box-shadow:var(--cro-shadow);max-height:calc(100dvh - 24px);overflow:auto}
#cro-prototype [hidden]{display:none!important}
#cro-prototype .cro-edit-controls .cro-full{width:auto}
#cro-prototype button:focus-visible,#cro-prototype a:focus-visible,#cro-prototype input:focus-visible,#cro-prototype select:focus-visible{outline:2px solid var(--cro-accent);outline-offset:3px}
@container cro (max-width:600px){
 #cro-prototype .cro-editor{grid-template-columns:1fr;min-height:calc(100dvh - 190px)}
 #cro-prototype .cro-rail{grid-row:2;flex-direction:row;border-top:1px solid var(--cro-line)}
 #cro-prototype .cro-edit-controls{padding:6px;gap:4px}
 #cro-prototype .cro-control>button{padding:5px 7px;gap:4px;min-height:40px}
 #cro-prototype .cro-control-label{font-size:10px}
 #cro-prototype .cro-control-value{max-width:110px;font-size:12px}
 #cro-prototype .cro-context{padding:6px}
 #cro-prototype .cro-stage{min-height:300px}
 #cro-prototype .cro-global{gap:0}
}


#cro-prototype .cro-transform-handle:focus-visible{outline:none}
#cro-prototype .cro-transform-handle:focus-visible>rect,#cro-prototype .cro-transform-handle:focus-visible>circle:last-child,#cro-prototype .cro-transform-handle:focus-visible>.cro-move-disc{stroke:#182c52;stroke-width:3;fill:#dce7fa}

#cro-prototype .cro-overlap-panel{position:fixed;z-index:12;width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:12px;border:1px solid var(--cro-line);border-radius:8px;background:var(--cro-panel);box-shadow:var(--cro-shadow)}
#cro-prototype .cro-overlap-panel>p{margin:6px 0 10px;font-size:12px}
#cro-prototype .cro-overlap-panel [role=menu]>button{display:flex;width:100%;min-height:44px;gap:10px;text-align:left;white-space:normal;border:0;justify-content:flex-start}
#cro-prototype .cro-overlap-panel [role=menu]>button[aria-checked=true]{background:var(--cro-accent-soft)}
#cro-prototype .cro-overlap-label{min-width:0;overflow-wrap:anywhere}
#cro-prototype .cro-overlap-label small{display:block;color:var(--cro-muted);font-size:11px}
#cro-prototype .cro-overlap-colour{width:12px;height:12px;flex:none;border:1px solid var(--cro-line);border-radius:50%}
#cro-prototype .cro-overlap-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;font-size:12px}

#cro-prototype .cro-order-buttons,#cro-prototype .cro-nudge-buttons{display:flex;gap:4px;align-items:center}
#cro-prototype .cro-order-buttons{border-left:1px solid var(--cro-line);padding-left:6px}
#cro-prototype .cro-order-buttons .cro-icon,#cro-prototype .cro-nudge-buttons .cro-icon{min-width:40px;min-height:40px}
@media(pointer:coarse){#cro-prototype .cro-order-buttons .cro-icon,#cro-prototype .cro-nudge-buttons .cro-icon{min-width:44px;min-height:44px}}

.cro-group-trail{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:6px 12px;border-bottom:1px solid var(--cro-border,#dedfe5);font-size:12px}
.cro-group-trail button{min-height:36px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cro-group-trail button[aria-current]{color:inherit;opacity:1;font-weight:600}
.cro-scope-hint{color:var(--cro-muted,#687080);margin-left:6px}
@media(max-width:600px){.cro-scope-hint{flex-basis:100%;margin:0}.cro-group-trail{padding:4px 8px}.cro-group-trail button{max-width:130px}}
@media(pointer:coarse){.cro-group-trail button{min-height:44px;min-width:44px}}

#cro-prototype .cro-copy-mode{display:flex;flex-wrap:wrap;align-items:center;gap:4px}
#cro-prototype .cro-copy-mode button{min-height:40px;padding:5px 9px;font-size:12px}
@media(pointer:coarse){#cro-prototype .cro-copy-mode button{min-height:44px}}

#cro-prototype .cro-appearance-fields{display:grid;gap:10px;min-width:230px;max-width:290px}
#cro-prototype .cro-toolbar-tooltip{position:fixed;z-index:50;max-width:min(310px,calc(100vw - 16px));padding:9px 12px;border:1px solid var(--cro-line);border-radius:7px;background:var(--cro-active);color:var(--cro-on-active);box-shadow:var(--cro-shadow);font-size:14px;line-height:1.4;white-space:normal}
#cro-prototype .cro-appearance-fields .cro-field{margin:0}
#cro-prototype .cro-colour-input{display:flex;gap:8px}
#cro-prototype .cro-colour-input input[type=color]{width:44px;min-width:44px;height:38px;padding:3px}
#cro-prototype .cro-colour-input input[type=text]{min-width:0;width:100%}
#cro-prototype .cro-appearance-fields p{margin:0;font-size:13px}
#cro-prototype .cro-element-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#cro-prototype .cro-element-cell{display:flex;flex-direction:column;min-width:0}
#cro-prototype .cro-element-pick{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;padding:6px;min-height:88px;font-size:13px;white-space:normal;overflow-wrap:anywhere;color:var(--cro-ink)}
#cro-prototype .cro-element-pick svg{width:44px;height:44px;flex:none}
#cro-prototype .cro-element-pick[aria-pressed=true]{color:var(--cro-ink);border-color:var(--cro-accent);background:var(--cro-soft);outline:2px solid var(--cro-ink);outline-offset:-2px}
#cro-prototype .cro-element-pin{font-size:12px;min-height:28px;padding:3px}
#cro-prototype .cro-palette-pages{display:flex;justify-content:space-between;align-items:center;margin-top:10px}
#cro-prototype .cro-palette-selection{font-size:13px;min-height:32px;margin:8px 0!important}
#cro-prototype .cro-palette-dialog .cro-field{margin-bottom:8px}
#cro-prototype .cro-palette-dialog .cro-dialog-actions{margin-top:8px}
@media(max-width:480px){#cro-prototype .cro-element-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#cro-prototype .cro-element-pick{min-height:64px;flex-direction:row}#cro-prototype .cro-element-pick svg{width:32px;height:32px}}
@media(max-height:600px){#cro-prototype .cro-modal-layer:has(.cro-palette-dialog){padding:6px}#cro-prototype .cro-palette-dialog{padding:10px;max-width:700px}#cro-prototype .cro-palette-dialog .cro-dialog-head{margin-bottom:6px}#cro-prototype .cro-palette-dialog [data-element-palette]{display:grid;grid-template-columns:1fr 1fr;gap:6px}#cro-prototype .cro-element-grid,#cro-prototype .cro-palette-pages,#cro-prototype .cro-palette-selection,#cro-prototype [data-palette-results]{grid-column:1/-1}#cro-prototype .cro-element-pick{min-height:48px;flex-direction:row}#cro-prototype .cro-element-pick svg{width:28px;height:28px}}

#cro-prototype .cro-stage[data-drawing="true"] .cro-drawing,#cro-prototype .cro-stage[data-drawing="true"] [data-group] { cursor:crosshair !important; }
#cro-prototype .cro-context button[aria-pressed="true"]:hover { background:var(--cro-active);color:var(--cro-on-active); }
#cro-prototype .cro-control-panel input[data-pen="stroke"] { height:36px;padding:3px; }

.cro-point-handle {cursor:move;outline:none}
.cro-point-handle:focus circle:last-child {stroke:#242a37;stroke-width:3}
.cro-point-navigation {display:flex;align-items:center;justify-content:space-between;margin:8px 0}

#cro-prototype .cro-grids-dialog {max-width:850px}
#cro-prototype .cro-guide-toolbar {display:flex;gap:12px;align-items:end;margin-bottom:12px;flex-wrap:wrap}
#cro-prototype .cro-guide-toolbar>.cro-field {flex:1;min-width:160px;margin:0}
#cro-prototype .cro-guide-toolbar>div {display:flex;gap:6px;flex-wrap:wrap}
#cro-prototype .cro-guide-layout {display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);gap:24px}
#cro-prototype .cro-guide-preview {display:block;width:100%;aspect-ratio:1;background:var(--cro-panel);border:1px solid var(--cro-line);border-radius:6px}
#cro-prototype :is(.cro-guide-preview,[data-guide-layer]) :is(path,circle,polygon) {vector-effect:non-scaling-stroke}
#cro-prototype .cro-guide-position {display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
#cro-prototype .cro-grids-dialog .cro-field {margin-bottom:8px}
#cro-prototype .cro-grids-dialog .cro-guide-size-help {font-size:11px;margin:0 0 8px}
#cro-prototype .cro-grids-dialog [data-guide-error]:empty {display:none}
@media(max-width:620px){#cro-prototype .cro-guide-layout {grid-template-columns:1fr;gap:10px}#cro-prototype .cro-guide-layout aside {display:grid;grid-template-columns:110px 1fr;gap:10px;align-items:start}#cro-prototype .cro-guide-layout aside [data-guide-preview] {grid-row:1/3}#cro-prototype .cro-guide-layout aside>p {grid-column:2;margin:0}#cro-prototype .cro-guide-layout aside [data-guide-preview] p {display:none}#cro-prototype .cro-grids-dialog {padding:12px}}

#cro-prototype .cro-grids-dialog input[type="color"] {height:38px;padding:4px;cursor:pointer}
@media(min-width:621px) and (max-height:800px){
  #cro-prototype .cro-grids-dialog {padding:14px}
  #cro-prototype .cro-grids-dialog .cro-field {margin-bottom:5px}
  #cro-prototype .cro-grids-dialog .cro-check {margin:7px 0}
  #cro-prototype .cro-grids-dialog .cro-dialog-actions {margin-top:8px}
  #cro-prototype .cro-grids-dialog .cro-dialog-head {margin-bottom:8px}
}

#cro-prototype .cro-export-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
#cro-prototype .cro-export-preview {height:200px;display:flex;align-items:center;justify-content:center;background:repeating-conic-gradient(#eef0f3 0% 25%,#fff 0% 50%) 50% / 20px 20px;border:1px solid #d0d4db;border-radius:8px;overflow:hidden;margin-top:12px;}
#cro-prototype .cro-export-preview svg {width:100%;height:100%;}
#cro-prototype [data-export-status] {min-height:1.5em;}

#cro-prototype .cro-dialog:has([data-motif-export],[data-chart-export-panel]) {max-height:calc(100dvh - 100px);overflow:auto;}
@media(max-height:700px){#cro-prototype .cro-export-preview{height:120px;}#cro-prototype .cro-dialog:has([data-motif-export],[data-chart-export-panel]){max-height:calc(100dvh - 48px);}}

#cro-prototype [data-chart-export-panel] .cro-check{display:flex;align-items:center;gap:8px;margin:4px 0 12px;font-size:13px;}

/* One document is shared by the screen preview and browser pagination. */
#cro-prototype .cro-pattern-preview {max-height:340px;overflow:auto;background:#edf0f4;border:1px solid #d0d4db;padding:16px;margin:12px 0;}
.cro-print-pattern {box-sizing:border-box;background:#fff;color:#20242b;font:11pt/1.55 Arial,Helvetica,sans-serif;overflow-wrap:anywhere;}
#cro-prototype .cro-print-pattern {padding:24px;font-size:13px;}
.cro-print-pattern h1 {font:500 26pt/1.2 Georgia,serif;margin:10px 0 24px;color:#20242b;}
.cro-print-pattern h2 {font:600 14pt/1.3 Arial,Helvetica,sans-serif;margin:24px 0 8px;color:#20242b;break-after:avoid;}
.cro-print-pattern .cro-print-eyebrow {font:9pt Arial,sans-serif;letter-spacing:1px;text-transform:uppercase;color:#565c66;}
.cro-print-pattern .cro-print-text {white-space:pre-wrap;overflow-wrap:anywhere;orphans:3;widows:3;}
.cro-print-pattern .cro-print-paragraph {margin:0;break-inside:auto;orphans:3;widows:3;}
.cro-print-pattern figure {margin:0 0 20px;break-inside:avoid;}
.cro-print-pattern .cro-print-design svg {display:block;width:100%;height:auto;max-height:185mm;object-fit:contain;}
.cro-print-pattern figcaption {font:10pt/1.4 Arial,sans-serif;text-align:center;margin-top:6px;}
.cro-pattern-print-root {display:none;}
@media print {
 html:has(body[data-cro-printing]) {height:auto!important;min-height:0!important;overflow:visible!important;background:#fff!important;color-scheme:light;}
 body[data-cro-printing] {margin:0!important;padding:0!important;background:#fff!important;height:auto!important;min-height:0!important;overflow:visible!important;}
 body[data-cro-printing] > :not(.cro-pattern-print-root) {display:none!important;}
 body[data-cro-printing] > .cro-pattern-print-root {display:block!important;}
 .cro-pattern-print-root .cro-print-pattern {width:auto;margin:0;padding:0;print-color-adjust:exact;-webkit-print-color-adjust:exact;}
}
#cro-prototype .cro-dialog:has([data-pattern-export-panel]) {max-height:calc(100dvh - 100px);overflow:auto;}
#cro-prototype .cro-pattern-preview h2 {font:600 14pt/1.3 Arial,Helvetica,sans-serif;margin:24px 0 8px;}
@media(max-height:700px){#cro-prototype .cro-pattern-preview{max-height:180px;}#cro-prototype .cro-dialog:has([data-pattern-export-panel]){max-height:calc(100dvh - 48px);}}
#cro-prototype .cro-legend-fields {max-height:300px;overflow:auto;display:grid;gap:12px;margin:14px 0;}
#cro-prototype .cro-legend-entry {display:flex;align-items:center;gap:12px;font-size:12px;}
#cro-prototype .cro-legend-entry svg {width:38px;height:38px;flex:none;}
#cro-prototype .cro-legend-entry span {flex:1;min-width:0;}
#cro-prototype .cro-legend-entry input {display:block;width:100%;margin-top:4px;}
#cro-prototype .cro-dialog:has(.cro-legend-fields) {max-height:calc(100dvh - 100px);overflow:auto;}
@media(max-height:700px){#cro-prototype .cro-legend-fields{max-height:150px;}#cro-prototype .cro-dialog:has(.cro-legend-fields){max-height:calc(100dvh - 48px);}}

#cro-prototype .cro-canvas-tools { flex-wrap:wrap; }

/* Invisible picking strokes retain a usable size while zooming or rotating. */
@media (pointer:coarse) {
  #cro-prototype [data-hit-area] { stroke-width:24; }
}

/* Three fixed rows above the artwork. Drawers float over the canvas. */
#cro-prototype .cro-app {height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#cro-prototype .cro-main {flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto}
#cro-prototype .cro-header,#cro-prototype .cro-docbar,#cro-prototype .cro-edit-controls {height:44px;min-height:44px;max-height:44px;flex:none;flex-wrap:nowrap;padding:4px 8px;gap:5px}
#cro-prototype .cro-header {display:flex}
#cro-prototype .cro-header-start {display:flex;align-items:center;gap:5px;flex:none}
#cro-prototype .cro-header:has(.cro-title-wrap) {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,290px) minmax(0,1fr)}
#cro-prototype .cro-header:has(.cro-title-wrap) .cro-global {grid-column:3;grid-row:1;justify-self:end;margin-left:0}
#cro-prototype .cro-header .cro-title-wrap {grid-column:2;grid-row:1;min-width:0;width:100%;flex-basis:auto;order:0}
#cro-prototype .cro-header .cro-title {text-align:center;max-width:none;line-height:18px}
#cro-prototype .cro-header .cro-save-status {text-align:center}
#cro-prototype .cro-header .cro-workspaces {display:flex;margin-left:0}
#cro-prototype .cro-header .cro-global {display:flex;margin-left:auto}
#cro-prototype .cro-header .cro-brand svg {width:26px;height:26px}
#cro-prototype .cro-header button {padding:5px;min-height:34px}
#cro-prototype .cro-docbar .cro-title-wrap {flex:1;min-width:40px;flex-basis:auto;order:0}
#cro-prototype .cro-title {font-size:13px}
#cro-prototype .cro-save-status {font-size:10px;line-height:12px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cro-prototype .cro-docbar .cro-actions {flex:none;flex-wrap:nowrap;order:0;width:auto;gap:4px}
#cro-prototype .cro-docbar .cro-save-button {order:0;margin:0}
#cro-prototype .cro-docbar button {min-height:34px;font-size:12px;padding:5px 7px}
#cro-prototype .cro-docbar .cro-separator {display:none}
#cro-prototype .cro-editor {flex:1;min-height:0;grid-template-columns:44px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
#cro-prototype .cro-work {min-height:0}
#cro-prototype .cro-stage {min-height:0;overflow:auto}
#cro-prototype .cro-rail {grid-row:auto;flex-direction:column;padding:5px 4px;gap:4px;border-top:0;border-right:1px solid var(--cro-line);overflow:auto;justify-content:flex-start}
#cro-prototype .cro-rail button {width:34px;height:34px;min-height:34px;padding:5px}
#cro-prototype .cro-editor:has(.cro-rail-colours) {grid-template-columns:54px minmax(0,1fr)}
#cro-prototype .cro-rail-colours {position:relative;width:44px;height:48px;flex:none;margin:9px 0 3px}
#cro-prototype .cro-rail-colours .cro-control {position:absolute;width:32px;height:32px}
#cro-prototype .cro-rail-fill {top:0;left:0;z-index:1}
#cro-prototype .cro-rail-stroke {top:12px;left:12px;z-index:2}
#cro-prototype .cro-rail-colours .cro-control:has(>button[aria-expanded="true"]) {z-index:45}
#cro-prototype .cro-rail-colours button[data-control] {position:relative;width:32px;height:32px;min-height:32px;padding:3px;border:1px solid var(--cro-ink);border-radius:3px;background:var(--cro-panel);box-shadow:0 0 0 2px var(--cro-panel)}
#cro-prototype .cro-rail-swatch {display:block;width:100%;height:100%;background:var(--swatch);border:1px solid #0005;position:relative}
#cro-prototype .cro-rail-stroke .cro-rail-swatch::after {content:"";position:absolute;inset:5px;background:var(--cro-panel);border:1px solid #0005}
#cro-prototype .cro-rail-swatch[data-value="mixed"] {background:repeating-linear-gradient(135deg,#888 0 4px,#fff 4px 8px)}
#cro-prototype .cro-rail-swatch[data-value="none"] {background:linear-gradient(135deg,transparent 45%,#dc2626 46% 54%,transparent 55%),#fff}
#cro-prototype .cro-rail-swatch-letter {position:absolute;right:1px;bottom:0;font-size:9px;line-height:11px;background:var(--cro-panel);color:var(--cro-ink);padding:0 1px;pointer-events:none}
#cro-prototype .cro-rail-colour-panel {display:grid;gap:10px;padding:12px}
#cro-prototype .cro-rail-colour-panel[hidden] {display:none}
#cro-prototype .cro-rail-colour-panel p {margin:0;font-size:12px}
#cro-prototype .cro-rail-presets {display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
#cro-prototype .cro-rail .cro-rail-presets button {width:30px;height:30px;min-height:30px;padding:0;border:1px solid #8888;border-radius:5px;background:var(--swatch)}
#cro-prototype .cro-rail .cro-rail-colour-panel [data-act="no-fill"],#cro-prototype .cro-rail .cro-rail-colour-panel [data-act="no-stroke"] {width:auto;height:auto;padding:6px 10px;border:1px solid var(--cro-line)}
#cro-prototype .cro-edit-controls {overflow:visible;min-width:0}
#cro-prototype .cro-edit-controls> * {flex:none}
#cro-prototype .cro-control>button {height:34px;min-height:34px;padding:4px 7px;gap:5px}
#cro-prototype .cro-control-label {font-size:11px}
#cro-prototype .cro-control-value {font-size:12px;max-width:160px}
#cro-prototype .cro-copy-mode {display:flex;gap:2px;white-space:nowrap}
#cro-prototype .cro-copy-mode button {font-size:12px;height:34px;min-height:34px;padding:4px 7px}
#cro-prototype .cro-selection-swatch {width:14px;height:14px;flex:none;border:1px solid var(--cro-line);border-radius:3px}
#cro-prototype .cro-mini-drawer {display:flex;flex-direction:column;align-items:stretch;gap:10px}
#cro-prototype .cro-mini-drawer>.cro-control>button {width:100%;justify-content:space-between}
#cro-prototype .cro-mini-drawer .cro-context,#cro-prototype .cro-mini-drawer .cro-group-trail {height:auto;min-height:0;display:flex;flex-wrap:wrap;gap:6px;padding:0;border:0}
#cro-prototype .cro-mini-drawer .cro-scope-hint {flex-basis:100%;white-space:normal}
#cro-prototype .cro-mini-drawer .cro-order-buttons {display:flex;flex-wrap:wrap;gap:4px}
#cro-prototype .cro-mini-drawer .cro-order-buttons::before {content:attr(aria-label);flex-basis:100%;font-size:11px;color:var(--cro-muted)}
#cro-prototype .cro-mini-drawer .cro-paintbar {padding:0;border:0}
#cro-prototype .cro-mini-drawer .cro-context-label {width:auto}
#cro-prototype .cro-settings-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#cro-prototype .cro-settings-grid .cro-field {margin:0;min-width:0}
#cro-prototype .cro-settings-grid input,#cro-prototype .cro-settings-grid select {width:100%;min-width:0}
#cro-prototype .cro-settings-grid .cro-field:has(select) {grid-column:1 / -1}
#cro-prototype .cro-settings-grid>button {grid-column:1 / -1;width:100%;min-width:0;white-space:normal}
#cro-prototype .cro-settings-grid>p {grid-column:1 / -1;margin:0}
#cro-prototype .cro-proportion-lock {display:flex;align-items:center;gap:6px;margin:10px 0 14px;font-size:12px}
#cro-prototype .cro-proportion-lock input {width:auto}
#cro-prototype .cro-proportion-lock svg {width:16px;height:16px;flex:none}
#cro-prototype .cro-proportion-lock[data-locked="false"] svg {opacity:.4}
#cro-prototype .cro-transform-nudge {border-top:1px solid var(--cro-line);padding-top:12px;margin-top:12px}
#cro-prototype .cro-transform-nudge .cro-field {margin-bottom:8px}
#cro-prototype .cro-range-labels {display:flex;justify-content:space-between;font-size:11px;color:var(--cro-muted);margin:2px 0 12px}
#cro-prototype .cro-objects-drawer {padding:12px}
#cro-prototype .cro-objects-heading {display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:10px}
#cro-prototype .cro-object-scope {margin-left:auto;font-size:11px;color:var(--cro-muted)}
#cro-prototype .cro-objects-heading .cro-icon {width:30px;height:30px;min-height:30px;padding:5px;flex:none}
#cro-prototype .cro-objects-drawer>input {width:100%;margin-bottom:8px}
#cro-prototype .cro-object-row {display:flex;align-items:center;gap:2px;min-height:38px;padding-left:calc(var(--object-depth)*8px);border-bottom:1px solid var(--cro-line)}
#cro-prototype .cro-object-row button {padding:4px;min-height:30px;height:30px;width:26px;flex:none}
#cro-prototype .cro-object-row button svg {width:16px;height:16px}
#cro-prototype .cro-object-row .cro-object-select {display:flex;align-items:center;gap:5px;width:auto;min-width:0;flex:1;text-align:left}
#cro-prototype .cro-object-name {font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cro-prototype .cro-object-thumbnail {display:flex;align-items:center;justify-content:center;width:22px;height:24px;flex:none;font-weight:600}
#cro-prototype .cro-object-thumbnail svg {width:22px!important;height:24px!important}
#cro-prototype .cro-object-row .cro-object-expand {width:18px}
#cro-prototype .cro-object-select[aria-pressed='true'] {background:var(--cro-accent-soft);box-shadow:inset 2px 0 var(--cro-accent)}
#cro-prototype .cro-object-pager {display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px;font-size:12px}
#cro-prototype .cro-object-pager button {min-height:28px;padding:4px;width:28px}
#cro-prototype .cro-object-pager svg {width:16px;height:16px}
#cro-prototype .cro-object-rename {display:flex;align-items:center;gap:5px;margin-top:12px}
#cro-prototype .cro-object-rename input {min-width:0;width:100%}
#cro-prototype .cro-object-rename button {font-size:11px;padding:5px;white-space:nowrap}
#cro-prototype .cro-visually-hidden {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#cro-prototype .cro-rail [data-control='objects']>svg {width:20px;height:20px}
#cro-prototype .cro-canvas-tools {height:44px;min-height:44px;flex:none;flex-wrap:nowrap;padding:4px 8px;overflow:visible}
#cro-prototype .cro-canvas-tools>span:first-child {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cro-prototype .cro-canvas-tools .cro-control {flex:none}
#cro-prototype .cro-page-wrap {margin:auto}
@container cro (max-width:1240px) {
 #cro-prototype .cro-header-start .cro-workspaces button span {display:none}
}
@container cro (max-width:700px) {
 #cro-prototype .cro-brand span,#cro-prototype .cro-workspaces button span,#cro-prototype .cro-global button span {display:none}
 #cro-prototype .cro-header .cro-workspaces,#cro-prototype .cro-header .cro-global {gap:1px}
 #cro-prototype .cro-workspaces button,#cro-prototype .cro-global button {width:32px}
 #cro-prototype .cro-docbar .cro-output {font-size:0;width:34px;margin:0}
 #cro-prototype .cro-docbar .cro-icon {width:30px}
 #cro-prototype .cro-canvas-tools {gap:3px;padding:4px}
 #cro-prototype .cro-canvas-tools .cro-control-label {display:none}
 #cro-prototype .cro-canvas-tools .cro-long-status {display:none}
}
@container cro (max-width:820px) {
 #cro-prototype .cro-header:has(.cro-title-wrap) {height:80px;min-height:80px;max-height:80px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:34px 34px;gap:2px 5px}
 #cro-prototype .cro-header:has(.cro-title-wrap) .cro-global {grid-column:2;grid-row:1}
 #cro-prototype .cro-header .cro-title-wrap {grid-column:1 / -1;grid-row:2;max-width:290px;justify-self:center}
}

/* Help never changes the fixed toolbar rows. Explicit help is a separate overlay. */
#cro-prototype .cro-toolbar-tooltip{max-width:min(260px,calc(100vw - 16px));padding:6px 9px;font-size:12px}
#cro-prototype .cro-help-trigger{width:28px;min-width:28px;height:28px;min-height:28px;padding:0;border-radius:50%;font-weight:700;margin:4px 0 0 auto;display:block}
#cro-prototype [data-help-note][hidden]{display:none!important}
#cro-prototype .cro-control-help{position:fixed;z-index:55;width:min(320px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box;padding:14px;border:1px solid var(--cro-line);border-radius:9px;background:var(--cro-panel);color:var(--cro-ink);box-shadow:var(--cro-shadow);font-size:13px;line-height:1.5}
#cro-prototype .cro-control-help>button{float:right;width:28px;min-height:28px;padding:0;margin:-4px -4px 4px 8px}
#cro-prototype .cro-control-help p{margin:10px 0 0}

/* Familiar None swatch and weight samples, scoped to rail paint controls. */
#cro-prototype .cro-rail-colour-panel .cro-none-icon{display:inline-block;flex:0 0 18px;width:18px;height:18px;border:1px solid currentColor;background:linear-gradient(135deg,transparent 44%,#dc2626 45%,#dc2626 55%,transparent 56%);vertical-align:middle;margin-right:6px}
.cro-width-presets{display:flex;gap:4px}.cro-width-presets button{flex:1;min-width:0;padding:8px 4px}.cro-width-presets span{display:block;background:currentColor;width:100%}
.cro-rail-colour-panel input[type=range]{width:100%}

/* Screen-sized slots keep changing summaries from moving neighbouring controls.
   These classes belong only to toolbar sections, never colour or canvas buttons. */
#cro-prototype .cro-toolbar-section {width:clamp(130px,15vw,170px);min-width:0}
#cro-prototype .cro-toolbar-section>button {width:100%;min-width:0;box-sizing:border-box;white-space:nowrap}
#cro-prototype .cro-toolbar-section .cro-control-label,#cro-prototype .cro-toolbar-section>button svg {flex:none}
#cro-prototype .cro-toolbar-section .cro-control-value {flex:1;min-width:0;max-width:none;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#cro-prototype .cro-mini-drawer>.cro-toolbar-section {width:100%}

/* Selection properties have one mounted field set, independent of toolbar overflow. */
#cro-prototype .cro-properties {padding:0;min-height:0;overflow:auto;overscroll-behavior:contain}
#cro-prototype .cro-properties .cro-inspector-header {height:44px;min-height:44px;padding:6px 12px;margin:0;border-bottom:1px solid var(--cro-line)}
#cro-prototype .cro-properties-selection {height:164px;min-height:164px;flex:none;display:flex;flex-direction:column;gap:3px;padding:10px 12px;overflow:hidden}
#cro-prototype .cro-properties-selection:has([data-properties-scope][hidden]) {height:90px;min-height:90px}
#cro-prototype .cro-properties-selection>strong {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;font-weight:600}
#cro-prototype .cro-properties-selection>.cro-muted {font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cro-prototype .cro-properties-location {display:flex;align-items:center;gap:4px;min-height:28px}
#cro-prototype .cro-properties-location>[data-properties-command="group-location"] {flex:1;min-width:0;width:auto;display:block;padding:0 3px;text-align:left;color:var(--cro-muted);background:transparent;border-color:transparent;font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#cro-prototype .cro-properties-location button {padding:4px;min-height:28px;width:28px;height:28px}
#cro-prototype .cro-properties-location button span {display:none}
#cro-prototype .cro-properties-location svg,#cro-prototype .cro-properties-actions svg {width:16px;height:16px;flex:none}
#cro-prototype .cro-properties-actions {display:grid;grid-template-columns:1fr 1fr;gap:4px;min-height:34px}
#cro-prototype .cro-properties-actions button {min-width:0;height:34px;min-height:34px;padding:4px;font-size:11px;gap:4px;white-space:nowrap}
#cro-prototype .cro-properties-selection [data-properties-scope] {margin-top:auto;min-height:34px}
#cro-prototype .cro-properties .cro-copy-mode {display:grid;grid-template-columns:1fr 1fr 34px;gap:4px}
#cro-prototype .cro-properties .cro-copy-mode [data-act="reset-copies"] {padding:5px;min-height:34px;height:34px}
#cro-prototype .cro-properties-section {border-top:1px solid var(--cro-line);flex:none}
#cro-prototype .cro-properties-section>summary {padding:10px 12px;min-height:40px;font-size:13px;font-weight:600}
#cro-prototype .cro-properties-section>summary .cro-muted {float:right;font-weight:400;max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cro-prototype .cro-properties-body {padding:0 12px 12px}
#cro-prototype .cro-properties .cro-field {margin:0}
#cro-prototype .cro-properties .cro-field>span {margin-bottom:4px}
#cro-prototype .cro-properties .cro-text-fields {display:grid;gap:8px}
#cro-prototype .cro-properties .cro-settings-grid {gap:8px;margin-bottom:10px}
#cro-prototype .cro-properties .cro-settings-grid input {padding:6px;min-height:32px;font-size:13px;font-variant-numeric:tabular-nums}
#cro-prototype .cro-properties .cro-settings-grid>.cro-field:has([data-transform-value="angle"]) {grid-column:1 / -1;max-width:50%;padding-right:4px}
#cro-prototype .cro-properties-colour {display:grid;grid-template-columns:96px minmax(0,1fr) 32px;gap:5px;align-items:center;margin-bottom:8px}
#cro-prototype .cro-properties-colour>label {display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px}
#cro-prototype .cro-properties-colour input[type="color"] {width:38px;height:32px;padding:3px;min-width:0}
#cro-prototype .cro-properties-colour input[type="text"] {width:100%;min-width:0;padding:6px;font-size:12px}
#cro-prototype .cro-properties-colour button {height:32px;min-height:32px;padding:5px}
#cro-prototype .cro-properties .cro-none-icon {display:inline-block;width:18px;height:18px;border:1px solid currentColor;background:linear-gradient(135deg,transparent 44%,#dc2626 45%,#dc2626 55%,transparent 56%)}
#cro-prototype .cro-properties-colour input[data-colour-state="mixed"]::-webkit-color-swatch,#cro-prototype .cro-properties-colour input[data-colour-state="none"]::-webkit-color-swatch {opacity:0}
#cro-prototype .cro-properties-colour input[data-colour-state="mixed"]::-moz-color-swatch,#cro-prototype .cro-properties-colour input[data-colour-state="none"]::-moz-color-swatch {opacity:0}
#cro-prototype .cro-properties-extra>summary {font-size:12px;padding:6px 0}
#cro-prototype .cro-properties-extra .cro-field {margin-bottom:8px}
#cro-prototype .cro-properties-body p[role="status"] {margin:4px 0;font-size:12px}
#cro-prototype .cro-properties-body p[role="status"]:empty {display:none}
#cro-prototype .cro-properties .cro-proportion-lock {margin:10px 0;font-size:12px}
#cro-prototype .cro-properties .cro-help-trigger {margin:6px 0 0}
#cro-prototype .cro-edit-controls>.cro-props-trigger {flex:none;min-width:104px;font-size:12px;gap:5px}
#cro-prototype .cro-edit-controls>.cro-toolbar-section:has(>[data-icon-control]) {width:56px}
#cro-prototype .cro-toolbar-section>button>svg:first-child:not([data-lucide="chevron-down"]) {width:18px;height:18px}
#cro-prototype .cro-edit-controls>.cro-toolbar-section>[data-icon-control] .cro-control-label,#cro-prototype .cro-edit-controls>.cro-toolbar-section>[data-icon-control] .cro-control-value {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@container cro (min-width:900px) {
 #cro-prototype .cro-editor:has(>.cro-properties) {grid-template-columns:54px minmax(0,1fr) 280px}
 #cro-prototype .cro-editor>.cro-properties {display:block;position:static;width:auto;max-height:none;border-radius:0;box-shadow:none}
 #cro-prototype .cro-properties .cro-close-props,#cro-prototype .cro-edit-controls>.cro-props-trigger {display:none}
}
@container cro (max-width:899px) {
 #cro-prototype .cro-editor>.cro-properties {display:none;position:absolute;left:54px;right:0;top:auto;bottom:44px;width:auto;max-height:calc(100% - 88px);border:1px solid var(--cro-line);border-radius:10px 10px 0 0;z-index:3;box-shadow:0 -8px 22px #0002}
 #cro-prototype .cro-editor.cro-props-open>.cro-properties {display:block}
 #cro-prototype .cro-properties .cro-close-props,#cro-prototype .cro-edit-controls>.cro-props-trigger {display:inline-flex}
 #cro-prototype .cro-properties input:not([type="checkbox"]),#cro-prototype .cro-properties select {font-size:16px}
}
#cro-prototype .cro-replace-section {width:130px}
#cro-prototype .cro-editor:has([data-act="cancel-placement"]) .cro-drawing, #cro-prototype .cro-editor:has([data-act="cancel-placement"]) .cro-drawing [data-group] {cursor:crosshair !important}

#cro-prototype .cro-grid-manager{display:grid;grid-template-columns:minmax(200px,1fr) minmax(0,1.5fr);gap:18px}
#cro-prototype .cro-grid-list-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
#cro-prototype .cro-grid-manager h3{font-size:15px;margin:0 0 10px}
#cro-prototype .cro-grid-list .cro-field{margin-bottom:8px}
#cro-prototype .cro-grid-row{display:flex;align-items:center;gap:3px;border-bottom:1px solid var(--cro-line);padding:4px 0}
#cro-prototype .cro-grid-row>button:first-child{flex:1;min-width:0;display:block;text-align:left;padding:5px}
#cro-prototype .cro-grid-row strong,#cro-prototype .cro-grid-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#cro-prototype .cro-grid-row small{font-size:10px;color:var(--cro-muted)}
#cro-prototype .cro-grid-row>button:not(:first-child){width:28px;min-height:30px;padding:4px;flex:none}
#cro-prototype .cro-grid-row svg{width:16px;height:16px}
#cro-prototype .cro-grid-pages{display:flex;justify-content:space-between;align-items:center;gap:5px;margin:8px 0;font-size:11px}
#cro-prototype .cro-grid-pages button{padding:4px 6px;min-height:30px}
#cro-prototype .cro-grid-list [data-guide-preview]{max-width:140px;margin:auto}
#cro-prototype .cro-grid-tabs{display:flex;gap:4px;margin-bottom:12px}
#cro-prototype .cro-grid-tabs button{font-size:12px;padding:5px 7px;flex:1}
#cro-prototype .cro-grid-tabs [aria-selected=true]{background:var(--cro-active);color:var(--cro-on-active)}
#cro-prototype .cro-grid-types{display:grid;gap:5px;border:1px solid var(--cro-line);border-radius:6px;margin:0 0 10px;padding:8px}
#cro-prototype .cro-grid-types legend{font-size:12px;color:var(--cro-muted)}
#cro-prototype .cro-grid-types button{justify-content:flex-start;text-align:left}
#cro-prototype .cro-grid-detail>button{margin:0 5px 5px 0;font-size:12px}
#cro-prototype .cro-grid-detail{min-width:0}
@media(max-width:620px),(max-height:660px){#cro-prototype .cro-grid-list [data-guide-preview]{display:none}}
@media(max-width:620px){#cro-prototype .cro-grid-manager{grid-template-columns:1fr;gap:12px}#cro-prototype .cro-grid-row{padding:1px 0}#cro-prototype .cro-grid-list-heading h3{margin:0}#cro-prototype .cro-grid-list-heading{margin-bottom:8px}}

#cro-prototype .cro-grid-back{display:none}
@media(max-width:620px){#cro-prototype .cro-grid-back{display:flex;margin-bottom:8px}#cro-prototype [data-grid-screen=list] .cro-grid-detail,#cro-prototype [data-grid-screen=detail] .cro-grid-list{display:none}}

#cro-prototype .cro-grids-dialog .cro-dialog-head h2{display:flex;align-items:center;gap:8px}
#cro-prototype .cro-grids-dialog .cro-dialog-head .cro-help-trigger{margin:0}

#cro-prototype .cro-context-menu{width:260px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;padding:8px;}
#cro-prototype .cro-context-menu strong{display:block;padding:6px 8px;font-size:12px;}
#cro-prototype .cro-context-menu [role=menu]{display:grid;gap:2px;}
#cro-prototype .cro-context-menu button{width:100%;display:flex;align-items:center;justify-content:flex-start;gap:8px;text-align:left;min-height:32px;padding:6px 8px;}
#cro-prototype .cro-context-menu button span{flex:1;}
#cro-prototype .cro-menu-shortcut{font-family:inherit;font-size:11px;color:var(--cro-muted);white-space:nowrap;margin-left:auto;}
#cro-prototype [data-control-panel="file-menu"] button{justify-content:flex-start;text-align:left;}
#cro-prototype [data-control-panel="file-menu"] button:not(:has(svg))::before{content:"";width:18px;flex-shrink:0;}
#cro-prototype .cro-context-menu hr{width:100%;border:0;border-top:1px solid var(--cro-line);margin:4px 0;}

#cro-prototype .cro-align-buttons{display:grid;grid-template-columns:1fr 1fr;gap:4px}
#cro-prototype .cro-align-buttons button{white-space:normal;text-align:left;justify-content:flex-start}

#cro-prototype .cro-dialog:has([data-my-objects]){max-width:760px;max-height:calc(100dvh - 100px);overflow:auto}
#cro-prototype .cro-dialog:has([data-object-restore]){max-height:calc(100dvh - 100px);overflow:auto}
#cro-prototype [data-object-restore-list]{max-height:240px;overflow:auto;overflow-wrap:anywhere}
#cro-prototype .cro-my-objects-browser{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:14px}
#cro-prototype .cro-my-objects-list{max-height:260px;overflow:auto;margin-top:8px}
#cro-prototype .cro-my-object-row{display:flex;gap:4px;margin-bottom:6px}
#cro-prototype .cro-my-object-row button[data-object-preview-index]{flex:1;min-width:0;justify-content:flex-start;text-align:left;white-space:normal}
#cro-prototype .cro-my-object-row button[data-object-preview-index] span{min-width:0;overflow-wrap:anywhere}
#cro-prototype .cro-my-object-location{display:block;color:var(--cro-muted);font-size:11px;margin-top:3px;overflow-wrap:anywhere}
#cro-prototype .cro-my-object-folder-actions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
#cro-prototype .cro-my-object-folder-actions button{font-size:12px;min-height:32px}
#cro-prototype .cro-my-object-folders select{max-width:100%;min-width:0}
#cro-prototype .cro-dialog:has([data-folder-manage],[data-object-title]){max-height:calc(100dvh - 100px);overflow:auto}
#cro-prototype .cro-my-object-row button[aria-pressed="true"]{background:var(--cro-accent-soft);color:var(--cro-ink);border-color:var(--cro-accent)}
#cro-prototype .cro-my-objects-detail{min-width:0;overflow-wrap:anywhere}
#cro-prototype .cro-my-objects-preview{height:230px;margin-top:8px;border:1px solid var(--cro-line);border-radius:6px;overflow:hidden;background:var(--cro-bg)}
#cro-prototype .cro-my-objects-preview svg{display:block;width:100%;height:100%}
@media(max-width:600px){#cro-prototype .cro-my-objects-browser{grid-template-columns:minmax(0,1fr)}#cro-prototype .cro-my-objects-detail{grid-row:1}#cro-prototype .cro-my-objects-preview{height:180px}#cro-prototype .cro-my-objects-list{max-height:180px}}
