:root{color:#30262c;background:#fff7f8;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;font-synthesis:none;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;overflow-x:hidden;color:#30262c;background:linear-gradient(135deg,#fff2f6eb,#f8fdffeb),repeating-linear-gradient(90deg,rgba(255,134,162,.08) 0 1px,transparent 1px 42px)}body:has(.editor-layout){overscroll-behavior-y:contain}button,input,a{font:inherit}button,a{-webkit-tap-highlight-color:transparent}.app-shell{width:min(1180px,100%);min-height:100vh;margin:0 auto;padding:18px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px}.topbar-actions{display:flex;align-items:center;gap:10px}.brand{display:inline-flex;align-items:center;gap:10px;padding:0;border:0;color:#30262c;background:transparent;font-size:22px;font-weight:800;letter-spacing:0;cursor:pointer}.brand-logo{position:relative;display:grid;width:46px;height:42px;place-items:center;border:2px solid #30262c;border-radius:8px;background:linear-gradient(145deg,#fff,#fff2f6 55%,#dff8ff);box-shadow:4px 4px #ffb7c8;overflow:hidden}.logo-strip{position:absolute;top:5px;right:5px;bottom:5px;left:5px;display:grid;grid-template-columns:repeat(4,1fr);gap:2px;opacity:.8}.logo-strip span{border-radius:3px;background:#ff7da657}.logo-letter{position:relative;color:#30262c;font-family:Georgia,Times New Roman,serif;font-size:24px;font-weight:900;text-shadow:1px 1px 0 #ffffff}.brand-word{font-family:Georgia,Times New Roman,PingFang SC,serif;font-weight:900}.topbar-note{color:#795d68;font-size:14px;font-weight:700}.ghost-button,.danger-button,.replace-button,.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;border-radius:8px;border:0;text-decoration:none;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease}.primary-button{padding:0 22px;color:#fff;background:#30262c;font-weight:800;box-shadow:0 10px 24px #30262c2e}.secondary-button{padding:0 22px;color:#30262c;background:#fff;border:1px solid rgba(48,38,44,.14);font-weight:800}.ghost-button{min-height:40px;padding:0 14px;color:#5f4d56;background:#ffffffb3;border:1px solid rgba(48,38,44,.1);font-size:14px;font-weight:750}.danger-button{width:100%;color:#9d2443;background:#fff1f4;font-weight:800}.replace-button{position:relative;width:100%;color:#30262c;background:#fff;border:1px solid rgba(48,38,44,.14);font-weight:800}.replace-button input,.upload-drop input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.primary-button:hover,.secondary-button:hover,.ghost-button:hover,.danger-button:hover,.replace-button:hover{transform:translateY(-1px)}.primary-button:disabled,.secondary-button:disabled{cursor:not-allowed;opacity:.45;transform:none}.wide{width:100%}.start-panel{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:38px;align-items:center;padding:54px 0 28px}.hero-copy{padding:30px 0}.eyebrow{margin:0 0 10px;color:#d24a76;font-size:13px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}h1,h2{margin:0;color:#30262c;letter-spacing:0}h1{font-size:clamp(62px,15vw,156px);line-height:.88;font-family:Georgia,Times New Roman,serif}h2{font-size:30px;line-height:1.12}.subcopy{max-width:520px;margin:24px 0 0;color:#705a65;font-size:18px;line-height:1.7}.hero-strip{position:relative;display:grid;gap:14px;width:min(330px,78vw);margin:0 auto;padding:28px;border-radius:10px;background:#fffdfd;box-shadow:0 24px 50px #8f4b6124,inset 0 0 0 2px #ff86a240}.hero-strip:before,.hero-strip:after{position:absolute;left:32px;right:32px;height:2px;content:"";border-top:2px dashed #ffb7c8}.hero-strip:before{top:14px}.hero-strip:after{bottom:14px}.mini-photo{aspect-ratio:1.42 / 1;border-radius:8px;background:linear-gradient(135deg,#ffffff2e,#fff0),linear-gradient(145deg,#ffc4d3,#f7e0a7 48%,#b9e4ef);border:8px solid #ffffff}.mini-photo.two{background:linear-gradient(135deg,#fff3,#fff0),linear-gradient(145deg,#b9e4ef,#ffe6ee 52%,#ffc4d3)}.mini-photo.three{background:linear-gradient(135deg,#fff3,#fff0),linear-gradient(145deg,#ffd9a8,#ffe6ee 48%,#c9f0de)}.mini-photo.four{background:linear-gradient(135deg,#fff3,#fff0),linear-gradient(145deg,#e0c4ff,#fff1ca 45%,#ffc4d3)}.action-grid{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}.flow-panel,.camera-panel,.export-panel,.admin-panel{display:grid;gap:20px;width:min(560px,100%);margin:34px auto 0}.section-heading{display:grid;gap:4px}.upload-drop{position:relative;display:grid;min-height:210px;place-items:center;gap:6px;padding:28px;border:2px dashed rgba(255,134,162,.65);border-radius:8px;color:#705a65;background:#ffffffb8;cursor:pointer}.upload-icon{display:grid;width:58px;height:58px;place-items:center;border-radius:8px;color:#fff;background:#ff86a2;font-size:38px;font-weight:300;line-height:1}.thumb-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.thumb,.thumb-button{display:grid;aspect-ratio:1;place-items:center;overflow:hidden;border-radius:8px;border:1px solid rgba(48,38,44,.1);background:#ffffffb8;color:#b07b8d;font-weight:900}.thumb img,.thumb-button img{width:100%;height:100%;object-fit:cover}.camera-frame{position:relative;overflow:hidden;aspect-ratio:4 / 3;border-radius:8px;background:#30262c}.camera-frame video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}.countdown{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;color:#fff;background:#30262c38;font-size:112px;font-weight:900;text-shadow:0 8px 28px rgba(48,38,44,.35)}.camera-error{position:absolute;inset:auto 18px 18px;margin:0;padding:12px 14px;border-radius:8px;color:#9d2443;background:#ffffffeb;font-weight:800}.camera-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.editor-layout{display:grid;grid-template-columns:minmax(280px,480px) minmax(340px,1fr);gap:26px;align-items:start;padding-top:24px}.preview-wrap{position:sticky;top:18px;display:grid;justify-items:center;padding:16px}.preview-canvas{width:min(100%,390px);height:auto;border-radius:8px;background:#fff;box-shadow:0 22px 48px #8f4b612e;touch-action:none;-webkit-user-select:none;user-select:none}.edit-panel{overflow:hidden;border:1px solid rgba(48,38,44,.1);border-radius:8px;background:#ffffffc2;box-shadow:0 18px 42px #8f4b611f}.tool-tabs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));overflow-x:auto;border-bottom:1px solid rgba(48,38,44,.1)}.tool-tabs button,.segmented button,.choice,.template-card,.sticker-button,.thumb-button{border:0;cursor:pointer}.tool-tabs button{min-height:52px;min-width:76px;color:#705a65;background:transparent;font-size:14px;font-weight:850}.tool-tabs button.active{color:#30262c;background:#fff2f6}.panel-body{display:grid;gap:16px;padding:18px}.segmented{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}.segmented button{flex:0 0 auto;min-height:38px;padding:0 14px;border-radius:8px;color:#705a65;background:#fff;font-size:13px;font-weight:850}.segmented button.active{color:#fff;background:#30262c}.template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.template-card{display:grid;grid-template-columns:44px 1fr;gap:10px;align-items:center;min-height:80px;padding:12px;border:2px solid transparent;border-radius:8px;color:#30262c;background:var(--bg);text-align:left}.template-card.active{border-color:var(--accent)}.template-card small{display:block;margin-top:3px;color:#705a65}.template-swatch{width:44px;height:56px;border-radius:8px;background:linear-gradient(var(--bg),var(--bg)) padding-box,linear-gradient(135deg,var(--accent),#ffffff) border-box;border:5px solid transparent;box-shadow:inset 0 0 0 2px #fffc}.choice-list,.photo-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.choice{min-height:52px;border:1px solid rgba(48,38,44,.08);border-radius:8px;color:#30262c;background:#ffffffe0;font-weight:850;box-shadow:0 8px 18px #8f4b610d}.choice.active{color:#fff;background:#30262c}.sticker-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.sticker-button{display:grid;aspect-ratio:1;place-items:center;border-radius:8px;background:#fff}.sticker-button img{width:72%;height:72%}.control-card{display:grid;gap:14px;padding:14px;border-radius:8px;background:#ffffffd1}.control-card label{display:grid;gap:8px;color:#5f4d56;font-size:13px;font-weight:850}input[type=range]{width:100%;accent-color:#ff76a0}.photo-picker{grid-template-columns:repeat(4,1fr)}.thumb-button{padding:0;outline:3px solid transparent}.thumb-button.active{outline-color:#ff76a0}.hint{margin:0;color:#705a65;font-size:14px;line-height:1.6}.inline-field{display:grid;gap:8px;color:#5f4d56;font-size:13px;font-weight:850}.inline-field input{width:100%;min-height:48px;padding:0 14px;border:1px solid rgba(48,38,44,.12);border-radius:8px;color:#30262c;background:#fff;box-shadow:inset 0 1px #ffffffe6;outline:none}.inline-field input:focus{border-color:#ff76a0;box-shadow:0 0 0 4px #ff76a026}.inline-field input[type=color]{width:72px;min-height:42px;padding:4px;border-radius:8px}.export-panel{justify-items:center}.export-image{width:min(360px,88vw);border-radius:8px;box-shadow:0 22px 48px #8f4b612e}.share-card{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:16px;align-items:center;width:100%;padding:16px;border:1px solid rgba(48,38,44,.1);border-radius:8px;background:#ffffffc7}.share-card code{display:block;overflow:hidden;margin-top:8px;padding:8px;border-radius:8px;background:#fff2f6;color:#705a65;text-overflow:ellipsis;white-space:nowrap}.qr-image{width:150px;height:150px;border-radius:8px;background:#fff}.admin-panel{width:min(1120px,100%)}.admin-card{display:grid;gap:10px;padding:18px;border:1px solid rgba(48,38,44,.1);border-radius:8px;background:#ffffffc7}.admin-card h3{margin:0;color:#30262c;font-size:18px}.admin-card h4{margin:6px 0 0;color:#30262c;font-size:14px;font-weight:900}.admin-card p{margin:0;color:#705a65;line-height:1.7}.admin-card code,.admin-card pre{overflow:auto;margin:0;padding:12px;border-radius:8px;color:#30262c;background:#fff6f8;font-size:13px}.admin-template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.admin-template-item{display:grid;gap:4px;padding:12px;border-radius:8px;background:#fff}.admin-toolbar{grid-template-columns:1fr auto;align-items:center}.admin-template-item span,.admin-template-item small{color:#705a65}.admin-sticker-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.admin-sticker-item{display:grid;gap:7px;justify-items:center;padding:12px;border-radius:8px;background:#fff;text-align:center}.admin-sticker-item.muted{opacity:.62}.admin-sticker-item img{width:56px;height:56px;object-fit:contain}.admin-bulk-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}.visibility-pill{display:inline-flex;min-height:24px;align-items:center;justify-content:center;padding:0 8px;border-radius:999px;font-size:11px;font-weight:900}.visibility-pill.on{color:#27613f;background:#e9f8ee}.visibility-pill.off{color:#795d68;background:#f3edf0}.compact{min-height:34px;padding:0 10px;font-size:12px}.danger-button:disabled{cursor:not-allowed;opacity:.42}.admin-form label{display:grid;gap:8px;color:#5f4d56;font-size:13px;font-weight:850}.admin-form input,.admin-form select{width:100%;min-height:44px;padding:0 12px;border:1px solid rgba(48,38,44,.14);border-radius:8px;color:#30262c;background:#fff}.admin-form input[type=file]{padding:10px 12px}.upload-queue{display:grid;gap:10px;padding:12px;border:1px solid rgba(48,38,44,.1);border-radius:8px;background:#ffffff9e}.upload-queue-header,.upload-queue-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}.upload-queue-list{display:grid;gap:8px}.upload-queue-item{grid-template-columns:52px minmax(0,1fr) auto;padding:8px;border-radius:8px;background:#fff}.upload-queue-item img{width:52px;height:52px;object-fit:contain;border-radius:6px;background:linear-gradient(45deg,rgba(48,38,44,.04) 25%,transparent 25%),linear-gradient(-45deg,rgba(48,38,44,.04) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(48,38,44,.04) 75%),linear-gradient(-45deg,transparent 75%,rgba(48,38,44,.04) 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-size:16px 16px}.upload-queue-item strong,.upload-queue-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-queue-item small{margin-top:3px;color:#705a65}.designer-card{gap:16px}.designer-layout{display:grid;grid-template-columns:minmax(240px,320px) minmax(340px,1fr) minmax(220px,260px);gap:18px;align-items:start}.designer-preview-wrap{position:sticky;top:16px;display:grid;justify-items:center;padding:12px;border-radius:8px;background:#fff7f8}.designer-canvas{width:min(100%,290px);height:auto;border-radius:8px;background:#fff;box-shadow:0 16px 34px #8f4b6124}.designer-controls{display:grid;gap:12px}.designer-toolbar{display:flex;flex-wrap:wrap;gap:8px}.designer-layer-panel{display:grid;gap:10px;padding:12px;border-radius:8px;background:#fff7f8}.designer-layer-head{display:grid;gap:10px}.designer-layer-head h4{margin:0}.designer-layer-list{display:grid;gap:7px;max-height:320px;overflow:auto;padding-right:4px}.designer-layer{display:grid;grid-template-columns:54px minmax(0,1fr);gap:9px;align-items:center;min-height:62px;padding:7px;border:1px solid rgba(48,38,44,.1);border-radius:8px;color:#30262c;background:#fff;cursor:pointer;text-align:left}.designer-layer.active{border-color:#ff76a0;box-shadow:0 0 0 2px #ff76a024}.designer-layer img,.layer-icon{width:54px;height:46px;object-fit:contain;border-radius:7px;background:#fff1f4}.layer-icon{display:grid;place-items:center;color:#9d2443;font-size:12px;font-weight:900;line-height:1.1;text-align:center}.layer-copy{min-width:0}.layer-copy strong,.layer-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-copy small{color:#705a65;font-size:11px}.designer-sticker-panel{position:sticky;top:16px;display:grid;gap:10px;align-self:start;padding:12px;border-radius:8px;background:#fff7f8}.designer-sticker-panel-head{display:grid;gap:5px}.designer-sticker-panel h4,.designer-sticker-panel .hint{margin:0}.designer-sticker-search,.designer-sticker-panel select{width:100%;min-height:38px;padding:0 10px;border:1px solid rgba(48,38,44,.14);border-radius:8px;color:#30262c;background:#fff}.designer-sticker-scroll{max-height:520px;overflow:auto;padding-right:4px}.designer-sticker-panel .compact-sticker-grid{grid-template-columns:repeat(4,minmax(38px,1fr))}@media(max-width:1120px)and (min-width:821px){.admin-panel{width:min(920px,100%)}.designer-layout{grid-template-columns:minmax(240px,310px) minmax(360px,1fr)}.designer-sticker-panel{grid-column:2;grid-row:1}.designer-controls{grid-column:2;grid-row:2}}.designer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.designer-grid label,.designer-controls label{display:grid;gap:7px;color:#5f4d56;font-size:13px;font-weight:850}.designer-grid input,.designer-grid select,.designer-controls input,.designer-controls select{width:100%;min-height:40px;padding:0 10px;border:1px solid rgba(48,38,44,.14);border-radius:8px;color:#30262c;background:#fff}.designer-actions{display:flex;flex-wrap:wrap;gap:8px}.compact-upload{width:auto;min-height:36px;padding:0 12px}.compact-choice{min-height:36px;padding:0 12px}.compact-sticker-grid{grid-template-columns:repeat(6,minmax(38px,1fr))}.slot-preset-row{display:flex;flex-wrap:wrap;gap:8px}.slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.slot-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border-radius:8px;background:#fff}.slot-card strong{grid-column:1 / -1}.slot-card label{display:grid;gap:5px;color:#705a65;font-size:12px;font-weight:850}.slot-card input{width:100%;min-height:38px;padding:0 8px;border:1px solid rgba(48,38,44,.14);border-radius:8px}@media(max-width:820px){:root{background:#fff7f8}html,body{width:100%;min-height:100%;color:#30262c;background:linear-gradient(180deg,#fff6f8,#fff 62%,#f6fcff)}body:before{display:none}.app-shell{width:100%;max-width:100vw;min-height:100dvh;padding:12px 12px calc(12px + env(safe-area-inset-bottom));color:#30262c;opacity:1;background:transparent}.topbar{position:sticky;top:0;z-index:8;min-height:48px;padding:4px 0 8px;background:#fff7f8eb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.brand{gap:7px;font-size:18px}.brand-logo{width:38px;height:35px;box-shadow:3px 3px #ffb7c8}.logo-letter{font-size:20px}.topbar-note{display:none}.start-panel{display:flex;flex-direction:column;gap:20px;align-items:stretch;padding:18px 0 28px}.hero-copy{order:1;padding:8px 2px 0;color:#30262c;opacity:1}h1{font-size:clamp(56px,17vw,76px);line-height:.95;color:#30262c;opacity:1;text-shadow:none}h2{font-size:25px}.subcopy{margin-top:16px;font-size:16px;line-height:1.55}.hero-strip{order:2;width:min(310px,86vw);gap:10px;padding:22px;background:#fff;opacity:1;border:1px solid rgba(255,118,160,.28);box-shadow:0 16px 36px #8f4b6129}.mini-photo{border-width:7px;opacity:1}.action-grid{order:3;display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;margin-top:2px}.flow-panel,.camera-panel,.export-panel{gap:16px;margin-top:18px}.upload-drop{min-height:180px;padding:22px;color:#30262c;background:#fff;border-color:#ff76a061;opacity:1;box-shadow:0 10px 24px #8f4b611a}.editor-layout{display:block;min-height:calc(100dvh - 64px);padding:8px 0 calc(50dvh + env(safe-area-inset-bottom))}.preview-wrap{position:sticky;top:58px;z-index:1;min-height:44dvh;align-content:center;padding:4px 0 12px}.preview-canvas{width:min(78vw,340px);max-height:52dvh;box-shadow:0 16px 34px #8f4b6129}.edit-panel{position:fixed;right:0;bottom:0;left:0;z-index:20;max-height:min(50dvh,430px);overflow:auto;border-width:1px 0 0;border-radius:18px 18px 0 0;background:#fffffff0;box-shadow:0 -16px 40px #8f4b6129;padding-bottom:env(safe-area-inset-bottom);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.tool-tabs{position:sticky;top:0;z-index:3;display:flex;grid-template-columns:none;background:#fffffff2;scroll-snap-type:x proximity}.tool-tabs button{flex:0 0 auto;min-height:48px;min-width:76px;font-size:13px;scroll-snap-align:start}.panel-body{max-height:calc(min(50dvh,430px) - 50px - env(safe-area-inset-bottom));overflow:auto;padding:14px 14px 18px}.segmented,.choice-list{overscroll-behavior-x:contain}.choice-list{gap:8px}.choice{min-height:46px;padding:0 10px;font-size:13px}.template-list{grid-template-columns:1fr;gap:8px}.template-card{min-height:68px;padding:10px}.topbar-actions{gap:6px}.topbar-actions .ghost-button{padding:0 10px}.primary-button,.secondary-button,.replace-button,.danger-button{min-height:46px}.admin-template-list{grid-template-columns:1fr}.admin-sticker-list{grid-template-columns:repeat(2,minmax(0,1fr))}.designer-layout,.designer-grid{grid-template-columns:1fr}.designer-controls,.designer-sticker-panel{grid-column:auto;grid-row:auto}.designer-preview-wrap,.designer-sticker-panel{position:static}.slot-grid,.admin-toolbar,.camera-actions{grid-template-columns:1fr}.share-card{grid-template-columns:1fr;justify-items:center}}@media(max-width:430px){.app-shell{padding-right:10px;padding-left:10px}.topbar-actions .ghost-button{min-height:36px;padding:0 8px;font-size:12px}.brand-word{max-width:92px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thumb-grid,.photo-picker{gap:7px}.editor-layout{padding-bottom:calc(54dvh + env(safe-area-inset-bottom))}.preview-wrap{top:54px;min-height:40dvh;padding-top:0}.preview-canvas{width:min(82vw,310px);max-height:47dvh}.edit-panel{max-height:min(54dvh,440px)}.panel-body{max-height:calc(min(54dvh,440px) - 50px - env(safe-area-inset-bottom))}.choice-list{grid-template-columns:repeat(2,minmax(0,1fr))}.sticker-grid{grid-template-columns:repeat(5,minmax(44px,1fr));gap:7px}.panel-body{padding:14px}.share-card code{max-width:86vw}}@media(max-height:700px)and (max-width:820px){.preview-wrap{min-height:36dvh}.preview-canvas{max-height:42dvh;width:min(68vw,285px)}}
@media(max-width:820px){body:has(.editor-layout){overflow:hidden}.screen-editor.app-shell{height:100dvh;overflow:hidden}.editor-layout{display:grid!important;grid-template-rows:minmax(0,42dvh) minmax(0,1fr);height:calc(100dvh - 64px);min-height:0;padding:0!important;gap:0}.preview-wrap{position:relative!important;top:auto!important;z-index:1;min-height:0!important;height:42dvh;padding:4px 0 8px!important;display:grid;place-items:center;overflow:hidden}.preview-canvas{width:auto!important;height:min(39dvh,440px)!important;max-width:88vw!important;max-height:39dvh!important;object-fit:contain;border-radius:8px}.edit-panel{position:relative!important;inset:auto!important;z-index:2;display:grid;grid-template-rows:auto minmax(0,1fr);height:auto;max-height:none!important;min-height:0;overflow:hidden!important;border-radius:18px 18px 0 0;background:#fffffff5}.tool-tabs{display:flex!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}.tool-tabs::-webkit-scrollbar,.segmented::-webkit-scrollbar{display:none}.tool-tabs button{flex:0 0 82px!important;min-width:82px!important;white-space:nowrap}.panel-body{max-height:none!important;min-height:0;overflow-y:auto!important;-webkit-overflow-scrolling:touch;padding:14px 14px calc(72px + env(safe-area-inset-bottom))!important}.segmented{display:flex!important;overflow-x:auto!important;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding:0 0 8px}.segmented button{flex:0 0 auto;min-width:74px}.template-list{grid-template-columns:1fr!important;gap:10px}.template-card{grid-template-columns:40px minmax(0,1fr)!important;min-height:76px!important;padding:10px!important}.template-card strong{font-size:18px}.template-swatch{width:40px!important;height:54px!important}.choice-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}.choice{min-height:50px!important;font-size:15px}.control-card{padding:12px}.sticker-grid{grid-template-columns:repeat(4,minmax(54px,1fr))!important}.photo-picker{grid-template-columns:repeat(4,minmax(0,1fr))!important}.topbar{z-index:10}.topbar-actions{max-width:62vw;overflow-x:auto}.topbar-actions .ghost-button{flex:0 0 auto}}@media(max-width:430px){.editor-layout{grid-template-rows:minmax(0,39dvh) minmax(0,1fr);height:calc(100dvh - 58px)}.preview-wrap{height:39dvh}.preview-canvas{height:min(36dvh,390px)!important;max-height:36dvh!important;max-width:84vw!important}.tool-tabs button{flex-basis:78px!important;min-width:78px!important}.panel-body{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}.template-card strong{font-size:17px}.choice{font-size:14px}.sticker-grid{grid-template-columns:repeat(4,minmax(48px,1fr))!important}}

@media(max-width:820px){body:has(.editor-layout){overflow:hidden}.screen-editor.app-shell{height:100dvh;overflow:hidden}.editor-layout{display:grid!important;grid-template-rows:minmax(0,42dvh) minmax(0,1fr);height:calc(100dvh - 64px);min-height:0;padding:0!important;gap:0}.preview-wrap{position:relative!important;top:auto!important;z-index:1;min-height:0!important;height:42dvh;padding:4px 0 8px!important;display:grid;place-items:center;overflow:hidden}.preview-canvas{width:auto!important;height:min(39dvh,440px)!important;max-width:88vw!important;max-height:39dvh!important;object-fit:contain;border-radius:8px}.edit-panel{position:relative!important;inset:auto!important;z-index:2;display:grid;grid-template-rows:auto minmax(0,1fr);height:auto;max-height:none!important;min-height:0;overflow:hidden!important;border-radius:18px 18px 0 0;background:#fffffff5}.tool-tabs{display:flex!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}.tool-tabs::-webkit-scrollbar,.segmented::-webkit-scrollbar{display:none}.tool-tabs button{flex:0 0 82px!important;min-width:82px!important;white-space:nowrap}.panel-body{max-height:none!important;min-height:0;overflow-y:auto!important;-webkit-overflow-scrolling:touch;padding:14px 14px calc(72px + env(safe-area-inset-bottom))!important}.segmented{display:flex!important;overflow-x:auto!important;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding:0 0 8px}.segmented button{flex:0 0 auto;min-width:74px}.template-list{grid-template-columns:1fr!important;gap:10px}.template-card{grid-template-columns:40px minmax(0,1fr)!important;min-height:76px!important;padding:10px!important}.template-card strong{font-size:18px}.template-swatch{width:40px!important;height:54px!important}.choice-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}.choice{min-height:50px!important;font-size:15px}.control-card{padding:12px}.sticker-grid{grid-template-columns:repeat(4,minmax(54px,1fr))!important}.photo-picker{grid-template-columns:repeat(4,minmax(0,1fr))!important}.topbar{z-index:10}.topbar-actions{max-width:62vw;overflow-x:auto}.topbar-actions .ghost-button{flex:0 0 auto}}@media(max-width:430px){.editor-layout{grid-template-rows:minmax(0,39dvh) minmax(0,1fr);height:calc(100dvh - 58px)}.preview-wrap{height:39dvh}.preview-canvas{height:min(36dvh,390px)!important;max-height:36dvh!important;max-width:84vw!important}.tool-tabs button{flex-basis:78px!important;min-width:78px!important}.panel-body{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}.template-card strong{font-size:17px}.choice{font-size:14px}.sticker-grid{grid-template-columns:repeat(4,minmax(48px,1fr))!important}}

@media(max-width:820px){
  :root{--mbooth-drawer-height:34dvh}
  body:has(.editor-layout){overflow:hidden;background:#fff7f8}
  .screen-start .action-grid{grid-template-columns:1fr!important}.screen-start .action-grid .secondary-button{display:none!important}
  .mobile-capture-button{display:flex;position:relative;overflow:hidden}.mobile-capture-button input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
  .screen-editor.app-shell{height:100dvh;overflow:hidden;padding:10px 10px 0!important}
  .screen-editor .topbar{position:fixed!important;top:0;left:0;right:0;z-index:30;padding:8px 10px;background:#fff7f8d8;backdrop-filter:blur(16px)}
  .editor-layout{position:fixed!important;inset:0!important;display:block!important;height:100dvh!important;min-height:0!important;padding:0!important;overflow:hidden!important;background:linear-gradient(180deg,#fff6f8,#fff 60%,#f6fcff)}
  .preview-wrap{position:fixed!important;inset:56px 0 0 0!important;z-index:1;height:auto!important;min-height:0!important;padding:8px 0 calc(var(--mbooth-drawer-height) + 14px)!important;display:grid!important;place-items:center!important;overflow:hidden!important}
  .preview-canvas{width:auto!important;height:min(76dvh,calc(100dvh - 78px))!important;max-width:100vw!important;max-height:calc(100dvh - 78px)!important;object-fit:contain!important;border-radius:8px;box-shadow:0 18px 40px rgba(143,75,97,.24)}
  .edit-panel{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;z-index:40;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;height:var(--mbooth-drawer-height)!important;min-height:190px!important;max-height:78dvh!important;overflow:hidden!important;border-radius:20px 20px 0 0!important;border-width:1px 0 0!important;background:#fffffff7!important;box-shadow:0 -18px 42px rgba(143,75,97,.28)!important;backdrop-filter:blur(18px);touch-action:none}
  .edit-panel:before{content:"";display:block;position:absolute;top:8px;left:50%;width:46px;height:5px;transform:translateX(-50%);border-radius:999px;background:rgba(48,38,44,.25);z-index:5}
  .tool-tabs{padding-top:18px!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;background:#fff!important;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none;touch-action:pan-x}
  .tool-tabs button{flex:0 0 82px!important;min-width:82px!important;min-height:48px!important;white-space:nowrap!important;font-size:14px!important}
  .panel-body{height:100%!important;max-height:none!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:14px 14px calc(96px + env(safe-area-inset-bottom))!important}
  .segmented{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;touch-action:pan-x;-webkit-overflow-scrolling:touch;padding-bottom:8px!important}.segmented button{flex:0 0 auto;min-width:76px}
  .template-list{grid-template-columns:1fr!important;gap:10px!important}.template-card{grid-template-columns:42px minmax(0,1fr)!important;min-height:78px!important;padding:10px!important}.template-card strong{font-size:18px!important}.template-swatch{width:42px!important;height:56px!important}
  .choice-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.choice{min-height:52px!important;font-size:15px!important}.choice.active{box-shadow:0 0 0 3px rgba(255,118,160,.2),0 10px 22px rgba(48,38,44,.16)!important}
  .control-card{padding:12px!important}.sticker-grid{grid-template-columns:repeat(4,minmax(52px,1fr))!important}.photo-picker{grid-template-columns:repeat(4,minmax(0,1fr))!important}.topbar-actions{max-width:62vw;overflow-x:auto}.topbar-actions .ghost-button{flex:0 0 auto}
}
@media(min-width:821px){.mobile-capture-button{display:none!important}}
@media(max-width:430px){:root{--mbooth-drawer-height:36dvh}.screen-editor .topbar{min-height:52px}.preview-wrap{inset-top:54px!important}.preview-canvas{height:min(78dvh,calc(100dvh - 72px))!important}.tool-tabs button{flex-basis:78px!important;min-width:78px!important}.panel-body{padding-bottom:calc(112px + env(safe-area-inset-bottom))!important}.choice{font-size:14px!important}.sticker-grid{grid-template-columns:repeat(4,minmax(48px,1fr))!important}}


@media(max-width:820px){
  .preview-wrap{cursor:pointer;touch-action:manipulation!important}
  .preview-canvas{touch-action:none!important;-webkit-user-select:none!important;user-select:none!important;transform:translateZ(0)}
  .edit-panel{height:var(--mbooth-drawer-height,34dvh)!important;transition:height .24s cubic-bezier(.2,.8,.2,1),box-shadow .2s ease!important;will-change:height;contain:layout paint style}
  .edit-panel.drawer-dragging{transition:none!important;box-shadow:0 -8px 28px rgba(143,75,97,.2)!important}
  .edit-panel.drawer-collapsed{box-shadow:0 -8px 24px rgba(143,75,97,.18)!important}
  .edit-panel.drawer-collapsed .panel-body{display:none!important}
  .edit-panel.drawer-collapsed .tool-tabs{padding-top:18px!important}
  .panel-body,.tool-tabs{overscroll-behavior:contain}
  input[type=range]{touch-action:pan-x}
}

@media(max-width:820px){
  .edit-panel{transform:translateY(0);transition:height .24s cubic-bezier(.2,.8,.2,1),transform .22s cubic-bezier(.2,.8,.2,1),box-shadow .2s ease!important}
  .edit-panel.drawer-dragging{transition:none!important}
  .edit-panel.drawer-collapsed{transform:translateY(calc(100% - 30px))!important;box-shadow:0 -4px 18px rgba(143,75,97,.16)!important}
  .edit-panel.drawer-collapsed .tool-tabs,.edit-panel.drawer-collapsed .panel-body{visibility:hidden!important;pointer-events:none!important}
  .edit-panel.drawer-collapsed:before{visibility:visible!important;pointer-events:auto!important;top:9px;background:rgba(48,38,44,.34)}
  .preview-canvas{filter:none!important}
}

@media(max-width:820px){
  .mbooth-drawer-collapsed .preview-wrap{padding-bottom:34px!important}
  .mbooth-drawer-collapsed .preview-canvas{height:min(86dvh,calc(100dvh - 82px))!important;max-height:calc(100dvh - 82px)!important}
  .mbooth-undo{position:fixed;right:14px;top:64px;z-index:45;min-height:38px;padding:0 12px;border:1px solid rgba(48,38,44,.12);border-radius:999px;color:#30262c;background:#fffffff0;font-weight:850;box-shadow:0 10px 26px rgba(143,75,97,.18)}
  .mbooth-undo:disabled{opacity:.38}
}

@media(max-width:820px){
  .screen-editor .editor-layout{background:#fff7f8!important}
  .screen-editor .preview-wrap{align-items:start!important;place-items:start center!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch;padding-top:62px!important;padding-left:6px!important;padding-right:6px!important;background:#fff7f8!important;touch-action:pan-y!important}
  .screen-editor .preview-canvas{width:calc(100vw - 12px)!important;height:auto!important;max-width:none!important;max-height:none!important;min-height:0!important;object-fit:contain!important;box-shadow:0 16px 32px rgba(143,75,97,.20)!important}
  .mbooth-drawer-collapsed .preview-wrap{padding-bottom:38px!important}
  .mbooth-drawer-collapsed .preview-canvas{width:calc(100vw - 8px)!important;height:auto!important;max-height:none!important}
}

@media(max-width:820px){
  .screen-editor .preview-wrap{overflow-y:auto!important;overscroll-behavior:contain;touch-action:none!important;justify-items:center!important}
  .screen-editor .preview-canvas{width:calc(100vw - 12px)!important;max-width:none!important;height:auto!important;transform:none!important;transform-origin:top center!important;touch-action:none!important}
}

@media(max-width:820px){
  .screen-editor .preview-canvas{width:var(--mbooth-preview-width, calc(100vw - 12px))!important;max-width:none!important;height:auto!important}
}

@media(min-width:821px){
  .editor-layout{display:grid!important;grid-template-columns:minmax(280px,480px) minmax(340px,1fr)!important;gap:26px!important;align-items:start!important;padding-top:24px!important;height:auto!important;min-height:0!important;overflow:visible!important;background:transparent!important}
  .preview-wrap{position:sticky!important;top:18px!important;display:grid!important;justify-items:center!important;place-items:start center!important;height:auto!important;min-height:0!important;padding:16px!important;overflow:visible!important;background:transparent!important;touch-action:auto!important}
  .preview-canvas{width:min(100%,390px)!important;max-width:390px!important;height:auto!important;max-height:none!important;object-fit:contain!important}
  .edit-panel{position:static!important;display:block!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:hidden!important;transform:none!important;border-radius:8px!important}
  .tool-tabs{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;overflow-x:auto!important;padding-top:0!important}
  .panel-body{height:auto!important;max-height:none!important;overflow:visible!important;padding:18px!important}
  .mbooth-undo{position:fixed;right:24px;top:78px;z-index:45}
}
