
/* Noto Serif SC subset licensed under SIL OFL 1.1 See assets/NotoSerifSC-OFL.txt */
@font-face {
  font-family: 'Fan Serif';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(./fan-serif.woff2) format('woff2');
  unicode-range: U+20, U+23, U+25, U+2b-3a, U+41-5a, U+61-7a, U+b7, U+d7, U+2014, U+2197, U+21ba, U+3002, U+4e00, U+4e07, U+4e0a-4e0b, U+4e3a, U+4e58, U+4ec5, U+4ee5, U+4ef6, U+4f20, U+4f30, U+4f60, U+4f7f, U+4f8b, U+4f9b, U+4fdd, U+505a, U+50cf, U+5173, U+5185, U+51c6, U+51fb, U+5230, U+52a8, U+5305, U+5355, U+5373, U+5398, U+539f, U+53c2, U+53d6, U+53ef, U+53f3, U+53f7, U+540e, U+542b, U+548c, U+5582, U+559c, U+56fe, U+5728, U+573a, U+5904, U+5927, U+5931, U+59cb, U+5b8c, U+5b9e, U+5bb9, U+5bf8-5bf9, U+5bfc, U+5c0f, U+5c11, U+5c1d, U+5c3a, U+5de6, U+5df2, U+5ea6, U+5f00, U+5f0f, U+5f20, U+5f84, U+5fc3, U+6050, U+6210, U+6216, U+6253, U+628a, U+6295, U+62e9, U+62fc, U+6307, U+6309, U+6362, U+63a5, U+653e, U+6548, U+6570, U+6574, U+6587, U+65b0, U+65e0, U+65f6, U+660e, U+6613, U+663e, U+6682, U+6696-6697, U+66f4, U+66ff, U+6709, U+6750, U+6765, U+6797, U+679c, U+67e5, U+6807, U+683c, U+68ee, U+6a21, U+6a59, U+6b22, U+6b63, U+6bcf, U+6beb, U+6ca1, U+6cd5, U+6e05, U+6e90, U+6ed1, U+6eda, U+7070, U+70b9, U+7167, U+7247, U+7269, U+751f, U+7528, U+7559, U+7565, U+7684, U+76f4, U+7701, U+770b, U+793a, U+7a7a, U+7b80, U+7b97, U+7c73, U+7cbe, U+7d20, U+7eb8, U+7ec6, U+7eff, U+7f29, U+7f51, U+7f6e, U+8003, U+817b, U+81ea, U+8272, U+8981, U+89c8, U+89d2, U+8bbe, U+8bd5, U+8bf7, U+8bfb, U+8c03, U+8c46, U+8d25, U+8d85, U+8f6c, U+8f7d, U+8f83, U+8fb9, U+8fc7, U+8fd8-8fd9, U+9009, U+900f, U+901a, U+914d, U+91cc-91cf, U+94f6, U+957f, U+95ed, U+96be, U+9875, U+9879, U+9884, U+9897, U+989c, U+9996, U+9ad8, U+9f99, U+ff01, U+ff08-ff09, U+ff0b-ff0c, U+ff0f, U+ff1a, U+ff1f;
}

:root{--art-font:"Fan Serif","Songti SC","Noto Serif CJK SC",SimSun,serif}

