:root{--ink:#181410;--muted:#716b63;--line:rgba(28,22,18,.11);--paper:#fffdf9;--accent:#f2a846;--soft:#fff0dd;--store-gradient:linear-gradient(145deg,#27120f,#7d2415,#d27b2b)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#171310}body{color:var(--ink);font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif}button,input{font:inherit}button{color:inherit;cursor:pointer}.app-shell{min-height:100svh;display:grid;place-items:center;background:var(--store-gradient);transition:background .65s ease;position:relative;overflow:hidden}.ambient{display:none}.phone{width:100%;min-height:100svh;background:var(--paper);position:relative;overflow:hidden}.screen{min-height:100svh;padding-bottom:112px;animation:screenIn .4s ease both}@keyframes screenIn{from{opacity:0;transform:translateY(7px)}}
.topbar,.editor-header{min-height:68px;padding:13px 18px;display:flex;align-items:center;gap:11px;background:rgba(255,255,255,.86);backdrop-filter:blur(16px)}.brand-mark{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:var(--ink);color:#fff;font:800 13px serif}.topbar-copy{display:grid;gap:2px;flex:1}.topbar-copy strong{font-size:15px;letter-spacing:.05em}.topbar-copy span{font-size:10px;color:var(--muted)}.icon-button,.back-button{border:0;background:#f5f1ea;width:38px;height:38px;border-radius:50%;font-weight:800}.store-tabs{display:flex;gap:7px;overflow:auto;scrollbar-width:none;padding:8px 18px 12px;background:rgba(255,255,255,.9)}.store-tabs::-webkit-scrollbar,.template-row::-webkit-scrollbar{display:none}.store-tabs button{flex:0 0 auto;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-size:12px;font-weight:700}.store-tabs button.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.hero{margin:0 12px;min-height:300px;border-radius:28px;overflow:hidden;background:var(--store-gradient);position:relative;color:#fff;box-shadow:0 18px 45px rgba(50,24,14,.22)}.hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 85% 15%,rgba(255,255,255,.24),transparent 31%),linear-gradient(115deg,rgba(0,0,0,.16),transparent 60%)}.hero-copy{position:relative;z-index:2;padding:26px 20px 0;max-width:78%}.eyebrow{margin:0 0 10px;font-size:10px;letter-spacing:.12em;font-weight:800;opacity:.84}.hero h1{margin:0;font:800 clamp(28px,8vw,38px)/1.12 serif;letter-spacing:-.03em}.hero h1 span{display:block}.hero-copy>p:last-child{margin:11px 0;font-size:12px;line-height:1.6;opacity:.78}.hero-art{height:178px;position:absolute;left:14%;right:-4%;bottom:-10px;display:grid;place-items:center;transform:rotate(-1.5deg)}.hero-art>img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 12px 10px rgba(0,0,0,.25))}.hero-art.focused{left:38%;right:-7%;bottom:-8px;height:205px;border-radius:48% 0 0;overflow:hidden}.hero-art.focused>img{object-fit:cover}.spark{position:absolute;font-size:20px;color:#ffe7a3;animation:twinkle 1.8s ease-in-out infinite}.spark-a{top:9%;right:16%}.spark-b{bottom:24%;left:8%;animation-delay:.7s}@keyframes twinkle{50%{opacity:.25;transform:scale(.6) rotate(25deg)}}
.section-head{padding:22px 18px 12px;display:flex;align-items:end;justify-content:space-between}.section-head>div{display:grid;gap:4px}.section-head span{font:800 18px serif}.section-head small{color:var(--muted);font-size:11px}.guide-button{border:0;background:transparent;font-size:11px;color:var(--muted)}.template-row{display:flex;gap:10px;padding:0 18px 6px;overflow:auto;scrollbar-width:none}.template-card{flex:0 0 166px;border:1px solid var(--line);background:#fff;border-radius:19px;padding:7px;text-align:left}.template-card.selected{border:2px solid var(--accent);padding:6px;box-shadow:0 8px 24px color-mix(in srgb,var(--accent) 22%,transparent)}.template-image{height:105px;border-radius:14px;overflow:hidden;background:var(--soft);position:relative;display:grid;place-items:center}.template-image img{width:100%;height:100%;object-fit:contain}.template-image img.focused{object-fit:cover;transform:scale(1.08)}.template-image>span{position:absolute;top:7px;left:7px;padding:4px 7px;border-radius:7px;background:rgba(255,255,255,.88);font-size:9px;font-weight:800}.template-card>strong{display:block;margin:9px 5px 3px;font-size:13px}.template-card>small{display:block;margin:0 5px 6px;font-size:10px;color:var(--muted)}.steps-line{display:flex;align-items:center;justify-content:center;padding:20px 18px 8px;color:var(--muted);font-size:10px}.steps-line span{display:flex;align-items:center;gap:4px;white-space:nowrap}.steps-line b{width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:var(--soft);color:var(--accent)}.steps-line i{width:24px;height:1px;background:var(--line);margin:0 5px}
.sticky-action,.editor-action{position:absolute;left:0;right:0;bottom:0;z-index:10;padding:12px 18px calc(13px + env(safe-area-inset-bottom));background:linear-gradient(transparent,rgba(255,253,249,.96) 20%)}.primary-button{width:100%;min-height:54px;border:0;border-radius:17px;background:var(--ink);color:#fff;font-weight:800;font-size:15px;box-shadow:0 12px 28px rgba(20,16,12,.2)}.primary-button:active{transform:scale(.98)}.primary-button:disabled{background:#b7b0a8;box-shadow:none}.sticky-action p{margin:7px 0 0;text-align:center;font-size:9px;color:var(--muted)}
.editor-header{border-bottom:1px solid var(--line);position:relative;z-index:6}.back-button{font-size:28px;line-height:1;padding-bottom:4px}.editor-header>div{flex:1;display:grid;gap:3px;text-align:center}.editor-header strong{font-size:15px}.editor-header span{font-size:9px;color:var(--muted)}.reset-button{border:0;background:transparent;color:var(--muted);font-size:11px;width:38px}.preview-badge{border-radius:999px;padding:6px 8px;background:var(--soft);color:var(--accent)!important;font-weight:800}.photo-guide{margin:12px 14px 10px;border-radius:14px;background:var(--soft);color:#4d4136}.photo-guide summary{list-style:none;display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:7px;padding:10px 12px}.photo-guide summary::-webkit-details-marker{display:none}.photo-guide summary b{font-size:11px}.photo-guide summary em{font-style:normal;font-size:9px;color:var(--muted)}.photo-guide p{margin:0;padding:0 12px 11px;font-size:10px;line-height:1.65;color:var(--muted)}
.canvas-wrap{padding:0 14px}.canvas-label{display:flex;justify-content:space-between;align-items:center;padding:0 3px 7px;font-size:9px;color:var(--muted)}.canvas-label b{color:var(--accent);background:var(--soft);padding:4px 7px;border-radius:999px}.stage{aspect-ratio:1/.84;position:relative;overflow:hidden;touch-action:none;border-radius:22px;background:#f7f3ed;border:1px solid var(--line)}.scene-backdrop{position:absolute;inset:0;display:grid;place-items:center}.body-template{width:100%;height:100%;object-fit:contain;will-change:transform}.head-layer,.sticker-layer{position:absolute;z-index:3;user-select:none}.head-layer{aspect-ratio:1;border-radius:50%}.head-layer img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}.head-layer.selected,.sticker-layer.selected{outline:2px solid var(--accent);outline-offset:3px}.head-placeholder{width:100%;height:100%;border-radius:50%;background:#fff;border:2px dashed #b7aea4;display:grid;place-items:center;align-content:center;color:#8c8279}.head-placeholder span{font-size:22px;line-height:1}.head-placeholder small{font-size:7px;margin-top:3px}.head-upload{position:absolute;inset:0;cursor:pointer;border-radius:50%}.head-upload input{display:none}.head-upload>b{position:absolute;right:-5px;bottom:-3px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:#fff;background:var(--ink);border:2px solid #fff;font-size:13px}.sticker-layer{font-size:35px;line-height:1;filter:drop-shadow(0 3px 3px rgba(0,0,0,.18));cursor:grab}
.tool-tabs{display:grid;grid-template-columns:1fr 1fr;margin:12px 14px 8px;background:#f2eee8;padding:4px;border-radius:13px}.tool-tabs button{border:0;border-radius:10px;padding:9px;background:transparent;color:var(--muted);font-size:12px;font-weight:700}.tool-tabs button.active{background:#fff;color:var(--ink);box-shadow:0 3px 9px rgba(40,30,20,.08)}.upload-list,.sticker-tools{display:flex;gap:10px;padding:2px 18px 10px;overflow:auto}.upload-avatar{width:70px;flex:0 0 70px;display:grid;justify-items:center;gap:5px;cursor:pointer}.upload-avatar input{display:none}.upload-avatar>span,.upload-avatar>img{width:52px;height:52px;border-radius:50%}.upload-avatar>span{display:grid;place-items:center;border:1px dashed #aaa197;color:#81786e;background:#fff;font-size:20px}.upload-avatar>img{object-fit:cover;border:2px solid transparent}.upload-avatar.active>img,.upload-avatar.active>span{border-color:var(--accent);box-shadow:0 0 0 3px var(--soft)}.upload-avatar small{font-size:9px;color:var(--muted);white-space:nowrap}.sticker-tools button{flex:0 0 52px;height:52px;border:1px solid var(--line);border-radius:15px;background:#fff;font-size:27px}.fine-tune{display:grid;grid-template-columns:1.25fr .8fr auto;gap:9px;align-items:center;padding:2px 18px 8px}.fine-tune label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:5px;font-size:9px;color:var(--muted)}.fine-tune input{width:100%;accent-color:var(--accent)}.fine-tune .delete{border:0;background:#ffe7e1;color:#a83b2d;border-radius:8px;padding:5px 7px;font-size:9px}.scale-control{display:grid;grid-template-columns:auto 28px 1fr 28px;align-items:center;gap:5px;font-size:9px;color:var(--muted)}.scale-control button{width:28px;height:28px;border:1px solid var(--line);border-radius:9px;padding:0;background:#fff;font-size:16px;font-weight:800}
.preview-screen{background:linear-gradient(180deg,#fff 0 18%,var(--soft) 100%)}.preview-copy{padding:25px 22px 17px}.preview-copy .eyebrow{color:var(--accent)}.preview-copy h2{margin:0;font:800 28px/1.15 serif;letter-spacing:-.03em}.preview-copy>p:last-child{margin:9px 0 0;color:var(--muted);font-size:11px}.preview-card{margin:0 17px;padding:8px;border-radius:28px;background:#fff;box-shadow:0 20px 50px rgba(49,31,19,.18);position:relative}.preview-card .stage{border-radius:21px}.watermark{position:absolute;bottom:18px;right:18px;padding:7px 9px;border-radius:8px;background:rgba(20,16,12,.66);color:#fff;display:grid;gap:1px}.watermark b{font-size:9px}.watermark span{font-size:6px;opacity:.7;letter-spacing:.08em}.motion-note{margin:14px auto 18px;width:max-content;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.7);color:var(--muted);font-size:10px}.preview-actions{display:grid;grid-template-columns:.75fr 1.25fr;gap:9px;padding:0 18px}.secondary-button{min-height:54px;border-radius:17px;border:1px solid var(--line);background:#fff;font-weight:800}.restart-button{display:block;margin:13px auto;border:0;background:transparent;color:var(--muted);font-size:11px}.wobble{animation:headWobble 1.6s ease-in-out infinite;transform-origin:50% 85%}@keyframes headWobble{0%,100%{margin-top:0}50%{margin-top:-4px}}
.beer-art{width:100%;height:100%;position:relative;overflow:hidden;background:radial-gradient(circle at 50% 15%,#704095,#191631 68%);color:#ffcf62}.beer-art.compact{border-radius:inherit;min-height:100px}.neon{position:absolute;top:10%;width:100%;text-align:center;font:900 22px serif;letter-spacing:.12em;text-shadow:0 0 8px #ffb42a,0 0 18px #ff7a22}.beer-person{position:absolute;bottom:18%;width:28%;height:45%;border-radius:30% 30% 10% 10%;background:linear-gradient(#722c75,#2b1f54);border:3px solid #e09d3a}.beer-person.left{left:19%;transform:rotate(-5deg)}.beer-person.right{right:19%;transform:rotate(5deg)}.beer-head{position:absolute;width:58%;aspect-ratio:1;border-radius:50%;background:rgba(255,255,255,.12);border:2px dashed rgba(255,255,255,.6);left:21%;top:-29%}.beer-person i{position:absolute;right:-22%;top:35%;font-style:normal;font-size:30px}.beer-person.right i{right:auto;left:-22%}.beer-table{position:absolute;left:16%;right:16%;height:7%;bottom:16%;background:#b86b2b;border-radius:50%}.beer-lights{position:absolute;width:100%;bottom:5%;text-align:center;color:#f3b33f;letter-spacing:.5em}
.city-placeholder{width:100%;height:100%;display:grid;place-content:center;text-align:center;gap:6px;background:radial-gradient(circle at 28% 18%,rgba(255,255,255,.5),transparent 25%),linear-gradient(145deg,#d8eee9,#8fb8b2 52%,#d7aa72);color:#173d47}.city-placeholder span{font-size:10px;letter-spacing:.2em}.city-placeholder strong{font:800 26px serif}.city-placeholder small{font-size:9px;opacity:.72}.city-placeholder.compact{min-height:100px}.city-placeholder.compact strong{font-size:20px}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:99;background:#181410;color:#fff;padding:11px 17px;border-radius:999px;font-size:12px;box-shadow:0 10px 30px rgba(0,0,0,.28)}
@media(min-width:560px){.app-shell{padding:30px}.ambient{display:block;position:absolute;width:320px;height:320px;border-radius:50%;filter:blur(70px);background:rgba(255,255,255,.11)}.ambient-one{left:4%;top:6%}.ambient-two{right:3%;bottom:3%}.phone{width:430px;min-height:880px;height:min(900px,calc(100svh - 60px));border-radius:34px;box-shadow:0 30px 90px rgba(0,0,0,.42)}.screen{min-height:100%;height:100%;overflow-y:auto}.sticky-action,.editor-action{position:sticky;margin-top:8px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Template-card taxonomy: scope badge on the top-right, people count on the top-left. */
.template-image .people-badge{left:7px}
.template-image .scope-badge{left:auto;right:7px;color:#fff;background:color-mix(in srgb,var(--accent) 88%,#181410)}
.template-image .scope-badge.shared{background:rgba(24,20,16,.82)}

/* Bobblehead preview: pivot around the neck instead of floating vertically. */
.wobble{animation:headWobble 1.45s linear infinite;transform-origin:50% 88%}
@keyframes headWobble{0%,100%{margin-top:0;rotate:calc(-1 * var(--swing-half-angle,20deg))}50%{margin-top:0;rotate:var(--swing-half-angle,20deg)}}

/* Fixed head frame: the photo moves and zooms inside this crop, never the circle itself. */
.head-layer{overflow:hidden;background:#fff}
.head-photo{position:absolute;inset:0;border-radius:50%;overflow:hidden;touch-action:none;cursor:grab;background:#f2eee8}
.head-photo:active{cursor:grabbing}
.head-photo img{width:100%;height:100%;object-fit:contain;border-radius:0;display:block;transform-origin:50% 50%;will-change:transform;pointer-events:none}
.replace-photo{position:absolute;right:3px;bottom:3px;z-index:5;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;border:2px solid #fff;box-shadow:0 3px 9px rgba(0,0,0,.25);cursor:pointer}
.replace-photo input{display:none}
.replace-photo span{font-size:13px;line-height:1}

/* Hidden template calibration mode. */
.brand-mark{border:0;padding:0}
.admin-entry,.admin-exit{border:0;border-radius:999px;padding:8px 11px;background:#181410;color:#fff;font-size:10px;font-weight:800}
.admin-modal{position:fixed;inset:0;z-index:200;display:grid;place-items:center;padding:20px;background:rgba(15,12,10,.68);backdrop-filter:blur(8px)}
.admin-dialog{width:min(340px,100%);position:relative;display:grid;gap:11px;padding:25px;border-radius:22px;background:#fffdf9;box-shadow:0 25px 80px rgba(0,0,0,.38)}
.admin-dialog>strong{font:800 22px serif}.admin-dialog p{margin:0;color:var(--muted);font-size:12px}.admin-dialog>input{width:100%;height:48px;border:1px solid var(--line);border-radius:13px;padding:0 14px;font-size:18px;letter-spacing:.22em;outline:none}.admin-dialog>input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--soft)}
.admin-close{position:absolute;right:13px;top:12px;width:32px;height:32px;border:0;border-radius:50%;background:#f2eee8;font-size:20px}.admin-error{min-height:15px;color:#b13b2d;font-size:10px}
.calibration-screen{padding-bottom:28px;background:#f7f3ed}.calibration-note{margin:12px 14px;padding:10px 12px;border-radius:13px;background:#fff0dd;color:#66513d;font-size:10px;line-height:1.55}.calibration-stage{touch-action:none}.calibration-head{position:absolute;z-index:5;aspect-ratio:1;border:2px dashed rgba(190,45,32,.7);border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.48);color:#922d23;font-size:9px;font-weight:800;cursor:move;user-select:none;box-shadow:0 0 0 1px rgba(255,255,255,.8)}.calibration-head.active{border-style:solid;box-shadow:0 0 0 3px rgba(190,45,32,.18)}.calibration-head i{position:absolute;left:50%;bottom:-5px;width:10px;height:10px;border-radius:50%;transform:translateX(-50%);background:#d33124;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.3)}
.calibration-head.active{animation:calibrationSwing var(--wobble-duration,.85s) linear infinite}.pivot-axis{position:absolute;left:50%;z-index:7;width:0;border-left:2px dashed rgba(20,122,157,.7);pointer-events:none}.pivot-marker{position:absolute;left:50%;z-index:8;width:24px;height:24px;transform:translate(-50%,-50%);border-radius:50%;background:rgba(255,255,255,.94);border:2px solid #147a9d;box-shadow:0 2px 9px rgba(0,0,0,.22);cursor:ns-resize;touch-action:none}.pivot-marker b{position:absolute;inset:5px;border:2px solid #147a9d;border-radius:50%}.pivot-marker:after{content:"";position:absolute;left:50%;top:2px;bottom:2px;border-left:1px solid #147a9d}.pivot-marker:before{content:"";position:absolute;top:50%;left:2px;right:2px;border-top:1px solid #147a9d}.pivot-marker small{position:absolute;left:27px;top:50%;transform:translateY(-50%);padding:3px 5px;border-radius:6px;background:#147a9d;color:#fff;font:700 8px/1 Arial;white-space:nowrap}.calibration-head:not(.active) .pivot-axis,.calibration-head:not(.active) .pivot-marker{display:none}@keyframes calibrationSwing{0%,100%{rotate:calc(-1 * var(--swing-half-angle,20deg))}50%{rotate:var(--swing-half-angle,20deg)}}
.mechanical-reference{position:absolute;left:0;right:0;bottom:68%;z-index:4;border-top:1px dashed rgba(20,122,157,.75);pointer-events:none}.mechanical-reference span{position:absolute;right:5px;top:4px;padding:3px 5px;border-radius:6px;background:rgba(20,122,157,.9);color:#fff;font:700 7px/1 Arial}.control-help{font-size:8px;color:var(--muted)}
.calibration-slots{display:flex;gap:7px;padding:10px 16px 0;overflow:auto}.calibration-slots button{border:1px solid var(--line);border-radius:999px;background:#fff;padding:7px 11px;font-size:10px}.calibration-slots button.active{background:var(--ink);color:#fff}.calibration-controls{display:grid;gap:12px;margin:12px 14px;padding:15px;border-radius:17px;background:#fff}.calibration-controls label{display:grid;gap:7px}.calibration-controls label>span{display:flex;justify-content:space-between;font-size:10px;color:var(--muted)}.calibration-controls b{color:var(--ink)}.calibration-controls input{width:100%;accent-color:#bd3125}.calibration-actions{display:grid;grid-template-columns:.8fr 1.2fr;gap:9px;padding:0 14px}.calibration-actions .primary-button,.calibration-actions .secondary-button{min-height:48px}
.calibration-controls .position-control{display:none}
.body-calibration-divider{display:flex;align-items:center;justify-content:space-between;margin-top:3px;padding-top:12px;border-top:1px solid var(--line)}.body-calibration-divider b{font-size:11px}.body-calibration-divider span{font-size:8px;color:var(--muted)}
.admin-template-row{align-items:flex-start}.template-admin-card{flex:0 0 166px;display:grid;gap:6px}.template-admin-card .template-card{width:100%;flex:none}.template-card.disabled-template{opacity:.5;filter:grayscale(.65)}.template-image .disabled-badge{left:50%;right:auto;top:50%;transform:translate(-50%,-50%);background:#181410;color:#fff;font-size:10px;padding:6px 9px;white-space:nowrap}.template-manage{display:grid;grid-template-columns:1fr 1fr;gap:5px}.template-manage button{border:1px solid var(--line);border-radius:9px;background:#fff;padding:7px 5px;font-size:9px;font-weight:800}.template-manage button:last-child{color:#a33a2e;background:#fff2ef}.template-manage button.enable{color:#267044;background:#effaf3}.template-manage button:disabled{opacity:.35;cursor:default}
.calibration-city-tabs{display:flex;gap:6px;padding:10px 14px 7px;overflow:auto;scrollbar-width:none;background:#fff}.calibration-city-tabs button{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:#fff;padding:7px 12px;font-size:10px;font-weight:800}.calibration-city-tabs button.active{background:var(--ink);border-color:var(--ink);color:#fff}.calibration-template-tabs{display:flex;gap:7px;padding:0 14px 9px;overflow:auto;scrollbar-width:none;background:#fff}.calibration-template-tabs button{flex:0 0 118px;display:grid;gap:3px;text-align:left;border:1px solid var(--line);border-radius:11px;background:#fff;padding:8px}.calibration-template-tabs button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:800}.calibration-template-tabs button small{font-size:8px;color:#267044}.calibration-template-tabs button.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--soft)}.calibration-template-tabs button.disabled-item{opacity:.55}.calibration-template-tabs button.disabled-item small{color:#a33a2e}.calibration-management{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 14px 0}.calibration-management button{border:1px solid var(--line);border-radius:11px;background:#fff;padding:9px;font-size:9px;font-weight:800}.calibration-management button:last-child{color:#a33a2e}.calibration-management button.enable{color:#267044}.calibration-management button:disabled{opacity:.35}
.sticker-layer{animation:none!important}.sticker-delete{position:absolute;right:-12px;top:-12px;width:20px;height:20px;border:2px solid #fff;border-radius:50%;display:grid;place-items:center;padding:0;background:#c93b2d;color:#fff;font:800 13px/1 Arial;box-shadow:0 2px 7px rgba(0,0,0,.28);cursor:pointer}
.header-spacer{display:block;width:38px;flex:0 0 38px}.preview-card+.preview-actions{margin-top:18px}
.wobble{animation-duration:var(--wobble-duration,.85s)}.motion-speed-control{display:grid;grid-template-columns:auto 1fr 34px;align-items:center;gap:9px;margin:3px 18px 10px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:#fff}.motion-speed-control>span{display:grid;gap:2px;font-size:10px;font-weight:800}.motion-speed-control small{font-size:7px;color:var(--muted);font-weight:400}.motion-speed-control input{width:100%;accent-color:var(--accent)}.motion-speed-control b{text-align:right;font-size:10px;color:var(--accent)}
.fine-tune .flip-photo{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:8px;padding:6px 8px;font-size:9px;white-space:nowrap}.fine-tune .flip-photo.active{border-color:var(--accent);background:var(--soft);color:var(--accent)}

/* Stabilize rounded clipping in iOS Safari and embedded WebViews. */
button{-webkit-appearance:none;appearance:none}
.head-layer .sticker-layer{z-index:6;font-size:clamp(15px,5vw,34px);touch-action:none}
.calibration-motion-toggle{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0 14px 12px;padding:4px;border-radius:13px;background:#fff;border:1px solid var(--line)}.calibration-motion-toggle button{min-height:38px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-size:10px;font-weight:800}.calibration-motion-toggle button.active{background:var(--ink);color:#fff;box-shadow:0 4px 12px rgba(20,16,12,.16)}.calibration-screen.calibration-static .calibration-head.active{animation:none!important;rotate:0deg!important}

/* Keep the primary action visible in the first mobile viewport. */
@media(max-width:559px){
  .home-screen{padding-bottom:118px}
  .home-screen .topbar{min-height:60px;padding:10px 16px}
  .home-screen .brand-mark{width:36px;height:36px;border-radius:12px}
  .home-screen .store-tabs{padding:6px 14px 9px}
  .home-screen .store-tabs button{padding:7px 13px}
  .home-screen .hero{min-height:226px;margin:0 10px;border-radius:23px}
  .home-screen .hero-copy{padding:18px 17px 0;max-width:76%}
  .home-screen .hero-copy .eyebrow{margin-bottom:7px}
  .home-screen .hero h1{font-size:clamp(25px,7vw,32px)}
  .home-screen .hero-copy>p:last-child{margin-top:8px;font-size:11px;line-height:1.45}
  .home-screen .hero-art{height:145px;bottom:-8px}
  .home-screen .hero-art.focused{height:166px;bottom:-7px}
  .home-screen .section-head{padding:14px 16px 9px}
  .home-screen .section-head span{font-size:17px}
  .home-screen .template-row{padding:0 14px 4px;gap:8px}
  .home-screen .template-card{flex-basis:142px;border-radius:17px;padding:6px}
  .home-screen .template-card.selected{padding:5px}
  .home-screen .template-image{height:82px;border-radius:12px}
  .home-screen .template-card>strong{margin:7px 4px 2px;font-size:12px}
  .home-screen .template-card>small{margin:0 4px 4px;font-size:9px}
  .home-screen .steps-line{padding:11px 14px 5px}
  .home-screen .sticky-action{position:fixed;bottom:0;padding:15px 16px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(transparent,rgba(255,253,249,.98) 24%)}
  .home-screen .sticky-action .primary-button{min-height:62px;border:2px solid rgba(255,255,255,.72);border-radius:20px;background:var(--accent);font-size:17px;letter-spacing:.04em;box-shadow:0 10px 30px color-mix(in srgb,var(--accent) 48%,rgba(0,0,0,.25)),0 0 0 4px color-mix(in srgb,var(--accent) 16%,transparent)}
  .home-screen .sticky-action p{margin-top:6px;font-size:10px}
}
@supports (-webkit-touch-callout:none){.hero,.hero-art.focused,.template-card,.template-image,.stage,.preview-card,.head-layer,.head-photo,.beer-art.compact{-webkit-mask-image:-webkit-radial-gradient(white,#000);-webkit-mask-repeat:no-repeat}.topbar,.editor-header{-webkit-backdrop-filter:blur(16px)}}
.preview-card .head-photo,
.preview-card .sticker-layer {
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
