:root{font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#1c2637;background:#f2f4f7;font-synthesis:none;--ink:#1c2637;--navy:#152039;--accent:#f26b4f;--line:#e7eaf0;--soft:#f7f8fb;--muted:#7b879a}
*{box-sizing:border-box}
body{margin:0;min-height:100vh}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.45}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #f7a496;outline-offset:2px}
.hidden{display:none!important}
.topbar{height:76px;padding:0 30px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:18px;box-shadow:0 3px 14px #1821351a}
.brand{display:flex;align-items:center;gap:13px;min-width:0}
.brand-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#ff9e7e,#f26149);font-size:25px;font-weight:700;box-shadow:0 5px 15px #eb5e4b55}
.brand strong{display:block;font-size:17px;letter-spacing:.04em;white-space:nowrap}
.brand small{display:block;color:#b9c3d2;font-size:11px;margin-top:2px;white-space:nowrap}
.top-actions{display:flex;align-items:center;gap:10px}
.privacy-tag{font-size:12px;color:#b9c3d2;margin-right:8px;white-space:nowrap}
.btn{border:1px solid var(--line);border-radius:11px;padding:10px 15px;line-height:1.1;font-size:13px;font-weight:700;background:#fff;color:var(--ink);white-space:nowrap;transition:transform .15s,border-color .15s,background .15s}
.btn:not(:disabled):hover{transform:translateY(-1px);border-color:#bdc6d5}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 4px 11px #f26b4f30}
.btn.primary:not(:disabled):hover{background:#e75e43}
.topbar .btn.ghost{background:#263451;border-color:#3b4c6b;color:#fff}
.license-bar{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:7px 30px;background:#fff5f1;border-bottom:1px solid #f3d7cf;color:#8a473b;font-size:11px}
.license-bar button{border:0;background:none;color:#9b4e3f;font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}
.license-bar a{color:#9b4e3f;font-weight:700;white-space:nowrap;text-decoration:none}
.full{width:100%}
.layout{display:grid;grid-template-columns:minmax(270px,314px) minmax(420px,1fr) minmax(285px,326px);align-items:start;gap:16px;padding:18px;max-width:1840px;margin:0 auto}
.panel,.workspace{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 5px 20px #1c26370a;min-width:0}
.panel{overflow:hidden}
.panel-title{padding:24px 23px 20px;border-bottom:1px solid var(--line)}
.eyebrow{font-size:10px;color:#e4745a;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.panel-title h2,.workspace-head h1{margin:7px 0 5px;font-size:21px;letter-spacing:-.025em;line-height:1.25}
.panel-title p{font-size:12px;color:var(--muted);line-height:1.6;margin:0}
.section{padding:20px 23px;border-bottom:1px solid var(--line)}
.section:last-child{border-bottom:0}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}
.section-head h3{font-size:14px;margin:0;color:#243148}
.section-head>span,.section-note{font-size:11px;color:var(--muted)}
.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.two-fields label,.select-label{font-size:11px;color:#657388;font-weight:700;display:block}
.two-fields input,.select-label select,.search{width:100%;margin-top:7px;padding:10px 11px;border:1px solid #dce1e9;border-radius:9px;background:#fff;color:var(--ink);font-size:13px;min-width:0}
.two-fields input{font-weight:700;font-variant-numeric:tabular-nums}
.preset-row{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}
.size-preset-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.size-preset-row .chip{justify-content:center;min-width:0}
.chip{display:inline-flex;align-items:center;gap:5px;font-size:11px;border:1px solid #dce2e9;background:#fff;color:#627086;border-radius:8px;padding:7px 9px}
.chip.active{background:#fff1ed;border-color:#f2a494;color:#c95d48;font-weight:800}
.preset-badge{display:inline-block;padding:2px 4px;border-radius:4px;background:#fff0e8;color:#d15c3f;font-size:9px;font-weight:800;line-height:1}
.small-cartoon-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-3px 0 11px;padding:9px 11px;border:1px solid #dce2e9;border-radius:9px;background:#fff;color:#627086;text-align:left}
.small-cartoon-copy{display:flex;align-items:center;gap:7px;min-width:0}
.small-cartoon-toggle strong{font-size:12px;color:#314057}
.small-cartoon-toggle small{color:#8a95a5;font-size:9px;white-space:nowrap}
.toggle-track{position:relative;flex:0 0 auto;width:34px;height:20px;border-radius:999px;background:#c7cdd6;transition:background .18s ease}
.toggle-thumb{position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .18s ease}
.small-cartoon-toggle.active .toggle-track{background:#35ad63}
.small-cartoon-toggle.active .toggle-thumb{transform:translateX(14px)}
.small-cartoon-toggle:disabled{opacity:.45;cursor:not-allowed}
.range-label{display:flex;justify-content:space-between;font-size:12px;color:#56657b;margin-bottom:10px}
.range-label b{color:var(--ink)}
.count-input{display:inline-flex;align-items:center;gap:4px;color:#56657b}
.count-input input{width:58px;height:28px;padding:3px 5px;border:1px solid #dce1e9;border-radius:7px;text-align:center;color:var(--ink);font-size:12px;font-weight:800}
input[type=range]{width:100%;accent-color:var(--accent);margin:0;height:20px}
.range-end{display:flex;justify-content:space-between;color:#9aa4b2;font-size:10px;margin:2px 0 16px}
.select-label{margin:10px 0 15px}
.select-label small{display:block;font-weight:400;color:#9aa4b2;font-size:10px;margin-top:4px;line-height:1.4}
.check-row{display:flex;align-items:flex-start;gap:9px;margin:11px 0;cursor:pointer;font-size:12px;font-weight:700}
.check-row input{accent-color:var(--accent);margin-top:2px}
.check-row small{display:block;font-weight:400;color:#9aa4b2;font-size:10px;margin-top:3px;line-height:1.4}
.section .btn.primary.full{margin-top:17px}
.help{color:#98a2b1;font-size:10.5px;line-height:1.55;margin:8px 0 0}
.toggle-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px}
.switch-row{font-size:11px;color:#607086;display:flex;align-items:center;gap:5px}
.switch-row input{accent-color:var(--accent)}
.workspace{overflow:hidden}
.workspace-head{min-height:88px;display:flex;align-items:center;justify-content:space-between;padding:20px 24px;gap:10px}
.workspace-head h1{font-size:19px;margin-bottom:0}
.workspace-actions{display:flex;gap:8px}
.workspace-actions .btn{padding:9px 11px;font-size:11px}
.summary-bar{display:flex;align-items:center;gap:28px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:11px 24px;color:#8691a1;font-size:11px;overflow-x:auto;white-space:nowrap}
.summary-bar b{color:#253249;font-size:12px;margin-left:5px}
.canvas-shell{min-height:580px;height:min(68vh,820px);background:#fff;position:relative}
.empty-state{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px}
.empty-illustration{display:grid;grid-template-columns:repeat(3,21px);gap:5px;transform:rotate(-10deg);margin-bottom:26px}
.empty-illustration span{display:block;width:21px;height:21px;border-radius:6px;background:#f1a392;box-shadow:inset 0 0 0 5px #fffbf9,0 2px 5px #f26b4f24}
.empty-illustration span:nth-child(2),.empty-illustration span:nth-child(4),.empty-illustration span:nth-child(9){background:#f5bd72}
.empty-illustration span:nth-child(3),.empty-illustration span:nth-child(6){background:#667aa8}
.empty-illustration span:nth-child(5){background:#db6d87}
.empty-illustration span:nth-child(7){background:#9bbda7}
.empty-state h2{font-size:22px;margin:0 0 9px}
.empty-state p{max-width:370px;color:#8490a1;font-size:12px;line-height:1.75;margin:0}
.empty-actions{display:flex;gap:8px;margin-top:23px}
.canvas-scroller{width:100%;height:100%;overflow:hidden;position:relative;touch-action:auto}
.reference-mode-bar[hidden]{display:none!important}
.reference-mode-bar{position:absolute;left:50%;top:10px;z-index:12;display:flex;align-items:center;gap:3px;max-width:calc(100% - 24px);padding:4px;border:1px solid #d4deeb;border-radius:11px;background:#fffffff2;box-shadow:0 5px 18px #17243b22;transform:translateX(-50%);backdrop-filter:blur(7px)}
.reference-mode-bar button{min-height:31px;padding:5px 9px;border:0;border-radius:7px;background:transparent;color:#536177;font-size:10px;font-weight:700;white-space:nowrap;cursor:pointer}
.reference-mode-bar button[aria-pressed="true"]{background:#18834a;color:#fff}
.reference-mode-bar .reference-mode-close{min-width:29px;padding:4px;color:#7b8799;font-size:17px;line-height:1}
.reference-opacity{display:flex;align-items:center;gap:6px;padding:0 6px;color:#667489;font-size:9px;font-weight:700;white-space:nowrap}
.reference-opacity input{width:86px;accent-color:#18834a}
.reference-opacity span{min-width:28px;color:#27364d;text-align:right}
.reference-panel[hidden],.reference-divider[hidden]{display:none!important}
.reference-toggle.active{background:#e8f7ee!important;border-color:#79c994!important;color:#187f49!important}
.reference-panel{position:absolute;left:0;top:0;bottom:0;width:var(--reference-width,38%);z-index:6;display:flex;flex-direction:column;overflow:hidden;background:#f8fafc;border-right:1px solid #dce4ee}
.reference-head{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px 7px 12px;border-bottom:1px solid #dfe6ef;background:#fff;flex:none;user-select:none}
.reference-head strong{font-size:12px;color:#223047;white-space:nowrap}
.reference-head>div{display:flex;align-items:center;gap:4px}
.reference-head button,.reference-controls button{border:1px solid #dbe3ed;border-radius:7px;background:#fff;color:#526178;font-size:10px;font-weight:700;cursor:pointer}
.reference-head button{min-height:27px;padding:4px 7px;white-space:nowrap}
.reference-head button[aria-pressed="true"]{border-color:#91d4aa;background:#e8f7ee;color:#187f49}
#referenceCloseBtn{width:27px;padding:0;font-size:17px;line-height:1}
.reference-stage{position:relative;flex:1;min-height:0;overflow:hidden;background-color:#f2f5f8;background-image:linear-gradient(45deg,#e8edf3 25%,transparent 25%),linear-gradient(-45deg,#e8edf3 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e8edf3 75%),linear-gradient(-45deg,transparent 75%,#e8edf3 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0;touch-action:none;cursor:grab}
.reference-stage.dragging{cursor:grabbing}
#referenceCanvas{position:absolute;left:50%;top:50%;display:block;transform:translate(-50%,-50%);background:#fff;box-shadow:0 3px 18px #17243b24;image-rendering:auto;pointer-events:none}
.reference-controls{height:42px;display:flex;align-items:center;justify-content:center;gap:5px;padding:6px;border-top:1px solid #dfe6ef;background:#fff;flex:none}
.reference-controls button{height:27px;min-width:29px;padding:3px 8px}
.reference-controls span{min-width:43px;text-align:center;color:#5b687b;font-size:10px;font-weight:700}
.reference-divider{position:absolute;left:var(--reference-width,38%);top:0;bottom:0;width:9px;z-index:7;transform:translateX(-4px);cursor:col-resize;touch-action:none}
.reference-divider::after{content:"";position:absolute;left:3px;top:45%;width:3px;height:42px;border-radius:3px;background:#a9b8cb;box-shadow:0 0 0 1px #fff}
.canvas-shell.reference-active .canvas-scroller{position:absolute;left:calc(var(--reference-width,38%) + 5px);top:0;width:calc(100% - var(--reference-width,38%) - 5px);height:100%}
.reference-resize{display:none}
.canvas-scroller.pan-mode{touch-action:none;cursor:grab}
.canvas-scroller.pan-mode.dragging{cursor:grabbing}
#referenceOverlayCanvas[hidden]{display:none!important}
#referenceOverlayCanvas,#patternCanvas{display:block;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid #d7dce5}
#referenceOverlayCanvas{z-index:0;pointer-events:none;background:#fff;image-rendering:auto}
#patternCanvas{z-index:1;image-rendering:pixelated;background:#fff;touch-action:none}
.canvas-shell.reference-overlay #patternCanvas{background:transparent}
.canvas-scroller.touch-page-scroll,.canvas-scroller.touch-page-scroll #patternCanvas{touch-action:pan-y}
.touch-mode-switch{display:none;position:absolute;top:12px;right:12px;z-index:5;gap:3px;padding:3px;border:1px solid #d5e0ef;border-radius:10px;background:#fffffff2;box-shadow:0 3px 12px #18253b1c}
.touch-mode-switch button{min-height:42px;padding:7px 11px;border:0;border-radius:7px;background:transparent;color:#34435a;font-size:11px;font-weight:700;white-space:nowrap;cursor:pointer}
.touch-mode-switch button[aria-pressed="true"]{background:#18834a;color:#fff}
@media(max-width:790px),(any-pointer:coarse){.touch-mode-switch:not([hidden]){display:flex}}
@media(max-width:790px),(any-pointer:coarse){.reference-mode-bar{left:10px;right:10px;max-width:none;transform:none;justify-content:center}.reference-opacity input{width:64px}}
.detail-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;image-rendering:pixelated}
.cell-hover{position:absolute;z-index:4;pointer-events:none;display:flex;align-items:center;gap:6px;padding:5px 8px;border-radius:6px;background:#111827e8;color:#fff;font-size:11px;font-weight:700;line-height:1;box-shadow:0 4px 14px #11182733;white-space:nowrap}
.cell-hover .dot{width:11px;height:11px;border:1px solid #ffffff8c;box-shadow:none;flex:0 0 auto}
.cell-info{position:absolute;right:14px;bottom:13px;z-index:2;padding:8px 11px;border:1px solid #dbe2ed;border-radius:9px;background:#fffffff0;box-shadow:0 3px 13px #17243b18;color:#46566d;font-size:11px;font-weight:700;pointer-events:none;max-width:calc(100% - 28px)}
.cell-info .dot{display:inline-block;width:12px;height:12px;border:1px solid #0002;border-radius:3px;vertical-align:-2px;margin-right:5px}
.canvas-footer{display:flex;justify-content:space-between;align-items:center;padding:11px 17px;gap:10px;min-height:50px;color:#9aa4b2;font-size:10px}
.canvas-footer #statusText{margin-left:auto}
.code-view-btn{background:#fff3ef;border-color:#f1b1a4;color:#b9503d;padding:7px 10px;font-size:11px}
.code-view-btn.active{background:#df634d;border-color:#df634d;color:#fff}
.zoom-group{display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;overflow:hidden;white-space:nowrap;color:#5e6c81}
.zoom-group button{border:0;background:#fff;color:#4c5d76;min-width:31px;height:28px;font-size:15px}
.zoom-group button:hover{background:#f4f5f8}
.zoom-group button:last-child{font-size:10px;padding:0 8px;border-left:1px solid var(--line)}
.zoom-group span{font-size:10px;min-width:42px;text-align:center}
@media(min-width:1221px){
  .layout{align-items:stretch}
  .layout>.settings-panel,.layout>.workspace,.layout>.tools-panel{height:calc(100vh - 95px);height:calc(100dvh - 95px)}
  .settings-panel,.tools-panel{overflow-y:auto}
  .workspace{display:flex;flex-direction:column}
  .workspace-head,.summary-bar,.canvas-footer{flex:none}
  .canvas-shell{flex:1;height:auto;min-height:0}
}
.inline-buttons{display:flex;gap:9px}
.inline-buttons button,.selected-color button{border:0;background:none;color:#6b7b91;font-size:10px;padding:2px}
.inline-buttons button:not(:disabled):hover,.selected-color button:hover{color:var(--accent)}
.tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.tool{display:flex;align-items:center;gap:8px;text-align:left;padding:9px 10px;border:1px solid #e1e6ee;border-radius:9px;background:#fff;color:#607086;font-size:16px}
.tool span{font-size:11px}
.tool.active{background:#fff4f1;border-color:#f19d8e;color:#c85641;font-weight:700}
.tool-help{margin:10px 0 0;padding:9px 10px;border-radius:8px;background:#f5f8fd;color:#586a83;font-size:11px;line-height:1.6}
.selected-color{display:flex;align-items:center;gap:9px;background:#f7f8fa;border:1px solid var(--line);border-radius:9px;padding:8px 9px;margin-bottom:10px}
.selected-color>span{width:26px;height:26px;border-radius:6px;border:1px solid #00000016;flex:none}
.selected-color div{flex:1;min-width:0;line-height:1.1}
.selected-color small{display:block;font-size:9px;color:#95a0ae}
.selected-color strong{font-size:12px}
.search{margin:0 0 10px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2395a1b1' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") no-repeat 10px center;padding-left:33px}
.palette-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;max-height:186px;overflow:auto;padding-right:3px}
.swatch{height:31px;border:1px solid #0000001e;border-radius:6px;padding:0;position:relative;min-width:0}
.swatch span{position:absolute;inset:auto 1px 2px;font-size:8px;line-height:1;text-align:center;font-weight:800;text-shadow:0 1px 2px #fff,0 -1px 2px #fff;color:#172131}
.swatch.active{outline:2px solid #e85f47;outline-offset:1px}
.stats-list{max-height:241px;overflow:auto;display:flex;flex-direction:column;gap:4px}
.stats-row{display:flex;align-items:center;gap:8px;padding:7px 8px;border:1px solid #e9ecf1;border-radius:8px;background:#fff;width:100%;text-align:left;color:#43536b}
.stats-row:hover,.stats-row.active{background:#fff5f2;border-color:#f4c0b4}
.stats-row .dot{width:17px;height:17px;border-radius:4px;border:1px solid #00000015;flex:none}
.stats-row strong{font-size:11px;min-width:34px}
.stats-row .bar{height:5px;background:#f4b2a2;border-radius:3px;max-width:70px;min-width:3px}
.stats-row em{font-style:normal;margin-left:auto;font-size:10px;color:#7e8999;white-space:nowrap}
.muted{color:#9ba5b2;font-size:11px;margin:8px 0}
dialog{border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px #111a2a55;max-width:calc(100vw - 28px);color:var(--ink)}
dialog::backdrop{background:#121a2bb8}
.crop-dialog{width:min(590px,100%)}
.access-dialog{width:min(440px,100%)}
.access-body{padding:20px 24px 4px;color:#5b687b;font-size:13px;line-height:1.7}
.access-body p{margin:0 0 12px}
.access-dialog .btn.primary{display:inline-flex;align-items:center;text-decoration:none}
.dialog-head{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--line);margin:0}
.dialog-head h2{margin:3px 0 0;font-size:19px}
.close-btn{border:0;background:#f2f4f7;border-radius:50%;width:30px;height:30px;font-size:21px;color:#6b7788}
.crop-body{padding:18px 24px 12px}
.crop-body p{font-size:12px;color:#788598;margin:0 0 12px}
.crop-preview-wrap{background:#e8ebf1;max-height:54vh;overflow:auto;display:grid;place-items:center;border-radius:11px;padding:10px}
#cropCanvas{display:block;max-width:100%;cursor:grab;touch-action:none;background:#fff;border:2px solid #f27661}
#cropCanvas:active{cursor:grabbing}
.crop-body .range-label{margin:15px 0 6px}
.crop-options{display:flex;gap:19px;margin-top:11px;font-size:12px;color:#59667a}
.crop-options input{accent-color:var(--accent)}
.dialog-actions{padding:15px 24px 22px;display:flex;justify-content:flex-end;gap:9px}
.preview-dialog{width:min(1120px,100%)}
.preview-body{padding:20px;max-height:78vh;overflow:auto;background:#f5f6f9}
.preview-hint{margin:0 0 16px;color:#657286;font-size:13px}
.preview-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.preview-compare.single{grid-template-columns:minmax(0,1fr);max-width:600px;margin:auto}
.preview-compare>div{min-width:0}
.preview-compare strong{display:block;margin:0 0 9px;color:#243148;font-size:13px}
.preview-compare canvas{display:block;width:100%;height:auto;background:#fff;box-shadow:0 3px 18px #202b3a1c}
.variant-dialog{width:min(1240px,calc(100vw - 24px));max-height:min(92vh,900px)}
.variant-dialog[open]{display:flex;flex-direction:column}
.variant-dialog .dialog-head{flex:none}
.variant-dialog .dialog-head p{margin:6px 0 0;color:#7c899b;font-size:11px}
.variant-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:18px 20px;overflow:auto;background:#f5f7fa}
.variant-card{position:relative;min-width:0;display:flex;flex-direction:column;padding:14px;border:1px solid #dce4ef;border-radius:13px;background:#fff}
.variant-card.recommended{border-color:#ed9a88;box-shadow:0 0 0 2px #f16f5320}
.variant-recommended{position:absolute;right:13px;top:-1px;padding:4px 9px;border-radius:0 0 7px 7px;background:#e86f55;color:#fff;font-size:9px;font-weight:800}
.variant-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:11px;padding-right:2px}
.variant-card-head strong{display:block;color:#223149;font-size:14px}
.variant-card-head span{display:block;margin-top:4px;color:#8290a2;font-size:10px}
.variant-card-head em{margin-top:2px;color:#b35b48;font-size:9px;font-style:normal;font-weight:700;white-space:nowrap}
.variant-canvas-wrap{display:grid;place-items:center;min-height:250px;flex:1;overflow:hidden;border:1px solid #dfe6ef;border-radius:9px;background:#fff}
.variant-canvas-wrap canvas{display:block;width:100%;height:100%;max-height:48vh;object-fit:contain;image-rendering:pixelated}
.variant-card>p{min-height:34px;margin:10px 1px;color:#78879a;font-size:10px;line-height:1.6}
.variant-card>.btn{width:100%}
.variant-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 20px;border-top:1px solid #dfe5ed;background:#fff;color:#8592a3;font-size:10px;flex:none}
@media(max-width:900px){.variant-body{grid-template-columns:1fr}.variant-canvas-wrap{min-height:260px}.variant-card>p{min-height:0}.variant-footer{align-items:flex-start;flex-direction:column}.variant-footer .btn{width:100%}}
@media(max-width:1220px){.layout{grid-template-columns:minmax(260px,300px) minmax(420px,1fr)}.tools-panel{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.tools-panel .panel-title{grid-column:1/-1}.tools-panel .section:nth-of-type(2),.tools-panel .section:nth-of-type(4){border-left:1px solid var(--line)}}
@media(max-width:790px){.topbar{height:auto;min-height:70px;padding:11px 15px}.brand strong{font-size:14px}.brand small,.privacy-tag{display:none}.top-actions .btn{padding:9px 10px;font-size:11px}.layout{display:flex;flex-direction:column;padding:10px;gap:10px}.settings-panel{order:2;width:100%}.tools-panel{order:3;width:100%;display:block}.tools-panel .section:nth-of-type(2),.tools-panel .section:nth-of-type(4){border-left:0}.panel-title{padding:18px}.section{padding:17px 18px}.workspace-head{padding:16px;min-height:74px}.workspace-head h1{font-size:16px}.workspace-actions .btn{font-size:10px;padding:8px}.summary-bar{padding:10px 16px;gap:18px}.canvas-shell{height:58vh;min-height:350px}.canvas-scroller{padding:14px}.canvas-footer{padding:8px 11px}.canvas-footer #statusText{display:none}.palette-grid{grid-template-columns:repeat(10,minmax(0,1fr));max-height:162px}.preview-compare{grid-template-columns:1fr}}
@media(max-width:420px){.brand-mark{width:34px;height:34px;font-size:19px}.brand{gap:8px}.brand strong{font-size:12px}.top-actions{gap:5px}.top-actions .btn{font-size:10px;padding:8px}.workspace-head{align-items:flex-start;flex-direction:column;gap:10px}.workspace-actions{align-self:flex-end}.empty-state h2{font-size:18px}.empty-state p{font-size:11px}.palette-grid{grid-template-columns:repeat(8,minmax(0,1fr))}}
@media(max-width:790px){.workspace{order:1;width:100%}}
@media(max-width:790px){.license-bar{justify-content:space-between;padding:8px 14px;font-size:10px}}

@media(max-width:790px),(any-pointer:coarse){
  .canvas-shell.reference-active .canvas-scroller{position:relative;left:0;top:0;width:100%;height:100%}
  .reference-divider{display:none!important}
  .reference-panel{left:auto;right:12px;top:68px;bottom:auto;width:min(74vw,300px);height:min(42vh,320px);border:1px solid #cfd9e6;border-radius:12px;box-shadow:0 10px 30px #17243b38}
  .reference-head{min-height:40px;padding:5px 6px 5px 10px;cursor:move}
  .reference-head strong{font-size:11px}
  .reference-head button{min-height:28px;padding:3px 5px;font-size:9px}
  .reference-controls{height:37px;padding:4px}
  .reference-resize{display:block;position:absolute;right:2px;bottom:2px;width:22px;height:22px;z-index:2;cursor:nwse-resize;touch-action:none}
  .reference-resize::after{content:"";position:absolute;right:4px;bottom:4px;width:9px;height:9px;border-right:2px solid #8b9ab0;border-bottom:2px solid #8b9ab0}
}

/* Guide page: short overview first, full instructions on demand. */
.guide-main{width:min(1180px,calc(100% - 36px));margin-top:28px}
.guide-hero{min-height:270px;display:flex;align-items:center;justify-content:space-between;gap:38px;padding:42px 52px;border:1px solid #eadbd5;border-radius:22px;background:linear-gradient(125deg,#fff 0%,#fff9f6 55%,#f7e8e2 100%);box-shadow:0 10px 30px #51291f0a;overflow:hidden}
.guide-hero>div:first-child{max-width:680px;position:relative;z-index:1}
.guide-eyebrow,.guide-section-head>div>span{display:block;margin-bottom:8px;color:#bd5b46;font-size:10px;font-weight:800;letter-spacing:.12em}
.guide-main .guide-hero h1{margin:0 0 13px;font-size:34px;line-height:1.25;color:#162238}
.guide-hero p{max-width:610px;margin:0;color:#718097;font-size:13px;line-height:1.8}
.guide-hero-actions{display:flex;gap:9px;margin-top:23px}
.guide-hero .guide-feedback{display:flex;align-items:center;gap:5px;margin:17px 0 0;color:#8b776f;font-size:10.5px;line-height:1.5}
.guide-feedback::before{content:"✉";display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:7px;background:#fff0eb;color:#bd5b46;font-size:11px}
.guide-feedback a{color:#b85540;font-weight:800;text-decoration:none}
.guide-feedback a:hover{text-decoration:underline}
.guide-hero-art{display:grid;grid-template-columns:repeat(3,38px);gap:9px;flex:none;transform:rotate(-8deg);padding:24px}
.guide-hero-art span{width:38px;height:38px;border:8px solid #fff8f4;border-radius:11px;background:#e1654e;box-shadow:0 5px 12px #7136291c}
.guide-hero-art span:nth-child(2),.guide-hero-art span:nth-child(4),.guide-hero-art span:nth-child(9){background:#f0b45c}
.guide-hero-art span:nth-child(3),.guide-hero-art span:nth-child(6){background:#536f9f}
.guide-hero-art span:nth-child(5){background:#cc6983}
.guide-hero-art span:nth-child(7){background:#7ca58d}
.guide-reference-feature{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.75fr);align-items:center;gap:28px;margin-top:26px;padding:18px;border:1px solid #dfe7f1;border-radius:19px;background:#fff;box-shadow:0 7px 24px #15243b0a}
.guide-reference-preview{min-width:0;margin:0;padding:9px;border:1px solid #dfe6ef;border-radius:13px;background:#f4f7fa}
.guide-reference-preview img{display:block;width:100%;height:auto;border-radius:8px}
.guide-reference-copy{padding:12px 18px 12px 2px}
.guide-reference-copy h2{margin:0 0 10px;color:#17243a;font-size:23px}
.guide-reference-lead{margin:0;color:#718097;font-size:12px;line-height:1.75}
.guide-reference-benefits{display:grid;gap:5px;margin:19px 0 0;padding:0;list-style:none}
.guide-reference-benefits li{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:10px;border-radius:9px}
.guide-reference-benefits li:hover{background:#f7f9fc}
.guide-reference-benefits li>span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#eaf6ee;color:#18834a;font-size:9px;font-weight:800}
.guide-reference-benefits strong{display:block;margin:0 0 3px;color:#2b3a51;font-size:11.5px}
.guide-reference-benefits p{margin:0;color:#8391a3;font-size:10px;line-height:1.5}
.guide-section{margin-top:42px}
.guide-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px}
.guide-section-head h2,.guide-presets h2,.guide-bottom-cta h2{margin:0;color:#17243a;font-size:21px}
.guide-section-head>p{margin:0 0 2px;color:#8290a4;font-size:11px}
.quick-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
.quick-step{position:relative;min-height:174px;padding:18px 17px;border:1px solid #dfe7f1;border-radius:15px;background:#fff;box-shadow:0 4px 15px #15243b08}
.quick-step>b{position:absolute;right:14px;top:12px;color:#dce3ed;font-size:19px;letter-spacing:.04em}
.quick-step-icon{width:40px;height:40px;display:grid;place-items:center;margin-bottom:18px;border-radius:11px;background:#fff0eb;color:#b85540;font-size:19px;font-weight:800}
.quick-step h3{margin:0 0 8px;color:#26344b;font-size:13px}
.quick-step p{margin:0;color:#7a899e;font-size:11px;line-height:1.6}
.guide-presets{margin-top:28px;padding:24px;border:1px solid #edd7a8;border-radius:17px;background:linear-gradient(115deg,#fffaf0,#fff)}
.guide-preset-title{display:flex;align-items:center;gap:13px;margin-bottom:17px}
.guide-preset-title>span{width:37px;height:37px;display:grid;place-items:center;flex:none;border-radius:11px;background:#f5b856;color:#fff;font-size:17px}
.guide-preset-title h2{font-size:16px}
.guide-preset-title p{margin:5px 0 0;color:#8e8068;font-size:11px}
.guide-preset-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.guide-preset-grid article{padding:13px 14px;border:1px solid #eee3cb;border-radius:10px;background:#fff}
.guide-preset-grid strong{display:block;color:#26334a;font-size:12px}
.guide-preset-grid p{margin:6px 0;color:#6f7e92;font-size:10.5px}
.guide-preset-grid span{display:inline-block;padding:3px 7px;border-radius:5px;background:#fff3df;color:#a36720;font-size:9px;font-weight:700}
.guide-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.guide-feature-grid article{display:flex;align-items:center;gap:13px;min-height:90px;padding:16px;border:1px solid #dfe7f1;border-radius:13px;background:#fff}
.guide-feature-grid i{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:11px;background:#eef3fa;color:#405a7b;font-size:14px;font-style:normal;font-weight:800}
.guide-feature-grid h3{margin:0 0 6px;color:#26344b;font-size:12px}
.guide-feature-grid p{margin:0;color:#8090a4;font-size:10.5px;line-height:1.55}
.guide-details{scroll-margin-top:18px}
.guide-accordion{margin-bottom:9px;border:1px solid #dfe7f1;border-radius:12px;background:#fff;overflow:hidden}
.guide-accordion summary{display:grid;grid-template-columns:43px minmax(0,1fr) 28px;align-items:center;gap:11px;min-height:70px;padding:10px 17px;cursor:pointer;list-style:none;user-select:none}
.guide-accordion summary::-webkit-details-marker{display:none}
.guide-accordion summary:hover{background:#fafbfd}
.guide-detail-number{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#f1f4f8;color:#63758e;font-size:11px;font-weight:800}
.guide-accordion summary strong{display:block;color:#25334a;font-size:13px}
.guide-accordion summary small{display:block;margin-top:5px;color:#8a98aa;font-size:10.5px;font-weight:400}
.guide-accordion summary>i{position:relative;width:26px;height:26px;border-radius:50%;background:#f3f5f8}
.guide-accordion summary>i::before,.guide-accordion summary>i::after{content:"";position:absolute;left:8px;top:12px;width:10px;height:2px;border-radius:2px;background:#718198}
.guide-accordion summary>i::after{transform:rotate(90deg);transition:transform .2s}
.guide-accordion[open]{border-color:#e1b9ae;box-shadow:0 5px 17px #3d211a0a}
.guide-accordion[open] summary{background:#fff9f7;border-bottom:1px solid #f0e1dc}
.guide-accordion[open] .guide-detail-number{background:#e56f56;color:#fff}
.guide-accordion[open] summary>i::after{transform:rotate(0)}
.guide-detail-body{padding:20px 70px 24px;color:#64748a;font-size:12px;line-height:1.8}
.guide-detail-body>p:first-child{margin-top:0}
.guide-detail-body p{margin:9px 0}
.guide-detail-body h4{margin:5px 0 7px;color:#31425a;font-size:12px}
.guide-detail-body ul{margin:0;padding-left:18px}
.guide-detail-body li+li{margin-top:3px}
.guide-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:15px 0}
.guide-columns>div{padding:14px 15px;border-radius:10px;background:#f7f9fc}
.guide-size-grid,.guide-tool-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:15px 0}
.guide-size-grid span,.guide-tool-grid span{padding:11px 12px;border:1px solid #e2e8f1;border-radius:9px;background:#fafbfd;font-size:10.5px;line-height:1.55}
.guide-size-grid b,.guide-tool-grid b{display:block;margin-bottom:4px;color:#25354c;font-size:11px}
.guide-tip{padding:10px 12px;border-left:3px solid #e16a51;border-radius:0 8px 8px 0;background:#fff6f3;color:#8b594e}
.guide-rule{display:flex;align-items:center;gap:12px;margin-top:8px;padding:9px 11px;border-radius:8px;background:#f7f9fc}
.guide-rule span{flex:none;padding:4px 7px;border-radius:5px;background:#e9eff7;color:#405675;font-size:10px;font-weight:800}
.guide-rule p{margin:0}
.guide-bottom-cta{display:flex;align-items:center;justify-content:space-between;gap:30px;margin-top:38px;padding:28px 32px;border-radius:17px;background:#172238;color:#fff}
.guide-bottom-cta span{display:block;margin-bottom:6px;color:#ef9c89;font-size:10px;font-weight:800;letter-spacing:.12em}
.guide-bottom-cta h2{color:#fff;font-size:17px}
.guide-bottom-cta .portal-button{border-color:#fff;background:#fff;color:#172238}
@media(max-width:900px){.guide-reference-feature{grid-template-columns:1fr}.guide-reference-copy{padding:10px}.guide-reference-benefits{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-steps{grid-template-columns:repeat(3,minmax(0,1fr))}.guide-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.guide-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.guide-size-grid,.guide-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.guide-main{width:calc(100% - 24px);margin-top:16px}.guide-hero{min-height:0;padding:27px 22px;border-radius:16px}.guide-main .guide-hero h1{font-size:25px}.guide-hero-art{display:none}.guide-reference-feature{gap:10px;margin-top:15px;padding:9px;border-radius:14px}.guide-reference-preview{padding:4px}.guide-reference-copy{padding:14px 10px}.guide-reference-copy h2{font-size:20px}.guide-reference-benefits{grid-template-columns:1fr}.guide-section{margin-top:30px}.guide-section-head{display:block}.guide-section-head>p{margin-top:7px}.quick-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-step{min-height:150px}.guide-presets{padding:18px}.guide-preset-grid{grid-template-columns:1fr}.guide-feature-grid{grid-template-columns:1fr}.guide-accordion summary{grid-template-columns:38px minmax(0,1fr) 26px;padding:9px 11px}.guide-detail-number{width:34px;height:34px}.guide-detail-body{padding:17px 16px 20px}.guide-columns{grid-template-columns:1fr;gap:8px}.guide-bottom-cta{align-items:flex-start;flex-direction:column;padding:23px}.guide-bottom-cta .portal-button{width:100%}}
@media(max-width:410px){.guide-hero-actions{align-items:stretch;flex-direction:column}.quick-steps{grid-template-columns:1fr}.quick-step{min-height:0}.guide-size-grid,.guide-tool-grid{grid-template-columns:1fr}}
/* Compact maker controls and palette manager. */
.settings-panel .section{padding:17px 20px}
.settings-panel .section-head{margin-bottom:11px}
.quick-view-section{padding:15px 14px!important}
.quick-view-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.view-card{min-height:62px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid #dce3ef;border-radius:11px;background:#fff;color:#63718a;font-size:11px;cursor:pointer;user-select:none}
.view-card input{position:absolute;opacity:0;pointer-events:none}
.view-card:has(input:checked){border-color:#a7c7ff;background:#f0f6ff;color:#3d79d6;font-weight:700}
.view-card .view-icon{font-size:17px;line-height:1}
.view-card:has(input:focus-visible){outline:3px solid #f7a496;outline-offset:2px}
.choice-row{display:flex;flex-wrap:wrap;gap:5px}
.choice{border:1px solid #dce3ef;background:#fff;color:#52627b;border-radius:6px;padding:6px 9px;font-size:11px;line-height:1.15;white-space:nowrap}
.choice.active{background:#152039;border-color:#152039;color:#fff;font-weight:700}
.choice:hover:not(.active){background:#f2f5fa;border-color:#b9c8de}
.subhead{font-size:12px;color:#233149;margin:17px 0 8px}
.palette-presets .choice{min-width:45px}
.palette-manager-button{margin-top:10px;font-size:11px;padding:9px}
.workspace-actions .btn.pending{background:#ee785c;border-color:#ee785c;box-shadow:0 0 0 3px #f26b4f22}
.palette-dialog{width:min(800px,calc(100vw - 24px));max-height:min(90vh,850px)}
.palette-dialog[open]{display:flex;flex-direction:column}
.palette-dialog .dialog-head{flex:none;padding:18px 22px}
.palette-dialog .dialog-head p{color:#8190a5;margin:5px 0 0;font-size:11px}
.palette-dialog-body{overflow:auto;padding:16px 22px;flex:1;min-height:0}
.palette-dialog-body h3{font-size:13px;margin:0 0 9px}
.palette-dialog-body .help{margin:8px 0 13px}
.palette-dialog-body .search{margin:0 0 10px}
.palette-bulk{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.palette-bulk button,.palette-manager-group-head button{border:0;background:none;color:#50637e;font-size:11px;padding:5px 6px}
.palette-bulk button:first-child{background:#e9eef5;border-radius:5px}
.palette-bulk button:hover,.palette-manager-group-head button:hover{color:#e46047}
.palette-bulk span{margin-left:auto;color:#8895a7;font-size:11px}
.palette-manager-groups{display:flex;flex-direction:column;gap:8px}
.palette-manager-group{border:1px solid #e6ebf3;border-radius:9px;overflow:hidden}
.palette-manager-group-head{display:flex;align-items:center;justify-content:space-between;padding:8px 11px;background:#f7f9fc}
.palette-manager-group-head strong{font-size:12px}
.palette-manager-group-head small{color:#8a98aa;font-weight:400}
.palette-manager-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:10px}
.palette-manager-color{display:flex;align-items:center;gap:7px;min-width:0;min-height:34px;border:1px solid #e6ebf3;border-radius:5px;padding:4px 6px;font-size:11px;cursor:pointer}
.palette-manager-color input{accent-color:#152039;margin:0;flex:none}
.palette-manager-color .dot{height:23px;width:23px;border:1px solid #00000012;border-radius:4px;flex:none}
.palette-dialog .dialog-actions{padding:12px 22px;border-top:1px solid var(--line);flex:none}
@media(max-width:600px){.palette-manager-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.palette-dialog .dialog-head,.palette-dialog-body,.palette-dialog .dialog-actions{padding-left:14px;padding-right:14px}}

/* Tool-specific controls and export menu. */
.workspace-head{position:relative;z-index:3}
.workspace-actions{align-items:center;flex-wrap:wrap;justify-content:flex-end}
.export-menu{position:relative}
.export-menu summary{display:block;list-style:none;cursor:pointer;user-select:none}
.export-menu summary::-webkit-details-marker{display:none}
.export-menu .btn.dark{background:#19253a;border-color:#19253a;color:#fff}
.export-menu summary[aria-disabled=true]{opacity:.48;cursor:not-allowed}
.export-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:10;width:228px;padding:6px;background:#fff;border:1px solid #dfe5ed;border-radius:10px;box-shadow:0 12px 30px #1c293a25}
.export-popover button{display:block;width:100%;border:0;background:#fff;color:#26334b;text-align:left;border-radius:6px;padding:10px;font-size:12px;cursor:pointer}
.export-popover button:hover:not(:disabled),.export-popover button:focus-visible{background:#f1f5fb}
.export-popover button:disabled{opacity:.45;cursor:not-allowed}
.tool-badge{display:inline-block;margin-left:4px;color:#cb654d;background:#fff0eb;padding:1px 4px;border-radius:4px;font-size:9px;font-weight:700}
.brush-section .range-label{margin-bottom:5px;font-weight:700}
.replace-dialog{width:min(430px,calc(100vw - 24px));max-height:min(82vh,690px)}
.replace-dialog[open]{display:flex;flex-direction:column}
.replace-dialog .dialog-head{flex:none;padding:18px 20px}
.replace-dialog .dialog-head h2{font-size:17px}
.replace-dialog .dialog-head p{font-size:11px;color:#758197;margin:8px 0 0;line-height:1.5}
.replace-body{padding:15px 18px;min-height:0;display:flex;flex-direction:column;gap:11px}
.replace-source,.replace-choice{display:flex;align-items:center;gap:10px;width:100%;padding:9px 11px;border-radius:8px;font-size:12px;color:#26334b}
.replace-source{background:#f5f7fa;border:1px solid #e1e6ef}
.replace-source .dot,.replace-choice .dot{height:20px;width:20px;border:1px solid #00000018;border-radius:5px;flex:none}
.replace-source em,.replace-choice em{font-style:normal;color:#7e8999;margin-left:auto;white-space:nowrap}
.replace-body .search{margin:0}
.replace-list{overflow:auto;min-height:110px;display:flex;flex-direction:column;gap:3px;padding-right:3px}
.replace-choice{background:#fff;border:1px solid transparent;text-align:left;cursor:pointer}
.replace-choice:hover,.replace-choice:focus-visible{background:#f4f7fb;border-color:#d9e2ef}
.empty-dot{background:repeating-conic-gradient(#e4e9f0 0 25%,#fff 0 50%) 0 / 8px 8px}
.replace-dialog .dialog-actions{border-top:1px solid var(--line);padding:11px 18px;flex:none}
@media(max-width:1220px){.tools-panel{display:block}.tools-panel .section{border-left:0!important}}
@media(max-width:790px){.workspace-head{align-items:flex-start}.workspace-actions{gap:5px}.workspace-actions .btn{padding:8px}.export-popover{right:0}}

/* Compact navigation and account history. */
.site-nav{min-height:57px;display:flex;align-items:center;justify-content:flex-end;gap:5px;padding:10px 24px;background:#fff;border-bottom:1px solid var(--line)}
.site-nav a,.site-nav button{display:inline-flex;align-items:center;justify-content:center;min-height:31px;padding:5px 11px;border:1px solid #dce3ee;border-radius:7px;background:#fff;color:#26334b;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.site-nav .active{background:#182338;border-color:#182338;color:#fff}
.site-nav a:hover:not(.active),.site-nav button:hover:not(.active){background:#f4f6fa}
.site-nav .active:hover{background:#25344f}
#zoomFit,#codeViewBtn{display:none!important}
.history-dialog{width:min(670px,calc(100vw - 24px));max-height:min(82vh,760px)}
.history-dialog[open]{display:flex;flex-direction:column}
.history-dialog .dialog-head p,.account-dialog .dialog-head p,.guide-dialog .dialog-head p{margin:5px 0 0;color:#8090a5;font-size:11px}
.history-body{padding:15px 22px;overflow:auto;min-height:120px}
.history-body>.help{margin:0 0 14px}
.history-list{display:grid;gap:9px}
.history-empty{padding:28px 14px;text-align:center;color:#7d8b9c;font-size:12px;border:1px dashed #d9e1eb;border-radius:10px}
.history-item{display:flex;align-items:center;gap:11px;border:1px solid #e0e6ef;border-radius:10px;padding:11px}
.history-item-icon{width:39px;height:39px;flex:none;border-radius:8px;background:#fff0eb;color:#d6654c;display:grid;place-items:center;font-size:19px}
.history-item-preview{width:58px;height:58px;flex:none;object-fit:contain;border:1px solid #e0e6ef;border-radius:7px;background:#fff;image-rendering:pixelated}
.history-item-main{flex:1;min-width:0}
.history-item-main strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#253149}
.history-item-main small{display:block;margin-top:4px;color:#8a98a8;font-size:10px}
.history-item-actions{display:flex;gap:5px;flex:none}
.history-item-actions .btn{padding:8px 10px;font-size:11px}
.history-item-actions .delete{color:#be5a4b}
.history-dialog .dialog-actions{border-top:1px solid var(--line)}
.account-dialog{width:min(440px,calc(100vw - 24px))}
.account-body{padding:20px 24px 24px}
.account-body p{margin:0 0 17px;line-height:1.6;font-size:13px;color:#4b5d74}
.account-overview{border:1px solid #e1e7ef;border-radius:10px;background:#f8fafc;padding:14px;margin-bottom:17px}
.account-overview p{margin:0}
.account-overview p+p{margin-top:6px;color:#66778d;font-size:12px}
.account-actions{display:flex;gap:9px;flex-wrap:wrap}
.account-actions a{text-decoration:none}
.password-form{margin-top:19px;padding-top:17px;border-top:1px solid #e0e6ee;display:grid;gap:11px}
.password-form label{display:grid;gap:5px;color:#526178;font-size:12px;font-weight:700}
.password-form input{width:100%;border:1px solid #d9e2ee;border-radius:8px;padding:10px;color:#26334b}
.password-form .btn{justify-self:start}
.password-form p{margin:0;color:#ad5546;font-size:11px}
.guide-dialog{width:min(530px,calc(100vw - 24px))}
.placeholder-body{padding:45px 24px;text-align:center;color:#a1acb9;font-size:13px}
@media(max-width:790px){.site-nav{justify-content:flex-start;overflow-x:auto;padding:9px 12px}.site-nav a,.site-nav button{font-size:11px}.history-item{align-items:flex-start}.history-item-actions{flex-direction:column}}

/* Separate navigation pages. */
.site-nav{justify-content:space-between;gap:18px;min-height:59px;padding:9px 17px}
.site-brand{flex:none;background:#aa5848!important;border-color:#aa5848!important;color:#fff!important;font-size:13px!important;font-weight:800!important;letter-spacing:.02em}
.site-nav-links{display:flex;justify-content:flex-end;gap:5px;min-width:0}
.site-nav-links>a{min-height:29px}
.portal-main{width:min(1160px,calc(100% - 36px));margin:34px auto 65px}
.portal-main h1{margin:0;color:#142036;font-size:21px}
.portal-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}
.portal-count{display:inline-flex;align-items:center;justify-content:center;min-width:33px;height:26px;padding:0 7px;border-radius:20px;background:#172238;color:#fff;font-size:12px;font-weight:800}
.project-search{display:flex;align-items:center;gap:8px;height:42px;padding:0 13px;border:1px solid #d8e3f2;border-radius:8px;color:#657891;box-shadow:0 1px 2px #15243c0a;margin-bottom:24px}
.project-search span{font-size:21px;line-height:1}
.project-search input{flex:1;min-width:0;height:100%;border:0;background:transparent;outline:0;color:#26344d;font-size:13px}
.project-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.project-card{min-width:0;border:1px solid #dbe5f3;border-radius:17px;overflow:hidden;background:#fff;box-shadow:0 1px 2px #15243c08}
.project-art{position:relative;aspect-ratio:1/1;background:#fff}
.project-art>a{display:block;width:100%;height:100%}
.project-art img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
.project-no-preview{display:grid;place-items:center;width:100%;height:100%;font-size:40px;color:#d8dfe9}
.project-badge{position:absolute;top:9px;left:9px;border:1px solid #dce4f0;background:#fffdfd;border-radius:15px;padding:3px 8px;color:#37445a;font-size:10px;font-weight:700}
.project-menu{position:absolute;right:9px;top:8px}
.project-menu summary{list-style:none;display:grid;place-items:center;width:26px;height:26px;background:#fff;border:1px solid #dce4f0;border-radius:50%;color:#586c83;font-size:16px;line-height:1;cursor:pointer}
.project-menu summary::-webkit-details-marker{display:none}
.project-menu>div{position:absolute;right:0;top:30px;z-index:2;width:104px;padding:4px;background:#fff;border:1px solid #dce4f0;border-radius:8px;box-shadow:0 5px 18px #17243a22}
.project-menu button{display:block;width:100%;padding:7px;border:0;background:transparent;color:#35455a;text-align:left;font-size:11px;border-radius:4px}
.project-menu button:hover{background:#f1f4f8}
.project-meta{padding:10px 12px 11px;border-top:1px solid #eef2f7}
.project-meta>div{display:flex;align-items:center;gap:5px}
.project-meta a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#142037;font-size:12px;font-weight:700;text-decoration:none}
.project-rename{border:0;background:none;color:#9aabba;font-size:14px;padding:0 3px}
.project-meta small{display:block;color:#71839d;font-size:10px;margin-top:4px}
.portal-empty{grid-column:1/-1;padding:48px 20px;text-align:center;border:1px dashed #dbe5f1;border-radius:12px;color:#798aa1;font-size:13px}
.portal-empty p{margin:16px 0 0}
.portal-note{color:#8494a9;font-size:11px;margin-top:23px;line-height:1.6}
.project-pagination{display:flex;align-items:center;justify-content:center;gap:8px;margin:28px 0 8px}
.project-pagination[hidden]{display:none}
.project-pagination>button,.project-pagination #projectPages button{min-width:36px;height:34px;padding:0 10px;border:1px solid #d8e2ef;border-radius:7px;background:#fff;color:#34465e;font-size:12px;font-weight:700}
.project-pagination>button{min-width:68px}
.project-pagination button:hover:not(:disabled):not(.active){background:#f2f5f9;border-color:#bdcada}
.project-pagination button:disabled{opacity:.4}
.project-pagination #projectPages{display:flex;align-items:center;gap:6px}
.project-pagination #projectPages button.active{background:#172238;border-color:#172238;color:#fff}
.page-gap{display:inline-grid;place-items:center;width:22px;color:#8998aa;font-size:12px}
.portal-button{display:inline-flex;align-items:center;justify-content:center;min-height:33px;padding:7px 13px;border:1px solid #d7e0ec;border-radius:7px;background:#fff;color:#1d2a3d;font-size:12px;font-weight:700;text-decoration:none;white-space:nowrap}
.portal-button.dark{background:#172238;border-color:#172238;color:#fff}
.portal-button[hidden]{display:none}
.portal-blank{margin-top:24px;min-height:300px;display:grid;place-items:center;color:#a3aebc;border:1px solid #e1e8f2;border-radius:12px;background:#fff;font-size:13px}
.profile-main{max-width:990px}
.profile-main>h1{margin-bottom:24px}
.profile-card{border:1px solid #dbe5f2;border-radius:12px;padding:22px 24px;background:#fff;box-shadow:0 2px 4px #15243b0d;margin-bottom:18px}
.profile-card h2{font-size:15px;margin:0 0 16px;color:#101d32}
.profile-account{display:flex;align-items:center;gap:14px}
.profile-avatar{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:50%;background:#182338;color:#fff;font-size:18px;font-weight:800}
.profile-identity{display:grid;gap:4px;min-width:0}
.profile-identity strong{font-size:13px;color:#1c2b40;overflow-wrap:anywhere}
.profile-identity span{font-size:11px;color:#637994}
.profile-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;margin-left:auto}
.profile-password{margin:20px 0 0;padding-top:18px;border-top:1px solid #e3eaf2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.profile-password[hidden]{display:none}
.profile-password label{display:grid;gap:6px;color:#586b83;font-size:11px}
.profile-password input,.redeem-inline input{width:100%;min-width:0;border:1px solid #d8e3f1;border-radius:7px;padding:9px 10px;color:#23344c}
.profile-password>button{justify-self:start}
.profile-password p{align-self:center;margin:0;color:#a84c3d;font-size:11px;grid-column:span 2}
.redeem-inline{display:flex;gap:9px}
.redeem-inline input{flex:1}
.profile-feedback{margin:9px 0 0;color:#9b5d4d;font-size:11px;min-height:1em}
@media(max-width:1050px){.project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:750px){.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.site-nav{padding:9px 12px;overflow-x:auto}.site-nav-links{flex:none}.site-brand{flex:none}.profile-account{align-items:flex-start;flex-wrap:wrap}.profile-actions{width:100%;justify-content:flex-start;margin-left:0}.profile-password{grid-template-columns:1fr}}
@media(max-width:480px){.project-grid{grid-template-columns:1fr}.portal-main{width:calc(100% - 24px);margin-top:22px}.profile-card{padding:17px}.project-art{aspect-ratio:1.25/1}.redeem-inline{flex-direction:column}}
@media(max-width:480px){.project-pagination{gap:5px}.project-pagination>button{min-width:58px;padding:0 7px}.project-pagination #projectPages button{min-width:31px;padding:0 6px}.project-pagination #projectPages button:not(.active){display:none}.page-gap{display:none}}

/* Public examples below the workbench. */
.showcase-section{width:min(1804px,calc(100% - 36px));margin:0 auto 56px;padding:34px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 5px 20px #1c26370a}
.showcase-heading{text-align:center;margin-bottom:30px}
.showcase-heading h2{margin:7px 0 8px;color:#b34d39;font-size:23px}
.showcase-heading p{margin:0;color:#8491a4;font-size:12px}
.showcase-list{display:grid;gap:34px}
.showcase-item{padding-top:28px;border-top:1px solid #edf1f6}
.showcase-item:first-child{padding-top:0;border-top:0}
.showcase-item>h3{margin:0 0 15px;color:#25344b;font-size:14px}
.showcase-size{display:inline-flex;align-items:center;margin-left:8px;padding:4px 9px;border-radius:999px;background:#fff0ec;color:#bd5945;font-size:10px;font-weight:700;vertical-align:middle}
.showcase-pair{display:grid;grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr);align-items:center;gap:16px}
.showcase-pair figure{min-width:0;margin:0}
.showcase-pair figcaption{display:flex;align-items:center;gap:8px;margin:0 0 10px;color:#8796aa;font-size:11px}
.showcase-pair figcaption span{display:grid;place-items:center;width:20px;height:20px;border-radius:5px;background:#edf2f8;color:#43536b;font-size:10px;font-weight:800}
.showcase-frame{height:clamp(260px,23vw,360px);display:grid;place-items:center;overflow:hidden;border:1px solid #e1e8f1;border-radius:14px;background:#f8fafc;padding:24px}
.showcase-frame img{display:block;width:min(300px,70vw);height:min(300px,70vw);object-fit:contain;border-radius:6px}
.showcase-frame .pattern-example{image-rendering:pixelated}
.showcase-arrow{display:grid;place-items:center;color:#aeb9c8;font-size:28px}
@media(max-width:790px){.showcase-section{width:calc(100% - 20px);margin-bottom:30px;padding:24px 16px}.showcase-pair{grid-template-columns:1fr;gap:10px}.showcase-arrow{transform:rotate(90deg);height:32px}.showcase-frame{height:min(88vw,420px);padding:14px}.showcase-heading{margin-bottom:24px}.showcase-heading h2{font-size:20px}}

/* Keep every setting visible in the desktop sidebar. */
@media(min-width:1221px){
  .settings-panel .panel-title{padding:13px 17px 11px}
  .settings-panel .panel-title .eyebrow{font-size:9px}
  .settings-panel .panel-title h2{margin:4px 0 3px;font-size:18px}
  .settings-panel .panel-title p{font-size:10px;line-height:1.35}
  .settings-panel .quick-view-section{padding:9px 11px!important}
  .settings-panel .view-card{min-height:45px;gap:2px;border-radius:9px;font-size:10px}
  .settings-panel .view-card .view-icon{font-size:14px}
  .settings-panel .section:not(.quick-view-section){padding:10px 15px}
  .settings-panel .section-head{margin-bottom:7px}
  .settings-panel .section-head h3{font-size:13px}
  .settings-panel .section-head>span{font-size:9px}
  .settings-panel .two-fields{gap:7px}
  .settings-panel .two-fields label,.settings-panel .select-label{font-size:10px}
  .settings-panel .two-fields input,.settings-panel .select-label select{margin-top:4px;padding:7px 9px;border-radius:7px;font-size:12px}
  .settings-panel .preset-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:7px}
  .settings-panel .chip{justify-content:center;min-width:0;padding:6px 2px;border-radius:7px;font-size:10px}
  .settings-panel .preset-badge{padding:1px 2px;font-size:8px}
  .settings-panel .select-label{margin:5px 0 7px}
  .settings-panel .check-row{gap:6px;margin:6px 0;font-size:10px}
  .settings-panel .check-row small{font-size:8.5px;line-height:1.25;margin-top:2px}
  .settings-panel .range-label{margin:5px 0 2px;font-size:10px}
  .settings-panel .count-input input{width:49px;height:24px;font-size:10px}
  .settings-panel input[type=range]{height:15px}
  .settings-panel .range-end{margin:0 0 4px;font-size:8.5px}
  .settings-panel .help{margin-top:4px;font-size:8.5px;line-height:1.3}
  .settings-panel .choice-row{gap:3px}
  .settings-panel .palette-settings-section #systemChoices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr))}
  .settings-panel .palette-settings-section .choice{min-width:0;padding:5px 2px;font-size:9.5px}
  .settings-panel .subhead{margin:8px 0 5px;font-size:10.5px}
  .settings-panel .palette-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
  .settings-panel .palette-presets .choice{min-width:0;padding:5px 2px}
  .settings-panel .palette-manager-button{margin-top:6px;padding:7px;font-size:10px}
}
@media(min-width:1221px) and (max-height:820px){
  .settings-panel .panel-title p,.settings-panel .palette-settings-section .help,.settings-panel .range-end{display:none}
  .settings-panel .section:not(.quick-view-section){padding-top:8px;padding-bottom:8px}
}