:root{font:14px/1.6 var(--art-font);color:#344238;background:#edf0ed;--ink:#344238;--muted:#748176;--line:#d8dfd5;--glass:rgba(255,255,255,.54);--serif:var(--art-font);--ease:cubic-bezier(.22,1,.36,1)}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 5% 5%,#dce7dd 0,transparent 43%),radial-gradient(ellipse at 95% 30%,#dbe2e8 0,transparent 45%),radial-gradient(ellipse at 52% 100%,#ede7d9 0,transparent 60%),repeating-linear-gradient(0deg,#eff1ed 0,#eff1ed 3px,#edf0eb 4px),#eff1ed}body:before{display:none}h1,h2,p{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{border:0;cursor:pointer;color:inherit;touch-action:manipulation}button:disabled{opacity:.4;cursor:not-allowed}button:active:not(:disabled){transform:scale(.96);transition:transform 80ms}a{color:inherit;text-decoration:none}button,a{transition:background 180ms,box-shadow 180ms,transform 180ms var(--ease)}:focus-visible{outline:2px solid #637c60;outline-offset:4px}svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}[hidden]{display:none!important}.app{max-width:1296px;padding:23px 38px 20px;margin:auto}.nav{display:flex;align-items:center;justify-content:space-between;min-height:55px}.wordmark{font:italic 44px/.85 var(--serif);letter-spacing:-.065em;display:flex;align-items:baseline;gap:13px}.wordmark small{font:10px/1 var(--art-font);letter-spacing:.21em;text-transform:uppercase;color:#80907e}.nav-actions{display:flex;align-items:center;gap:18px}.device-note{font-size:10px;color:#7e8b7e;letter-spacing:.06em}.nav-button{display:flex;align-items:center;gap:8px;border:1px solid #ffffffaa;background:#ffffff70;box-shadow:inset 0 1px #fff,0 3px 10px #4b645306;border-radius:99px;padding:10px 17px;font-size:11px;min-height:40px;backdrop-filter:blur(14px)}.masthead{display:flex;align-items:end;justify-content:space-between;padding:26px 0 20px}.masthead h1{font:400 40px/1 var(--serif);letter-spacing:-.04em}.masthead h1 em{font-weight:400;color:#7b8e72}.masthead p{font-size:11px;color:#859180;letter-spacing:.035em}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}.glass{border:1px solid #ffffffc9;background:var(--glass);-webkit-backdrop-filter:blur(26px) saturate(125%);backdrop-filter:blur(26px) saturate(125%);box-shadow:inset 0 1px 0 #fff,0 22px 60px #4356470b,0 2px 5px #62766306;border-radius:28px}.preview{padding:12px;min-width:0}.preview-stage{height:477px;border-radius:20px;position:relative;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 40%,#f3f6f0,#e1e8dd);display:grid;place-items:center}.preview-stage.pattern{background-color:#edf0e9;background-image:radial-gradient(#bbc8b753 .8px,transparent .8px);background-size:12px 12px}.preview-stage::after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 50px #3c603b05;border:1px solid #9bb79c14;border-radius:inherit;pointer-events:none}.preview-toolbar{position:absolute;top:18px;left:50%;transform:translateX(-50%);z-index:3}.tabs{display:flex;position:relative;isolation:isolate;gap:2px;padding:5px;border:1px solid #ffffffaa;border-radius:99px;background:#e9ede47a;-webkit-backdrop-filter:blur(24px) saturate(150%);backdrop-filter:blur(24px) saturate(150%);box-shadow:inset 0 1px 1px #fff9,0 5px 20px #253a2414}.tab{position:relative;z-index:1;min-width:81px;min-height:34px;background:transparent;border-radius:99px;padding:7px 14px;font-size:11px;color:#566650;white-space:nowrap}.tab[aria-selected=true]{color:#2e452d;font-weight:600}.glass-pill{position:absolute;left:5px;top:5px;height:34px;width:81px;z-index:0;border:1px solid #ffffffd9;border-radius:99px;background:linear-gradient(155deg,#ffffffd9,#ffffff55);box-shadow:inset 0 1px 2px #fff,inset 0 -1px 3px #ffffff99,0 3px 9px #344e2e15;backdrop-filter:blur(12px);transform-origin:center;pointer-events:none;will-change:transform,width}.image-views{width:100%;height:100%;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;justify-items:center;padding:75px 30px 36px;gap:22px}.image-views.compare{grid-template-columns:repeat(2,minmax(0,1fr));padding-left:25px;padding-right:25px;gap:18px}.image-view{position:relative;margin:0;min-width:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:11px}.image-view img,.image-view canvas{display:block;width:auto;height:auto;max-width:100%;max-height:335px;object-fit:contain;border-radius:7px;filter:drop-shadow(0 14px 16px #263e2819)}.image-view img{max-height:355px}.image-view figcaption{font-size:9px;letter-spacing:.13em;color:#6e806c;text-transform:uppercase;flex-shrink:0}.image-view canvas{image-rendering:pixelated;border-radius:2px}.source-media{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:0;max-height:355px}.liquid{position:absolute;inset:0;pointer-events:none;border-radius:7px;max-width:100%;height:100%;width:100%;filter:none!important}.stage-index{position:absolute;bottom:15px;left:18px;color:#7b8a77;font:10px var(--art-font);letter-spacing:.05em}.stage-size{position:absolute;bottom:15px;right:18px;color:#7b8a77;font:10px var(--art-font)}.preview-info{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 10px 3px}.status{color:#74816c;font-size:10px;line-height:1.6;max-width:68%}.source-link{font-size:9px;color:#73826b;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}.stats{display:flex;align-items:center;gap:17px;padding:11px 10px 4px;color:#7c8775;font-size:10px}.stats strong{font-weight:550;color:#3f553a;font-size:13px;font-variant-numeric:tabular-nums}.stats span+span{padding-left:17px;border-left:1px solid #d9dfd3}.empty{color:#81917a;text-align:center;font-size:12px}.empty strong{display:block;font:italic 32px var(--serif);margin-bottom:14px}.empty button{border-radius:99px;background:#ffffffb0;border:1px solid white;padding:10px 20px}.editor{padding:22px;position:relative}.editor-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.editor-title h2{font:italic 25px var(--serif);letter-spacing:-.025em}.editor-title span{font-size:9px;color:#85927e;letter-spacing:.12em}.sheet-close{display:none}.source-card{border-radius:13px;border:1px solid #ffffffb5;background:#ffffff59;padding:9px;display:flex;align-items:center;gap:11px;width:100%;text-align:left;cursor:pointer}.source-thumb{width:45px;height:49px;object-fit:cover;border-radius:7px}.source-copy{min-width:0;flex:1}.source-copy strong{display:block;font-size:11px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-copy small{display:block;font-size:9px;color:#87917d;margin-top:3px}.source-card .change{font-size:18px;color:#93a084}.source-card.drag{border:1px dashed #6d885e;background:#dde9d7}.file-name{font-size:9px;color:#7a8b6d;display:none}.field{margin-top:22px}.field-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:11px}.field-head .value{font:italic 20px/.8 var(--serif);color:#617951}.field-head .value small{font:9px var(--art-font);font-style:normal;color:#889879;margin-left:2px}.range-ends{display:flex;justify-content:space-between;color:#8e9b81;font-size:8px;margin-top:1px}input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:25px;margin:0;background:transparent;--fill:41.18%;cursor:pointer}#colors{--fill:60%}input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:9px;background:linear-gradient(to right,#95a680 var(--fill),#dce3d7 var(--fill))}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:17px;height:17px;border:3px solid #fff;background:#96a881;border-radius:50%;margin-top:-6px;box-shadow:0 2px 5px #455e482b}input[type=range]::-moz-range-track{height:4px;background:#dce3d7;border-radius:9px}input[type=range]::-moz-range-progress{height:4px;background:#95a680;border-radius:9px}input[type=range]::-moz-range-thumb{height:12px;width:12px;background:#96a881;border:3px solid white;border-radius:50%}.select{width:100%;min-height:39px;padding:8px 10px;border:1px solid #fff;border-radius:10px;background:#ffffff70;color:#506246;font-size:11px}.checks{display:flex;gap:8px}.chip{flex:1;min-height:37px;font-size:10px;background:#ffffff70;border:1px solid #fff;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:8px}.switch{width:21px;height:13px;border-radius:9px;background:#d7dfd1;padding:2px;display:block;transition:background .2s}.switch:after{content:'';display:block;width:9px;height:9px;background:white;border-radius:50%;box-shadow:0 1px 2px #0001;transform:translateX(0);transition:transform .3s var(--ease)}.chip[aria-pressed=true] .switch{background:#899e71}.chip[aria-pressed=true] .switch:after{transform:translateX(8px)}.palette-dots{display:flex;gap:5px;margin-top:10px}.palette-dots i{display:block;width:13px;height:13px;border:1px solid #ffffffbb;border-radius:50%}.generate{margin-top:23px;min-height:44px;width:100%;border-radius:12px;background:linear-gradient(120deg,#455c3c,#6e8255);color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;gap:14px;box-shadow:inset 0 1px #ffffff30,0 5px 12px #3c593326}.download{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:40px;margin-top:8px;background:#ffffff80;border:1px solid #fff;border-radius:12px;font-size:11px}.privacy{font-size:9px;color:#839079;text-align:center;margin-top:12px}.error{font-size:11px;color:#a7474d;margin-top:10px}.palette-summary{padding:16px 5px 0}.palette-summary summary{list-style:none;display:flex;justify-content:space-between;cursor:pointer;color:#607355;font-size:10px}.palette-summary summary::-webkit-details-marker{display:none}.palette-summary summary span:last-child{color:#9aa58e}.legend{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.swatch{display:flex;align-items:center;gap:5px;border:1px solid #d8e1d2;border-radius:6px;padding:4px 6px;background:#ffffff80;font-size:9px;color:#637855}.swatch i{display:block;width:12px;height:12px;border-radius:3px}.swatch b{font-weight:400;color:#839079}.shelf{margin-top:24px}.shelf-header{display:flex;align-items:baseline;gap:13px;margin-bottom:12px}.shelf-header h2{font:italic 24px/1 var(--serif);letter-spacing:-.03em}.shelf-header p{font-size:10px;color:#829277}.sample-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.sample-card{border:1px solid #ffffffa8;background:#ffffff55;border-radius:17px;display:flex;align-items:center;gap:12px;padding:8px;text-align:left;min-width:0;box-shadow:inset 0 1px #fff;position:relative;overflow:hidden}.sample-card:after{content:'↗';margin-left:auto;padding-right:9px;font-size:15px;color:#8b9a80}.sample-card[aria-pressed=true]{background:#f9fff4a3;border-color:#afbc9d}.sample-card img{width:56px;height:65px;border-radius:10px;object-fit:cover}.sample-card strong{display:block;font-size:11px;font-weight:500}.sample-card small{display:block;font-size:9px;color:#85917b;margin-top:4px}.footer{display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#94a089;margin-top:19px}.footer a{border-bottom:1px solid #bbc8b1}.mobile-dock,.sheet-grip{display:none}#settingsDialog{max-width:none;max-height:none;padding:0;border:0;background:transparent;overflow:visible;color:inherit}#settingsDialog::backdrop{background:#20342036;backdrop-filter:blur(5px);animation:scrim-in .25s ease-out}@keyframes scrim-in{from{opacity:0}to{opacity:1}}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
/* liquid glass interaction layer */
button,.source-card,.chip,.nav-button,.download,.generate,.sample-card,#closePattern{position:relative;overflow:hidden;transition:transform .28s cubic-bezier(.22,1,.36,1),box-shadow .28s ease,background .28s ease,border-color .28s ease}
button:not(:disabled):hover,.source-card:hover,.sample-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px #3d54351f,inset 0 1px #fff}
button:not(:disabled):active,.source-card:active,.sample-card:active{transform:scale(.97) translateY(1px)}
button:not(:disabled)::before,.source-card::before,.chip::before,.nav-button::before,.download::before,.generate::before,.sample-card::before,#closePattern::before{content:"";position:absolute;inset:-40%;background:radial-gradient(circle at 30% 20%,#fff9,transparent 32%);opacity:0;transform:translateX(-35%);transition:opacity .3s,transform .5s;pointer-events:none}
button:not(:disabled):hover::before,.source-card:hover::before,.chip:hover::before,.nav-button:hover::before,.download:hover::before,.generate:hover::before,.sample-card:hover::before,#closePattern:hover::before{opacity:1;transform:translateX(15%)}
.loading{pointer-events:none!important;color:transparent!important}.loading::after{content:"";position:absolute;width:16px;height:16px;border:2px solid #ffffff66;border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){button,.source-card,.chip,.nav-button,.download,.generate,.sample-card,#closePattern{transition:none!important}*{animation-duration:.01ms!important}}
@media(hover:hover){button:not(:disabled):hover,.source-card:hover{background-color:#ffffff90;box-shadow:0 4px 16px #455e4812}.generate:not(:disabled):hover{background:linear-gradient(120deg,#4f6844,#7e9461)}.sample-card:hover img{transform:scale(1.025);transition:transform .35s var(--ease)}}
@media(min-width:761px){.editor{position:sticky;top:20px}.desktop-download{display:block}}
@media(max-width:1060px) and (min-width:761px){.app{padding:20px}.workspace{grid-template-columns:minmax(0,1fr) 265px;gap:14px}.editor{padding:18px}.preview-stage{height:465px}.image-views{padding-left:14px;padding-right:14px}.image-view img{max-height:320px}.sample-card{gap:7px}.sample-card img{width:44px;height:53px}.sample-card small{font-size:8px}.sample-card strong{font-size:10px}.sample-card:after{display:none}.image-views.compare{gap:8px;padding-inline:10px}.image-views.compare .source-media img{max-height:230px}}
@media(max-width:760px){.app{padding:17px 16px calc(99px + env(safe-area-inset-bottom));max-width:600px}.nav{min-height:42px}.wordmark{font-size:36px;gap:10px}.wordmark small{font-size:8px}.nav-button{min-height:39px;padding:8px 12px;font-size:10px}.nav-actions{gap:10px}.device-note{display:none}.masthead{padding:23px 2px 18px;align-items:center}.masthead h1{font-size:32px}.masthead p{font-size:9px;max-width:88px;text-align:right;line-height:1.6}.workspace{display:block}.preview{padding:8px;border-radius:25px}.preview-stage{height:clamp(350px,57svh,510px);border-radius:18px}.image-views{padding:69px 20px 35px}.image-view img,.image-view canvas{max-height:calc(57svh - 125px);max-width:100%;border-radius:5px}.source-media{max-height:calc(57svh - 125px)}.preview-toolbar{top:14px}.tab{font-size:11px;min-width:78px;min-height:36px;padding:8px 13px}.glass-pill{height:36px}.image-views.compare{gap:10px;padding-inline:12px}.image-views.compare .image-view{gap:12px}.image-views.compare .image-view img,.image-views.compare .image-view canvas{max-height:270px}.image-view figcaption{font-size:8px}.preview-info{padding:11px 8px 2px}.status{font-size:9px;max-width:62%}.source-link{font-size:8px}.stats{gap:12px;padding:8px 8px 5px;font-size:9px}.stats span+span{padding-left:12px}.stats strong{font-size:12px}.palette-summary{padding:13px 6px 0}.shelf{margin-top:24px}.shelf-header{margin-bottom:11px}.shelf-header h2{font-size:24px}.shelf-header p{font-size:9px}.sample-list{gap:8px}.sample-card{padding:5px;display:block;border-radius:13px}.sample-card img{height:104px;width:100%;border-radius:9px;object-fit:cover}.sample-card strong{font-size:10px;padding:6px 4px 1px}.sample-card small{font-size:8px;padding:0 4px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.sample-card:after{display:none}.footer{font-size:8px;gap:15px;margin-top:18px}.mobile-dock{display:flex;position:fixed;bottom:calc(13px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 32px);max-width:470px;padding:7px;gap:8px;z-index:10;border-radius:23px;border:1px solid #ffffffe6;background:#f7fbf0a8;box-shadow:inset 0 1px #fff,0 9px 38px #31462c24;-webkit-backdrop-filter:blur(26px) saturate(155%);backdrop-filter:blur(26px) saturate(155%)}.mobile-dock button{min-height:45px;display:flex;align-items:center;justify-content:center;gap:9px;border-radius:16px;font-size:11px}.settings-button{flex:1;background:#ffffff80;border:1px solid #fff!important}.mobile-download{flex:1.4;background:linear-gradient(125deg,#4b643f,#76865b);color:#fff;box-shadow:inset 0 1px #ffffff55}.editor{padding:10px 23px calc(20px + env(safe-area-inset-bottom));border-radius:30px 30px 0 0;background:#eef4e9e6;-webkit-backdrop-filter:blur(35px) saturate(140%);backdrop-filter:blur(35px) saturate(140%);box-shadow:inset 0 1px #fff,0 -10px 50px #293d2921;max-height:86svh;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:19px}.editor-title,.source-card,.generate,.privacy,.error,.sheet-grip{grid-column:1/-1}.editor-title{margin-bottom:15px}.editor-title h2{font-size:29px}.editor-title>span{display:none}.sheet-close{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#fff9;min-width:32px}.sheet-grip{display:block;width:35px;height:4px;margin:0 auto 15px;border-radius:4px;background:#b5c4a9}.source-card{padding:7px}.source-thumb{height:40px;width:40px}.field{margin-top:21px}.select{font-size:16px;min-height:41px;max-width:100%}.chip{font-size:10px;min-height:41px;gap:5px}.checks{gap:5px}.generate{min-height:46px;margin-top:23px;font-size:12px}.desktop-download{display:none}.privacy{font-size:9px;margin-top:11px}#settingsDialog{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:600px}#settingsSlot{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.liquid{display:none!important}.glass-pill{will-change:auto}}
@media(prefers-reduced-transparency:reduce){.glass,.tabs,.glass-pill,.mobile-dock,.editor{background:#f6f8f2;backdrop-filter:none;-webkit-backdrop-filter:none}#settingsDialog::backdrop{backdrop-filter:none}}
@media(prefers-contrast:more){body{color:#182d17}.glass{background:#f8fcf4;border-color:#78936b}.status,.source-link,.privacy,.range-ends,.source-copy small,.field,.footer,.shelf-header p{color:#3f5734}.tabs,.glass-pill{background:#f8fcf4}.tab{color:#213d19}}
@property --theme-h{syntax:'<number>';inherits:true;initial-value:100}
@property --theme-s{syntax:'<number>';inherits:true;initial-value:25}
:root{--theme-h:100;--theme-s:25;--accent:hsl(var(--theme-h) calc(var(--theme-s)*1%) 29%);--accent-light:hsl(var(--theme-h) calc(var(--theme-s)*1%) 38%);--ink:hsl(var(--theme-h) calc(var(--theme-s)*.4%) 21%);--muted:hsl(var(--theme-h) calc(var(--theme-s)*.35%) 39%);--line:hsl(var(--theme-h) calc(var(--theme-s)*.4%) 83%);--wash:hsl(var(--theme-h) calc(var(--theme-s)*.55%) 92%);--glass:hsla(var(--theme-h),calc(var(--theme-s)*.2%),99%,.6);color:var(--ink);transition:--theme-h 650ms ease,--theme-s 650ms ease}
body{background:url("./paper-grain.png") repeat,radial-gradient(ellipse at 5% 5%,hsla(var(--theme-h),calc(var(--theme-s)*.8%),87%,.85),transparent 45%),radial-gradient(ellipse at 95% 30%,hsla(calc(var(--theme-h) + 25),calc(var(--theme-s)*.55%),89%,.9),transparent 50%),var(--wash);color:var(--ink)}.wordmark{gap:7px;letter-spacing:-.04em}.fan-name{font:italic 42px/.9 var(--serif)}.dou-name{font:600 26px/1 var(--art-font)}.masthead{padding-top:20px;padding-bottom:12px}.masthead h1{font:500 30px/1.35 var(--art-font);letter-spacing:.02em}.masthead h1 em{font-style:normal;color:var(--accent)}.masthead p{color:var(--muted);font-size:11px}.nav-button{font-size:13px;font-weight:600;min-height:45px;padding:10px 19px;color:white;background:var(--accent);border-color:#ffffff88;box-shadow:inset 0 1px #fff4,0 4px 16px #0001}.nav-button svg{stroke-width:1.8}.device-note{color:var(--muted)}.preview-stage{--picture-height:337px;background:radial-gradient(ellipse at 50% 40%,#ffffffb0,var(--wash))}.preview-stage.pattern{background-color:var(--wash);background-image:radial-gradient(hsla(var(--theme-h),15%,55%,.16) .8px,transparent .8px)}.image-view{height:auto;gap:12px}.source-media{height:var(--picture-height);max-height:none}.image-view img,.image-view canvas{width:100%;height:var(--picture-height);max-height:none;max-width:100%;object-fit:contain;filter:drop-shadow(0 7px 12px #0000000d);border-radius:0}.source-media img{width:100%;height:100%;max-height:none}.image-view figcaption{font-size:11px;letter-spacing:0;color:var(--muted)}.tabs{background:hsla(var(--theme-h),calc(var(--theme-s)*.3%),93%,.65)}.tab{font-size:12px;color:var(--muted)}.tab[aria-selected=true]{color:var(--accent)}.stage-index,.stage-size,.status,.source-link,.privacy,.stats,.footer,.field-head,.range-ends{color:var(--muted)}.stats strong{color:var(--ink)}.stats span+span{border-color:var(--line)}.status{font-size:11px}.editor-title h2{font:500 21px/1.3 var(--art-font)}.editor-title span{font-size:10px;color:var(--muted);letter-spacing:0}.field{margin-top:18px}.field-head{font-size:12px}.field-head .value{color:var(--accent);font-style:normal}.field-head .value small,.source-copy small{color:var(--muted)}.source-copy strong{font-size:12px}.presets{display:flex;gap:5px;padding:4px;background:var(--wash);border:1px solid #fff9;border-radius:11px;margin-top:15px}.presets button{flex:1;border-radius:8px;background:transparent;color:var(--muted);padding:6px;min-height:30px;font-size:11px}.presets button[aria-pressed=true]{background:#fff;box-shadow:0 2px 6px #0001;color:var(--accent);font-weight:600}.select{color:var(--ink);font-size:12px}.color-hint,.preview-hint{font-size:10px;line-height:1.7;color:var(--muted);margin-top:7px}.palette-dots{margin-top:8px}.preview-hint{margin-top:13px}.chip{font-size:11px}.chip[aria-pressed=true] .switch{background:var(--accent-light)}.switch{background:var(--line)}input[type=range]::-webkit-slider-runnable-track{background:linear-gradient(to right,var(--accent-light) var(--fill),var(--line) var(--fill))}input[type=range]::-webkit-slider-thumb{background:var(--accent-light)}input[type=range]::-moz-range-progress{background:var(--accent-light)}input[type=range]::-moz-range-thumb{background:var(--accent-light)}.generate{margin-top:14px;font-size:12px;background:var(--accent)}.download{font-size:13px;min-height:45px;font-weight:600}.mobile-download{background:var(--accent)}:root[data-ready=true] .generate{background:#ffffff8c;color:var(--accent);border:1px solid white;box-shadow:inset 0 1px #fff}:root[data-ready=true] .download{background:linear-gradient(120deg,var(--accent),var(--accent-light));color:#fff;border-color:#ffffff70;box-shadow:0 5px 13px #0001}.palette-summary summary,.legend,.swatch,.swatch b{color:var(--muted)}.swatch{border-color:var(--line)}.shelf-header h2{font:500 22px var(--art-font)}.shelf-header p{color:var(--muted);font-size:11px}.sample-card[aria-pressed=true]{background:#ffffffb0;border-color:var(--accent-light)}.sample-card small,.sample-card:after{color:var(--muted)}.sample-card strong{font-size:12px}.sample-card img{object-fit:contain;background:#fff8}.footer{font-size:10px}.source-card .change{color:var(--accent)}.source-card.drag{border-color:var(--accent);background:var(--wash)}.error{padding:10px 9px 0;font-size:12px}
@media(hover:hover){.nav-button:hover:not(:disabled),.mobile-download:hover:not(:disabled){background:var(--accent-light);color:white}.generate:hover:not(:disabled){background:var(--wash)}.download:hover:not(:disabled){filter:brightness(1.06)}.tab:hover:not(:disabled){background:#ffffff38}}
@media(max-width:1060px) and (min-width:761px){.preview-stage{--picture-height:325px}.image-views.compare .source-media img{max-height:none}.editor{padding:17px}.color-hint,.preview-hint{font-size:9px}}
@media(max-width:760px){.fan-name{font-size:34px}.dou-name{font-size:23px}.masthead h1{font-size:25px}.masthead p{max-width:100px;font-size:10px}.nav-button{font-size:12px;min-height:42px;padding:8px 13px}.preview-stage{--picture-height:calc(clamp(350px,57svh,510px) - 135px)}.image-view img,.image-view canvas{width:100%;height:var(--picture-height);max-height:none}.image-views.compare .image-view img,.image-views.compare .image-view canvas{max-height:none}.source-media{height:var(--picture-height);max-height:none}.source-media img{height:100%;max-height:none}.editor{width:100%;max-width:100%;background:hsla(var(--theme-h),calc(var(--theme-s)*.3%),95%,.92)}.editor-title h2{font:500 25px var(--art-font)}.presets,.preview-hint{grid-column:1/-1}.presets{margin-top:13px}.presets button{min-height:34px}.field{margin-top:16px}.select{font-size:16px}.color-hint{font-size:10px}.preview-hint{font-size:10px}.mobile-dock{background:hsla(var(--theme-h),calc(var(--theme-s)*.35%),97%,.7)}.mobile-dock button{font-size:13px;font-weight:550}.mobile-download{background:linear-gradient(120deg,var(--accent),var(--accent-light))}.settings-button{color:var(--ink)}.sheet-grip{background:var(--line)}#settingsDialog::backdrop{background:hsla(var(--theme-h),15%,15%,.25)}.stage-index,.stage-size{font-size:9px}.stats{gap:8px;font-size:9px}.stats span+span{padding-left:8px}.sample-card strong{font-size:11px}.sample-card small{font-size:9px}.sample-card img{object-fit:contain}.shelf-header h2{font-size:21px}.shelf-header p{font-size:10px}.footer{font-size:9px;flex-wrap:wrap}.error{font-size:12px}}
@media(prefers-reduced-transparency:reduce){.glass,.tabs,.glass-pill,.mobile-dock,.editor{background:hsl(var(--theme-h) calc(var(--theme-s)*.3%) 97%);backdrop-filter:none;-webkit-backdrop-filter:none}}


.masthead{padding-bottom:20px}.bead-media{height:var(--picture-height);width:100%;display:flex;align-items:center;justify-content:center;flex-shrink:0}#canvas{flex-shrink:0;object-fit:fill;max-width:none;max-height:none;image-rendering:pixelated;filter:none}.image-views{filter:none}.masthead h1{letter-spacing:.035em}.masthead h1 em{margin-left:.1em}
@media(max-width:760px){.masthead{padding-top:19px;padding-bottom:18px}.bead-media{height:var(--picture-height)}}

/* Consistent spacing and a content-sized preview on both layouts. */
.app{padding-top:24px}.nav{min-height:46px}.masthead{padding:18px 0 24px}.masthead h1{font-size:30px;line-height:1.4;letter-spacing:.01em}.masthead h1 em{font-style:italic;margin-left:0}.nav-actions{gap:16px}.nav-button{gap:9px;padding:10px 18px}.preview-stage{height:auto;min-height:220px}.image-views,.image-views.compare{height:auto;padding:76px 22px 40px;gap:18px}.image-view,.image-views.compare .image-view{gap:10px}.image-view figcaption{height:28px;display:flex;align-items:center;justify-content:center}.preview-toolbar{top:16px}.source-media img{filter:none}.preview-info{padding:14px 10px 0}.stats{padding:10px 10px 8px;gap:16px}.stats span+span{padding-left:16px}.shelf{margin-top:24px}.shelf-header{gap:14px;margin-bottom:14px}.sample-list{gap:12px}.sample-card{padding:10px;gap:12px}.sample-card img{width:58px;height:70px}.sample-card small{margin-top:5px}.editor{padding:22px}.editor-title{margin-bottom:18px}.source-card{padding:10px;gap:12px}.source-thumb{height:48px;width:44px}.field{margin-top:22px}.field-head{margin-bottom:10px}.checks{gap:8px}.chip{min-height:42px}.presets{margin-top:18px;padding:5px}.presets button{min-height:34px}.range-ends{font-size:10px;margin-top:2px}.color-hint{font-size:11px;line-height:1.6;margin-top:10px}.preview-hint{margin-top:18px;font-size:11px}.generate{margin-top:14px;min-height:44px}.download{margin-top:10px;gap:10px}.inspect-pattern{display:flex;align-items:center;gap:6px;border-radius:99px;background:#ffffffb0;padding:5px 10px;font-size:11px;color:var(--accent);min-height:28px;white-space:nowrap}
.palette-picker{position:relative;z-index:4}.palette-picker summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;min-height:44px;padding:10px 12px;background:#ffffff90;border:1px solid #fff;border-radius:12px;font-size:13px}.palette-picker summary::-webkit-details-marker{display:none}.palette-picker summary svg{width:15px;height:15px;transition:transform .3s var(--ease)}.palette-picker[open] summary svg{transform:rotate(180deg)}.palette-options{position:absolute;top:calc(100% + 7px);left:0;right:0;padding:6px;border-radius:16px;background:hsla(var(--theme-h),15%,98%,.96);border:1px solid white;box-shadow:0 12px 30px #17251624,inset 0 1px white;backdrop-filter:blur(24px);transform-origin:top center;animation:picker-in .3s var(--ease)}.palette-options label{position:relative;display:flex;align-items:center;gap:10px;padding:11px 10px;border-radius:11px;cursor:pointer;transition:background .18s,transform .18s}.palette-options label+label{margin-top:4px}.palette-options label:has(input:checked){background:var(--wash)}.palette-options label:hover{background:var(--wash)}.palette-options input{position:absolute;opacity:0;width:1px;height:1px}.palette-options label:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:-2px}.palette-options strong{font-size:13px;font-weight:550;display:block}.palette-options small{font-size:10px;display:block;margin-top:3px;color:var(--muted)}.palette-options i{font-style:normal;margin-left:auto;color:var(--accent);opacity:0}.palette-options input:checked~i{opacity:1}.palette-options label:active{transform:scale(.98)}
@keyframes picker-in{from{opacity:0;transform:translateY(-5px) scale(.96)}65%{opacity:1;transform:translateY(1px) scale(1.015)}to{transform:none}}
html.modal-open{overflow:hidden}html,body{overflow-x:hidden;max-width:100%}html.modal-open body{position:fixed;left:0;right:0;width:100%;overflow:hidden}.editor,#patternScroll{overscroll-behavior:contain}#patternDialog{width:min(960px,calc(100% - 28px));height:min(820px,90svh);max-width:none;max-height:none;border:1px solid white;border-radius:24px;padding:16px;background:var(--wash);color:var(--ink);overflow:hidden;box-shadow:0 25px 80px #0003}#patternDialog[open]{display:flex;flex-direction:column;gap:14px;animation:picker-in .25s var(--ease)}#patternDialog::backdrop{background:#18231460;backdrop-filter:blur(9px)}#patternDialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 2px}#patternDialog h2{font:500 23px var(--art-font)}#patternMeta{font-size:11px;color:var(--muted);margin-top:6px;letter-spacing:0}#patternDialog p{font-size:11px;color:var(--muted);margin-top:5px}#closePattern{width:42px;height:42px;border-radius:50%;background:#ffffffaa;font-size:18px}#patternScroll{overflow:auto;flex:1;border:2px solid #1f1f1f;min-height:0;border-radius:10px;background:#fff;touch-action:pan-x pan-y;display:flex;align-items:flex-start;justify-content:center;scrollbar-gutter:stable}#patternScroll svg{display:block;width:min(100%,var(--pattern-fit-width,100%));height:auto;max-width:none;max-height:none;stroke:none;fill:none;flex-shrink:0;transform-origin:top center;transition:transform .35s cubic-bezier(.22,1,.36,1)}
@media(max-width:1060px) and (min-width:761px){.editor{padding:17px}.image-views,.image-views.compare{padding-inline:14px;gap:12px}.stats{gap:8px}.stats span+span{padding-left:8px}.sample-card{gap:8px;padding:7px}.sample-card img{width:42px;height:58px}}
@media(max-width:760px){.app{padding-top:18px}.nav{min-height:42px}.masthead{padding:12px 2px 20px}.masthead h1{font-size:25px}.preview-toolbar{top:13px}.image-views,.image-views.compare{padding:72px 14px 34px;gap:12px}.image-view,.image-views.compare .image-view{gap:8px}.image-view figcaption{font-size:10px}.preview-info{padding:12px 8px 0}.stats{gap:9px;padding:9px 8px 7px}.stats span+span{padding-left:9px}.sample-list{gap:9px}.sample-card{padding:7px}.sample-card img{width:100%;height:112px}.sample-card strong{padding:8px 3px 0}.sample-card small{padding:0 3px 5px;margin-top:4px}.shelf{margin-top:20px}.shelf-header{margin-bottom:12px}.editor{padding:12px 18px calc(22px + env(safe-area-inset-bottom));gap:0 16px;max-height:88svh}.sheet-grip{margin-bottom:16px}.editor-title{margin-bottom:16px}.editor-title h2{font-size:24px}.sheet-close{width:38px;height:38px}.source-card{padding:9px;gap:11px}.source-thumb{width:42px;height:46px}.presets{margin-top:16px}.field{margin-top:20px}.palette-field{grid-column:1/-1}.palette-field+.field{grid-column:1/-1}.palette-dots{display:none}.color-hint{font-size:10px;margin-top:8px}.palette-picker summary{font-size:14px;min-height:46px}.palette-options strong{font-size:14px}.palette-options small{font-size:11px}.palette-options label{min-height:60px;padding:10px 12px}.preview-hint{margin-top:12px}.chip{min-height:42px;gap:8px}.inspect-pattern{font-size:10px;padding:5px 8px}.mobile-dock{gap:8px;padding:7px}.mobile-dock button{gap:8px;min-height:46px}.mobile-download{flex:1.2}.footer{margin-top:18px}.palette-picker[open]{z-index:8}}


/* One serif family throughout the interface, with readable tabular numerals. */
body{font-weight:500;letter-spacing:.02em}.fan-name{font-family:"Iowan Old Style",Baskerville,"Times New Roman",serif}.dou-name{font-weight:600}.nav-button,.download,.mobile-dock button{letter-spacing:.06em;font-weight:600}.tab,.presets button,.chip{font-size:12px;letter-spacing:.04em}.field-head,.source-copy strong,.palette-picker summary{font-weight:600}.field-head .value{font-size:22px;font-variant-numeric:tabular-nums}.stats strong,.swatch,.stage-size{font-variant-numeric:tabular-nums}.range-ends,.source-copy small,.sample-card small,.status,.source-link,.footer,.color-hint,.preview-hint{font-size:11px;line-height:1.7}.image-view figcaption,.inspect-pattern{font-size:12px}.stage-index,.stage-size{font-size:11px}.palette-options strong{font-weight:600}.palette-options small{font-size:11px}.stats{font-size:11px}.stats strong{font-size:14px}
@media(max-width:760px){.tab,.presets button,.chip{font-size:12px}.range-ends,.source-copy small,.sample-card small,.status,.source-link,.footer,.color-hint,.preview-hint{font-size:10px}.stats{font-size:10px;gap:7px}.stats strong{font-size:12px}.stats span+span{padding-left:7px}.stage-index,.stage-size{font-size:10px}.image-view figcaption,.inspect-pattern{font-size:10px}.sample-card strong{font-size:11px}}

@media(max-width:760px){
:root{transition:none}body:before{display:none}.preview-stage{min-height:444px}.image-views{min-height:444px}.image-views.compare .source-media img{height:auto;max-height:var(--picture-height)}
button:active:not(:disabled){transform:none}.glass-pill{backdrop-filter:none;-webkit-backdrop-filter:none;will-change:transform}.editor{backdrop-filter:none;-webkit-backdrop-filter:none;background:hsla(var(--theme-h),12%,95%,.98)}
#settingsDialog,#patternDialog{backface-visibility:hidden}#settingsDialog::backdrop,#patternDialog::backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;animation:none;background:#26302055}
.palette-options{backdrop-filter:none;animation:menu-slide .18s ease-out}.palette-options label:active{transform:none}#patternDialog[open]{animation:menu-slide .18s ease-out}
}
@keyframes menu-slide{from{transform:translateY(5px)}to{transform:translateY(0)}}
.image-view img,.sample-card img,.source-thumb{background:#e7ede3 url("./paper-grain.png") center/180px;}.image-view img:not([src]),.sample-card img:not([src]){visibility:hidden}.img-fallback{display:grid;place-items:center;color:#788873;font-size:11px;min-height:80px;background:var(--wash);border-radius:10px}

