:root{--wine:#822c3c;--wineD:#612232;--ink:#263e35;--muted:#626c60;--line:#dedacf;--paper:#faf9f4;--soft:#f3f0e6;--serif:"Songti SC","STSong","Noto Serif CJK SC",Georgia,serif;font-family:"DM Sans","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-size:16px}*{box-sizing:border-box}body{margin:0}button,select,textarea,input{font:inherit;color:inherit}button,select{cursor:pointer}button{border:0;background:transparent}button:disabled{opacity:.4;cursor:default}button:focus-visible,select:focus-visible,textarea:focus-visible,canvas:focus-visible{outline:3px solid #ba9663;outline-offset:3px}svg{display:inline-block;width:19px;height:19px;vertical-align:middle;flex:none}i{font-style:normal;display:inline-flex}button{transition:background .16s,color .16s,border-color .16s,transform .16s}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}header{border-bottom:1px solid var(--line);background:#faf9f4}.headerinner,main{width:min(1248px,calc(100% - 9vw));margin:auto}.headerinner{height:78px;display:flex;align-items:center;justify-content:space-between}.brand,.navbtn,nav,.hint,.actionrow button,.textbtn,.sheethead,.sheet button,.boxhead,.scene-label,.undo,.tooltabs button,#draft,.samplehead,.filterrow,.stagehead,.stagefoot,.editbar div{display:flex;align-items:center}.brandmark{height:42px;width:42px;background:var(--wine);color:#fff1d5;display:grid;place-items:center;border-radius:12px 12px 12px 3px;outline:1px solid #e1bd8d;outline-offset:-4px}.brandmark svg{width:27px;height:27px;stroke-width:1.3}.brand b,.brand small{display:block;margin-left:11px}.brand b{font-family:var(--serif);font-size:20px;letter-spacing:.12em}.brand small{font-size:10px;letter-spacing:.22em;color:#7b654d;margin-top:2px}.navbtn{gap:8px;font-size:14px;padding:10px 15px}.navbtn+button{border:1px solid #c7c9bc;border-radius:7px;margin-left:7px}.navbtn:hover,.textbtn:hover,.iconbtn:hover{background:#eeece2}.intro{display:flex;align-items:flex-end;justify-content:space-between;margin:32px 0 25px}.intro h1{font-family:var(--serif);font-size:clamp(33px,3.3vw,49px);letter-spacing:.035em;margin:0 0 8px;font-weight:700;line-height:1.22}.intro h1 span{font-family:Georgia;color:#b8985b;font-size:.52em;vertical-align:top;margin-left:10px}.intro p{font-size:15px;color:var(--muted);margin:0;letter-spacing:.02em}#draft{font-size:13px;gap:5px;color:var(--muted);padding:0 2px 1px}#draft svg{width:16px;height:16px}.workbench{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(350px,1fr);align-items:start;gap:24px}.stage{position:relative;isolation:isolate;height:clamp(398px,45vw,530px);border:1px solid #d9cbb9;border-radius:16px;overflow:hidden;background-color:#f4ecda;background-image:radial-gradient(ellipse at 49% 44%,#fff9eb 0%,#f6efdf 45%,#ecdfc8 100%);transition:background-color .7s}.stage:after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.19;z-index:-1;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.3' filter='url(%23n)'/%3E%3C/svg%3E")}.stage:before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 50%,#435044,#202e29);opacity:0;transition:opacity .8s;z-index:-1}.stage.night:before{opacity:1}.stage.night .scene-caption,.stage.night .stagefoot,.stage.night .corner{color:#e7d6a7}.mat{position:absolute;inset:11px;border:1px solid #bc9d6d75;border-radius:9px;pointer-events:none}.corner{font:17px/17px Georgia,serif;color:#b19770;position:absolute;background:#f0e5cf;height:17px;width:17px;text-align:center}.night .corner{background:#29362f}.c1{top:-8px;left:-6px}.c2{top:-8px;right:-6px}.c3{bottom:-8px;left:-6px}.c4{bottom:-8px;right:-6px}.stagehead,.stagefoot{position:absolute;left:26px;right:25px;justify-content:space-between;z-index:1;pointer-events:none}.stagehead{top:22px}.scene-label{border-radius:20px;padding:6px 11px;background:#fcf9eddf;border:1px solid #d7c8aa;gap:5px;color:#53614a;font-size:13px}.scene-label b{font-weight:500}.scene-label svg{width:15px;height:15px}.undo{width:33px;height:33px;justify-content:center;background:#fbf8ed;border:1px solid #d6c8af;border-radius:50%;pointer-events:auto}.stagefoot{bottom:22px;font-size:12px;color:#776d59;align-items:flex-end}.scene-caption{font:italic 20px Georgia,var(--serif);letter-spacing:.14em;color:#766443}.canvaswrap{height:100%;display:flex;align-items:center;justify-content:center;padding:3px 0 5px}.canvaswrap canvas{height:100%;width:auto;max-width:100%;object-fit:contain;touch-action:none;user-select:none;-webkit-user-select:none}.actionrow{display:flex;gap:10px;margin-top:12px}.actionrow button{justify-content:center;height:49px;border-radius:8px;font-weight:600;font-size:16px;gap:9px}.primary{background:var(--wine);color:#fffaf0;border:1px solid var(--wine)}.primary:hover{background:var(--wineD)}.actionrow .primary{flex:1.3}.secondary{border:1px solid #c7c6b8;background:#fbfaf5}.secondary:hover{background:#f0ede2}.actionrow .secondary{flex:1}.toolbox{background:#fffefa;border:1px solid var(--line);border-radius:15px;overflow:hidden}.boxhead{gap:10px;padding:19px 21px 17px}.boxicon{color:var(--wine)}.boxicon svg{width:24px;height:24px}h2,h3{margin:0}h2{font-family:var(--serif);font-size:22px}.tooltabs{display:flex;background:#f6f4eb;padding:0 14px;border-top:1px solid #ede9dd;border-bottom:1px solid var(--line)}.tooltabs button{flex:1;justify-content:center;gap:6px;white-space:nowrap;font-size:14px;font-weight:600;padding:13px 2px;color:#5e685c;border-bottom:2px solid transparent}.tooltabs button[aria-selected=true]{border-bottom-color:var(--wine);color:var(--wine)}.tabpage{padding:18px 19px 12px}.filterrow,.samplehead,.sheethead{justify-content:space-between}.filterrow{margin-bottom:13px}.filterrow label,h3{font-size:16px;font-weight:650}.filterrow select{padding:5px 27px 5px 11px;appearance:none;background:#fffdf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%235c6559'/%3E%3C/svg%3E") no-repeat right 8px center;border:1px solid #dfdacd;border-radius:20px;font-size:13px}.shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:clamp(320px,28vw,398px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d2c5ae transparent;align-content:start;padding:1px 3px 2px 1px}.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f7f4eb;border:1px solid #e7e0d2;border-radius:8px;aspect-ratio:.9;padding:8px 2px 7px;min-width:0}.tile img{height:clamp(43px,4.6vw,69px);width:82%;object-fit:contain;margin-bottom:4px;filter:drop-shadow(0 2px 2px #43362420)}.tile span{font-size:13px;color:#494c40;white-space:nowrap}.tile:hover,.tile.mark{border-color:#a77365;background:#f1e8d8}.hint{gap:7px;font-size:13px;color:var(--muted);margin:13px 0 0;line-height:1.5}.hint svg{width:16px;height:16px}.samples{margin:23px 0 40px}.samplehead{margin-bottom:12px}.samplehead h2{font-size:19px}.textbtn{gap:4px;font-size:13px;border-radius:4px;padding:5px 0 5px 5px}.textbtn svg{width:15px}.samplegrid,.basegrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.sample{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:4px;border:1px solid var(--line);border-radius:8px;background:#f2eee3;padding:2px 6px;min-height:76px}.sample:nth-child(2){background:#eaf0e6}.sample:nth-child(3){background:#e8eff0}.sample.active{border-color:#925b57;box-shadow:inset 0 0 0 1px #925b5755}.sample canvas{width:auto;height:63px;max-width:42%;object-fit:contain}.sample strong{font-size:15px;font-family:var(--serif)}.basegrid{margin:16px 0}.basegrid .tile{aspect-ratio:.74}.basegrid img{height:80px}.seg{display:flex;flex-wrap:wrap;gap:6px}.seg button,.editbar button,.sheet button:not(.iconbtn){border-radius:6px;border:1px solid var(--line);padding:6px 10px;background:#faf8f0;font-size:14px}.seg button[aria-pressed=true],.tile[aria-pressed=true]{border-color:var(--wine);color:var(--wine);background:#f7ece6}.trimrow{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:10px 0}.trimrow>span{font-size:14px}.trimpart{padding-bottom:10px;margin-bottom:14px;border-bottom:1px solid var(--line)}.trimpart:last-child{border:0;margin:0}.sw{display:inline-block;width:12px;height:12px;border-radius:100%;margin-right:5px;border:1px solid #0002;vertical-align:-1px}.editbar{padding:12px 19px;background:#f6f3e9;border-top:1px solid var(--line)}.editbar strong{font-size:14px}.editbar div{margin-top:8px;gap:5px;flex-wrap:wrap}.editbar button{padding:6px;display:flex;align-items:center;gap:3px;font-size:13px}.editbar svg{width:15px;height:15px}.overlay{position:fixed;inset:0;z-index:8;background:#152b256b;display:flex;align-items:center;justify-content:center;padding:16px}.sheet{background:var(--paper);border-radius:15px;width:min(440px,100%);padding:23px;max-height:90vh;overflow:auto;box-shadow:0 18px 72px #152b2540}.sheethead{margin-bottom:15px}.sheet h2{font-size:23px}.iconbtn{display:grid;place-items:center;padding:7px;border-radius:50%}.sheet p{line-height:1.6;font-size:15px;color:#4e6054;margin:10px 0}.sheet textarea,.sheet select{width:100%;padding:10px;border:1px solid #c9c7b7;background:white;border-radius:6px;margin:5px 0 9px;font-size:15px}.sheet textarea{height:78px;resize:vertical}.sheet label{font-size:14px;font-weight:600;display:block;margin-top:13px}.sheet button:not(.iconbtn),.dl{margin:5px 0;padding:10px 14px}.sheet .solid,.dl{background:var(--wine)!important;color:white;border:0!important}.dl{display:inline-block;border-radius:6px;text-decoration:none}.previewimg{display:block;width:min(220px,70%);margin:0 auto 14px;border-radius:5px}.sheet .err{color:var(--wine)}.toast{position:fixed;z-index:12;bottom:24px;left:50%;transform:translateX(-50%);background:#283e34;color:white;border-radius:24px;padding:11px 20px;max-width:90vw;width:max-content;box-shadow:0 5px 24px #1232;font-size:14px;pointer-events:none}
@media(min-width:1450px){.intro{margin-top:38px}.stage{height:555px}}
@media(max-width:999px){.headerinner,main{width:94%}.workbench{gap:14px;grid-template-columns:minmax(0,1.16fr) minmax(310px,1fr)}.tabpage{padding:14px 12px 10px}.shelf{gap:5px}.tile span{font-size:12px}.sample{flex-direction:column;padding:5px}.sample canvas{max-width:100%}.stage{height:420px}}
@media(max-width:740px){.headerinner,main{width:calc(100% - 28px)}.headerinner{height:60px}.brandmark{width:34px;height:34px}.brand b{font-size:16px}.brand small{font-size:8px}.navbtn{font-size:13px;padding:7px;gap:4px}.navbtn+button{margin-left:1px}.navbtn svg{width:16px}.intro{margin:18px 0 14px}.intro h1{font-size:31px;margin-bottom:5px}.intro p{font-size:13px}.intro #draft{display:none}.workbench{display:flex;flex-direction:column;gap:13px;position:relative}.left{display:contents}.stage,.toolbox,.actionrow,.samples{width:100%}.stage{order:1;height:clamp(273px,39svh,395px);border-radius:12px}.stagehead{top:15px;left:16px;right:16px}.mat{inset:8px}.stagefoot{bottom:14px;left:16px;right:16px}.scene-caption{font-size:16px}.actionrow{order:2;margin:0}.actionrow button{height:43px;font-size:15px}.toolbox{order:3}.samples{order:4;margin:4px 0 25px}.boxhead{padding:12px 15px}.boxhead h2{font-size:19px}.tooltabs button{padding:10px 2px}.shelf{max-height:218px;gap:6px}.tile{aspect-ratio:1.08}.tile img{height:43px}.filterrow{margin-bottom:8px}.tabpage{padding:11px 12px}.sample{flex-direction:row;min-height:67px}.sample canvas{height:52px;max-width:42%}.sample strong{font-size:13px}.hint{margin:8px 0 0}.seg button{font-size:13px}.stage .canvaswrap{padding:0}.editbar{position:relative}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Small WebViews can still use the editor without modern sizing units. */
@supports not (height:1svh){@media(max-width:740px){.stage{height:310px}}}

/* Christmas Atelier, second edition */
:root{--wine:#294e43;--wineD:#18372f;--ink:#243c34;--muted:#737e78;--line:#dce2dc;--paper:#f7f9f6;--soft:#eef2ed}
header{background:#f7f9f6}.headerinner{height:76px}.brandmark{background:transparent;color:#294e43;border-radius:0;outline:0;width:29px}.brandmark svg{width:27px;height:34px}.brand b{font-family:"PingFang SC",sans-serif;font-size:18px;letter-spacing:.04em;font-weight:500}.brand small{font-size:9px;color:#76867b;letter-spacing:.18em}.navbtn+button{border-radius:30px;padding:10px 19px;border-color:#c5d0c7}.intro{margin:34px 0 26px;align-items:center}.intro h1{font-size:42px;font-weight:500;letter-spacing:.01em}.intro h1 em{font-style:normal;color:#668475}.intro p{font-size:14px;margin-top:11px}.workbench{grid-template-columns:minmax(0,1.55fr) minmax(350px,1fr);gap:28px}.stage{height:540px;border:0;border-radius:3px;background:#e6ede6;background-image:radial-gradient(ellipse at 50% 28%,#f4f7f1 0%,#e3ece2 58%,#cfdbce 100%)}.stage:after,.mat{display:none}.stage:before{background:radial-gradient(ellipse at 50% 45%,#3c5148,#132e27)}.scene-label{background:#ffffff90;border:0;padding:8px 12px;letter-spacing:.03em}.undo{background:#ffffffa0;border:0}.stagehead{top:20px}.scene-caption{font-size:18px;letter-spacing:.1em;color:#4f6556}.stagefoot{color:#637269}.canvaswrap{padding:0}.actionrow{gap:12px}.actionrow button{border-radius:3px;height:49px;font-weight:500}.secondary{border-color:#becbc0;background:transparent}.toolbox{border:0;border-radius:3px;background:#fff;box-shadow:0 5px 30px #18372f06}.boxhead{padding:23px 22px}.boxhead h2{font-size:21px;font-weight:500}.tooltabs{background:#fff;border-top:0;border-bottom:1px solid #e8ece7}.tooltabs button{font-size:14px;font-weight:500;padding:14px 0}.tabpage{padding:20px}.filterrow{margin-bottom:16px}.filterrow label{font-weight:500}.filterrow select{background-color:#fff;border-color:#dce2dc}.shelf{max-height:414px;gap:9px;padding:2px 5px 2px 1px}.tile{border:1px solid transparent;border-radius:2px;background:#f2f5f0;aspect-ratio:.85;padding:11px 3px}.tile:hover,.tile.mark{background:#e9efe6;border-color:#b9cdbb}.tile span{font-size:13px;color:#45564c}.tile img{height:66px;margin-bottom:8px}.tile[aria-pressed=true]{background:#e6eee4;border-color:#6e947b;color:#294e43}.basegrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.basegrid .tile{aspect-ratio:.68}.basegrid img{height:103px}.samples{margin-top:24px}.samplehead h2{font-size:18px;font-weight:500}.samplegrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.sample{min-height:98px;border:1px solid #dce4da;border-radius:2px;background:#edf2eb!important;flex-direction:column;padding:6px}.sample.active{border-color:#62826a;box-shadow:none}.sample canvas{height:61px;max-width:100%}.sample strong{font-size:13px;font-weight:500}.editbar{background:#eef3ec;border-top-color:#dce2dc}.editbar button,.seg button{background:#fff;border-color:#d5dfd3;border-radius:3px}.seg button[aria-pressed=true]{color:#244434;border-color:#7c9b7e;background:#eef4eb}.sheet{background:#fbfcf9;border-radius:5px}.sheet .dl{display:block;font-size:14px;margin:12px 0;text-align:center}.trimpart{border-color:#dce2dc}.hint{font-size:13px}.toast{border-radius:5px}
@media(min-width:1450px){.stage{height:580px}}
@media(max-width:999px){.workbench{gap:17px;grid-template-columns:minmax(0,1.15fr) minmax(320px,1fr)}.stage{height:480px}.basegrid{grid-template-columns:repeat(3,minmax(0,1fr))}.basegrid img{height:88px}.tabpage{padding:14px}.tile img{height:48px}.samplegrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:740px){.headerinner{height:65px}.brand b{font-size:15px}.brand small{font-size:8px}.brandmark{width:20px}.navbtn{font-size:12px;padding:8px 5px}.navbtn+button{padding:8px}.intro{margin:23px 0 18px}.intro h1{font-size:29px}.intro p{font-size:12px;line-height:1.6;max-width:320px}.stage{height:345px;height:42svh;min-height:300px;max-height:410px}.workbench{gap:13px}.boxhead{padding:16px}.tooltabs button{padding:12px 0}.tabpage{padding:14px}.shelf{max-height:245px}.tile{aspect-ratio:1}.tile img{height:49px}.basegrid{grid-template-columns:repeat(4,minmax(0,1fr))}.basegrid img{height:85px}.basegrid .tile{aspect-ratio:.7}.samplegrid{grid-template-columns:repeat(4,minmax(0,1fr))}.sample{flex-direction:column}.sample canvas{max-width:100%}.sample strong{font-size:12px}.samplehead h2{font-size:16px}.textbtn{font-size:12px}.scene-caption{font-size:16px}}
/* Theme packs & atmosphere polish */
.stage:before{background:radial-gradient(ellipse at 50% 42%,#243a33 0%,#142620 55%,#0b1713 100%)}
.packbar{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.packchip{font-size:12px;padding:5px 10px;border-radius:99px;border:1px solid #d5dfd3;background:#f7f9f5;color:#46594e;display:inline-flex;align-items:center;gap:4px}
.packchip:hover{background:#ebf1e8}
.packchip[aria-pressed=true]{background:#294e43;color:#fff;border-color:#294e43}
.packchip .price{font-size:11px;opacity:.85;color:#9d7437;font-weight:600}
.packchip[aria-pressed=true] .price{color:#f6dc9c}
.packnote{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;margin:0 0 11px;border-radius:4px;background:linear-gradient(135deg,#faf5ea,#f4efe4);border:1px solid #e4d7be;font-size:12px;color:#5a4d38;line-height:1.45}
.packnote strong{color:#3c3120;display:block;font-size:13px;margin-bottom:2px}
.packnote button{flex:none;font-size:12px;padding:5px 10px;border-radius:3px;background:#294e43;color:#fff;white-space:nowrap}
.packnote button:hover{background:#18372f}
.tile{position:relative;padding-top:15px}
.tile span{font-size:12px;letter-spacing:-.01em}
.badge{position:absolute;top:3px;right:3px;font-size:9px;line-height:1;padding:2px 4px;border-radius:99px;background:#f7ebd4;color:#8c6429;border:1px solid #e2c997;font-weight:600;pointer-events:none}
.packcard{border:1px solid #dce2dc;border-radius:6px;padding:13px;margin:10px 0;background:#fff}
.packcardhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.packcardhead strong{font-size:16px;font-family:var(--serif)}
.packtag{font-size:12px;padding:2px 8px;border-radius:99px;background:#f7ebd4;color:#8c6429;font-weight:600}
.packthumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0}
.packthumbs div{background:#f3f6f1;border-radius:4px;padding:7px 4px;text-align:center}
.packthumbs img{height:48px;max-width:100%;object-fit:contain;display:block;margin:0 auto 4px}
.packthumbs span{font-size:11px;color:#4c5d52}
.badge.ok{background:#e4f1e6;color:#2a5f3e;border-color:#b8d9be}
.packchip .price.ok{color:#2a5f3e}
.packchip[aria-pressed=true] .price.ok{color:#b9efc4}
.packtag.ok{background:#e4f1e6;color:#2a5f3e}
.redeemrow{display:flex;gap:8px;margin:10px 0 4px}
.redeemrow input{flex:1;padding:10px 12px;border:1px solid #c9c7b7;background:#fff;border-radius:6px;font-size:14px;text-transform:uppercase;letter-spacing:.05em}
.redeemrow button{margin:0!important;white-space:nowrap}
.sheet .okmsg{color:#2a5f3e;font-size:13px;margin:6px 0}
.sheet .guide{background:#f3f6f1;border:1px solid #dce3da;border-radius:6px;padding:11px 13px;font-size:13px;color:#4a5d51;line-height:1.6;margin:12px 0}
.sheet .btnrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.navbtn+button{border:0;border-radius:6px;margin-left:2px;padding:9px 12px}
#desk{border:1px solid #c5d0c7;border-radius:30px;padding:9px 17px;margin-left:6px}
@media(max-width:740px){.navbtn+button{padding:7px 5px}#desk{padding:7px 10px;margin-left:2px}}
