:root{color-scheme:dark;--bg:#151519;--panel:#1e1e24;--surface:#292930;--line:#37373e;--text:#f4f3f7;--muted:#a4a3b2;--yellow:#ffe35c;--pink:#ff528b;--radius:9px;font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-synthesis:weight}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:16px;line-height:1.6}button,input,textarea,select,a{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{opacity:.3;cursor:default}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid var(--yellow);outline-offset:4px}button{border:0}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.topbar{min-height:89px;display:flex;align-items:center;justify-content:space-between;padding:18px 36px;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;align-items:center;gap:13px;font-weight:850;letter-spacing:.05em;line-height:1.25;white-space:nowrap;font-size:21px}.brand small{display:block;font-size:12px;letter-spacing:.22em;color:var(--muted);margin-top:6px}.brandmark{position:relative;display:grid;place-items:center;background:var(--yellow);color:#18181d;width:43px;height:43px;border-radius:11px;font-family:Arial,sans-serif;font-size:36px;font-weight:950;font-style:italic;letter-spacing:-.08em;line-height:1;transform:rotate(-6deg);padding-right:5px}.brandmark span{position:absolute;right:5px;bottom:7px;font-size:22px}.header-actions{display:flex;align-items:center;gap:12px}.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:11px 16px;min-height:44px;border-radius:var(--radius);font-weight:700;font-size:14px;line-height:1.4;white-space:nowrap;transition:background .15s,transform .15s;border:1px solid transparent}.button:hover{transform:translateY(-1px)}.button:active{transform:translateY(0)}.primary{background:var(--yellow);color:#17171c}.primary:hover{background:#ffed8b}.secondary{background:var(--surface);border-color:var(--line)}.secondary:hover{background:#35353e}.icon{width:18px;height:18px;flex-shrink:0;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}.workspace{max-width:1680px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 340px;min-height:calc(100dvh - 89px)}.workarea{padding:26px 32px 20px;min-width:0;background:radial-gradient(ellipse at 35% 18%,#25242c66,transparent 62%)}.stage-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.file-info{display:flex;align-items:center;gap:14px;min-width:0;font-size:13px}.tiny-label{color:var(--yellow);font:700 12px/1.4 Arial,sans-serif;letter-spacing:.14em}.file-info #fileName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}.file-info #dimensions{font-size:12px;color:var(--muted);white-space:nowrap}.history-actions{display:flex;gap:6px}.icon-button{width:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;background:transparent;color:var(--muted);flex-shrink:0}.icon-button:hover:not(:disabled){background:var(--surface);color:var(--text)}.stage-outer{position:relative;display:flex;align-items:center;justify-content:center;min-height:260px;height:clamp(330px,47vw,560px);border:1px solid #323139;border-radius:9px;padding:22px;background-color:#19191f;background-image:radial-gradient(#3c3b46 1px,transparent 1px);background-size:16px 16px;overflow:hidden}.canvas-wrap{position:relative;flex-shrink:0;box-shadow:0 14px 44px #0005;max-width:100%;line-height:0;isolation:isolate}#canvas{display:block;width:100%;height:100%;outline:none;touch-action:none;cursor:default}#overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.drop-overlay{display:none;position:absolute;inset:12px;background:#20201ef0;border:2px dashed var(--yellow);border-radius:8px;align-items:center;justify-content:center;flex-direction:column;gap:16px;font-weight:700;color:var(--yellow);z-index:3}.drop-overlay .icon{width:44px;height:44px}.drag-over .drop-overlay{display:flex}.stage-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:13px;color:var(--muted);font-size:12px}.stage-footer>span{display:flex;align-items:center;gap:6px}.stage-footer .icon{width:14px;height:14px}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;background:transparent;font-size:13px;min-height:36px;border-radius:5px;color:var(--muted);padding:5px 7px;white-space:nowrap}.text-button:hover:not(:disabled){color:var(--text);background:var(--surface)}.preset-section{margin-top:23px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:13px}.section-heading h2{font-size:14px;font-weight:750;margin:0}.muted{color:var(--muted);font-size:12px}.preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.preset-card{position:relative;background:#25252c;border:1px solid #3a3943;border-radius:9px;padding:5px 8px 10px;text-align:left;overflow:hidden;transition:border-color .15s,background .15s}.preset-card:hover{background:#303039;border-color:#7d768a}.preset-card.active{border-color:var(--yellow);background:#343025}.preset-card canvas{width:100%;height:58px;object-fit:contain;display:block}.preset-meta{display:flex;justify-content:space-between;align-items:center;padding:0 4px;gap:3px;font-size:12px;line-height:1.6;color:#cccad4}.preset-number{font:12px/1.4 Arial,sans-serif;color:#8d8999;letter-spacing:.1em}.preset-card.active .preset-number{color:var(--yellow)}.local-note{font-size:12px;color:#85828f;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:23px;line-height:1.6}.local-note .icon{width:13px;height:13px}.inspector{padding:28px 23px 22px;border-left:1px solid var(--line);background:var(--panel);min-width:0}.inspector-heading{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:17px}.inspector-heading h1{font-size:17px;letter-spacing:.04em;margin:0}.edition{font:12px/1.5 Arial,sans-serif;letter-spacing:.05em;color:#928ca0}.add-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:24px}.add-buttons .button{padding:10px}.field-label{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:13px;font-weight:600;margin-bottom:8px}.field-label>span{font-size:12px;font-weight:400;color:var(--muted)}.field-label>output{font-family:Arial,sans-serif;color:var(--yellow);font-size:12px}textarea,select{background:#15151b;border:1px solid #3c3b44;border-radius:7px;color:var(--text);outline:none;width:100%}textarea:focus,select:focus{border-color:var(--yellow)}textarea{resize:vertical;min-height:78px;max-height:230px;padding:12px;line-height:1.65;font-size:17px;font-weight:700}select{min-height:39px;padding:7px 28px 7px 10px;font-size:13px}.two-cols{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:13px}.font-row{margin-top:14px;align-items:center}.control-block{margin-top:19px}input[type=range]{appearance:none;-webkit-appearance:none;background:#4a4654;border:0;height:4px;border-radius:20px;width:100%;display:block;accent-color:var(--yellow);cursor:pointer;margin:18px 0;touch-action:pan-y}input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--yellow);border:2px solid #ffe35c;box-shadow:0 0 0 4px #ffe35c11}input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--yellow);border:0}.colors-row,.outline-row{display:flex;align-items:center;gap:10px}.color-control{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}input[type=color]{-webkit-appearance:none;appearance:none;width:30px;height:30px;background:none;border:1px solid #5c5669;border-radius:6px;overflow:hidden;padding:3px;cursor:pointer;flex-shrink:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:0;border-radius:3px}input[type=color]::-moz-color-swatch{border:0;border-radius:3px}.switch-label{display:flex;align-items:center;gap:6px;font-size:12px;position:relative;cursor:pointer;line-height:1.5}.switch-label input{position:absolute;opacity:0;width:29px;height:22px;margin:0;cursor:pointer}.switch{display:block;width:27px;height:16px;border-radius:20px;background:#53505f;transition:background .15s;flex-shrink:0;position:relative}.switch:after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:#d6d2de;top:3px;left:3px;transition:transform .15s}.switch-label input:checked+.switch{background:var(--yellow)}.switch-label input:checked+.switch:after{transform:translateX(11px);background:#353022}.switch-label input:focus-visible+.switch{outline:2px solid white;outline-offset:3px}.colors-row>.switch-label{margin-left:auto;gap:4px;font-size:12px}.outline-row input[type=range]{margin:12px 0}.outline-row output{font:12px/1.5 Arial,sans-serif;color:var(--muted);width:20px}.badge-options{display:flex;align-items:center;gap:13px;min-height:39px}.position-bar{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:0}.position-bar>span:first-child{font-size:12px;color:var(--muted);margin-right:4px}.position-bar .icon-button{width:31px}.position-bar .text-button{padding:4px 8px}.bar-separator{width:1px;height:18px;background:#494350;margin:0 3px}.layer-section{border-top:1px solid var(--line);padding-top:19px;margin-top:20px}.layer-section h2 span{font:11px Arial,sans-serif;display:inline-flex;align-items:center;justify-content:center;border:1px solid #494552;border-radius:5px;min-width:20px;height:20px;margin-left:4px;color:var(--muted)}.layers{display:flex;flex-direction:column;gap:5px;max-height:196px;overflow:auto}.layer{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;border:1px solid transparent;border-radius:6px;text-align:left;padding:7px 10px;background:#26252c;color:#b9b5c5}.layer.active{color:var(--yellow);background:#343126;border-color:#655a2c}.layer-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;flex:1}.layer-type{font-size:13px;font-weight:900;flex-shrink:0;width:19px;text-align:center}.layer .icon{width:14px;height:14px}.layer-actions{display:flex;justify-content:space-between;margin-top:5px;gap:2px}.layer-actions .text-button{font-size:12px;padding:5px 2px;gap:4px}.layer-actions .icon{width:13px;height:13px}.danger:hover:not(:disabled){color:#ff7a96}.export-options{border-top:1px solid var(--line);padding-top:18px;margin-top:12px}.export-options .switch-label{font-size:13px;color:#b9b5c5}.empty-selection{padding:26px 6px;color:var(--muted);font-size:14px;line-height:1.8}.mobile-import{display:none}.toast{position:fixed;bottom:max(28px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,16px);z-index:50;background:#ffe35c;color:#17171c;padding:10px 19px;border-radius:50px;font-size:14px;font-weight:650;box-shadow:0 5px 20px #0005;pointer-events:none;opacity:0;transition:opacity .18s,transform .18s;max-width:calc(100% - 24px);width:max-content;text-align:center}.toast.visible{opacity:1;transform:translate(-50%,0)}dialog{background:var(--panel);color:var(--text);border:1px solid #514d5f;border-radius:16px;width:min(740px,calc(100vw - 24px));padding:24px;max-height:92dvh;overflow:auto;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#0a081bcc;backdrop-filter:blur(6px)}.dialog-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.dialog-header h2{font-size:19px;margin:0}.export-preview{background:repeating-conic-gradient(#3a3743 0 25%,#27242f 0 50%) 0/20px 20px;border-radius:8px;overflow:hidden;display:flex;justify-content:center}.export-preview img{max-width:100%;max-height:50dvh;object-fit:contain;display:block}.export-dialog-actions{display:flex;gap:10px;flex-wrap:wrap}.dialog-hint,#exportDetails{font-size:13px;color:var(--muted)}
@media(min-width:1500px){.workspace{grid-template-columns:minmax(0,1fr) 375px}.workarea{padding:28px 44px}.inspector{padding:30px 28px}.preset-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.preset-meta{font-size:12px}.stage-outer{height:610px}}
@media(max-width:1100px){.topbar{padding:17px 24px}.workarea{padding:22px 20px}.workspace{grid-template-columns:minmax(0,1fr) 316px}.inspector{padding:25px 18px}.stage-outer{padding:14px;height:clamp(280px,42vw,500px)}.edition{display:none}.file-info{gap:8px}.file-info #fileName{max-width:170px}.tiny-label{display:none}.colors-row{gap:6px}.color-control{gap:4px}.local-note{font-size:12px}}
@media(max-width:760px){.topbar{min-height:74px;padding:14px 16px;gap:12px}.brand{font-size:18px;gap:10px}.brandmark{width:36px;height:36px;font-size:30px;border-radius:9px}.brandmark span{font-size:19px;right:4px;bottom:5px}.brand small{font-size:12px;margin-top:5px}.header-actions .import-trigger{display:none}.header-actions{gap:0}.header-actions .button{font-size:13px;padding:10px 12px}.workspace{display:block}.workarea{padding:12px 14px 0}.stage-toolbar{margin-bottom:9px}.file-info{font-size:12px;gap:10px}.file-info #fileName{max-width:165px}.file-info #dimensions{font-size:12px}.history-actions{gap:1px}.history-actions .icon-button{width:33px;min-height:33px}.stage-outer{height:clamp(225px,59vw,430px);min-height:220px;padding:12px}.stage-footer{font-size:12px;padding-top:3px}.stage-footer .text-button{font-size:12px}.mobile-import{display:flex;margin-top:7px}.mobile-import .button{width:100%;font-size:14px}.preset-section{margin-top:20px}.section-heading{margin-bottom:10px}.section-heading h2{font-size:14px}.preset-grid{display:flex;gap:8px;overflow-x:auto;padding:0 1px 8px;scroll-snap-type:x proximity;scrollbar-width:thin}.preset-card{flex:0 0 139px;scroll-snap-align:start}.preset-card canvas{height:51px}.preset-meta{font-size:12px}.local-note{margin:12px 0 18px;justify-content:flex-start;font-size:12px}.inspector{border-left:0;border-top:1px solid var(--line);padding:22px 20px max(24px,env(safe-area-inset-bottom))}.inspector-heading{margin-bottom:14px}.edition{display:block;font-size:12px}.add-buttons{margin-bottom:20px}.field-label{font-size:14px}.field-label>span{font-size:12px}.two-cols{gap:20px;grid-template-columns:1fr 1fr}select{font-size:14px;min-height:43px}.colors-row{gap:18px}.color-control{font-size:12px;gap:7px}.colors-row>.switch-label{font-size:12px;gap:6px}input[type=color]{width:34px;height:34px}.outline-row{gap:13px}.badge-options{gap:16px}.switch-label{font-size:13px}.position-bar{justify-content:flex-start;gap:10px}.position-bar .icon-button{width:36px;min-height:40px}.position-bar .text-button{min-height:40px}.layer-actions .text-button{font-size:13px;padding:7px 5px}.layer-actions .icon{width:15px;height:15px}.layer{min-height:43px}.layer-name{font-size:14px}.export-options .switch-label{font-size:14px}.layer-section{margin-top:17px}.export-dialog-actions .button{width:100%}dialog{padding:17px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Readable controls at every viewport size. */
.field-label,.text-button,.layer-name,select,.section-heading h2{font-size:14px}.field-label>span,.muted,.preset-meta,.color-control,.switch-label,.layer-actions .text-button,.position-bar>span:first-child{font-size:12px}.edition{letter-spacing:0}.brand small{letter-spacing:.12em}.preset-number,.tiny-label{font-size:12px}.colors-row{flex-wrap:wrap}.position-bar{flex-wrap:wrap}.layer-actions{flex-wrap:wrap}.layer-actions .text-button{font-size:14px}.inspector-heading{flex-wrap:wrap}.stage-footer .text-button{font-size:12px}.export-dialog-actions .button{white-space:normal;text-align:center}

.rotation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.rotation-heading .field-label{flex:1;margin-bottom:0}.rotation-heading .text-button{border:1px solid var(--line);color:var(--text);font-size:14px;padding:4px 9px}

.rotation-handle{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:2px solid #24212c;border-radius:50%;background:var(--yellow);color:#24212c;box-shadow:0 2px 10px #0006;transform:translate(-50%,-50%);touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}.rotation-handle .icon{width:24px;height:24px;pointer-events:none;stroke-width:2}.rotation-handle:hover{background:#fff08d}.rotation-handle.rotating{cursor:grabbing;background:#fff3a5;box-shadow:0 0 0 4px #ffe35c33,0 2px 10px #0006}

/* Browse the expanded pattern collection without losing the editing canvas. */
.preset-filters{display:flex;gap:7px;overflow-x:auto;padding:1px 0 10px;margin-bottom:4px;scrollbar-width:thin}
.preset-filters button{flex:0 0 auto;min-height:40px;padding:7px 12px;border:1px solid var(--line);border-radius:20px;background:var(--panel);color:var(--muted);font-size:14px;white-space:nowrap}
.preset-filters button[aria-pressed=true]{border-color:#8c7833;color:var(--yellow);background:#353022}
.preset-filters button:hover{border-color:#8c7833;color:var(--text)}
.preset-filters button span{margin-left:4px;font:12px Arial,sans-serif}
.font-status{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;color:var(--yellow);font-size:13px;margin-top:10px}
.font-status .text-button{font-size:13px;text-decoration:underline;min-height:36px;padding:4px 0}
.preset-meta{gap:6px}.preset-meta>span:first-child{min-width:0;line-height:1.5}.preset-number{flex-shrink:0}
@media(max-width:760px){.preset-filters{margin:0 -2px 6px;padding:2px 2px 8px}.preset-filters button{padding:7px 11px}.preset-card{flex-basis:158px}.preset-card canvas{height:56px}.preset-meta{min-height:40px;align-items:center}}
