:root{--paper:#f4f0e7;--ink:#252b30;--red:#a83c30;--line:#d8d2c7;--muted:#77746d}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 'Noto Sans SC',sans-serif}button,input,textarea,select{font:inherit;color:inherit}button,select{cursor:pointer}button{border:1px solid var(--line);background:#faf8f1;padding:10px 14px;min-height:44px;border-radius:3px;transition:background .15s}button:hover{background:#e9e3d7}button:disabled{opacity:.38;cursor:default}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,canvas:focus-visible{outline:2px solid var(--red);outline-offset:3px}button.primary{background:var(--red);border-color:var(--red);color:#fffaf0}button.primary:hover{background:#873027}.masthead{max-width:1600px;padding:24px 38px 20px;margin:auto;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font:700 13px/1.2 sans-serif;letter-spacing:1.8px;text-decoration:none;color:var(--ink)}.brand span{font-weight:400;font-size:10px;color:var(--muted);margin-left:20px}.masthead select{background:transparent;border:0;padding:10px;font-size:12px}main{max-width:1600px;padding:0 38px;margin:auto}.intro{padding:39px 0 35px;display:flex;justify-content:space-between;align-items:center}.eyebrow{font:10px/1.3 sans-serif;letter-spacing:2.2px;color:var(--red);text-transform:uppercase;margin:0 0 12px}h1{font:normal clamp(30px,3.7vw,56px)/1.2 Georgia,'Noto Sans SC',serif;letter-spacing:-1.8px;margin:0 0 13px}.lede{color:var(--muted);margin:0;max-width:740px;font-size:13px}.tiny-note{font:700 13px/1.15 sans-serif;transform:rotate(8deg);margin-right:15px;color:var(--red);letter-spacing:1px}.tiny-note span{display:block;font:40px Georgia}.workspace{display:grid;grid-template-columns:250px minmax(300px,1fr) 232px;gap:27px;align-items:start}.composer,.cuttings{padding-top:7px}.section-label{display:flex;gap:11px;align-items:center;font-size:12px;margin-bottom:15px;font-weight:600}.section-label>span:first-child{font:10px monospace;color:var(--red);border:1px solid #c9b9ac;border-radius:50%;width:25px;height:25px;display:grid;place-items:center}.composer textarea{width:100%;height:100px;resize:vertical;background:#faf8f1;border:1px solid var(--line);padding:14px;font-size:17px;line-height:1.65}.input-meta{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:10px;margin:4px 0 13px}.text-button{border:0;background:transparent;padding:2px 0;min-height:32px;font-size:11px;text-decoration:underline;text-underline-offset:3px}.input-group>.primary{width:100%}.small{font-size:11px;color:var(--muted);line-height:1.6;margin:12px 0 24px}.directions{display:grid;gap:9px;margin-bottom:25px}.direction{display:grid;grid-template-columns:72px 1fr;text-align:left;padding:7px;align-items:center;gap:11px;background:transparent}.direction.active{border-color:var(--red);box-shadow:inset 3px 0 var(--red)}.direction canvas{width:72px;height:70px;display:block}.direction b{font-weight:400;font-size:12px;display:block}.direction small{font-size:9px;color:var(--muted);display:block;margin-top:4px}.swatches{display:flex;gap:12px}.swatch{width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;box-shadow:inset 0 0 0 4px var(--paper);border:1px solid #bcb4a8}.swatch.active{outline:2px solid var(--red);outline-offset:3px}.save-note{font-size:10px;color:var(--muted);margin-top:25px}.studio{background:#dedbd2;border:1px solid #d0cabe;padding:0 22px 18px}.studio-toolbar{height:54px;display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#666}.studio-toolbar div{display:flex;gap:5px}.studio-toolbar button{font-size:10px;min-height:32px;padding:5px 9px;background:transparent;border-color:#bdb7ac}.canvas-wrap{position:relative;width:100%;max-width:590px;margin:auto;box-shadow:0 7px 22px #40362620}#art{display:block;width:100%;height:auto;touch-action:none;cursor:grab}#art:active{cursor:grabbing}.canvas-hint{text-align:center;font-size:10px;color:#777269;margin:13px 0}.export-bar{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}.export-bar button{font-size:11px}.resolution{margin-right:auto;font:9px monospace;color:#736f65}.cuttings .small{margin-top:-4px;margin-bottom:13px}#sources{display:grid;gap:12px}.source{position:relative;height:105px;overflow:hidden;padding:0;border:0;box-shadow:0 3px 6px #00000012;transform:rotate(-1deg);text-align:left}.source:nth-child(2){transform:rotate(1deg)}.source canvas{width:100%;height:100%;display:block}.source span{position:absolute;right:7px;bottom:5px;padding:3px 5px;background:#fffdf4d9;color:#34302b;font-size:9px}.selection{border-top:1px solid var(--line);margin-top:20px;padding-top:18px}.selection label{display:flex;justify-content:space-between;font-size:10px;color:#726e66;margin:12px 0 6px}.selection input[type=text],#pieceText{width:100%;padding:9px 11px;border:1px solid var(--line);background:#faf8f1;font-size:15px}.selection>button{width:100%;font-size:10px;margin-top:7px}.selection input[type=range]{width:100%;accent-color:var(--red);height:25px}.layer-controls{display:flex;gap:6px;margin-top:10px}.layer-controls button{flex:1;font-size:10px;padding:8px 5px}.piece-list{margin-top:18px;font-size:11px}.piece-list summary{cursor:pointer;padding:10px 0}#pieces{display:flex;flex-wrap:wrap;gap:5px;max-height:180px;overflow:auto}#pieces button{font-size:12px;padding:6px 9px;min-height:34px}#pieces button.active{border-color:var(--red)}footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;padding:20px 0;margin-top:32px;color:#868073;font-size:9px;letter-spacing:.3px}#tear-ghost{position:absolute;pointer-events:none;top:40%;left:45%;color:var(--red);font-size:50px;opacity:0}#tear-ghost.animate{animation:tear .65s ease-out}@keyframes tear{0%{opacity:1;transform:translate(-40px,-80px) rotate(-15deg)}60%{opacity:1;transform:translate(0,0) rotate(8deg)}100%{opacity:0;transform:translate(20px,20px) rotate(15deg)}}dialog{background:var(--paper);border:1px solid var(--line);max-width:560px;width:94vw;padding:20px;border-radius:5px}dialog::backdrop{background:#24242199}.dialog-top,.dialog-actions{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.dialog-top h2{margin:0;font:26px Georgia,'Noto Sans SC',serif}dialog img{display:block;max-height:50vh;max-width:100%;margin:20px auto;box-shadow:0 4px 12px #0002}dialog textarea{width:100%;min-height:70px;border:1px solid var(--line);background:#fffaf0;padding:10px}dialog p{font-size:12px}body[data-locale=ja]{font-family:'Noto Sans JP',sans-serif}body[data-locale=ko]{font-family:'Noto Sans KR',sans-serif}body[data-locale=zh-Hant]{font-family:'Noto Sans TC',sans-serif}@media(min-width:1600px){.canvas-wrap{max-width:640px}}@media(max-width:1150px){.workspace{grid-template-columns:205px minmax(300px,1fr) 190px;gap:17px}main{padding:0 24px}.studio{padding:0 14px 14px}.resolution{display:none}}@media(max-width:850px){.workspace{grid-template-columns:220px minmax(300px,1fr)}.cuttings{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px 24px}.cuttings>.section-label,.cuttings>.small{grid-column:1}.cuttings>#sources{grid-column:1;grid-row:3/span 2}.cuttings>.selection{grid-column:2;grid-row:1/span 4;margin:0;padding:0;border:0}.piece-list{grid-column:1/-1}.tiny-note{display:none}}@media(max-width:580px){.masthead{padding:16px}.brand span{display:none}main{padding:0 16px}.intro{padding:25px 0 22px}h1{letter-spacing:-1px;font-size:32px}.lede{font-size:12px}.workspace{display:flex;flex-direction:column;gap:23px}.composer,.studio,.cuttings{width:100%}.composer textarea{height:80px}.input-group>.small{margin-bottom:20px}.directions{grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:20px}.direction{display:block;padding:6px}.direction canvas{width:100%;height:auto;aspect-ratio:1}.direction b{font-size:10px;margin-top:5px}.direction small{display:none}.composer .section-label{margin-bottom:10px}.composer>.save-note{margin:16px 0 0}.studio-toolbar{height:47px}.studio{padding:0 10px 14px}.export-bar{justify-content:center}.export-bar button{flex:1}.cuttings{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.source{height:100px}.selection label{margin-top:8px}.cuttings .small{margin-bottom:4px}.selection input[type=range]{height:30px}footer{font-size:8px}footer>span:last-child{max-width:100px;text-align:right}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

@media(max-width:580px){.composer{display:contents}.input-group{order:0;width:100%}.studio{order:1}.mood-group{order:2;width:100%}.background-group{order:3;width:100%}.cuttings{order:4}.save-note{order:5}.input-group>.small{margin:9px 0 0}.directions{margin-bottom:0}.composer .section-label{margin-bottom:10px}.workspace{gap:18px}.studio-toolbar{font-size:9px}.input-group textarea{height:76px}.intro{padding-bottom:20px}}

#tear-ghost{left:calc(50% - 65px);top:calc(50% - 40px)}#tear-ghost canvas{width:130px;height:83px;display:block}

.effect-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}.effect-filters label{min-width:0;font-size:10px;color:var(--muted)}.effect-filters span{display:block;margin-bottom:5px}.effect-filters select{width:100%;min-height:40px;padding:7px 4px;background:#faf8f1;border:1px solid var(--line);font-size:10px}.effect-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;font-size:9px;color:var(--muted);margin:0 0 10px}.effect-meta #currentEffect{color:var(--red)}.directions{max-height:320px;overflow-y:auto;padding:2px 5px 3px 2px;scrollbar-width:thin;scrollbar-color:#bfb2a0 transparent}.effect-empty{font-size:12px;color:var(--muted);padding:15px 3px}.direction div{min-width:0}.direction b,.direction small{overflow-wrap:anywhere}@media(max-width:580px){.directions{max-height:310px}.direction small{display:block;font-size:8px;line-height:1.5}.effect-filters select{font-size:12px}.effect-meta{font-size:10px}}

#historyDialog{width:min(94vw,850px);max-width:850px;max-height:90dvh;overflow:auto}.history-tabs{display:flex;gap:8px;margin-top:18px}.history-tabs button[aria-pressed=true]{border-color:var(--red);color:var(--red)}.history-note{font-size:11px;color:var(--muted)}#historyList{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;max-height:58dvh;overflow:auto;padding:4px}.history-card{border:1px solid var(--line);background:#faf8f1;min-width:0}.history-restore{display:block;width:100%;border:0;padding:8px;text-align:left;background:transparent}.history-restore canvas{display:block;width:100%;height:auto}.history-words{display:block;font-size:12px;margin-top:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-restore small{font-size:10px;color:var(--muted)}.history-card-meta{display:flex;align-items:center;justify-content:space-between;padding:0 9px 8px;gap:5px}.history-card time{font-size:9px;color:var(--muted)}.history-card-meta button{padding:2px 8px;font-size:22px;color:var(--red);border:0;background:transparent}.studio-toolbar{gap:7px}.studio-toolbar>span{flex-shrink:0}.studio-toolbar div{flex-wrap:wrap;justify-content:flex-end}.studio-toolbar{min-height:54px;height:auto;padding:8px 0}@media(max-width:580px){#historyList{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-toolbar{font-size:9px}.studio-toolbar button{padding:5px 7px;font-size:9px}.studio-toolbar>span{max-width:52px}.history-note{font-size:10px}}
