/* 木东东东 · 渐变实验室 — a quiet canvas for color. */
@font-face{font-family:Lab Sans;src:local("Inter");font-display:swap}
:root{
  --page:#f7f7f4;--paper:#fff;--ink:#25272c;--ink-soft:#555862;
  --muted:#777b84;--line:#e3e4e6;--line-strong:#d0d2d8;
  --soft:#f3f4f6;--accent:#6356d6;--accent-hover:#5143c2;--accent-soft:#f0edff;
  --success:#267d66;--radius:12px;--radius-sm:7px;
  --shadow:0 3px 12px rgba(27,30,44,.025);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:24px}
body{margin:0;background:var(--page);color:var(--ink);font:14px/1.6 "Lab Sans",Inter,"PingFang SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
button,a,input,select,summary{-webkit-tap-highlight-color:transparent}
button{color:inherit}
button{cursor:pointer}
button:disabled{opacity:.45;cursor:not-allowed;transform:none!important}
button,input,select{touch-action:manipulation}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}
svg{width:18px;height:18px;flex-shrink:0;vertical-align:middle}
img,canvas{max-width:100%;display:block}
canvas{image-rendering:auto}
button svg{pointer-events:none}
::selection{background:#ded8ff;color:#33296b}
:focus-visible{outline:3px solid #a69df4;outline-offset:3px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.site-header{height:86px;max-width:1480px;padding:0 40px;margin:auto;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:inline-flex;align-items:center;gap:12px;min-width:0}
.brand-mark{width:35px;height:35px;border-radius:9px;display:grid;place-items:center;color:#fff;background:var(--ink);overflow:hidden;flex-shrink:0}
.brand-mark svg{width:23px;height:23px}
.brand-copy{display:flex;flex-direction:column;gap:1px}
.brand-name{font-size:16px;font-weight:750;line-height:1.35;letter-spacing:.01em}
.brand-caption{font-size:10px;line-height:1.5;letter-spacing:.13em;color:var(--muted);text-transform:uppercase}
.header-actions{display:flex;align-items:center;gap:10px;color:var(--ink-soft)}
.header-actions>a:not(.button){font-size:12px;padding:8px 10px}
main,.main-shell,.page-shell{max-width:1480px;margin:0 auto;padding:35px 40px 0}
.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:39px;padding:9px 14px;line-height:1.3;border:1px solid var(--line-strong);border-radius:var(--radius-sm);background:var(--paper);font-size:12px;font-weight:600;white-space:nowrap;transition:background .16s,border-color .16s,color .16s,box-shadow .16s,transform .16s}
.button:hover{background:#f5f5f8;border-color:#bbbcc5;box-shadow:0 2px 4px rgba(25,25,45,.035)}
.button:active{transform:translateY(1px)}
.button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.button.secondary{background:var(--paper);border-color:var(--line-strong)}
.button.ghost{background:transparent;border-color:transparent;color:var(--ink-soft);box-shadow:none}
.button.ghost:hover{background:#eeeef2;color:var(--ink)}
.button.small{min-height:31px;padding:6px 10px;font-size:11px}
.button.icon-only{padding:8px;width:36px;min-width:36px;min-height:36px}
.button.is-copied,.button.copied{background:#eaf5ef;border-color:#b7dac9;color:var(--success)}
.eyebrow{display:flex;align-items:center;gap:7px;color:var(--accent);font-size:10px;font-weight:700;letter-spacing:.13em;line-height:1.4;text-transform:uppercase;margin:0 0 9px}
.eyebrow::before{content:"";display:block;width:5px;height:5px;border-radius:50%;background:var(--accent)}
.page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:27px}
.page-intro h1{font-size:clamp(28px,2.7vw,37px);font-weight:750;letter-spacing:-.04em;line-height:1.3;margin:0 0 9px}
.page-intro h1 span{color:var(--accent)}
.intro-copy{font-size:13px;color:var(--ink-soft);line-height:1.7;margin:0}
.status-badge{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;border:1px solid var(--line);border-radius:30px;padding:6px 10px;color:var(--muted);background:rgba(255,255,255,.5);font-size:10px;margin-bottom:3px}
.status-badge svg{width:13px;height:13px}
.status-badge::before{content:"";width:5px;height:5px;border-radius:50%;background:#7d9b88}
.workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}
.sidebar,.workbench{min-width:0;display:flex;flex-direction:column;gap:16px}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 18px}
.panel-title{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;line-height:1.4;margin:0}
.panel-title svg{width:16px;height:16px;color:var(--muted)}
.panel-head>span,.panel-meta{font-size:10px;color:var(--muted)}
.step-number{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:5px;background:var(--soft);font-size:10px;color:var(--ink-soft);font-weight:700;font-family:Inter,system-ui,sans-serif}
.color-inputs{display:flex;flex-direction:column;gap:10px;position:relative}
.color-row{display:flex;align-items:center;gap:9px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#fff;min-width:0;transition:border-color .15s,box-shadow .15s}
.color-row:focus-within{border-color:#aaa0ee;box-shadow:0 0 0 2px #f0edff}
.color-chip{width:40px;height:40px;min-width:40px;border-radius:5px;border:1px solid rgba(0,0,0,.06);padding:0;position:relative;overflow:hidden;cursor:pointer}
.color-chip input[type=color]{position:absolute;left:-10px;top:-10px;width:calc(100% + 20px);height:calc(100% + 20px);border:0;padding:0;cursor:pointer}
input[type=color]{appearance:none;-webkit-appearance:none;padding:0;border:0;cursor:pointer}
input[type=color]::-webkit-color-swatch-wrapper{padding:0}
input[type=color]::-webkit-color-swatch{border:0;border-radius:4px}
input[type=color]::-moz-color-swatch{border:0;border-radius:4px}
.color-row>div:not(.color-chip){min-width:0;flex:1}
.color-row label,.color-row .color-label{display:block;color:var(--muted);font-size:10px;line-height:1.5;margin:0 0 1px}
.hex-input{font:600 13px/1.4 "SFMono-Regular",Consolas,"Liberation Mono",monospace;letter-spacing:.035em;border:0!important;border-radius:0!important;background:transparent!important;width:100%;min-width:0;padding:0!important;min-height:21px!important;text-transform:uppercase;color:var(--ink);box-shadow:none!important}
.hex-input:focus-visible{outline-offset:0}
.swap-button{position:absolute;right:9px;top:50%;transform:translateY(-50%);display:grid;place-items:center;z-index:2;width:26px;height:26px;border-radius:50%;background:var(--paper);border:1px solid var(--line-strong);color:var(--muted);padding:0;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.swap-button:hover{color:var(--accent);border-color:#b5aaf1}
.swap-button svg{width:13px;height:13px}
.color-help{font-size:10px;line-height:1.7;color:var(--muted);margin:12px 0 0}
.image-drop{border:1px dashed #cfcfd7;background:#fafafa;border-radius:8px;min-height:116px;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;text-align:center;padding:20px 12px;position:relative;transition:background .16s,border-color .16s;cursor:pointer}
.image-drop:hover,.image-drop.dragover{background:var(--accent-soft);border-color:#aaa0e9}
.image-drop svg{width:23px;height:23px;color:#8b8a99;margin-bottom:4px}
.image-drop strong{font-size:12px;font-weight:600}
.image-drop span,.image-drop small{font-size:10px;line-height:1.6;color:var(--muted)}
.image-drop input[type=file]{position:absolute;opacity:0;width:100%;height:100%;inset:0;cursor:pointer}
.image-wrap{position:relative;overflow:hidden;border-radius:7px;border:1px solid var(--line);background:#f0f0f0;max-height:250px}
.source-image{width:100%;height:auto;max-height:250px;object-fit:contain;cursor:crosshair}
.image-wrap canvas{width:100%;height:auto;max-height:250px;object-fit:contain;cursor:crosshair}
.image-wrap .button{position:absolute;right:5px;top:5px;background:rgba(255,255,255,.95)}
.pick-targets{display:flex;gap:7px;margin-top:10px}
.pick-target{display:flex;align-items:center;justify-content:center;gap:5px;flex:1;border:1px solid var(--line);border-radius:6px;padding:7px 6px;background:var(--paper);font-size:10px;color:var(--ink-soft)}
.pick-target.active,.pick-target[aria-pressed=true]{color:var(--accent);border-color:#b9aff0;background:var(--accent-soft)}
.pick-target svg{width:13px;height:13px}
.image-hint{color:var(--muted);font-size:10px;line-height:1.7;margin:9px 0 0;display:flex;gap:5px;align-items:flex-start}
.image-hint svg{width:12px;height:12px;margin-top:3px}
.preview-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.preview-head{padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);min-height:61px}
.preview-head .panel-title{font-size:12px}
.view-tabs{display:flex;align-items:center;gap:4px;border-radius:6px;padding:3px;background:#f1f2f4}
.tab{background:transparent;border:0;border-radius:4px;padding:6px 11px;color:var(--muted);font-size:11px;font-weight:600;display:inline-flex;align-items:center;gap:5px;line-height:1.4}
.tab svg{width:13px;height:13px}
.tab:hover{color:var(--ink)}
.tab.active,.tab[aria-selected=true]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(20,20,35,.07)}
.preview-stage{position:relative;padding:20px;background:#fafafa;isolation:isolate}
.preview-stage>canvas,.preview-stage #gradientCanvas,.preview-stage .gradient-canvas{width:100%;height:auto;aspect-ratio:16/8;object-fit:fill;border-radius:5px;background:#e5e2ed}
.preview-stage canvas{max-width:100%}
.preview-overlay{position:absolute;inset:20px;display:flex;flex-direction:column;justify-content:space-between;padding:17px;color:#fff;pointer-events:none;text-shadow:0 1px 9px rgba(20,10,35,.16)}
.preview-label{align-self:flex-start;background:rgba(255,255,255,.22);border:1px solid rgba(255,255,255,.45);border-radius:4px;padding:4px 8px;font-size:9px;font-weight:600;letter-spacing:.02em;backdrop-filter:blur(10px)}
.preview-overlay .preview-label.dark{background:rgba(26,22,44,.15)}
.preview-overlay h2{font-size:clamp(25px,3.1vw,47px);letter-spacing:-.05em;line-height:1.15;margin:0;font-weight:650}
.preview-overlay p{font-size:11px;margin:7px 0 0;opacity:.85}
.preview-actions{display:flex;gap:6px;align-items:center}
.preview-actions .button{background:rgba(255,255,255,.8);color:var(--ink);border-color:rgba(255,255,255,.6)}
.preview-bottom{padding:13px 20px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}
.preview-bottom p{font-size:10px;line-height:1.6;color:var(--muted);margin:0}
.preview-bottom .button{flex-shrink:0}
.route-section{margin-top:17px}
.section-label{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--ink-soft);font-size:10px;line-height:1.5;margin:0 0 9px;font-weight:650}
.section-label small,.section-label span:not(:first-child){font-size:10px;font-weight:400;color:var(--muted)}
.route-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.route-option{border:1px solid var(--line);border-radius:7px;background:#fff;padding:8px;text-align:left;min-width:0;position:relative;transition:border-color .15s,background .15s}
.route-option:hover{border-color:#b5a9ec;background:#fdfcff}
.route-option.selected,.route-option[aria-pressed=true]{border-color:var(--accent);background:#fcfbff;box-shadow:0 0 0 1px var(--accent)}
.route-mini{width:100%;height:23px;border-radius:3px;margin-bottom:7px}
.route-copy{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:10px;font-weight:600}
.route-copy small{font-size:9px;color:var(--muted);font-weight:400}
.route-copy svg{width:12px;height:12px;color:var(--accent)}
.route-option:not(.selected) .route-copy .check-icon{visibility:hidden}
.compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.compare-grid.is-hidden{display:none}
.compare-tile{min-width:0}
.compare-tile canvas{width:100%;height:auto;aspect-ratio:1.15;border-radius:5px;object-fit:fill}
.compare-caption{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:11px;font-weight:600;padding-top:9px}
.compare-caption span{font-size:10px;color:var(--muted);font-weight:400}
.toolbar{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding-top:17px;margin-top:17px;border-top:1px solid var(--line)}
.control-group{min-width:0}
.control-group .field-label{margin-bottom:7px}
.segmented{display:inline-flex;gap:2px;background:var(--soft);padding:3px;border:1px solid #ebebee;border-radius:6px}
.segmented button{border:0;background:transparent;color:var(--muted);border-radius:4px;padding:6px 9px;font-size:10px;line-height:1.5;display:flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;transition:background .15s,color .15s}
.segmented button.active,.segmented button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(20,20,30,.08)}
.segmented svg{width:12px;height:12px}
.control-row{display:flex;gap:10px;align-items:center;min-width:0}
.range-value{font:11px/1.4 Consolas,monospace;min-width:34px;color:var(--ink-soft);text-align:right}
input[type=range]{appearance:none;-webkit-appearance:none;accent-color:var(--accent);height:4px;background:#dedee6;border-radius:4px;cursor:pointer;border:0;min-width:60px;width:100%;margin:8px 0}
input[type=range]::-webkit-slider-thumb{appearance:none;width:13px;height:13px;border-radius:50%;background:#fff;border:3px solid var(--accent);box-shadow:0 1px 3px rgba(0,0,0,.12)}
input[type=range]::-moz-range-thumb{width:9px;height:9px;border-radius:50%;background:#fff;border:3px solid var(--accent)}
.stops-panel{padding:20px}
.stops-panel .panel-head{margin-bottom:14px}
.samples-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.samples-head p{font-size:10px;color:var(--muted);margin:0}
.stop-track{height:30px;position:relative;border-radius:5px;margin:7px 9px 25px;border:1px solid rgba(0,0,0,.04);touch-action:none}
.stop-track canvas{width:100%;height:100%;border-radius:4px;pointer-events:none}
.stop-handle{position:absolute;top:22px;transform:translateX(-50%);width:17px;height:22px;border:2px solid #fff;border-radius:3px 3px 5px 5px;box-shadow:0 0 0 1px #b6b6bd,0 2px 3px rgba(0,0,0,.1);padding:0;cursor:ew-resize;touch-action:none;z-index:2}
.stop-handle::before{content:"";position:absolute;left:3px;top:-5px;width:7px;height:7px;transform:rotate(45deg);background:inherit;border-left:2px solid #fff;border-top:2px solid #fff;border-radius:1px}
.stop-handle.active,.stop-handle[aria-selected=true]{box-shadow:0 0 0 2px var(--accent);z-index:3}
.sample-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}
.sample-grid button,.sample-color{min-width:0;border:1px solid transparent;background:transparent;padding:0;border-radius:5px;text-align:left;transition:background .15s,border-color .15s,transform .15s}
.sample-grid button:hover,.sample-color:hover{background:var(--soft);border-color:var(--line);transform:translateY(-1px)}
.sample-grid button:active,.sample-color:active{transform:translateY(0)}
.sample-color .swatch,.sample-grid .swatch,.sample-color>span:first-child{display:block;height:32px;border:1px solid rgba(0,0,0,.04);border-radius:4px;margin-bottom:6px}
.sample-color.copied,.sample-grid button.copied{background:#eef8f2;outline:1px solid #93c7ae}
.sample-hex{display:block;font:9px/1.6 Consolas,monospace;color:var(--ink-soft);text-align:center;text-transform:uppercase;white-space:nowrap}
.sample-pos{display:block;font-size:9px;line-height:1.6;color:#9698a0;text-align:center}
.manual-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--accent-soft);color:#665b93;border:1px solid #e1dcf8;border-radius:6px;padding:8px 10px;font-size:10px;margin-bottom:12px}
.manual-banner svg{width:13px;height:13px}
.stop-editor{display:flex;align-items:end;gap:10px;border-top:1px solid var(--line);padding-top:13px;margin-top:15px}
.stop-editor>.control-group{flex:1}
.stop-editor .button{min-height:35px}
.download-row{display:flex;justify-content:space-between;gap:15px;align-items:flex-end;padding-top:17px;margin-top:18px;border-top:1px solid var(--line)}
.dimensions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.dimensions label{display:flex;flex-direction:column;gap:5px;font-size:10px;color:var(--muted)}
.dimensions input{width:70px;max-width:100%}
.dimensions>span{color:#9c9da5;font-size:12px;align-self:flex-end;padding-bottom:7px}
.dimensions select{min-width:107px;max-width:160px}
.export-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.advanced{margin-top:16px;border:1px solid var(--line);border-radius:var(--radius);background:rgba(255,255,255,.55);overflow:hidden}
.advanced summary,.advanced>details>summary{font-size:11px;font-weight:600;color:var(--ink-soft);padding:13px 17px;cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px}
.advanced summary::-webkit-details-marker{display:none}
.advanced summary::after{content:"+";font-size:18px;font-weight:400;line-height:1;color:var(--muted)}
.advanced[open]>summary::after,.advanced details[open]>summary::after{content:"−"}
.advanced-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:3px 17px 17px}
.advanced-grid p{font-size:10px;color:var(--muted);line-height:1.7;margin:5px 0 0}
.field-label{display:block;font-size:10px;font-weight:600;line-height:1.5;margin:0 0 6px;color:var(--ink-soft)}
select,input[type=text],input[type=number],input[type=url],textarea{min-height:35px;max-width:100%;background:#fff;color:var(--ink);border:1px solid var(--line-strong);border-radius:6px;padding:7px 9px;line-height:1.5;font-size:11px;transition:border-color .15s}
select:hover,input[type=text]:hover,input[type=number]:hover{border-color:#b9b7c6}
select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23777b84' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center;padding-right:29px;cursor:pointer;width:100%}
input[type=number]{font-family:Consolas,monospace}
input[type=number]::-webkit-inner-spin-button{opacity:.5}
.tip,.notice{font-size:10px;line-height:1.8;color:var(--muted);display:flex;gap:7px;align-items:flex-start;margin:12px 0 0}
.tip svg,.notice svg{width:13px;height:13px;flex-shrink:0;margin-top:3px}
.notice{background:#f8f7fc;border:1px solid #e9e6f3;padding:10px 12px;border-radius:7px;color:#78718f}
.notice.warning{background:#fff9ed;border-color:#ede1bc;color:#8f7847}
.preset-section{margin-top:32px}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:15px}
.section-head h2,.preset-section>h2,.learning-section>h2{font-size:16px;font-weight:700;line-height:1.5;margin:0;letter-spacing:-.02em}
.section-head p{font-size:11px;line-height:1.7;color:var(--muted);margin:4px 0 0}
.section-head>span{font-size:10px;color:var(--muted)}
.preset-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.preset-card{display:flex;flex-direction:column;align-items:stretch;min-width:0;border:1px solid var(--line);padding:7px;border-radius:8px;background:#fff;text-align:left;transition:border-color .15s,transform .15s,box-shadow .15s}
.preset-card:hover{border-color:#b5a9ea;transform:translateY(-2px);box-shadow:0 4px 10px rgba(20,15,50,.04)}
.preset-card.selected{border-color:var(--accent)}
.preset-card canvas{width:100%;height:auto;aspect-ratio:2.1;border-radius:4px;margin-bottom:8px}
.preset-title{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:10px;line-height:1.5;font-weight:600;margin:0 2px 2px}
.preset-title svg{width:12px;height:12px;color:var(--muted)}
.preset-card small{font-size:9px;color:var(--muted);margin:0 2px 2px}
.learning-section{margin-top:34px;padding-top:28px;border-top:1px solid var(--line)}
.learning-grid{display:grid;grid-template-columns:1.05fr 1fr 1fr;gap:18px;margin-top:16px}
.lesson-card{border:1px solid var(--line);border-radius:10px;background:#fff;padding:20px;min-width:0}
.lesson-card .eyebrow{font-size:9px;margin-bottom:10px}
.lesson-card h3{font-size:13px;line-height:1.6;font-weight:700;margin:0 0 7px}
.lesson-card p{font-size:11px;line-height:1.9;color:var(--muted);margin:0}
.lesson-card strong{color:var(--ink-soft);font-weight:600}
.lesson-card .lesson-number{font:11px/1.5 Consolas,monospace;color:#aaa3c5;margin-bottom:10px;display:block}
.path-demo{width:100%;margin:13px 0 2px;border-radius:6px;overflow:hidden;background:#f8f7fb}
.path-demo svg{display:block;width:100%;height:auto;max-height:145px}
.path-demo canvas{display:block;width:100%;height:auto}
.workflow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:20px 0 0;margin-top:8px}
.workflow-step{display:flex;gap:10px;align-items:flex-start}
.workflow-step .step-number{background:#ece9f5;color:#7c71aa;min-width:25px;height:25px}
.workflow-step strong{font-size:11px;display:block;font-weight:650;line-height:1.6}
.workflow-step p{font-size:10px;line-height:1.8;color:var(--muted);margin:2px 0 0}
.footer{max-width:1480px;padding:28px 40px 24px;margin:33px auto 0;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:10px;color:#8b8c94}
.footer>div{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.footer .footer-brand{font-weight:650;color:var(--ink-soft)}
.footer a:hover{text-decoration:underline}
.toast{position:fixed;bottom:28px;left:50%;z-index:100;max-width:calc(100vw - 32px);transform:translate(-50%,16px);background:#272832;color:#fff;border:1px solid rgba(255,255,255,.08);border-radius:8px;box-shadow:0 6px 24px rgba(20,20,35,.15);padding:11px 17px;font-size:12px;line-height:1.6;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;display:flex;align-items:center;gap:8px}
.toast.show,.toast.visible,.toast[data-visible=true]{opacity:1;transform:translate(-50%,0)}
.toast svg{width:15px;height:15px;color:#c5bff6}
.modal,dialog{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 20px 80px rgba(20,20,35,.15);color:var(--ink);width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 60px);padding:25px;overflow:auto}
dialog::backdrop{background:rgba(24,24,32,.3);backdrop-filter:blur(3px)}
.modal h2,dialog h2{font-size:19px;line-height:1.5;margin:0 0 12px;letter-spacing:-.02em}
.modal p,dialog p{font-size:12px;line-height:1.9;color:var(--ink-soft)}
.modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.modal-header h2{margin:0}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}
.modal textarea,dialog textarea{width:100%;min-height:140px;font:11px/1.8 Consolas,monospace;resize:vertical;background:#f8f8fb}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hidden,[hidden],.is-hidden{display:none!important}
.muted{color:var(--muted)}
.mono{font-family:Consolas,"Liberation Mono",monospace}
.text-accent{color:var(--accent)}
.w-full{width:100%}
.divider{height:1px;background:var(--line);margin:18px 0;border:0}
.button:focus-visible,.tab:focus-visible,.route-option:focus-visible,.preset-card:focus-visible,.sample-color:focus-visible,.stop-handle:focus-visible{position:relative;z-index:4}
@media(min-width:1600px){.preview-stage>canvas,.preview-stage #gradientCanvas,.preview-stage .gradient-canvas{aspect-ratio:16/7.5}}
@media(max-width:1150px){
  .site-header{height:77px;padding:0 30px}main,.main-shell,.page-shell{padding:28px 30px 0}.footer{padding-left:30px;padding-right:30px}
  .workspace{grid-template-columns:275px minmax(0,1fr);gap:16px}.panel{padding:17px}.preview-head{padding:14px 17px}.preview-stage{padding:17px}.preview-overlay{inset:17px}.preview-bottom{padding:12px 17px}
  .preview-stage>canvas,.preview-stage #gradientCanvas,.preview-stage .gradient-canvas{aspect-ratio:1.7}.route-options{gap:7px}.route-option{padding:6px}.route-copy{font-size:9px}.route-copy small{display:none}
  .toolbar{gap:12px}.segmented button{padding:6px 8px}.sample-grid{gap:5px}.sample-hex{font-size:8px}.download-row{align-items:flex-start;flex-direction:column;gap:13px}.export-actions{width:100%;justify-content:flex-end}
  .preset-grid{gap:9px}.learning-grid{gap:12px}.lesson-card{padding:16px}
}
@media(max-width:900px){
  .page-intro{gap:15px}.status-badge{display:none}.workspace{grid-template-columns:250px minmax(0,1fr);gap:14px}.panel{padding:15px}.sidebar,.workbench{gap:14px}
  .preview-head{padding:12px 14px}.preview-head .panel-title{font-size:11px}.tab{padding:6px 8px;font-size:10px}.tab svg{display:none}.preview-stage{padding:14px}.preview-overlay{inset:14px;padding:13px}.preview-stage>canvas,.preview-stage #gradientCanvas,.preview-stage .gradient-canvas{aspect-ratio:1.4}.preview-bottom{padding:11px 14px}.preview-bottom p{font-size:9px}
  .toolbar{display:grid;grid-template-columns:1fr}.toolbar .control-row{width:100%}.segmented{display:flex}.segmented button{flex:1}.route-options{grid-template-columns:1fr}.route-option{display:flex;align-items:center;gap:9px;padding:7px}.route-mini{width:55px;height:22px;flex-shrink:0;margin:0}.route-copy{flex:1;font-size:10px}.route-copy small{display:inline}
  .sample-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.sample-hex{font-size:9px}.sample-color .swatch,.sample-grid .swatch,.sample-color>span:first-child{height:26px}.samples-head{align-items:flex-start}.samples-head p{max-width:135px;font-size:9px}
  .advanced-grid{grid-template-columns:1fr 1fr}.preset-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.preset-card canvas{aspect-ratio:2.7}.learning-grid{grid-template-columns:1fr 1fr}.lesson-card:first-child{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.lesson-card:first-child .path-demo{grid-column:2;grid-row:1/span 4;margin:0}.workflow{grid-template-columns:1fr 1fr;gap:17px}
}
@media(max-width:767px){
  .site-header{height:72px;padding:0 20px}.brand-mark{width:32px;height:32px}.brand-name{font-size:14px}.brand-caption{font-size:9px}.header-actions{gap:4px}.header-actions>a:not(.button){font-size:11px;padding:7px}.header-actions .button{min-height:33px;padding:7px 10px;font-size:10px}
  main,.main-shell,.page-shell{padding:25px 20px 0}.page-intro{margin-bottom:23px}.page-intro h1{font-size:29px;margin-bottom:8px}.eyebrow{font-size:9px}.intro-copy{font-size:12px}
  .workspace{grid-template-columns:minmax(0,1fr);gap:16px}.sidebar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.sidebar>.panel{margin:0}.sidebar>.panel:nth-child(n+3){grid-column:1/-1}.panel{padding:17px}.panel-head{margin-bottom:15px}.color-chip{width:34px;min-width:34px;height:34px}.color-row{padding:6px;gap:7px}.hex-input{font-size:12px}.image-drop{min-height:111px;padding:12px 8px}.image-drop strong{font-size:11px}.image-drop span,.image-drop small{font-size:9px}.image-hint{font-size:9px}.image-wrap,.source-image,.image-wrap canvas{max-height:139px}.pick-targets{gap:5px;margin-top:8px}.pick-target{padding:5px 3px;font-size:9px}.color-help{font-size:9px;margin-top:10px}
  .preview-head{padding:13px 17px}.preview-stage{padding:17px}.preview-overlay{inset:17px;padding:16px}.preview-overlay h2{font-size:38px}.preview-stage>canvas,.preview-stage #gradientCanvas,.preview-stage .gradient-canvas{aspect-ratio:16/9}.preview-bottom{padding:12px 17px}.preview-bottom p{font-size:10px}.route-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.route-option{display:block;padding:7px}.route-mini{width:100%;height:23px;margin-bottom:7px}.route-copy{font-size:10px}.route-copy small{display:none}.toolbar{display:flex;gap:15px}.toolbar>.control-group{flex:1}.toolbar .control-row{min-width:130px}.sample-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}.samples-head p{max-width:none;font-size:10px}.sample-hex{font-size:8px}.download-row{flex-direction:row;align-items:flex-end}.export-actions{width:auto;max-width:55%;justify-content:flex-end}.dimensions select{max-width:130px}.advanced-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .preset-section{margin-top:27px}.section-head{gap:10px}.section-head h2,.preset-section>h2,.learning-section>h2{font-size:15px}.section-head p{font-size:10px}.preset-grid{gap:10px}.learning-section{margin-top:27px;padding-top:23px}.learning-grid{gap:12px}.lesson-card:first-child{grid-template-columns:1fr 1.1fr}.footer{padding:22px 20px;margin-top:27px;align-items:flex-start;font-size:9px}.footer>div{gap:8px 12px}
}
@media(max-width:480px){
  .site-header{height:68px;padding:0 16px;gap:12px}.brand{gap:9px}.brand-name{font-size:13px}.brand-caption{font-size:8px;letter-spacing:.1em}.brand-mark{width:30px;height:30px;border-radius:7px}.header-actions>a:not(.button){display:none}.header-actions .button{padding:7px 8px;font-size:9px}.header-actions .button svg{width:13px;height:13px}
  main,.main-shell,.page-shell{padding:22px 16px 0}.page-intro{margin-bottom:20px}.page-intro h1{font-size:27px;letter-spacing:-.05em}.intro-copy{font-size:11px;max-width:310px;line-height:1.8}.eyebrow{font-size:8px;letter-spacing:.1em;margin-bottom:8px}.workspace{gap:13px}.sidebar{gap:9px}.sidebar .panel{padding:13px 11px}.panel-title{font-size:11px;gap:6px}.step-number{min-width:17px;height:17px;font-size:9px;border-radius:4px}.panel-head{margin-bottom:12px}.panel-head>span{display:none}.color-row{padding:5px;gap:6px;border-radius:6px}.color-row label,.color-row .color-label{font-size:8px}.color-chip{width:29px;min-width:29px;height:29px}.hex-input{font-size:10px;letter-spacing:0}.color-inputs{gap:9px}.swap-button{right:4px;width:23px;height:23px}.swap-button svg{width:11px;height:11px}.color-help{font-size:8px;line-height:1.8;margin-top:8px}.image-drop{min-height:99px;border-radius:6px;padding:10px 5px;gap:3px}.image-drop svg{width:19px;height:19px;margin-bottom:3px}.image-drop strong{font-size:10px}.image-drop span,.image-drop small{font-size:8px}.image-hint{font-size:8px;line-height:1.7;margin-top:7px;gap:4px}.image-hint svg{width:10px;height:10px}.image-wrap,.source-image,.image-wrap canvas{max-height:114px}.pick-targets{gap:4px}.pick-target{font-size:8px;padding:4px 2px;gap:3px}.pick-target svg{width:10px;height:10px}
  .workbench{gap:13px}.preview-head{padding:11px 13px;gap:8px;min-height:54px}.preview-head .panel-title{font-size:10px}.tab{padding:5px 7px;font-size:9px}.view-tabs{gap:1px;padding:3px}.preview-stage{padding:12px}.preview-overlay{inset:12px;padding:13px}.preview-overlay h2{font-size:30px}.preview-overlay p{font-size:9px}.preview-label{font-size:8px;padding:3px 6px}.preview-bottom{padding:10px 13px;gap:8px}.preview-bottom p{font-size:9px;line-height:1.6}.preview-bottom .button.small{font-size:9px;padding:5px 7px;min-height:28px}.button.small svg{width:12px;height:12px}.route-section{margin-top:14px}.section-label{font-size:9px}.section-label small,.section-label span:not(:first-child){font-size:8px}.route-options{gap:7px}.route-option{padding:6px}.route-mini{height:21px;margin-bottom:6px}.route-copy{font-size:9px}.route-copy svg{width:10px;height:10px}.toolbar{gap:13px;padding-top:14px;margin-top:14px}.toolbar .control-group:first-child{flex-basis:100%}.toolbar .control-group{flex:auto}.toolbar .control-row{min-width:100%;width:100%}.toolbar .segmented{display:flex;width:100%}.segmented button{font-size:9px;padding:6px 9px}.field-label{font-size:9px}.stops-panel{padding:16px 13px}.samples-head{gap:6px;margin-bottom:12px}.samples-head p{font-size:9px;max-width:140px}.samples-head .button.small{font-size:9px;min-height:29px;padding:5px 7px}.sample-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.sample-hex{font-size:9px}.sample-color .swatch,.sample-grid .swatch,.sample-color>span:first-child{height:29px}.sample-pos{font-size:8px}.stop-track{height:25px;margin-bottom:24px}.stop-handle{top:19px;width:15px;height:20px}.stop-handle::before{left:2px}.download-row{flex-direction:column;align-items:stretch;gap:14px;margin-top:15px;padding-top:15px}.dimensions{gap:6px;flex-wrap:nowrap}.dimensions label{font-size:9px}.dimensions input{width:62px}.dimensions select{min-width:120px;max-width:100%;flex:1}.dimensions>span{font-size:10px}.export-actions{max-width:none;display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%}.export-actions .button{min-height:36px;padding:7px 6px;font-size:10px;gap:4px}.export-actions .button svg{width:13px;height:13px}.stop-editor{gap:6px;flex-wrap:wrap}.stop-editor .control-group{flex:1}.manual-banner{font-size:9px;padding:7px 8px}.advanced{margin-top:13px}.advanced-grid{grid-template-columns:1fr 1fr;gap:12px}.advanced summary,.advanced>details>summary{font-size:10px;padding:12px 14px}.advanced-grid{padding-left:14px;padding-right:14px}.advanced-grid p{font-size:9px}select,input[type=text],input[type=number],input[type=url],textarea{font-size:11px;min-height:34px}.compare-grid{gap:9px}.compare-tile canvas{aspect-ratio:.9}.compare-caption{font-size:9px;flex-direction:column;align-items:flex-start;gap:1px}.compare-caption span{font-size:8px}
  .section-head{align-items:flex-start}.section-head>span{display:none}.section-head h2,.preset-section>h2,.learning-section>h2{font-size:14px}.section-head p{font-size:9px;max-width:250px}.preset-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.preset-card{padding:5px;border-radius:6px}.preset-card canvas{aspect-ratio:1.8;margin-bottom:6px;border-radius:3px}.preset-title{font-size:9px;margin:0 1px 1px}.preset-title svg{width:10px;height:10px}.preset-card small{font-size:8px;margin:0 1px}.learning-grid{grid-template-columns:1fr;gap:10px;margin-top:13px}.lesson-card{padding:16px}.lesson-card:first-child{grid-template-columns:1fr 1fr;gap:0 12px}.lesson-card h3{font-size:12px}.lesson-card p{font-size:10px}.lesson-card .eyebrow{font-size:8px}.lesson-card .lesson-number{font-size:9px}.lesson-card:first-child .path-demo{align-self:center}.workflow{gap:16px 10px;padding-top:14px}.workflow-step{gap:7px}.workflow-step .step-number{min-width:21px;height:21px;font-size:9px}.workflow-step strong{font-size:10px}.workflow-step p{font-size:9px}.footer{padding:20px 16px;flex-direction:column;gap:8px;font-size:9px;margin-top:25px}.footer>div{gap:8px 12px}.toast{bottom:18px;padding:10px 14px;font-size:11px;min-width:180px;justify-content:center}.modal,dialog{padding:20px}.modal h2,dialog h2{font-size:17px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}}
