@media (max-width:740px){
.mobile-editor-shell{position:fixed;z-index:50;inset:0;height:100dvh;display:flex;flex-direction:column;background:#f5f3ec;color:#1b2821;overflow:hidden;--mobile-preview-height:clamp(132px,32dvh,280px)}
.mobile-editor-shell [hidden]{display:none!important}
.mobile-editor-header{flex:none;display:flex;align-items:center;gap:10px;min-height:62px;padding:env(safe-area-inset-top,0px) 16px 0;border-bottom:1px solid #d8dcd1;background:#f5f3ec}
.mobile-back,.mobile-save,.mobile-expand{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;background:transparent;color:inherit}
.mobile-back svg,.mobile-expand svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}
.mobile-editor-title{min-width:0;flex:1;display:flex;flex-direction:column;line-height:1.25}.mobile-editor-title strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-editor-title span{font-size:12px;color:#65716a}
.mobile-save{font-weight:700;color:#fffefa;background:#1b2821;border-radius:4px;white-space:nowrap;padding:0 12px}
.mobile-editor-error,.mobile-source-notice{flex:none;font-size:12px;line-height:1.35;margin:0;padding:5px 16px;max-height:60px;overflow:auto}.mobile-conflict{flex:none;margin:0 16px;padding:5px;max-height:100px;overflow:auto}.mobile-conflict button{min-height:44px}
.mobile-preview-panel{order:0!important;flex:none!important;position:relative!important;top:auto!important;display:block!important;margin:0!important;padding:10px 16px 8px!important;background:#e7ebdf!important;border:0!important;border-radius:0!important;text-align:center!important}
.mobile-preview-heading{display:flex;justify-content:space-between;color:#55635b;text-transform:uppercase;letter-spacing:.07em;font-size:11px;font-weight:700}
.mobile-preview-panel .preview-stage{position:relative;display:flex!important;align-items:center;justify-content:center;margin:5px auto!important;height:var(--mobile-preview-height)}
.mobile-preview-panel .preview-screen{position:relative;width:calc(var(--mobile-preview-height) / 3)!important;height:100%;aspect-ratio:1 / 3;padding:0;background:#17231d;border-radius:2px;overflow:hidden;box-shadow:5px 5px 0 #bdc8b7}
.mobile-preview-panel .preview-screen canvas{display:block;width:100%;height:100%;object-fit:fill}.mobile-preview-panel .preview-drag-bounds{inset:0}.mobile-preview-panel .preview-drag-target{touch-action:none}
.mobile-expand{position:absolute;right:0;bottom:0;border:1px solid #b7c2b2;border-radius:4px;background:#f5f7f0}.mobile-preview-hint{display:flex;justify-content:center;align-items:center;gap:5px;margin:0!important;font-size:12px;line-height:1.2;color:#536259}.mobile-preview-hint select{min-height:44px;max-width:190px;border:0;background:transparent;font-size:12px;font-weight:700;color:#1b2821}
.mobile-editor-tabs{flex:none;display:flex;border-bottom:1px solid #d8dcd1;background:#f5f3ec;padding:0 16px}.mobile-editor-tabs button{flex:1;min-height:48px;border:0;border-bottom:3px solid transparent;background:transparent;color:#687169;font-weight:700}.mobile-editor-tabs button.selected{color:#1b2821;border-color:#1b2821}
.mobile-editor-controls{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px 18px 20px}.mobile-control-title{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:16px}.mobile-control-title .link-button{min-height:44px;padding:0 8px}
.mobile-control-panel .range-row{display:grid;grid-template-columns:66px minmax(0,1fr) 50px;align-items:center;gap:10px;min-height:48px;margin:0}.mobile-control-panel .range-row input{width:100%;min-height:44px}.mobile-control-panel .range-row output{text-align:right;font-variant-numeric:tabular-nums}
.mobile-quick{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.mobile-quick button,.mobile-more summary,.mobile-more>button{min-height:44px}.mobile-more{margin-top:4px}.mobile-more summary{cursor:pointer;padding:10px 0;font-weight:700}.mobile-more .segmented{margin:8px 0}.mobile-control-panel .segmented button{min-height:48px}
.mobile-text-tabs{display:flex;gap:6px;margin:4px 0 14px}.mobile-text-tabs button{flex:1;min-height:44px;background:transparent;border:1px solid #b9c3b5;border-radius:4px;font-weight:600}.mobile-text-tabs button[aria-pressed=true]{background:#1b2821;color:#fffefa;border-color:#1b2821}
.mobile-editor-controls input[type=text]{font-size:16px;min-height:48px;width:100%}.mobile-editor-controls .emoji-picker summary,.mobile-editor-controls .emoji-options button,.mobile-editor-controls .auto-fit{min-height:44px}.mobile-editor-controls .font-control{display:flex;align-items:center;gap:8px}.mobile-editor-controls .font-control .range-row{flex:1;min-width:0;grid-template-columns:58px minmax(0,1fr) 42px}.mobile-editor-controls fieldset{min-width:0}.mobile-color-row{display:flex;align-items:center;justify-content:space-between;min-height:56px;border-bottom:1px solid #d8dcd1}.mobile-color-row input{width:48px;height:44px}
.mobile-editor-footer{flex:none;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid #d8dcd1;background:#f5f3ec}.mobile-editor-footer .button{min-height:48px;width:100%;justify-content:center}.mobile-editor-footer p{font-size:11px;color:#687169;text-align:center;margin:4px 0 0}
.mobile-editor-shell.mobile-compact{--mobile-preview-height:120px}.mobile-editor-shell.mobile-very-short{--mobile-preview-height:76px}.mobile-editor-shell.mobile-keyboard{--mobile-preview-height:60px}.mobile-very-short .mobile-editor-footer p{display:none}.mobile-keyboard .mobile-preview-heading,.mobile-keyboard .mobile-preview-hint,.mobile-keyboard .mobile-editor-footer{display:none}.mobile-keyboard .mobile-editor-header{min-height:44px}.mobile-keyboard .mobile-preview-panel{padding:2px 16px!important}.mobile-keyboard .mobile-editor-tabs button{min-height:44px}
.mobile-flattened-notice{font-size:12px;color:#536259}
@media (max-height:600px){.mobile-editor-shell{--mobile-preview-height:clamp(76px,19dvh,130px)}.mobile-preview-panel{padding-top:5px!important;padding-bottom:4px!important}.mobile-preview-heading,.mobile-preview-hint{font-size:11px}.mobile-editor-header{min-height:52px}.mobile-editor-tabs button{min-height:44px}.mobile-editor-footer{padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom,0px))}}
}
.editor-recovery { flex: 0 0 auto; }
.editor-recovery-list { max-height: 100px; overflow: auto; overscroll-behavior: contain; }
.editor-recovery-list button { display: block; text-align: left; padding: 8px 0; }
