/* Dedicated non-shrinking space below host navigation; preview flex absorbs it. */
#phone::before{content:"";display:block;height:50px;flex:0 0 50px;pointer-events:none}
.preview #stage{touch-action:none}
/* Editor controls are not document text. iPad Pencil gestures must not select
   button labels or open native copy/lookup menus over the drawing canvas. */
#phone{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#phone input,#phone textarea,#phone [contenteditable=true],#phone [contenteditable="plaintext-only"]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
.shadow-settings{border-top:1px solid var(--ui-line);margin-top:14px;padding-top:14px}
#saveCurrentColor{flex:none;width:32px;height:32px;padding:0;margin-right:2px;border:0;background:transparent;font-size:22px;line-height:32px;color:var(--ui-accent)}
#savedColorPanel{display:flex;align-items:center;margin-bottom:12px}
#savedColorCount{flex:none;margin-left:12px;font-size:11px;color:var(--ui-muted);white-space:nowrap}
#savedColorList{display:flex;flex:1;min-width:0;overflow-x:auto;padding:2px 1px;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}
#savedColorList::-webkit-scrollbar{display:none;width:0;height:0}
#savedColorList .saved-color{flex:none;width:30px;height:30px;min-width:30px;padding:0;border:1px solid var(--ui-line);border-radius:8px}
#savedColorList .saved-color+.saved-color{margin-left:8px}
#savedColorList .saved-color{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;touch-action:pan-x pan-y}
#swatchDeleteOverlay{position:fixed;inset:0;top:0;right:0;bottom:0;left:0;z-index:40}
#swatchDeleteDialog{position:absolute;width:220px;padding:14px;background:var(--ui-white);border:1px solid var(--ui-line);border-radius:12px;box-shadow:0 5px 24px var(--ui-shadow)}
#swatchDeleteDialog p{margin:0 0 12px;font-size:13px}
#swatchDeleteDialog>div{display:flex;justify-content:flex-end}
#swatchDeleteDialog button{min-width:56px;padding:6px 12px;font-size:12px}
#confirmSwatchDelete{margin-left:8px;background:var(--ui-ink);color:var(--ui-white)}
#previewJoystick{position:absolute;right:12px;bottom:12px;width:88px;height:88px;z-index:12;border:0;background:transparent;color:var(--ui-muted);pointer-events:none;touch-action:none;user-select:none;-webkit-user-select:none}
#previewJoystick .joy-arrow{position:absolute;pointer-events:none;font-size:20px;line-height:20px;opacity:0;transition:opacity .18s ease}
#previewJoystick.pressed .joy-arrow{opacity:1}
.joy-up{left:37px;top:4px}.joy-down{left:37px;bottom:4px}.joy-left{left:8px;top:32px}.joy-right{right:8px;top:32px}
#previewJoystick .joy-knob{position:absolute;left:24px;top:24px;width:40px;height:40px;padding:0;border-radius:50%;background:var(--ui-white);border:1px solid var(--ui-line);display:flex;align-items:center;justify-content:center;pointer-events:auto;transform:translate(var(--joy-x,0px),var(--joy-y,0px));transition:background .18s;touch-action:none}
#previewJoystick .joy-knob span{display:block;width:9px;height:9px;border:1.5px solid var(--ui-muted);border-radius:50%;pointer-events:none}
#previewJoystick.pressed .joy-knob{transform:translate(var(--joy-x,0px),var(--joy-y,0px)) scale(1.12);background:var(--ui-accent-soft);border-color:var(--ui-accent)}
.has-joystick .preview-controls{bottom:110px}
.has-joystick #previewZoomControl{top:10px;bottom:110px;right:8px;width:40px;transform:none;padding:0;--xhs-gap:4px;grid-gap:4px;gap:4px}
.has-joystick #previewZoomControl output{height:16px;line-height:16px;flex:none;width:100%;text-align:center}
#previewZoomControl .zoom-symbol{display:block;flex:none;width:100%;height:16px;line-height:16px;text-align:center;font-size:14px}
#previewZoomControl .zoom-rail{position:relative;display:block;flex:1;min-height:24px;width:32px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:ns-resize}
#previewZoomControl .zoom-track{position:absolute;left:14px;top:8px;bottom:8px;width:4px;background:var(--ui-switch-off);border-radius:2px;pointer-events:none}
#previewZoomControl .zoom-thumb{position:absolute;left:-6px;top:var(--zoom-position,80%);width:16px;height:16px;transform:translateY(-50%);border-radius:50%;background:var(--ui-accent);pointer-events:none}
.has-joystick #previewZoomControl input{position:absolute;inset:0;left:0;top:0;width:32px;height:100%;margin:0;opacity:0;pointer-events:none;touch-action:none;-webkit-appearance:none}
#previewZoomControl:focus-within .zoom-thumb{outline:2px solid var(--ui-ink);outline-offset:2px}
/* Hallmark · A neutral studio · pre-emit critique: P4 H4 E4 S4 R5 V4 */
:root{
 --ui-ink:#242422;--ui-muted:#777772;--ui-line:#e5e5e1;
 --ui-surface:#f1f1ee;--ui-canvas:#f7f7f4;--ui-white:#ffffff;
 --ui-accent:#ee8555;--ui-accent-soft:#fff0e8;--ui-switch-off:#cececa;
 --ui-glass:#ffffffed;--ui-overlay:#24242259;--ui-shadow:#24242214;
 --ui-debug-surface:#fff0e8f5;--ui-toast:#242422ed;
 --ui-selection:#ee855526;--ui-font:-apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif;
}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font:14px/1.45 var(--ui-font);color:var(--ui-ink);background:var(--ui-surface)}button,input{font:inherit}button{border:1px solid var(--ui-line);background:white;color:inherit;border-radius:12px;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible{outline:2px solid var(--ui-ink);outline-offset:2px}button.active{background:var(--ui-accent-soft);border-color:var(--ui-line);color:var(--ui-ink)}[hidden],#legacy{display:none!important}
#phone{width:100%;max-width:460px;height:100%;height:100dvh;margin:auto;background:var(--ui-white);display:flex;flex-direction:column;overflow:hidden;padding-top:0;padding-top:var(--safe-area-inset-top,env(safe-area-inset-top,0px))}.topbar{height:44px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 20px}.brand{font-size:13px;font-weight:750;letter-spacing:2px}.topbar small{font-size:10px;color:var(--ui-muted);letter-spacing:1px}.topbar button{border:0;font-size:11px;padding:5px 0;color:var(--ui-muted)}
.preview{position:relative;flex:1;min-height:140px;margin:0 16px;background:var(--ui-canvas);border:1px solid var(--ui-line);border-radius:18px;overflow:hidden;display:flex;align-items:center;justify-content:center}.preview #stage{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:relative}.preview canvas{position:absolute;touch-action:none;user-select:none;-webkit-user-select:none}.preview #handles{pointer-events:none}.preview-label{position:absolute;left:14px;top:11px;color:var(--ui-muted);font-size:10px;letter-spacing:1.4px;pointer-events:none}.preview-controls{position:absolute;bottom:9px;right:10px;display:flex;align-items:center;background:var(--ui-glass);padding:5px 9px;border-radius:20px;font-size:10px}.preview-controls input{margin:0 5px 0 0}.preview-controls label{display:flex;align-items:center}.preview-controls label+label{margin-left:10px}
.actionbar{height:38px;flex:none;display:flex;align-items:center;justify-content:space-between;margin:0 18px}.actionbar button{border:0;padding:5px 8px;font-size:12px;background:transparent}.actionbar button+button{margin-left:5px}#layerName{font-size:11px;color:var(--ui-muted)}.tabs{display:flex;flex:none;padding:0 14px 8px;overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar,.cards::-webkit-scrollbar{display:none}.tabs button{flex:1;min-width:48px;padding:9px 5px;border-radius:10px;border-color:transparent;background:var(--ui-surface);font-size:13px}.tabs button+button{margin-left:5px}.tabs button.active{background:var(--ui-ink);color:var(--ui-white)}
.editor{height:215px;flex:none;overflow-y:auto;overscroll-behavior:contain;padding:0 16px 10px;scrollbar-width:thin}.cards{display:flex;overflow-x:auto;padding:1px 0 8px;min-height:95px}.card{position:relative;flex:none;width:83px;height:87px;padding:6px;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:11px}.card+.card,.card+.saved-wrap,.saved-wrap+.saved-wrap{margin-left:8px}.card canvas{width:57px;height:53px}.card.custom{background:var(--ui-accent-soft);border-color:var(--ui-line);color:var(--ui-ink)}.card.custom b{font-size:24px;font-weight:400;line-height:1.3}.saved-wrap{display:flex;flex:none;position:relative}.saved-wrap>.card{margin:0}.delete-preset{position:absolute;right:0;top:0;font-size:12px;width:23px;height:23px;border-radius:0 10px 0 9px;background:var(--ui-white)}.row{display:flex;align-items:center;justify-content:space-between;margin:4px 0 10px;min-height:30px}.row label{font-size:12px}.switch{min-width:45px;font-size:12px;padding:5px 10px;border:0;background:var(--ui-surface)}.switch[aria-pressed=true]{color:var(--ui-ink);background:var(--ui-accent-soft)}.colorrow{display:flex;align-items:center}.colorrow input{flex:1;min-width:0;margin:0 12px}.colorrow button{padding:7px 10px;font-size:12px}.color-dot{width:24px;height:24px;border:3px solid white;box-shadow:0 0 0 1px var(--ui-line);border-radius:50%;flex:none}input[type=range]{width:100%;height:5px;accent-color:var(--ui-ink);cursor:pointer}.hue{appearance:none;-webkit-appearance:none;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:6px;height:7px!important}.hue::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;background:white;border:2px solid var(--ui-line);border-radius:50%}
.savebar{padding:7px 20px 14px;padding-bottom:calc(14px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));flex:none;background:var(--ui-white);border-top:1px solid var(--ui-line)}.primary{border:0;color:white;background:var(--ui-ink);padding:12px 14px;border-radius:13px;font-weight:600;width:100%}.primary:active{background:var(--ui-ink)}.savebar .primary{letter-spacing:2px}.tools{display:flex;margin:6px 0 12px}.tools button{flex:1;padding:8px 3px;font-size:12px}.tools button+button{margin-left:6px}.control-label{display:block;font-size:12px;margin:10px 0}.control-label output{float:right;color:var(--ui-muted);font-size:11px}.control-label input{margin:12px 0 5px}.mini-title{font-size:11px;color:var(--ui-muted);margin:7px 0}.small-actions{display:flex;flex-wrap:wrap}.small-actions button{padding:7px 10px;font-size:11px;margin:3px 5px 3px 0}.hint{font-size:11px;color:var(--ui-muted);margin:6px 0 10px}.feature-tabs{display:flex;margin:2px 0 8px}.feature-tabs button{flex:1;border:0;background:var(--ui-surface);padding:6px}.feature-tabs button+button{margin-left:5px}.feature-tabs button.active{color:var(--ui-ink);background:var(--ui-accent-soft)}.feature-options{display:flex;flex-wrap:wrap}.feature-options button{padding:8px 10px;font-size:12px;margin:3px 5px 3px 0}
.overlay{position:fixed;inset:0;top:0;right:0;bottom:0;left:0;background:var(--ui-overlay);z-index:10;display:flex;align-items:center;justify-content:center;padding:24px}.modal{background:white;border-radius:22px;padding:22px;width:100%;max-width:340px;max-height:90%;overflow:auto;box-shadow:0 18px 70px var(--ui-shadow)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.modal h2{font-size:17px;margin:0;font-weight:600}.close{border:0;padding:3px 8px;font-size:22px;background:transparent;color:var(--ui-muted)}.color-square{height:180px;border-radius:12px;position:relative;touch-action:none;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,var(--ui-white),transparent),red}.picker-marker{width:17px;height:17px;border:2px solid white;border-radius:50%;position:absolute;transform:translate(-50%,-50%);box-shadow:0 0 2px #000;pointer-events:none}.modal input[type=text]{width:100%;border:1px solid var(--ui-line);border-radius:9px;padding:9px}.modal .primary{margin-top:13px}.result-image{width:100%;border-radius:13px;border:1px solid var(--ui-line);background:var(--ui-canvas)}.download{display:block;text-align:center;text-decoration:none}.modal .hint{text-align:center}#toast{position:fixed;bottom:80px;left:50%;transform:translateX(-50%);max-width:90%;background:var(--ui-toast);color:white;border-radius:12px;padding:10px 17px;font-size:12px;opacity:0;pointer-events:none;z-index:30;transition:opacity .2s}#toast.show{opacity:1}
@media(max-height:700px){.topbar{height:34px}.editor{height:195px}.card{height:73px;width:76px}.card canvas{height:42px;width:48px}.cards{min-height:80px}.savebar{padding-top:5px;padding-bottom:8px}.tabs button{padding:7px 3px}.actionbar{height:33px}.primary{padding:10px}.row{margin-bottom:5px}}
@media(min-width:600px){#phone{box-shadow:0 0 60px var(--ui-shadow)}.preview{margin-top:8px}}
.preview #stage:not(.solid){background-color:var(--ui-white);background-image:linear-gradient(45deg,var(--ui-surface) 25%,transparent 25%),linear-gradient(-45deg,var(--ui-surface) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--ui-surface) 75%),linear-gradient(-45deg,transparent 75%,var(--ui-surface) 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}

.preview-controls{z-index:2;min-height:36px}.preview-controls label{min-height:26px;padding:0 4px;cursor:pointer}
/* Color editing replaces the lower editor, leaving the canvas uncovered. */
#colorOverlay{position:relative;inset:auto;top:auto;left:auto;right:auto;bottom:auto;flex:none;width:100%;height:215px;padding:0 16px 10px;background:transparent;display:block;z-index:3}
#colorOverlay .modal{width:100%;max-width:none;height:100%;max-height:none;overflow:auto;border-radius:12px;padding:10px;background:var(--ui-canvas);box-shadow:none;display:grid;grid-template-columns:43% 1fr;grid-template-rows:24px 1fr 1fr 1fr 32px;grid-column-gap:12px;grid-row-gap:4px}
#colorOverlay .modal-head{grid-column:1/-1;margin:0}#colorOverlay h2{font-size:13px}#colorOverlay .close{font-size:20px;padding:0 4px}
#colorOverlay .color-square{grid-column:1;grid-row:2/5;height:100%;min-height:90px;border-radius:8px}
#colorOverlay .control-label{grid-column:2;margin:0;font-size:10px;line-height:1.2}#colorOverlay .control-label input[type=range]{margin:8px 0 3px}#colorOverlay #hexColor{padding:4px 7px;font-size:11px}
#colorOverlay .primary{grid-column:1/-1;margin:0;padding:5px 12px;font-size:12px;border-radius:9px}
@media(max-height:700px){#colorOverlay{height:195px}}

#colorOverlay{padding:0 16px 14px}#colorOverlay .modal{padding:14px;grid-template-rows:28px 1fr 1fr 1fr 44px;grid-row-gap:10px}#colorOverlay h2{font-size:15px}#colorOverlay .control-label{font-size:12px}#colorOverlay #hexColor{padding:8px;font-size:12px}#colorOverlay .primary{font-size:14px}

#colorOverlay{overflow:hidden}
#colorOverlay.picker-enter .modal{animation:picker-slide-up .26s cubic-bezier(.22,.7,.2,1) both}
#colorOverlay.picker-exit{pointer-events:none}
#colorOverlay.picker-exit .modal{animation:picker-slide-down .22s cubic-bezier(.4,0,1,1) both}
@keyframes picker-slide-up{from{transform:translateY(105%);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes picker-slide-down{from{transform:translateY(0);opacity:1}to{transform:translateY(105%);opacity:0}}
@media(prefers-reduced-motion:reduce){#colorOverlay.picker-enter .modal,#colorOverlay.picker-exit .modal{animation:none}}

#debugMobile{font-size:10px;padding:5px 7px;border:1px solid var(--ui-line);border-radius:7px}#debugMobile[aria-pressed=true]{background:var(--ui-ink);color:white}#debugPanel{padding:8px 10px;background:var(--ui-accent-soft);border-radius:10px;font-size:11px;margin-bottom:8px}#debugPanel>div{display:flex;margin-top:6px}#debugPanel button{font-size:11px;padding:6px 8px;margin-right:5px}.card.selected-preset{border-color:var(--ui-ink);box-shadow:inset 0 0 0 1px var(--ui-ink)}

#debugPanel>div{flex-wrap:wrap;--xhs-gap:4px;grid-gap:4px;gap:4px}

.preview #debugPanel{position:absolute;z-index:3;left:10px;right:100px;bottom:10px;margin:0;padding:8px;background:var(--ui-debug-surface);max-height:120px;overflow-y:auto;box-sizing:border-box}.preview #debugPanel button{margin:0;padding:6px;font-size:10px}.preview #debugPanel>div{--xhs-gap:4px;grid-gap:4px;gap:4px}

.preview canvas{-webkit-touch-callout:none}

#insertControlPoint[aria-pressed=true]{background:var(--ui-ink);color:var(--ui-white)}

.feature-options .feature-thumb{width:76px;height:54px;padding:3px;overflow:hidden;flex:none}.feature-thumb canvas{width:100%;height:100%;object-fit:contain}.feature-options .feature-thumb.active{border-color:var(--ui-ink);background:var(--ui-accent-soft)}.card canvas{width:68px;height:65px}

.subpanel-head{display:flex;justify-content:space-between;align-items:center;margin:2px 0 12px;font-size:12px}.subpanel-head button{border:0;background:transparent;color:var(--ui-ink);padding:7px 0}#customTools .tools{margin-bottom:8px}#customTools #toolHint{display:none}#customAppearance{margin:12px 0 16px}#savePresetMobile{margin:0}.custom-open .subpanel-head{margin-bottom:6px}.custom-open #customAppearance{margin:8px 0}.custom-open .tools button{padding:7px 3px}#mainAdjustments .control-label{margin:10px 0 15px}.custom-open #customTools{animation:custom-panel-in .18s ease-out}@keyframes custom-panel-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.custom-open #customTools{animation:none}}

.thumbnail-wrap{display:inline-flex;position:relative;flex:none}.cards>.thumbnail-wrap,.cards>.saved-wrap{margin-left:8px}.saved-wrap>.thumbnail-wrap{margin:0}.reset-thumbnail{position:absolute;right:2px;bottom:2px;width:25px;height:25px;padding:0!important;margin:0!important;border:1px solid var(--ui-line)!important;border-radius:8px!important;background:var(--ui-glass)!important;color:var(--ui-ink);font-size:18px!important;line-height:22px;z-index:1}.feature-options>.thumbnail-wrap{margin:3px 5px 3px 0}.feature-options .thumbnail-wrap>.feature-thumb{margin:0}.thumbnail-wrap>.card{margin:0}.reset-thumbnail:active{background:var(--ui-accent-soft)!important}

.editor.custom-open{height:calc(215px + var(--covered-tabs-height,48px))}.switch{position:relative;width:44px;min-width:44px;height:26px;padding:0;border:0;border-radius:20px;background:var(--ui-switch-off);transition:background .18s}.switch::after{content:'';position:absolute;width:20px;height:20px;border-radius:50%;top:3px;left:3px;background:var(--ui-white);box-shadow:0 1px 3px var(--ui-shadow);transition:transform .18s}.switch[aria-checked=true]{background:var(--ui-ink)}.switch[aria-checked=true]::after{transform:translateX(18px)}.switch:focus-visible{outline:2px solid var(--ui-ink);outline-offset:3px}@media(max-height:700px){.editor.custom-open{height:calc(195px + var(--covered-tabs-height,42px))}}@media(prefers-reduced-motion:reduce){.switch,.switch::after{transition:none}}

.colorrow{display:block}.color-main{display:flex;align-items:center}.color-details{display:flex;align-items:center;--xhs-gap:14px;grid-gap:14px;gap:14px;margin-top:10px}.color-axes{flex:1;min-width:0}.color-axes label{display:block;font-size:11px;color:var(--ui-muted);margin:0 0 9px}.color-axes output{float:right;color:var(--ui-muted)}.color-axes input{display:block;width:100%;margin:8px 0 0}.mini-color-square{position:relative;flex:none;width:62px;height:62px;border:1px solid var(--ui-line);border-radius:8px;overflow:hidden}.mini-color-square span{position:absolute;width:8px;height:8px;border:1.5px solid white;box-shadow:0 0 1px #333;border-radius:50%;transform:translate(-50%,-50%)}

.eye-toolbar{display:flex;align-items:center;--xhs-gap:12px;grid-gap:12px;gap:12px;margin:0 0 14px;padding:7px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:14px}.eye-tool-group{display:flex;flex:1;min-width:0;--xhs-gap:3px;grid-gap:3px;gap:3px}.eye-tool-group+.eye-tool-group{border-left:1px solid var(--ui-line);padding-left:12px}.eye-tool-group button{display:flex;align-items:center;justify-content:center;--xhs-gap:5px;grid-gap:5px;gap:5px;flex:1;min-width:0;height:36px;padding:0 5px;border:0;border-radius:9px;background:transparent;color:var(--ui-muted);font-size:12px;white-space:nowrap}.eye-tool-group button.active{background:white;color:var(--ui-ink);box-shadow:0 1px 4px var(--ui-shadow)}.eye-tool-group svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.eye-tool-group button:focus-visible{outline:2px solid var(--ui-accent);outline-offset:1px}@media(max-width:350px){.eye-toolbar{--xhs-gap:6px;grid-gap:6px;gap:6px;padding:5px}.eye-tool-group+.eye-tool-group{padding-left:6px}.eye-tool-group button{--xhs-gap:3px;grid-gap:3px;gap:3px;font-size:11px}.eye-tool-group svg{width:14px;height:14px}}

/* Shared typography for every custom editing subpanel. */
.editor.custom-open{font-size:12px;font-weight:400;line-height:1.45}
.editor.custom-open label,.editor.custom-open .row,.editor.custom-open .control-label,.editor.custom-open .color-axes label,.editor.custom-open output,.editor.custom-open button,.editor.custom-open .hint,.editor.custom-open .mini-title{font-family:inherit;font-size:12px;font-weight:400;line-height:1.45}

.custom-open .tools.eye-toolbar{margin:0 0 14px}.custom-open .tools.eye-toolbar button{padding:0 5px;margin:0;font-size:12px}.custom-open .tools.eye-toolbar .eye-tool-group:first-child{flex:.85}.custom-open .tools.eye-toolbar .eye-tool-group:last-child{flex:1.4}#handArmControls .eye-toolbar{margin-bottom:10px}#handArmControls button[aria-pressed=true]{background:var(--ui-white);color:var(--ui-ink);box-shadow:0 1px 4px var(--ui-shadow)}.mouth-custom-controls>.row{margin-top:12px}

/* Drawing operations are text actions; tool selection keeps its pill treatment. */
.eye-tool-group button[data-eye-operation],.eye-tool-group #addTool,.eye-tool-group #eraseTool{background:transparent;box-shadow:none;border:0;border-radius:0}
.eye-tool-group button[data-eye-operation].active,.eye-tool-group #addTool.active,.eye-tool-group #eraseTool.active{background:transparent;box-shadow:none;color:var(--ui-ink)}
.eye-tool-group button[data-eye-operation] svg,.eye-tool-group #addTool svg,.eye-tool-group #eraseTool svg{display:none}

/* Separate the segmented tool selector from the standalone operation actions. */
.eye-toolbar.eye-drawing-toolbar,.custom-open .tools.eye-toolbar{background:transparent;border:0;padding:0;--xhs-gap:18px;grid-gap:18px;gap:18px}
.eye-toolbar>[aria-label="绘制工具"],.custom-open .tools.eye-toolbar>.eye-tool-group:first-child{background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:14px;padding:7px;flex:1.15}
.eye-toolbar>[aria-label="绘制方式"],.custom-open .tools.eye-toolbar>.eye-tool-group:last-child{border:0;padding-left:0;--xhs-gap:4px;grid-gap:4px;gap:4px;flex:1}
.eye-toolbar button[data-eye-operation] svg,.eye-toolbar #addTool svg,.eye-toolbar #eraseTool svg{display:block}
.eye-toolbar button[data-eye-operation],.eye-toolbar #addTool,.eye-toolbar #eraseTool{height:36px;padding:0 5px;border-radius:0;background:var(--ui-surface);box-shadow:none}
.eye-toolbar button[data-eye-operation].active,.eye-toolbar #addTool.active,.eye-toolbar #eraseTool.active{background:transparent;color:var(--ui-ink);box-shadow:none}
@media(max-width:350px){.eye-toolbar.eye-drawing-toolbar,.custom-open .tools.eye-toolbar{--xhs-gap:8px;grid-gap:8px;gap:8px}.eye-toolbar>[aria-label="绘制工具"],.custom-open .tools.eye-toolbar>.eye-tool-group:first-child{padding:5px}}

.eye-toolbar button[data-eye-operation="erase"],.eye-toolbar #eraseTool{background:transparent}

.eye-toolbar button[data-eye-operation="add"],.eye-toolbar #addTool{background:transparent}

.custom-open .tools.front-drawing-toolbar>.eye-tool-group:first-child{flex:1.2}.custom-open .tools.front-drawing-toolbar>.eye-tool-group:last-child{flex:1}

/* Keep the tool selector left-aligned while inactive controls collapse. */
.custom-open #customTools{animation:none}.eye-drawing-toolbar,.custom-open .tools.front-drawing-toolbar{justify-content:flex-start;--xhs-gap:16px;grid-gap:16px;gap:16px}.eye-drawing-toolbar>[aria-label="绘制工具"],.custom-open .tools.front-drawing-toolbar>.eye-tool-group:first-child{flex:0 0 54%;max-width:54%}.eye-drawing-toolbar>[aria-label="绘制方式"],.custom-open .tools.front-drawing-toolbar>.eye-tool-group:last-child{flex:1;min-width:0}.eye-tool-group button{transition:none}

.feature-options.eye-presets-row{display:flex;flex-wrap:nowrap;overflow-x:auto;--xhs-gap:8px;grid-gap:8px;gap:8px;padding:1px 0 8px;scrollbar-width:thin}.eye-presets-row>.thumbnail-wrap,.eye-presets-row>#customEyes{flex:none}.eye-presets-row button.feature-thumb{margin:0}.eye-presets-row>#customEyes{min-width:72px;margin:0}

.eye-presets-row>#customMouth{flex:none;min-width:72px;margin:0}

.front-custom-modes{display:flex;--xhs-gap:5px;grid-gap:5px;gap:5px;padding:6px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:14px;margin:0 0 14px}
.front-custom-modes button{flex:1;border:0;background:transparent;padding:10px 4px;color:var(--ui-muted)}
.front-custom-modes button.active{background:var(--ui-white);color:var(--ui-ink);box-shadow:0 1px 4px var(--ui-shadow)}
.custom-open .tools.front-vector-operations>.eye-tool-group:last-child{flex:0 0 54%;max-width:54%}

#frontDoodleTools [data-doodle-operation],#frontDoodleTools [data-doodle-operation].active{border:0;background:transparent;box-shadow:none;border-radius:0;height:36px;padding:0 5px}
#frontDoodleTools [data-doodle-operation].active{color:var(--ui-ink)}

/* Keep vector mode selection and contour actions on one compact row. */
#customTools.front-vector-row{display:grid;grid-template-columns:minmax(0,1fr) 112px;column-gap:8px}
#customTools.front-vector-row> *{grid-column:1 / -1}
#customTools.front-vector-row>#frontCustomModes{grid-column:1;grid-row:2;margin:0 0 14px;--xhs-gap:2px;grid-gap:2px;gap:2px;padding:5px}
#customTools.front-vector-row>.tools.front-vector-operations{grid-column:2;grid-row:2;margin:0 0 14px;align-self:center}
#customTools.front-vector-row .front-custom-modes button{white-space:nowrap;padding:10px 2px}
#customTools.front-vector-row .tools.front-vector-operations>.eye-tool-group:last-child{flex:1;max-width:100%;--xhs-gap:2px;grid-gap:2px;gap:2px}
#customTools.front-vector-row .tools.front-vector-operations button{white-space:nowrap;padding:0 2px;--xhs-gap:3px;grid-gap:3px;gap:3px}
@media(max-width:370px){#customTools.front-vector-row{grid-template-columns:minmax(0,1fr) 96px;column-gap:4px}#customTools.front-vector-row button{font-size:11px}}

.actionbar.front-custom-actionbar{display:grid;grid-template-columns:1fr auto 1fr;--xhs-gap:4px;grid-gap:4px;gap:4px}

.front-custom-actionbar #visibilityMobile{justify-self:end}
#frontCustomSections{display:flex;align-items:center;--xhs-gap:0;grid-gap:0;gap:0}
#frontCustomSections button{margin:0;padding:5px 10px;color:var(--ui-muted);border-radius:0}
#frontCustomSections button+button{border-left:1px solid var(--ui-line)}
#frontCustomSections button.active{color:var(--ui-ink);font-weight:600;background:transparent}
@media(max-width:370px){#frontCustomSections button{padding:5px 8px}}

.preview-history{position:absolute;left:10px;bottom:9px;display:flex;--xhs-gap:4px;grid-gap:4px;gap:4px;z-index:2;background:var(--ui-glass);border-radius:20px;padding:3px 5px}
.preview-history button{border:0;background:transparent;font-size:12px;padding:5px 7px;color:var(--ui-ink)}
.front-custom-actionbar #closeCustom{justify-self:start;margin:0;padding-left:0}
.front-custom-actionbar #frontCustomSections{justify-self:center}
#customTools.front-vector-row>#frontCustomModes,#customTools.front-vector-row>.tools.front-vector-operations{grid-row:1}
#clearFrontDoodle{margin-left:auto}

/* Shared finish across presets, tools, dialogs and export. */
body{background:var(--ui-surface);color:var(--ui-ink)}
button{background:var(--ui-white);transition:background-color .12s,border-color .12s;color:var(--ui-ink)}
button:focus-visible,input:focus-visible{outline-color:var(--ui-accent)}
button.active{background:var(--ui-accent-soft);border-color:var(--ui-accent);color:var(--ui-ink)}
input{accent-color:var(--ui-ink)}
.topbar{height:50px}.brand{color:var(--ui-ink)}.topbar small{letter-spacing:0}
.xhs-credit-icon{display:inline-block;vertical-align:middle;margin-top:-2px}
.topbar button{color:var(--ui-muted)}
.preview{background:var(--ui-canvas);border-color:var(--ui-line)}
.preview-history{background:transparent;padding:0;--xhs-gap:6px;grid-gap:6px;gap:6px}
.preview-history button{background:var(--ui-glass);border:1px solid var(--ui-line);border-radius:10px;min-height:32px;color:var(--ui-ink)}
.preview-controls{background:var(--ui-glass);border:1px solid var(--ui-line);border-radius:12px}
.actionbar{height:44px;border-bottom:1px solid var(--ui-line);margin-bottom:10px}
.actionbar button{color:var(--ui-ink)}
.tabs button{background:var(--ui-surface);color:var(--ui-muted)}
.tabs button.active{background:var(--ui-ink);color:var(--ui-white);border-color:var(--ui-ink)}
.card.custom{background:var(--ui-accent-soft);color:var(--ui-ink);border-color:var(--ui-line)}
.card.custom b{color:var(--ui-accent)}
.card.selected-preset{border-color:var(--ui-accent);box-shadow:inset 0 0 0 1px var(--ui-accent)}
.feature-options .feature-thumb.active{background:var(--ui-accent-soft);border-color:var(--ui-accent)}
.primary,.primary.active,#debugMobile[aria-pressed=true]{background:var(--ui-ink);color:var(--ui-white)}
.primary{border-radius:13px;min-height:46px;letter-spacing:0}
.primary:active{background:var(--ui-muted)}
.savebar{padding-top:10px}.savebar .primary{letter-spacing:.5px}
.switch[aria-checked=true]{background:var(--ui-ink)}
.hue::-webkit-slider-thumb{border-color:var(--ui-ink)}
.eye-tool-group button.active,#handArmControls button[aria-pressed=true],.front-custom-modes button.active{background:var(--ui-accent-soft);color:var(--ui-ink);box-shadow:none}
#frontCustomSections button{position:relative;color:var(--ui-muted);padding:8px 12px}
#frontCustomSections button+button{border:0}
#frontCustomSections button.active{color:var(--ui-ink)}
#frontCustomSections button.active::after{content:'';position:absolute;bottom:0;left:12px;right:12px;height:2px;background:var(--ui-accent);border-radius:2px}
.eye-tool-group #addTool svg{color:var(--ui-accent)}
#frontDoodleTools [data-doodle-operation].active{color:var(--ui-ink)}
.control-label,.color-axes label{color:var(--ui-ink)}
.editor.custom-open{height:356px}
.custom-open #brushOptions>.control-label,.mouth-custom-controls>.control-label{padding:0 0 12px;border-bottom:1px solid var(--ui-line)}
.custom-open #symmetryRow,.mouth-custom-controls>.row{padding-bottom:12px;border-bottom:1px solid var(--ui-line)}
.custom-open .color-details{margin-top:16px}
.custom-open .color-axes label{margin-bottom:12px}
.modal{border:1px solid var(--ui-line);box-shadow:0 18px 70px var(--ui-shadow)}
.modal input[type=text]{background:var(--ui-white);color:var(--ui-ink)}
#colorOverlay .modal{border-color:var(--ui-line);background:var(--ui-canvas)}
.editor{scrollbar-color:var(--ui-switch-off) transparent}
@media(hover:hover){button:not(:disabled):not(.primary):not(.switch):hover{border-color:var(--ui-accent)}.primary:hover{background:var(--ui-ink);opacity:.92}}
@media(max-height:800px){.editor.custom-open{height:310px}.topbar{height:44px}}
@media(max-height:680px){.editor.custom-open{height:260px}.topbar{height:36px}.actionbar{height:36px;margin-bottom:6px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

.actionbar #visibilityMobile{margin-left:auto}

/* Selected editing tools use a white surface with the coral theme accent. */
.eye-tool-group button.active,#handArmControls button[aria-pressed=true],.front-custom-modes button.active{background:var(--ui-white);color:var(--ui-accent);box-shadow:0 1px 4px var(--ui-shadow)}
.eye-tool-group button[data-eye-operation].active,.eye-tool-group #addTool.active,.eye-tool-group #eraseTool.active,#frontDoodleTools [data-doodle-operation].active{background:transparent;box-shadow:none;color:var(--ui-accent)}
#savePresetMobile{background:var(--ui-accent);color:var(--ui-white)}
#savePresetMobile:active{opacity:.85}

/* Shared selector width leaves an equally flexible action area for 2–3 buttons. */
#customTools{--tool-selector-width:46%;--tool-action-gap:12px}
#customTools.front-vector-row{grid-template-columns:var(--tool-selector-width) minmax(0,1fr);column-gap:var(--tool-action-gap)}
#frontCustomModes{width:var(--tool-selector-width);box-sizing:border-box}
#customTools.front-vector-row>#frontCustomModes{width:100%}
#frontDoodleTools{--xhs-gap:var(--tool-action-gap);grid-gap:var(--tool-action-gap);gap:var(--tool-action-gap)}
#frontDoodleTools>[aria-label="绘制工具"]{flex:0 0 var(--tool-selector-width);max-width:var(--tool-selector-width);box-sizing:border-box}
#frontDoodleTools>[aria-label="绘制方式"],#customTools.front-vector-row .tools.front-vector-operations>.eye-tool-group:last-child{display:flex;flex:1;min-width:0;--xhs-gap:2px;grid-gap:2px;gap:2px}
#frontDoodleTools>[aria-label="绘制方式"]>button,#customTools.front-vector-row .tools.front-vector-operations>.eye-tool-group:last-child>button{flex:1 1 0;min-width:0;margin:0;padding:0 2px;white-space:nowrap}

/* Identical contour and pattern selectors, independent of the selected tool. */
#customTools #frontCustomModes,#customTools #frontDoodleTools>[aria-label="绘制工具"]{height:48px;padding:5px;--xhs-gap:2px;grid-gap:2px;gap:2px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);align-items:center}
#customTools #frontCustomModes>button,#customTools #frontDoodleTools>[aria-label="绘制工具"]>button{height:36px;min-width:0;flex:1;margin:0;padding:0 2px;display:flex;align-items:center;justify-content:center;border:0;border-radius:9px;background:transparent;color:var(--ui-muted);font-size:12px;font-weight:400;line-height:1.45}
#customTools #frontCustomModes>button.active,#customTools #frontDoodleTools>[aria-label="绘制工具"]>button.active{background:var(--ui-white);color:var(--ui-accent);box-shadow:0 1px 4px var(--ui-shadow)}
#customTools .front-vector-operations #addTool,#customTools .front-vector-operations #eraseTool,#customTools #frontDoodleTools [data-doodle-operation]{display:flex;align-items:center;justify-content:center;height:36px;--xhs-gap:5px;grid-gap:5px;gap:5px;padding:0 2px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:12px;font-weight:400;line-height:1.45;color:var(--ui-muted)}
#customTools .front-vector-operations #addTool.active,#customTools .front-vector-operations #eraseTool.active,#customTools #frontDoodleTools [data-doodle-operation].active{color:var(--ui-accent)}
#customTools .front-vector-operations svg,#customTools #frontDoodleTools [data-doodle-operation] svg{display:block;width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;color:inherit}

/* Square color field with H/S/V controls and a compact, bounded footer. */
#colorOverlay .modal{padding:12px;grid-template-columns:43% minmax(0,1fr);grid-template-rows:24px repeat(3,minmax(36px,1fr)) 36px 40px;--xhs-gap:8px 12px;grid-gap:8px 12px;gap:8px 12px}
#colorOverlay .color-square{grid-row:2/5;align-self:start;width:100%;height:0;min-height:0;padding-bottom:100%}
#colorOverlay .control-label{align-self:center}
#colorOverlay .picker-hex-row{grid-column:1/-1;grid-row:5;display:flex;align-items:center;--xhs-gap:12px;grid-gap:12px;gap:12px}
#colorOverlay #hexColor{flex:1;min-width:0}
#colorOverlay .primary{grid-row:6;min-height:40px}
#customTools.front-vector-row .tools.front-vector-operations>.eye-tool-group:last-child,#frontDoodleTools>[aria-label="绘制方式"]{flex:0 1 138px;margin-left:auto;--xhs-gap:0;grid-gap:0;gap:0}

/* Keep brush settings at the same vertical position in contour and pattern modes. */
#customTools #brushOptions{margin:0;padding:0}
#customTools #brushOptions>.control-label,#customTools #doodleSize{display:block;margin:0;padding:10px 0 12px;border-bottom:1px solid var(--ui-line);font-size:12px;line-height:1.45}
#customTools #brushOptions>.control-label>input,#customTools #doodleSize>input{display:block;height:5px;margin:12px 0 5px}

#customTools #customAppearance{display:flex;flex-direction:column}

/* Pattern brush settings share the separator used by contour settings. */
.custom-open #featureControls>.control-label{padding-bottom:12px;border-bottom:1px solid var(--ui-line)}
#visibilityMobile{white-space:nowrap}

.actionbar[hidden]+.tabs{padding-top:8px}

/* Give the removed action row to the editor instead of enlarging the canvas. */
.editor:not(.custom-open){height:269px}
.editor:not(.custom-open)>.colorrow{padding-top:14px;margin-top:14px;border-top:1px solid var(--ui-line);padding-bottom:10px}
@media(max-height:700px){.editor:not(.custom-open){height:249px}}
@media(max-height:680px){.editor:not(.custom-open){height:237px}}

/* A fixed lower editing region: tools and pickers scroll without resizing the canvas. */
#editingDock{display:flex;flex-direction:column;flex:none;height:390px;min-height:0;margin-top:12px;overflow:hidden}
#editingDock .editor,#editingDock .editor.custom-open{height:auto;flex:1;min-height:0;overflow-y:auto}
#editingDock #colorOverlay{height:auto!important;flex:1;min-height:0;overflow-y:auto}
#editingDock #colorOverlay .modal{min-height:286px}
#editingDock .tabs{padding-top:0}
#editingDock .actionbar{margin-top:0}
@media(max-height:800px){#editingDock{height:350px}}
@media(max-height:680px){#editingDock{height:310px}}

/* Reserve scroll space before opening; animate opacity without moving layout bounds. */
#editingDock #colorOverlay{overflow-y:scroll;scrollbar-width:thin;scrollbar-gutter:stable}
#editingDock #colorOverlay .modal{overflow:visible}
#colorOverlay.picker-enter .modal{animation:picker-fade-in .12s ease-out both}
#colorOverlay.picker-exit .modal{animation:picker-fade-out .12s ease-in both}
@keyframes picker-fade-in{from{opacity:0}to{opacity:1}}
@keyframes picker-fade-out{from{opacity:1}to{opacity:0}}
#customTools{--tool-selector-width:42%}
#customTools #frontCustomModes,#customTools #frontDoodleTools>[aria-label="绘制工具"]{height:42px;padding:4px;border-radius:12px}
#customTools #frontCustomModes>button,#customTools #frontDoodleTools>[aria-label="绘制工具"]>button{height:32px;border-radius:8px}
@media(prefers-reduced-motion:reduce){#colorOverlay.picker-enter .modal,#colorOverlay.picker-exit .modal{animation:none}}
#customTools.front-vector-row>#frontCustomModes{padding:4px}

/* Feature entry cards use the same icon, typography and surface as layer entries. */
.feature-options #customEyes,.feature-options #customMouth{width:83px;min-width:83px;height:87px;padding:6px;margin:0;background:var(--ui-accent-soft);border-color:var(--ui-line);color:var(--ui-ink);font-size:11px;line-height:1.45}
.feature-options #customEyes b,.feature-options #customMouth b{font-size:24px;font-weight:400;line-height:1.3;color:var(--ui-accent)}
@media(max-height:700px){.feature-options #customEyes,.feature-options #customMouth{width:76px;min-width:76px;height:73px}}

.feature-options #customEyes,.feature-options #customMouth{height:54px;padding:3px 6px;justify-content:center}
#colorOverlay .modal{grid-template-columns:minmax(0,1fr);grid-template-rows:24px auto 36px 40px;align-content:start;--xhs-gap:12px;grid-gap:12px;gap:12px}
#colorOverlay .picker-fields{grid-column:1;grid-row:2;display:grid;grid-template-columns:43% minmax(0,1fr);--xhs-gap:12px;grid-gap:12px;gap:12px;align-items:stretch;min-width:0}
#colorOverlay .picker-fields .color-square{grid-column:1;grid-row:1;width:100%;height:0;padding-bottom:100%;min-height:0}
#colorOverlay .picker-axes{display:flex;flex-direction:column;justify-content:space-between;min-height:0}
#colorOverlay .picker-axes .control-label{align-self:stretch;margin:0;font-size:12px;line-height:1.2}
#colorOverlay .picker-axes input[type=range]{display:block;margin:6px 0 0;height:5px}
#colorOverlay .picker-hex-row{grid-row:3}
#colorOverlay .primary{grid-row:4}

/* Feature editors share the compact layer editor toolbar and brush spacing. */
.actionbar.feature-custom-actionbar{display:block}
.actionbar #featureCustomHead{display:flex;width:100%;margin:0;align-items:center;justify-content:space-between}
.actionbar #featureCustomHead button{font-size:12px;margin:0;padding:5px 0}
#featureControls .eye-drawing-toolbar{display:flex;align-items:center;--xhs-gap:12px;grid-gap:12px;gap:12px;margin:0 0 14px;padding:0;border:0;background:transparent}
#featureControls .eye-drawing-toolbar>[aria-label="绘制工具"]{flex:0 0 42%;max-width:42%;box-sizing:border-box;height:42px;padding:4px;--xhs-gap:2px;grid-gap:2px;gap:2px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface);align-items:center}
#featureControls .eye-drawing-toolbar>[aria-label="绘制工具"]>button{height:32px;min-width:0;flex:1;margin:0;padding:0 2px;display:flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--ui-muted);font-size:12px;font-weight:400;line-height:1.45}
#featureControls .eye-drawing-toolbar>[aria-label="绘制工具"]>button.active{background:var(--ui-white);color:var(--ui-accent);box-shadow:0 1px 4px var(--ui-shadow)}
#featureControls .eye-drawing-toolbar>[aria-label="绘制方式"]{flex:0 1 138px;margin-left:auto;--xhs-gap:0;grid-gap:0;gap:0;min-width:0;border:0;padding:0}
#featureControls [data-eye-operation]{display:flex;align-items:center;justify-content:center;flex:1 1 0;height:36px;min-width:0;--xhs-gap:5px;grid-gap:5px;gap:5px;margin:0;padding:0 2px;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:12px;font-weight:400;line-height:1.45;color:var(--ui-muted)}
#featureControls [data-eye-operation].active{background:transparent;color:var(--ui-accent);box-shadow:none}
#featureControls [data-eye-operation] svg{display:block;width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;color:inherit}
#featureControls .feature-brush-size{display:block;margin:0;padding:10px 0 12px;border-bottom:1px solid var(--ui-line);font-size:12px;line-height:1.45}
#featureControls .feature-brush-size>input{display:block;height:5px;margin:12px 0 5px}
#featureControls>.row,#featureControls .mouth-custom-controls>.row{margin:8px 0}

.topbar>div:last-child{display:flex;align-items:center;--xhs-gap:6px;grid-gap:6px;gap:6px;flex-shrink:0}
#resetAllMobile{font-size:11px;padding:5px 3px;white-space:nowrap;color:var(--ui-ink);background:transparent;border:0}
@media(max-width:370px){.topbar small{display:none}}

#resetAllMobile{border:1px solid var(--ui-line);border-radius:7px;padding:5px 9px}
@media(max-width:370px){.front-custom-actionbar #frontCustomSections button{padding:5px 5px;font-size:11px}}

#eyedropperMobile{display:flex;align-items:center;justify-content:center;flex:none;width:32px;height:32px;padding:6px;margin-right:5px;border:1px solid var(--ui-line);border-radius:9px;background:var(--ui-white);color:var(--ui-muted)}
#eyedropperMobile[aria-pressed=true]{color:var(--ui-accent);border-color:var(--ui-accent)}
#eyedropperMobile svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#colorSampleHint{position:absolute;z-index:20;top:12px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);box-sizing:border-box;width:max-content;padding:10px 14px;border:1px solid var(--ui-line);border-radius:18px;background:var(--ui-white);box-shadow:0 3px 12px var(--ui-shadow);font-size:12px;color:var(--ui-ink);pointer-events:none}
#colorSamplePreview{position:fixed;z-index:1000;width:44px;height:44px;transform:translateX(-50%);border:3px solid white;border-radius:50%;box-shadow:0 2px 8px #0005;pointer-events:none}

#previewZoomControl{position:absolute;right:8px;top:50%;transform:translateY(-50%);z-index:10;display:flex;flex-direction:column;align-items:center;--xhs-gap:8px;grid-gap:8px;gap:8px;padding:10px 6px;border:1px solid var(--ui-line);border-radius:18px;background:var(--ui-glass);color:var(--ui-muted);font-size:10px;touch-action:none}
#previewZoomControl input{writing-mode:vertical-lr;direction:rtl;width:16px;height:130px;margin:0;accent-color:var(--ui-accent)}
#previewZoomControl output{min-width:28px;text-align:center}

#eyedropperMobile,#eyedropperMobile[aria-pressed=true]{border:0;background:transparent;box-shadow:none;border-radius:0}
.eyedropper-icon{display:block;width:22px;height:22px;background:currentColor;-webkit-mask:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAANz0lEQVR4AeycCZrcuA2FNbmYJyeb5GSJTzaj3910q6q1cAFIUHr+itZCEAQf8BfVS/W/Fv2TAlLgUAEBciiNOqTAsggQVYEUOFFAgJyIoy4pIEBUA1LgRAFHQE5mVZcUmEQBATJJohTmGAUEyBjdNeskCgiQSRKlMMcoIEDG6K5ZJ1FgTkAmEVdhzq+AAJk/h1qBowICxFFcuZ5fAQEyfw61AkcFBIijuHI9vwIC5C2HupQCWwUEyFYNnUuBNwUEyJsgupQCWwUEyFYNnUuBNwUEyJsgupQCWwUEyFYN33N5X5Y/l8n+CZDJEjZZuADxvzVm2t+bI+d/rde09RD3JUDi5mb2yCh+wAAS2vt6/rPeoCVY1st4LwESLyd3iAgwKP7ctWALULn23ewESDepHzMRcOztGFcChIREgFylbYr+MEHWwpEWEA4SAZJSo2OrAq1wpPlDQSJAUlp0bFHACo4UQxhIBEhKiY61CljDkeIIAYkASenQsUYBLzhSLMMhESApFTruK3B81xuONPNQSARISoOOJQr0giPFNAwSAZJSoGOuAr3hSHENgUSAJPl1zFFgFBwptu6QCJAk/fgjP32mAPmVi9S4Nz6yjwiILUI8XSERIB/JH/U/BUfh8Qt7HLmmAFL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4FGK7055gsEjoODIycYNbDwAoYBqpamBizEAARjWj2jv62BtguNdlRtfewDSIhfFTrvygQ1QpMb11ZjW/gRHqx+Nn0gBL0AoploZeEzaK3ju0bZQcF07T8k4diZ2jpIx4W0V4LUCXoBcz3xsQdEnCNKRx6d0Tv/xaPse4PD+yb591PJoooAXIBYFBQipmSy2wongqBDtTkO8AGl5xIqgL/HzSGUBeoT1KIZKBbwAIRyKjONsjV0DOGaNfza9Q8frCchs774AARizxR2xwG4TkycgFBxtBrG0a8yQpQExegLCcqK/GwOwdg0ypbargDcgFCDvzruTD7xJXIBB43xgKJo6sgLegLB2dpEokAADUNA4Jz41KXCoQA9AmHw0JMAAFDTOiUltSgX6Bt0LEFY1AhJgAAoa58ShJgWyFegJCEH1gAQQeKT7Y51QYKwi6FWvQG9AiBRIKF6KmGuLBhTAkBpzWPiVj4crMAKQJDlFXAsKQNAAAh8cuaYl/zpKgWYFRgKSgk+gUOTsKjQKnYYNx9Towy417mOjJgXaFdjxEAGQFBbFDiy0BEDaHdI1fdilMTpKAVcFIgHiulA5lwI1CgiQGtU05jEKCJDHpFoLrVFAgNSopjGPUcAKkMcIpoU+SwEB8qx8a7WFCgiQQsFk/iwFBMiz8q3VFiogQAoFk/mzFJgAkGclRKuNpYAAiZUPRRNMAQESLCEKJ5YCAiRWPhRNMAUESLCEKJxYCjwbkFi5UDQBFRAgAZOikOIoIEDi5EKRBFRAgARMikKKo4AAiZMLRRJQAQHilBS5vYcC/wAAAP//lqBXdQAAAAZJREFUAwA4dDGvUDHCZwAAAABJRU5ErkJggg==") center/contain no-repeat;mask:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAANz0lEQVR4AeycCZrcuA2FNbmYJyeb5GSJTzaj3910q6q1cAFIUHr+itZCEAQf8BfVS/W/Fv2TAlLgUAEBciiNOqTAsggQVYEUOFFAgJyIoy4pIEBUA1LgRAFHQE5mVZcUmEQBATJJohTmGAUEyBjdNeskCgiQSR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FoLrVFAgNSopjGPUcAKkMcIpoU+SwEB8qx8a7WFCgiQQsFk/iwFBMiz8q3VFiogQAoFk/mzFJgAkGclRKuNpYAAiZUPRRNMAQESLCEKJ5YCAiRWPhRNMAUESLCEKJxYCjwbkFi5UDQBFRAgAZOikOIoIEDi5EKRBFRAgARMikKKo4AAiZMLRRJQAQHilBS5vYcC/wAAAP//lqBXdQAAAAZJREFUAwA4dDGvUDHCZwAAAABJRU5ErkJggg==") center/contain no-repeat}

#previewZoomControl{background:transparent;border:0;box-shadow:none}


.photo-effects{display:flex;--xhs-gap:12px;grid-gap:12px;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;padding:6px 3px 12px;scrollbar-width:thin}
.photo-effects button{flex:0 0 76px;display:flex;flex-direction:column;--xhs-gap:8px;grid-gap:8px;gap:8px;align-items:center;padding:3px;border:0;background:transparent;border-radius:0;color:var(--ui-muted);font-size:12px}
.photo-effects canvas{width:70px;height:78px;border-radius:7px;outline:1px solid var(--ui-line);outline-offset:2px}
.photo-effects button.active{color:#48758b;font-weight:600}.photo-effects button.active canvas{outline:2px solid #48758b;outline-offset:3px}

.style-outline-row{display:flex;align-items:center;--xhs-gap:14px;grid-gap:14px;gap:14px;margin:8px 0 18px;font-size:13px}.style-outline-row .feature-options{flex:1;margin:0}#outlineControls .photo-effects{border-top:1px solid var(--ui-line);padding-top:18px}#outlineControls .photo-effects button{flex-basis:64px}#outlineControls .photo-effects canvas{width:58px;height:66px}

.save-success{text-align:center}.save-success{padding-top:46px}.save-success .primary{width:100%}

.saved-preview{display:block;width:auto;max-width:100%;height:auto;max-height:45vh;aspect-ratio:8/9;object-fit:contain;margin:0 auto 20px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-bg,#fafafa)}

#importParameters,#showcaseImport{font-size:11px;padding:5px 9px;white-space:nowrap;color:var(--ui-ink);background:transparent;border:1px solid var(--ui-line);border-radius:7px}.save-success{position:relative}.save-success #closeSaveSuccess{position:absolute;right:12px;top:10px}

.share-feedback{font-size:12px;line-height:1.7;color:var(--ui-muted);margin:12px 0 0}.share-feedback a{color:var(--ui-ink);text-decoration:underline}

#restoreDeletedPreset{display:block;margin:16px 0 4px;padding:7px 12px;font-size:12px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-white);color:var(--ui-muted)}

.feature-options .delete-preset{display:flex;align-items:center;justify-content:center;width:23px;height:23px;min-width:0;min-height:0;padding:0;margin:0;line-height:1;box-sizing:border-box}

/* Control-point visibility belongs to the editor toolbar, outside the canvas. */
#pointToggleMobile{position:static;flex:none;min-height:36px;padding:0 4px;background:transparent;border:0;border-radius:0;font-size:12px;justify-self:end;align-self:center}
#pointToggleMobile label{white-space:nowrap;display:flex;align-items:center;justify-content:center;padding:0;min-height:36px}
#pointToggleMobile input{margin:0 5px 0 0}
#customTools.front-point-row{display:grid;grid-template-columns:var(--tool-selector-width) minmax(0,1fr);column-gap:var(--tool-action-gap)}
#customTools.front-point-row>*{grid-column:1 / -1}
#customTools.front-point-row>#frontCustomModes{grid-column:1;grid-row:1;width:100%;margin:0 0 14px}
#customTools.front-point-row>#pointToggleMobile{grid-column:2;grid-row:1;margin-bottom:14px}
#handArmControls>#pointToggleMobile{width:max-content;margin:0 0 8px auto}
.mouth-custom-controls .eye-toolbar>#pointToggleMobile{margin-left:auto}

#captureMobile{display:flex;align-items:center;justify-content:center}
#captureMobile .capture-icon{display:block;flex:none;width:22px;height:22px;margin-right:8px}

.save-result-actions{display:flex;align-items:stretch}
.save-result-actions>.primary{flex:1;min-width:0;width:auto;font-size:14px;padding:12px 6px}
.save-result-actions>.primary+.primary{margin-left:10px}
#parameterCardOverlay{z-index:35}#parameterCardOverlay .parameter-card-modal{max-height:85vh;overflow-y:auto;width:360px;max-width:calc(100vw - 40px);box-sizing:border-box;padding:22px}#parameterCardOverlay .modal-head{display:flex;align-items:center;justify-content:space-between}#parameterCardOverlay .close{position:static;flex:none}#cardTitle{font-size:17px;margin:0}#cardStatus{font-size:13px;line-height:1.6;color:#77776f}#cardPreview{display:block;width:100%;height:auto;border:1px solid #e5e5e0;border-radius:8px}#cardPreview[hidden]{display:none}#cardActions{display:flex;flex-wrap:wrap;--xhs-gap:8px;grid-gap:8px;gap:8px;margin-top:14px}#cardActions button{flex:1 1 100px;padding:11px 8px;font-size:13px}#parameterCardOverlay button:disabled{opacity:.5}

#saveSuccessBubble{position:absolute;bottom:12px;left:50%;transform:translate(-50%,4px);padding:8px 15px;border-radius:12px;background:var(--ui-toast);color:white;font-size:12px;line-height:20px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:1}#saveSuccessBubble.show{opacity:1;transform:translate(-50%,0)}

.saved-preview-frame{display:inline-block;position:relative;max-width:100%;margin:0 auto 20px;vertical-align:top}.saved-preview-frame .saved-preview{margin:0}

#cardActions button.primary{margin-top:0;min-height:46px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:20px}

#cardActions:empty{display:none}#codeSavedBubble{position:fixed;left:50%;transform:translateX(-50%);background:var(--ui-toast);color:white;padding:8px 15px;border-radius:12px;font-size:12px;line-height:20px;opacity:0;pointer-events:none;transition:opacity .2s}#codeSavedBubble.show{opacity:1}

/* Sliders adjust only by dragging, including touch input. */
input[type=range]{touch-action:pan-y}
.zoom-rail{touch-action:none}
/* Expanded canvas keeps an inset frame and a compact, usable editing dock. */
#expandPreview,#rotatePreview{position:absolute;top:10px;left:10px;z-index:4;width:34px;height:34px;padding:8px;border:1px solid var(--ui-line);color:var(--ui-muted);background:var(--ui-glass);border-radius:10px;touch-action:manipulation}
#expandPreview svg,#rotatePreview svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#expandPreview .collapse-icon{display:none}
#phone.canvas-expanded::before{height:40px;flex:0 0 40px}
#phone.canvas-expanded>.topbar{display:none}
#phone.canvas-expanded #preview{margin:0 20px;min-height:0;flex:1}
#phone.canvas-expanded #editingDock{height:22%;min-height:160px;max-height:230px;flex:none;margin-top:8px}
#phone.canvas-expanded #expandPreview .expand-icon{display:none}
#phone.canvas-expanded #expandPreview .collapse-icon{display:block}
#phone.canvas-expanded #expandPreview{top:10px}
#phone.canvas-expanded.expanded-brush #editingDock{height:230px;max-height:32%;min-height:190px}
#phone.canvas-expanded.expanded-brush.has-saved-colors #editingDock{height:270px;max-height:calc(32% + 40px);min-height:230px}
#phone.expanded-brush #mobileEditor,#phone.expanded-brush .actionbar,#phone.expanded-brush #mobileTabs{display:none!important}
#expandedBrushControls{flex:1;min-height:0;overflow-y:auto;padding:8px 20px 0}
#expandedBrushControls>.control-label{margin:0 0 6px;padding:0}
#expandedBrushControls>.row{margin:0 0 6px;min-height:24px}
#expandedBrushControls .colorrow{margin:0;padding:0;border:0}
#expandedBrushControls .color-details{display:none}
#expandedBrushControls #savedColorPanel{margin-bottom:6px}
/* Native range controls display the value; their wrapper owns all pointer input. */
.drag-only-range{display:block;position:relative;width:100%;min-width:0;touch-action:pan-y;cursor:ew-resize}
.drag-only-range>input[type=range]{pointer-events:none;touch-action:pan-y}
.color-main>.drag-only-range{flex:1;width:auto;margin:0 12px}
.color-main>.drag-only-range>input[type=range]{display:block;margin-left:0;margin-right:0;width:100%}
.storage-recovery{position:fixed;inset:0;z-index:99999;display:flex;flex-direction:column;align-items:center;justify-content:center;--xhs-gap:20px;grid-gap:20px;gap:20px;padding:28px;background:#fffaf3;text-align:center}
.storage-recovery button{padding:12px 28px;border:1px solid #c8cbb8;border-radius:12px;background:#edf0e3;color:#34472f;font:inherit}
#phone[hidden],#showcasePage[hidden]{display:none!important}
#homeShowcase,#showcaseEdit{display:inline-flex;align-items:center;justify-content:center;padding:6px;background:transparent;color:var(--ui-muted)}
#homeShowcase[hidden]{display:none}
#homeShowcaseHint{position:fixed;z-index:25;max-width:calc(100vw - 16px);padding:8px 12px;border-radius:10px;background:var(--ui-toast);color:white;font-size:12px;line-height:20px;pointer-events:none}
#homeShowcaseHint::before{content:"";position:absolute;top:-5px;left:var(--hint-arrow-left,50%);width:10px;height:10px;background:inherit;transform:translateX(-50%) rotate(45deg)}
#showcasePage{--showcase-paper:#fffbf6;--showcase-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.065'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Cpath fill='%23857561' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");position:fixed;inset:0;top:0;right:0;bottom:0;left:0;max-width:460px;margin:auto;padding:0 16px 160px;padding-bottom:calc(160px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));background-color:var(--showcase-paper);background-image:var(--showcase-grain);overflow-y:auto;color:var(--ui-ink,#34472f);z-index:20}
.showcase-footer{position:fixed;left:0;right:0;bottom:0;max-width:460px;margin:auto;padding:12px 20px 20px;padding-bottom:calc(20px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));background-color:var(--showcase-paper);background-image:var(--showcase-grain);border-top:1px solid var(--ui-line)}
.showcase-footer button{width:100%;min-height:44px;margin:0}
.showcase-navigation{margin:0 -16px;background:transparent;padding-top:50px;padding-top:calc(50px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}
.showcase-navigation::after{content:"";display:block;margin:0 16px;border-bottom:1px solid var(--ui-line)}
.showcase-header>div:first-child{display:flex;align-items:baseline;--xhs-gap:8px;grid-gap:8px;gap:8px;white-space:nowrap}
.showcase-title{font-size:10px;font-weight:400;color:var(--ui-muted);margin:0}
.showcase-note{font-size:12px;line-height:1.7;margin:0 0 12px;color:var(--ui-muted)}
#showcaseCount{display:inline-block;margin-left:2px;font-size:inherit;font-weight:400;color:var(--ui-muted);font-variant-numeric:tabular-nums;white-space:nowrap;vertical-align:baseline}
#showcaseGrid{margin-top:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));--xhs-gap:16px 12px;grid-gap:16px 12px;gap:16px 12px}
.showcase-card{min-width:0;border:1px solid var(--ui-line);border-radius:14px;overflow:hidden;background:var(--ui-white,#fff)}
.showcase-open{display:block;width:100%;padding:8px;border:0;background:transparent;text-align:left}
.showcase-open img{display:block;width:100%;height:auto;aspect-ratio:8/9;object-fit:contain;border-radius:8px;background:var(--ui-accent-soft)}
.showcase-card-meta{display:flex;align-items:center;--xhs-gap:4px;grid-gap:4px;gap:4px;height:21px;padding:0 8px;margin-bottom:9px}
.showcase-name{flex:1;min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:21px;line-height:21px;padding:0 4px;font-size:13px;border:0;background:transparent;text-align:left}
.showcase-more{flex:none;width:36px;height:21px;line-height:21px;padding:0;border:0;background:transparent;color:var(--ui-muted);font-size:10px;letter-spacing:1px}
.showcase-more[aria-expanded=true]{background:var(--ui-accent-soft);color:var(--ui-ink)}
#showcaseMenu{position:fixed;z-index:31;width:132px;padding:5px;background:var(--ui-white);border:1px solid var(--ui-line);border-radius:12px;box-shadow:0 6px 24px var(--ui-shadow)}
#showcaseMenu button{display:block;width:100%;min-height:40px;padding:9px 12px;border:0;border-radius:8px;background:transparent;text-align:left;font-size:13px}
#showcaseMenu button:hover,#showcaseMenu button:focus{background:var(--ui-accent-soft)}
#showcaseMenu:focus{outline:none}
.showcase-result-actions{display:flex;--xhs-gap:10px;grid-gap:10px;gap:10px;margin-top:10px}.showcase-result-actions button{flex:1;min-width:0;padding:12px 6px;font-size:14px}
#showcaseSaveOverlay{z-index:65}#showcaseSaveOverlay label{display:block;margin:12px 0 8px;font-size:13px}
#showcaseName{width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--ui-line);border-radius:8px;font:inherit;background:var(--ui-white)}
#confirmShowcaseSave{width:100%;margin-top:18px}
#confirmShowcaseSave[aria-disabled=true]{background:#b4b4b2;color:white;opacity:1;cursor:default}
#showcaseSaveHint{position:fixed;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:9px 14px;border-radius:12px;background:var(--ui-toast);color:white;font-size:12px;line-height:20px;text-align:center;white-space:nowrap;pointer-events:none}
.showcase-modes{display:flex;--xhs-gap:8px;grid-gap:8px;gap:8px}.showcase-modes button{flex:1;padding:12px 6px}
.showcase-modes button[aria-pressed=true]{background:var(--ui-ink);color:var(--ui-white)}
#showcaseChoices p{font-size:13px;line-height:1.6}#showcaseTarget{width:100%;padding:10px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-white);font:inherit}
#showcaseUnsavedOverlay{z-index:64}.showcase-guard-actions{display:flex;flex-direction:column;--xhs-gap:10px;grid-gap:10px;gap:10px}.showcase-guard-actions button{padding:12px}
#showcaseUnsavedOverlay p{font-size:13px;line-height:1.7;color:var(--ui-muted)}
#showcaseUnsavedOverlay .modal-head{align-items:flex-start;--xhs-gap:8px;grid-gap:8px;gap:8px}#showcaseKeepEditing{flex:none}
#showcaseDeleteOverlay{z-index:64}#showcaseDeleteOverlay p{font-size:13px;line-height:1.6}

/* Keep gallery scrolling from changing the shared page alignment. */
#showcasePage{scrollbar-width:none;-ms-overflow-style:none}
#showcasePage::-webkit-scrollbar{display:none;width:0;height:0}

/* Keep the editor/showcase primary action stationary when switching pages. */
.savebar,.showcase-footer{padding-bottom:calc(14px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)))}
#captureMobile,#closeShowcase{display:flex;align-items:center;justify-content:center;height:46px;min-height:46px;margin:0;line-height:22px}
@media(max-height:700px){
 .savebar,.showcase-footer{padding-bottom:calc(8px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)))}
 #captureMobile,#closeShowcase{height:42px;min-height:42px}
}

#storageRecoveryDetails{box-sizing:border-box;width:100%;max-width:480px;margin:0;padding:14px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-white);text-align:left;font:12px/1.7 monospace;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word}.storage-recovery{overflow-y:auto}.storage-recovery p{max-width:480px;margin:0}

#rotatePreview{left:50px}
#rotatePreview[aria-pressed="true"]{color:var(--ui-accent,#f5834f);border-color:currentColor}
/* Tablet layouts follow the host viewport, including split-screen windows. */
@media(min-width:768px){
 #phone{max-width:1200px}
 #phone:not(.canvas-expanded) #editingDock{height:420px}
 .modal{max-width:560px}
}
@media(min-width:1000px) and (min-height:600px) and (orientation:landscape){
 #phone{display:grid;grid-template-columns:minmax(0,1fr) 360px;grid-template-rows:44px minmax(0,1fr);padding-top:50px;padding-top:calc(50px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}
 #phone::before{display:none}
 #phone>.topbar{grid-column:1 / -1;grid-row:1}
 #phone #preview{grid-column:1;grid-row:2;margin:0 12px 12px 20px;min-width:0;min-height:0}
 #phone #editingDock,#phone:not(.canvas-expanded) #editingDock,#phone.canvas-expanded #editingDock,#phone.canvas-expanded.expanded-brush #editingDock,#phone.canvas-expanded.expanded-brush.has-saved-colors #editingDock{grid-column:2;grid-row:2;height:auto;max-height:none;min-height:0;margin:0;border-left:1px solid var(--ui-line);overflow:hidden}
 #phone.canvas-expanded{grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:minmax(0,1fr);padding-top:40px;padding-top:calc(40px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}
 #phone.canvas-expanded #preview,#phone.canvas-expanded #editingDock,#phone.canvas-expanded.expanded-brush #editingDock,#phone.canvas-expanded.expanded-brush.has-saved-colors #editingDock{grid-row:1}
 #expandedBrushControls{padding-left:16px;padding-right:16px}
}

/* iPad uses a left editing dock on first load, in either orientation.
   Narrow split-view windows retain the stacked layout for usable controls. */
@media(min-width:700px) and (min-height:500px){
 html.ipad-device #phone{display:grid;max-width:1200px;grid-template-columns:300px minmax(0,1fr);grid-template-rows:44px minmax(0,1fr);padding-top:calc(50px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}
 html.ipad-device #phone::before{display:none}
 html.ipad-device #phone>.topbar{grid-column:1 / -1;grid-row:1}
 html.ipad-device #phone #preview{grid-column:2;grid-row:2;margin:0 20px 12px 12px;min-width:0;min-height:0}
 html.ipad-device #phone #editingDock,html.ipad-device #phone:not(.canvas-expanded) #editingDock,html.ipad-device #phone.canvas-expanded #editingDock,html.ipad-device #phone.canvas-expanded.expanded-brush #editingDock,html.ipad-device #phone.canvas-expanded.expanded-brush.has-saved-colors #editingDock{grid-column:1;grid-row:2;height:auto;max-height:none;min-height:0;margin:0;border-left:0;border-right:1px solid var(--ui-line);overflow:hidden}
 html.ipad-device #phone.canvas-expanded{grid-template-columns:280px minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding-top:calc(40px + var(--safe-area-inset-top,env(safe-area-inset-top,0px)))}
 html.ipad-device #phone.canvas-expanded #preview,html.ipad-device #phone.canvas-expanded #editingDock,html.ipad-device #phone.canvas-expanded.expanded-brush #editingDock,html.ipad-device #phone.canvas-expanded.expanded-brush.has-saved-colors #editingDock{grid-row:1}
 html.ipad-device #expandedBrushControls{padding-left:16px;padding-right:16px}
}

#followOverlay{background:rgba(35,35,32,.34);padding:64px 24px 28px}
#followOverlay .follow-modal{position:relative;overflow:visible;max-width:320px;text-align:center;padding:62px 24px 10px;border:1px solid #eee8df;border-radius:28px;background:#fffefa;box-shadow:0 18px 64px rgba(35,35,32,.18)}
.follow-avatar{position:absolute;top:-46px;left:50%;transform:translateX(-50%);width:92px;height:92px;object-fit:cover;border-radius:50%;border:5px solid #fffefa;background:#fff;box-shadow:0 5px 16px rgba(90,65,35,.10)}
#followOverlay .follow-name{margin:0 0 20px;font-size:13px;font-weight:400;line-height:20px;color:#777267}
#followOverlay #followTitle{font-size:17px;font-weight:600;line-height:1.6;color:var(--ui-ink);margin:0;white-space:nowrap}
#followOverlay .follow-actions{display:flex;flex-direction:column;align-items:center;--xhs-gap:4px;grid-gap:4px;gap:4px;margin-top:16px}
#followOverlay .follow-actions button{margin:0;min-height:44px;border-radius:18px;font-size:15px;cursor:pointer}
#followAuthorButton{order:-1;width:238px;max-width:100%;background:#f38650;color:white;border:0;font-weight:600}
#followOverlay .follow-actions #skipFollowButton{width:120px;max-width:100%;height:40px;min-height:40px;border:0;background:transparent;color:#969188;font-size:12px!important;padding:8px 22px}
#followOverlay button:focus-visible{outline:2px solid #ed8757;outline-offset:3px}
#followOverlay button:disabled{opacity:.55;cursor:wait}
@media(max-width:359px){#followOverlay #followTitle{font-size:15px}#followOverlay .follow-modal{padding-left:16px;padding-right:16px}}

#phone{height:100%;height:var(--app-height,100vh)}button:focus,input:focus,textarea:focus{outline:2px solid var(--ui-ink);outline-offset:2px}#parameterTextOverlay{z-index:30}#parameterTextOverlay .modal{max-height:85vh;overflow-y:auto}#parameterText{display:block;box-sizing:border-box;width:100%;height:180px;resize:vertical;margin:12px 0;padding:10px;border:1px solid var(--ui-line);border-radius:10px;font:12px/1.5 monospace;-webkit-user-select:text;user-select:text}.saved-preview{width:240px;height:270px;max-width:100%;object-fit:contain}.editor,.modal{-webkit-overflow-scrolling:touch}
