:root{--bg:#f4f2ee;--surface:#fff;--line:#e3dfd8;--text:#24211d;--muted:#77716a;--accent:#c8442a;--accent-soft:#f8e6e0;--radius:12px}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;font-family:Zen Kaku Gothic New,Noto Sans JP,system-ui,sans-serif;font-size:14px}button,input,textarea,select{font:inherit;color:inherit}.app{flex-direction:column;min-height:100vh;display:flex}.topbar{z-index:10;background:var(--surface);border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;padding:10px 20px;display:flex;position:sticky;top:0}.brand{letter-spacing:.04em;align-items:center;gap:8px;font-size:16px;font-weight:900;display:flex}.brand-mark{background:var(--text);color:#fff;border-radius:8px;place-items:center;width:32px;height:32px;display:grid}.btn{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:999px;padding:8px 14px;font-weight:700}.btn:hover{border-color:var(--text)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{filter:brightness(1.08)}.btn:disabled{opacity:.4;cursor:not-allowed}.btn.ghost{padding:4px 12px;font-size:12px}.main{flex:1;grid-template-columns:380px minmax(0,1fr);grid-template-areas:"panel stage";align-items:start;gap:20px;padding:20px;display:grid}.stage{border-radius:var(--radius);background:repeating-conic-gradient(#ebe8e2 0 25%, #f4f2ee 0 50%) 0 0 / 20px 20px;border:2px dashed #0000;flex-direction:column;grid-area:stage;align-items:center;gap:10px;padding:20px;display:flex;position:sticky;top:73px}.stage.is-over{border-color:var(--accent);background:var(--accent-soft)}.canvas-wrap{justify-content:center;width:100%;display:flex}.canvas-wrap canvas{touch-action:none;width:auto;max-width:100%;height:auto;max-height:calc(100vh - 170px);display:block;box-shadow:0 10px 30px #00000026}.hint{color:var(--muted);text-align:center;margin:0;font-size:12px}.panel{flex-direction:column;grid-area:panel;gap:14px;display:flex}.group{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);flex-direction:column;gap:10px;padding:14px;display:flex}.group h2{letter-spacing:.06em;margin:0;font-size:13px;font-weight:900}.group h2 small{color:var(--muted);margin-left:4px;font-weight:500}.group-head{justify-content:space-between;align-items:center;display:flex}.chips{grid-template-columns:1fr 1fr;gap:6px;display:grid}.chip{text-align:left;border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:8px;flex-direction:column;padding:7px 10px;display:flex}.chip b{font-size:13px}.chip small{color:var(--muted);font-size:11px}.chip.on,.theme.on{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}.themes{grid-template-columns:repeat(4,1fr);gap:6px;display:grid}.theme{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:8px;flex-direction:column;align-items:center;gap:4px;padding:6px 4px;font-size:11px;font-weight:700;display:flex}.swatch{aspect-ratio:1;border-radius:6px;place-items:center;width:100%;display:grid;position:relative;overflow:hidden}.swatch span{aspect-ratio:1;border-radius:50%;width:62%;position:absolute;bottom:-18%;right:-18%}.swatch b{font-size:18px;position:relative}.field{flex-direction:column;gap:4px;display:flex}.field span{color:var(--muted);font-size:12px;font-weight:700}.field.inline{flex-direction:row;justify-content:space-between;align-items:center}textarea,input,select{border:1px solid var(--line);resize:vertical;background:#fcfbf9;border-radius:8px;width:100%;padding:7px 9px}.field.inline select{width:auto}textarea:focus,input:focus,select:focus{outline:2px solid var(--accent);outline-offset:-1px;background:#fff}.drop{border:2px dashed var(--line);cursor:pointer;background:#fcfbf9;border-radius:10px;flex-direction:column;align-items:center;gap:4px;padding:16px 10px;font-weight:700;display:flex}.drop:hover{border-color:var(--accent);color:var(--accent)}.drop small{color:var(--muted);font-size:11px;font-weight:400}.items{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.card{border:1px solid var(--line);border-radius:10px;grid-template-columns:64px 1fr;gap:10px;padding:10px 30px 10px 10px;scroll-margin:90px;display:grid;position:relative}.card.on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.card-side{flex-direction:column;align-items:center;gap:6px;display:flex}.card-side img{object-fit:contain;background:#f1eee9;border-radius:6px;width:64px;height:64px}.order{gap:4px;display:flex}.order button,.remove{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:6px;width:28px;height:24px;padding:0;line-height:1}.order button:disabled{opacity:.3;cursor:default}.card-fields{flex-direction:column;gap:6px;display:flex}.row{grid-template-columns:1fr 96px;gap:6px;display:grid}.remove{width:22px;height:22px;color:var(--muted);border:none;font-size:16px;position:absolute;top:8px;right:6px}.remove:hover{color:#d33}.note{color:var(--muted);margin:0;font-size:11px;line-height:1.6}@media (max-width:860px){.main{grid-template-columns:1fr;grid-template-areas:"stage""panel";padding:12px 16px}.stage{padding:12px;position:static}.canvas-wrap canvas{max-height:75vh}.themes{grid-template-columns:repeat(4,1fr)}}.actions{gap:8px;display:flex}.url-in{color:var(--muted);align-items:center;gap:4px;font-size:12px;display:flex}.url-in input{flex:1;min-width:0}.note code{color:var(--text);word-break:break-all;background:#f1eee9;border-radius:6px;margin:4px 0;padding:6px 8px;font-size:11px;display:block}.note.warn{color:#c0392b}@media (max-width:560px){.actions .btn:not(.primary){display:none}}.bg-row{align-items:center;gap:8px;display:flex}.bg-row img{object-fit:cover;border-radius:6px;width:40px;height:40px}.row.rev{grid-template-columns:110px 1fr}input[type=range]{width:50%;padding:0}.steps{counter-reset:step;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.steps li{counter-increment:step;grid-template-columns:24px 1fr;align-items:center;gap:4px 8px;display:grid}.steps li:before{content:counter(step);background:var(--text);color:#fff;border-radius:50%;grid-row:span 2;align-self:start;place-items:center;width:22px;height:22px;margin-top:6px;font-size:12px;font-weight:700;display:grid}.steps .btn{justify-self:start;text-decoration:none}.steps small{color:var(--muted);font-size:11px;line-height:1.5}.note.ok{color:#1f8a4c;font-weight:700}.colors{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.color-in{color:var(--muted);cursor:pointer;align-items:center;gap:6px;font-size:12px;font-weight:700;display:flex}.color-in input{cursor:pointer;background:#fff;border-radius:8px;width:34px;height:34px;padding:2px}
