:root{--ink:#292e58;--muted:#64617e;--paper:#fff8ed;--cream:#fae7ef;--line:#d9c4d7;--green:#343960;--pink:#efb9d2;--mint:#ace4cf;--lilac:#bca8d5;--sans:'Gowun Dodum',sans-serif}
body{background:#b8d9e9}em{color:var(--ink)}.eyebrow{color:#514e76;font-weight:700;letter-spacing:.13em}.primary,.secondary{border:2px solid var(--ink);border-radius:10px;box-shadow:3px 4px 0 var(--ink)}.primary{background:var(--mint);color:var(--ink)}.secondary{background:#f6d3e3}.primary:hover:not(:disabled),.secondary:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.03)}.primary:active:not(:disabled),.secondary:active:not(:disabled){transform:translate(2px,2px);box-shadow:1px 2px 0 var(--ink)}.icon-button:hover{background:#e9dbf0}.subtle-button{background:#fff8edc9;border:1px solid #d6c4dc}.text-button{font-weight:700}.tiny,.muted,.note{color:var(--muted)}
.title-screen,.result-screen{background:#b8d9e9 url('assets/backgrounds-3x4/clouds.webp') center/cover}.title-screen{padding:8vh max(9vw,30px);gap:5vw}.title-brand{top:24px;left:max(9vw,30px);font-size:10px;font-weight:700;gap:9px;color:var(--ink);letter-spacing:.1em}.brand-star{font-size:28px;line-height:1}.title-copy{position:relative;background:#f2c8dc url('assets/backgrounds-3x4/solid.webp') center/cover;border:2px solid #bd91b0;box-shadow:8px 10px 0 #292e5817;max-width:490px;justify-self:center;width:100%;padding:24px 34px 22px;transform:rotate(-2deg);text-align:center}.ticket-meta{display:flex;justify-content:space-between;gap:8px;font:9px 'Gowun Dodum';letter-spacing:.06em;margin-bottom:16px}.ticket-meta span{padding:5px 8px;background:#fff8edbd}.title-copy .eyebrow{font-size:10px}.title-copy h1{font-family:Jua,sans-serif;line-height:1.04;font-size:clamp(42px,5.25vw,76px);letter-spacing:-.03em;margin:17px 0 21px;filter:drop-shadow(3px 5px 0 #d994b8)}.title-copy h1>span,.title-copy h1>em{display:block;color:var(--lilac);-webkit-text-stroke:5px var(--ink);paint-order:stroke fill;text-shadow:3px 3px 0 var(--ink),-2px -2px 0 var(--ink)}.title-copy h1>em{color:var(--mint);font-size:1.17em;letter-spacing:-.055em;margin:2px 0 3px}.title-copy h1>span:last-child{font-size:.69em;margin-top:8px;letter-spacing:.03em}.intro{color:#4f466e;font-size:14px;line-height:1.7}.title-actions{margin:23px 0 13px;align-items:center;gap:9px}.title-actions .primary{min-width:240px;max-width:100%;font-family:Jua;font-size:18px;font-weight:400;padding:14px 22px;transform:rotate(2deg)}.title-actions .text-button{font-size:11px;text-align:center;padding:3px 0}.title-copy>.tiny{font-size:10px}.ticket-barcode{height:17px;width:42%;margin:16px auto 0;background:repeating-linear-gradient(90deg,var(--ink) 0 2px,transparent 2px 4px,var(--ink) 4px 5px,transparent 5px 7px,var(--ink) 7px 11px,transparent 11px 14px)}.title-art{height:min(77vh,710px)}.hero-card{height:74%;max-width:100%;aspect-ratio:3/4;transform:rotate(6deg);border-radius:24px;outline:2px solid #292e5828;box-shadow:9px 12px 0 #292e5824,0 15px 50px #526d8425}.hero-card canvas{border-radius:24px}.paper-tab{background:var(--mint);border:1.5px solid var(--ink);color:var(--ink);font-size:9px;top:-14px;padding:9px 8px;font-weight:700;transform:rotate(-9deg)}.orbit{display:none}.floating{filter:drop-shadow(3px 3px 0 #292e5844);width:88px}.f1{top:18%;left:-5%;transform:rotate(-18deg)}.f2{top:2%;right:5%;width:70px}.f3{right:-4%;bottom:7%;width:95px}.hand-note{left:-7%;bottom:7%;font-size:29px;color:var(--ink);background:#c2b0db;padding:9px 17px;border:2px solid var(--ink);box-shadow:4px 4px 0 #efb9d2;transform:rotate(-8deg)}.lucky-stamp{position:absolute;z-index:2;right:-3%;top:18%;background:var(--mint);border:2px solid var(--ink);border-radius:50%;width:94px;height:94px;display:flex;align-items:center;justify-content:center;flex-direction:column;font:28px Jua;transform:rotate(12deg);box-shadow:4px 4px 0 #d294b7}.lucky-stamp small{font:8px 'Gowun Dodum';letter-spacing:.08em;margin-top:3px}.title-bottom{bottom:22px;left:0;width:100%;justify-content:center;color:#424b6c;font-weight:700}.title-bottom i{background:#71638f}
.editor-screen{background:#b8d9e9}.editor-bar{background:#f3cddd;border-bottom:2px solid var(--ink);box-shadow:0 3px 0 #fff9;z-index:2}.brand-button{font-size:20px}.brand-button img{filter:drop-shadow(1px 1px 0 #292e5844)}.workspace-label{color:#6c577b}.bar-actions .primary{padding:9px 16px;box-shadow:2px 3px 0 var(--ink)}.tool-tabs{background:#d4c4e5;border-right:2px solid #b39abe;gap:10px}.tool-tabs button{color:#574966;border:1.5px solid transparent;border-radius:10px;font-weight:700}.tool-tabs button.active{background:var(--mint);border-color:var(--ink);box-shadow:2px 3px 0 var(--ink);color:var(--ink)}.materials,.inspector{background:#fff6f1}.materials{border-right:2px solid #d5b7cf}.inspector{border-left:2px solid #d5b7cf}.material-heading h2,.inspector-top h2{font-family:Jua;font-size:18px;font-weight:400}.count{color:#77628b}.segments{background:#eadced;border:1px solid #dbbfd9;border-radius:9px;gap:5px}.segments button.active{background:var(--mint);box-shadow:1px 2px 0 #8a76a2;color:var(--ink)}.character-filter button{border-color:#d9bbd2;background:#fffdf9}.character-filter button.active{background:#bea9d7;border-color:var(--ink);color:var(--ink)}.asset-button{background:#fcecf3;border:1px solid #d9bdd5;border-radius:11px;transition:background .12s}.asset-button:nth-child(3n+2){background:#eee6f6}.asset-button:nth-child(3n){background:#eaf5ee}.asset-button:hover{background:#f2d5e7;border-color:#8b719b}.asset-button.active{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink);background:#d7eddf}.asset-button span{color:#524866}.background-thumbnail{width:66px;height:88px;border-radius:7px}.material-grid{scrollbar-color:#cdb6d5 transparent}.text-preset{background:#f6e3ef;border:1px solid #d2b4ce;color:#3d365f}.text-preset:nth-child(2){background:#e6f1e8;color:#5c5b7b}.text-preset:nth-child(3){background:#e7def1;color:#514369}
.stage{background:#b8d9e9 url('assets/backgrounds-3x4/clouds.webp') center/cover}.stage-top{padding:0 3px}.size-chip{color:#525b78;background:#fff8edc9;padding:6px 9px;border-radius:6px}.size-chip b{color:var(--ink);font-weight:700}.safe-toggle{color:#484f70}.safe-toggle input{accent-color:#75598e}#card{aspect-ratio:3/4;box-shadow:6px 8px 0 #292e5820,0 10px 28px #64718c2a;outline:1px solid #292e5821}.stage-bottom{color:#4d5574}.inspector-top{border-bottom:1px dashed #dcc2d6;margin-bottom:12px}.empty-inspector{color:#756581}.empty-inspector .empty-symbol{color:#a78db8}.selection-label{color:#796085}select,textarea{background:#fffdf8;border-color:#d7c0d9}.field output{color:#766186}.effect{border-color:#e7d5e5}.effect-controls{background:#f1e6f3}.action-grid button{background:#fffdf8;border-color:#d7c0d9}.action-grid .danger{color:#a34e73}.shape-picker button{border-color:#cfb4d3}.shape-picker button.active{background:var(--lilac);color:var(--ink);border-color:var(--ink)}.divider{background:#e6cfe1}.original-colors{color:#55446f}
.result-screen{padding:8vh 12vw;gap:6vw}.result-back{background:#fff8edcf;border:1px solid #bca3c7;border-radius:8px;padding:9px 15px;color:var(--ink)}.result-card{aspect-ratio:3/4;filter:drop-shadow(8px 10px 0 #292e5824)}.result-copy{background:#f4ccdf;border:2px solid #b990b2;box-shadow:6px 8px 0 #292e5817;padding:30px;transform:rotate(1.5deg)}.result-copy h1{font-size:clamp(45px,4.5vw,68px);color:var(--lilac);-webkit-text-stroke:4px var(--ink);paint-order:stroke fill;text-shadow:3px 3px 0 var(--ink);filter:drop-shadow(2px 4px 0 #d395b8);margin:20px 0 22px}.result-copy h1 em{color:var(--mint)}.result-copy>p:not(.eyebrow):not(.tiny){color:#5a4c72;font-size:14px;margin-bottom:20px}.result-copy button{max-width:none;font-family:Jua;font-weight:400}.result-copy .tiny{margin-top:22px}.result-copy .eyebrow{font-size:9px}
dialog{background:#fff5f1;border:2px solid var(--ink);box-shadow:5px 6px 0 #c8a8d3}dialog::backdrop{background:#292e5866}.layer-row{border-color:#dbc2d9}.layer-row.active{background:#e1efdf;border-color:var(--ink)}#toast{background:#292e58f2;border:1px solid #c6b2dc;box-shadow:2px 3px 0 #efb9d2}.busy{background:#e7d7ecde}.spinner{border-color:#cab7db;border-top-color:#343960}
@media(min-width:1500px){.title-copy{max-width:520px;padding:28px 40px}.title-copy h1{font-size:80px}.title-art{height:76vh}}
@media(max-width:1100px) and (min-width:761px){.title-screen{padding:9vh 5vw;gap:5vw}.title-copy{padding:22px}.title-copy h1{font-size:58px}.title-brand{left:5vw}.hero-card{height:65%}.lucky-stamp{right:-3%;width:75px;height:75px;font-size:24px}.hand-note{font-size:24px}.result-screen{padding:9vh 6vw;gap:5vw}.result-copy{padding:22px}.result-copy h1{font-size:49px}.background-thumbnail{width:54px;height:72px}}
@media(max-width:760px){
 .title-screen{display:flex;padding:15px 24px 18px;gap:0;align-items:stretch}.title-brand{position:static;font-size:8px;gap:7px;justify-content:center;letter-spacing:.08em}.brand-star{font-size:21px}.title-copy{position:static;background:none;border:0;box-shadow:none;transform:none;padding:0;margin:0;max-width:none;width:auto}.ticket-meta{display:none}.title-copy .eyebrow{font-size:9px;margin-top:14px;color:#494566}.title-copy h1{font-size:38px;line-height:1.06;margin:8px 0 6px;filter:drop-shadow(2px 3px 0 #d99cbe)}.title-copy h1>span,.title-copy h1>em{-webkit-text-stroke:3px;text-shadow:2px 2px 0 var(--ink),-1px -1px 0 var(--ink)}.title-copy h1>span:first-child,.title-copy h1>span:last-child{display:inline;font-size:.64em;letter-spacing:-.02em}.title-copy h1>em{display:inline;font-size:1em;letter-spacing:-.05em;margin:0 5px}.title-copy h1>span:last-child{margin:0}.intro{position:static;width:auto;font-size:10px;line-height:1.7;color:#4c4c70}.intro br{display:none}.ticket-barcode{display:none}.title-art{flex:1;min-height:0;height:auto;margin:10px 0 113px}.hero-card{height:87%;max-height:440px;max-width:88%;border-radius:18px;transform:rotate(5deg)}.hero-card canvas{border-radius:18px}.paper-tab{font-size:7px;width:132px;left:calc(50% - 66px);padding:7px 5px;top:-12px}.lucky-stamp{right:-5px;top:12%;width:65px;height:65px;font-size:20px;box-shadow:3px 3px 0 #d294b7}.lucky-stamp small{font-size:6px}.f1{width:60px;left:-7px;top:20%}.f2{right:9%;top:0;width:45px}.f3{right:-4px;bottom:2%;width:65px}.hand-note{left:-2px;bottom:2%;font-size:21px;padding:6px 10px;box-shadow:3px 3px 0 #efb9d2}.title-actions{position:absolute;bottom:45px;left:26px;right:26px;gap:6px;margin:0;align-items:stretch}.title-actions .primary{font-size:17px;padding:13px 18px;transform:none;min-width:0;max-width:none}.title-actions .text-button{padding:5px;font-size:11px}.title-bottom{font-size:9px;bottom:17px;left:0;gap:10px}.title-bottom i{height:3px;width:3px}
 .editor-bar{padding:0 10px}.brand-button{font-size:16px}.bar-actions .primary{padding:8px 10px;box-shadow:2px 2px 0 var(--ink)}.tool-tabs{border-right:0;border-top:2px solid #8d739f;padding-top:4px;gap:0}.tool-tabs button{border-radius:8px;border-width:1px;font-size:10px}.tool-tabs button.active{box-shadow:2px 2px 0 var(--ink)}.materials,.inspector{border-left:0;border-right:0;border-top:2px solid #c4a8cc}.material-heading h2,.inspector-top h2{font-size:15px}.inspector-top{margin-bottom:4px}.stage{padding:0 12px}.stage-top{padding:0}.size-chip{font-size:7px;padding:4px 6px}.size-chip b{font-size:9px;display:inline}.safe-toggle{font-size:9px}.canvas-wrap{padding:5px 20px 3px}#card{border-radius:12px}.background-thumbnail{width:45px;height:60px}.asset-button{border-radius:8px}.material-grid{gap:6px}.mobile-selection{gap:2px}.mobile-selection .subtle-button{font-size:9px;padding:4px 6px}.mobile-selection>span{padding:0 4px;color:#454763}
 .result-screen{padding:48px 26px 18px;gap:10px}.result-back{top:11px;left:18px;padding:5px 9px;font-size:10px}.result-art{flex:1;min-height:0;height:auto;width:100%;padding:6px 0}.result-card{height:96%;max-height:390px;max-width:90%;transform:rotate(-3deg)}.result-copy{padding:13px 17px 15px;width:100%;transform:none;box-shadow:4px 5px 0 #292e5817}.result-copy h1{font-size:34px;margin:1px 0 7px;-webkit-text-stroke:2px;text-shadow:2px 2px 0 var(--ink);filter:drop-shadow(1px 2px 0 #d395b8)}.result-copy>p:not(.eyebrow):not(.tiny){font-size:10px;line-height:1.5;margin-bottom:12px}.result-copy>p:not(.eyebrow):not(.tiny) br{display:none}.result-copy button{font-size:14px;padding:10px;margin:9px 0}.result-copy .tiny{font-size:9px;margin:13px 0 0}
}
@media(max-height:700px) and (max-width:760px){.title-screen{padding-top:10px}.title-copy .eyebrow{margin-top:8px;font-size:8px}.title-copy h1{font-size:33px;margin:6px 0}.intro{font-size:9px}.title-art{margin-top:7px;margin-bottom:108px}.hero-card{height:84%}.hand-note{font-size:17px}.lucky-stamp{width:55px;height:55px;font-size:18px}.f1{width:48px}.f3{width:54px}.title-actions .primary{padding:10px;font-size:15px}.title-bottom{font-size:8px}.result-screen{padding:42px 25px 14px;gap:5px}.result-copy{padding:10px 15px}.result-copy h1{font-size:28px;margin:0 0 5px}.result-copy>p:not(.eyebrow):not(.tiny){display:none}.result-copy button{padding:8px;margin:8px 0;font-size:13px}.result-copy .tiny{font-size:8px;margin:11px 0 0}}
@media(min-width:761px) and (max-height:730px){.title-screen{padding-top:9vh;padding-bottom:8vh}.title-copy{padding:18px 28px}.ticket-meta{margin-bottom:9px}.title-copy h1{font-size:52px;margin:11px 0 14px}.intro{font-size:12px}.title-actions{margin:15px 0 9px}.title-actions .primary{padding:10px 20px;font-size:16px}.ticket-barcode{margin-top:10px;height:12px}.hero-card{height:78%}.result-copy{padding:22px}.result-copy h1{font-size:46px}}
#selection-tools{position:absolute;inset:0;pointer-events:none;z-index:4}
#delete-element{position:absolute;width:36px;height:36px;display:grid;place-items:center;padding:0;line-height:1;font:27px/1 sans-serif;border:2px solid #292e58;border-radius:50%;color:#292e58;background:#f8b7d0;box-shadow:2px 2px 0 #292e5833;pointer-events:auto;touch-action:manipulation}
#delete-element:hover{background:#ff9bbb}
.layer-row{display:flex;justify-content:space-between;padding:5px 6px;gap:4px}
.layer-select{display:flex;align-items:center;gap:8px;flex:1;min-width:0;text-align:left;padding:3px}
.layer-select>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.layer-order-controls{display:grid;grid-template-columns:repeat(2,32px);gap:3px;flex-shrink:0}
.layer-order-controls button{width:32px;height:36px;border:1px solid #b39bbe;border-radius:6px;background:#e2d5ee;font-size:18px}
.layer-order-controls button:disabled{opacity:.3}.layer-row.active .layer-select{font-weight:700}
.asset-styles{margin-top:11px;margin-bottom:4px}
@media(max-width:760px){.asset-styles{margin-top:7px}.asset-styles button{padding:4px}.original-colors{margin-top:6px}.characters .asset-button img{height:55px;width:55px}.character-filter{margin-top:10px}#material-header .background-controls{gap:12px}.background-controls .color-row{gap:5px}.layer-order-controls button{height:38px;width:34px}}

.material-filter{display:flex;align-items:center;gap:8px;margin:7px 0;font-size:11px;color:#665573}.material-filter>span{flex:none}.material-filter select{min-width:0;width:100%;padding:7px 9px;font-size:12px;border-radius:9px}.background-custom{font-size:11px;color:#665573;margin-top:6px}.background-custom summary{cursor:pointer;padding:4px 0}.background-custom .original-colors{margin:5px 0}.background-custom[open]{padding-bottom:5px}#material-header{max-height:55%;overflow-y:auto;overscroll-behavior:contain}@media(max-width:700px){.material-filter{margin:4px 0}.material-filter select{padding:5px 7px;font-size:11px}.background-custom{margin-top:2px}.background-custom summary{padding:3px 0}.background-custom[open]{max-height:140px;overflow-y:auto}}
.background-thumbnail img{width:100%;height:100%;object-fit:fill}
.font-preview{font-size:27px;line-height:1.55;overflow-wrap:anywhere;padding:12px 10px;margin:7px 0 14px;border:1px dashed #c4a8cc;border-radius:10px;background:#fffcf5;text-align:center}
.text-color-controls{border:1px solid #dfd0e4;border-radius:10px;padding:10px 12px;margin:8px 0;background:#fffafc}
.text-color-controls .field{margin-bottom:9px}.text-color-controls .field:last-child{margin-bottom:0}
.text-color-controls input[type=range]{appearance:none;height:12px;border-radius:8px;border:1px solid #b8a5c5}
.text-color-controls input[data-hsv=h]{background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)}
.text-color-controls input[data-hsv=s]{background:linear-gradient(to right,#fff,var(--chosen-hue,#f00))}
.text-color-controls input[data-hsv=v]{background:linear-gradient(to right,#000,var(--chosen-saturation,#f00))}
.text-color-controls input::-webkit-slider-thumb{appearance:none;width:19px;height:19px;border:2px solid #292e58;background:#fff;border-radius:50%;box-shadow:0 1px 3px #292e5840}
.text-color-controls input::-moz-range-thumb{width:16px;height:16px;border:2px solid #292e58;background:#fff;border-radius:50%}
.grid-menu{position:relative;flex-shrink:0;z-index:5;font-size:11px;color:var(--ink)}
.grid-menu>summary{list-style:none;cursor:pointer;background:#fff8ed;border:1px solid #bca9ca;border-radius:7px;padding:6px 9px}.grid-menu>summary::after{content:' ▾'}
.grid-options{position:absolute;right:0;top:calc(100% + 5px);width:164px;padding:12px;display:grid;gap:12px;border:1px solid #a28ab2;border-radius:10px;background:#fff8f2;box-shadow:2px 4px 12px #292e5833}
.grid-options label{display:flex;align-items:center;gap:7px;white-space:nowrap}.grid-options input{accent-color:#6f4b88}.grid-options select{width:72px;padding:4px}
#layers-dialog{width:min(440px,94vw);padding:20px;overflow:hidden}#layer-list{position:relative;max-height:52dvh;overflow-y:auto;overscroll-behavior:contain;padding:0 3px 8px;scrollbar-width:thin;touch-action:pan-y}
.layer-row{position:relative;min-height:68px}.layer-row.dragging{opacity:.55;background:#d9cbeb}.layer-row.drop-target{outline:2px solid #8b5caa;outline-offset:-2px}
.layer-drag{width:30px;min-width:30px;align-self:stretch;touch-action:none;cursor:grab;font-size:27px;color:#806690;user-select:none}.layer-drag:active{cursor:grabbing}
.layer-order-controls button{height:28px;width:32px;font-size:17px}.layer-select{min-width:0}.layer-select>img{flex-shrink:0}
.borders .asset-button img{width:66px;height:88px}.background-kinds{margin-top:8px}.background-kinds button{font-size:10px;padding:6px 2px;white-space:nowrap}
.result-copy h1{font-size:clamp(40px,4.3vw,66px)}.result-copy h1 br{display:block}#result-screen .result-copy>p:not(.eyebrow):not(.tiny){display:block}
@media(max-width:760px){.tool-tabs button{width:calc(100% / 6);font-size:9px;padding:3px 2px}.tool-tabs{padding-left:5px;padding-right:5px}.grid-menu{font-size:9px}.grid-menu>summary{padding:4px 7px}.grid-options{font-size:12px}.borders .asset-button img{width:45px;height:60px}#layers-dialog{padding:16px}.layer-order-controls{grid-template-columns:repeat(2,30px)}.layer-order-controls button{width:30px;height:27px}.layer-drag{width:26px;min-width:26px}.result-copy h1{font-size:31px;line-height:1.15;margin:9px 0}.result-copy h1 br{display:block}}

#add-image{flex-shrink:0;white-space:nowrap;padding:6px 9px;font-size:11px;border:1px solid #bca9ca;border-radius:7px;background:#fff8ed}#add-image:disabled{opacity:.5}
@media(max-width:760px){#add-image{font-size:9px;padding:4px 7px}.stage-top{gap:5px}.stage-top .size-chip{min-width:0}.stage-top .size-chip b{font-size:8px}}

/* Mobile tools open above the full-size canvas; picking an item closes the sheet. */
.materials-top,.panel-backdrop{display:none}
@media(max-width:760px){
 .editor-screen{position:relative;--tool-bar-height:calc(70px + env(safe-area-inset-bottom));grid-template-rows:56px minmax(0,1fr) var(--tool-bar-height)}
 .editor-bar{padding-inline:10px;gap:6px}
 .bar-actions .icon-button{width:44px;height:44px}
 .bar-actions .primary{min-height:44px;margin-left:3px;padding-inline:9px}
 .brand-button{font-size:15px;min-height:44px}
 .tool-tabs{grid-row:3;z-index:12;padding:5px 6px calc(5px + env(safe-area-inset-bottom));gap:3px}
 .tool-tabs button{flex:1;min-width:44px;min-height:54px;font-size:10px;padding:5px 1px;gap:3px}
 .stage{grid-row:2;grid-template-rows:44px minmax(0,1fr) 48px;padding:0 10px}
 .stage-top{gap:6px}
 .stage-top .size-chip{letter-spacing:0;padding:4px;font-size:7px}
 .stage-top .size-chip b{display:block;font-size:8px;margin:2px 0 0}
 #add-image,.grid-menu>summary{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px;font-size:11px}
 .canvas-wrap{padding:8px 4px}
 .mobile-selection{gap:6px}
 .mobile-selection .subtle-button{min-height:44px;padding:8px 10px;font-size:11px;border-radius:8px}
 .mobile-selection>span{font-size:10px;padding:0 2px}
 #delete-element{width:44px;height:44px}
 .panel-backdrop:not([hidden]){display:block;position:absolute;inset:56px 0 var(--tool-bar-height);z-index:9;padding:0;border:0;border-radius:0;background:#292e5826;touch-action:manipulation}
 .materials,.inspector,body.inspect-mobile .materials{display:none;position:absolute;grid-area:auto;left:0;right:0;bottom:var(--tool-bar-height);height:min(62dvh,520px);max-height:calc(100% - 56px - var(--tool-bar-height));z-index:10;border:1px solid #b79dc3;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -8px 28px #292e5826;overflow:hidden}
 body[data-mobile-panel=materials] .materials,body[data-mobile-panel=inspector] .inspector{display:flex}
 .materials-top,.inspector-top{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;min-height:54px;padding:5px 14px;margin:0;border-bottom:1px solid #e4d0e2}
 .materials-top h2,.inspector-top h2{font:18px Jua;margin:0}
 #close-materials,#close-inspector{display:inline-grid;place-items:center;width:44px;height:44px;font-size:21px}
 #material-header{flex:0 0 auto;min-height:0;max-height:45%;padding:0 14px 10px;overflow:auto}
 #material-header:empty{padding:0}
 .character-filter{margin-top:10px}
 .character-filter button,.segments button{min-height:44px;font-size:12px}
 .segments{margin-top:10px}
 .background-kinds button{font-size:10px;padding-inline:2px}
 .material-grid{flex:1;min-height:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:max-content;padding:10px 14px 16px;gap:8px;overscroll-behavior:contain;touch-action:pan-y}
 .material-grid.characters{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .asset-button{min-height:90px;height:max-content;padding:9px 4px;gap:5px}
 .asset-button span{font-size:10px}
 .characters .asset-button img{width:70px;height:70px}
 .background-custom summary{display:flex;align-items:center;min-height:44px;font-size:12px}
 .material-filter select,select,textarea{font-size:16px;min-height:44px}
 .material-filter{margin-top:10px}
 .background-controls input[type=color],.inspector input[type=color]{width:44px;height:44px}
 .background-controls{gap:10px;flex-wrap:wrap}
 .original-colors,.effect-switch{min-height:44px;font-size:12px}
 #inspector-body{flex:1;overscroll-behavior:contain;padding:12px 16px 20px}
 .inspector .action-grid button,.shape-picker button{min-height:44px;font-size:12px}
 .inspector input[type=range]{min-height:32px}
 .inspector .text-color-controls input[type=range]{min-height:20px;margin-block:8px}
 .inspector .swatch{width:36px;height:36px}
 .text-materials .primary,.text-preset{min-height:48px}
 .grid-options label{min-height:36px}
 #toast{bottom:calc(80px + env(safe-area-inset-bottom));pointer-events:none}
}
@media(max-width:350px){.editor-bar{padding-inline:6px;gap:2px}.brand-button{font-size:13px;gap:3px}.brand-button img{width:23px;height:23px}.bar-actions .primary{font-size:10px;padding-inline:5px}.bar-actions .primary span{display:none}.mobile-selection .subtle-button{padding-inline:7px}}
.sound-toggle{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:10px;border:1px solid #bca9ca;border-radius:10px;background:#fff8ed;color:var(--ink);touch-action:manipulation}
.sound-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sound-toggle .sound-muted,.sound-toggle[aria-pressed=false] .sound-wave{display:none}
.sound-toggle[aria-pressed=false] .sound-muted{display:block}
.sound-toggle[aria-pressed=false]{color:#776586;background:#eee4f1}
.sound-toggle-corner{position:absolute;top:14px;right:16px;z-index:5}
@media(max-width:760px){.title-screen .title-brand{padding-right:36px}.title-screen .sound-toggle-corner{top:8px;right:9px}.stage-top{gap:4px}.stage-top .size-chip{font-size:6px}.stage-top .size-chip b{font-size:7px}#add-image{padding-inline:6px}.grid-menu>summary{padding-inline:6px}}
