/* Touch starts as reading/scrolling. Geometry changes start only on explicit grips. */
.image-block,.image-block .visual-photo,.image-block img,.page-layer-item:not([data-type=text]),.page-layer-item:not([data-type=text]) .page-layer-art,.sticker-layer .sticker-object,.sticker-object .sticker-art,.inline-sticker .sticker-art{touch-action:pan-y pinch-zoom}
.photo-toolbar .media-drag-handle,.page-layer-tools button:first-child,.sticker-move-handle,.image-resize,.page-layer-resize,.page-layer-rotate,.sticker-resize-handle,.sticker-rotate-handle{touch-action:none}
.visual-photo[data-photo-cropping=true],.page-layer-art[data-photo-cropping=true]{touch-action:none}
.photo-free-crop{display:block;width:100%;padding:10px 12px;margin:12px 0 8px;background:#edf2e6;color:#82956e;border:1px solid #dfe6d4;border-radius:7px;font:11px var(--sans)}
.free-crop-dialog{position:fixed;inset:0;width:100vw;max-width:none;height:var(--visual-height,100dvh);max-height:none;margin:0;padding:0;border:0;background:#232821;color:#e8ebdf;overflow:hidden}
.free-crop-dialog[open]{display:flex;flex-direction:column}
.free-crop-dialog::backdrop{background:#151a13ee}
.free-crop-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;min-height:58px;padding:8px 20px;background:#2c3328}
.free-crop-dialog h2{font:14px var(--sans);font-weight:400;margin:0;letter-spacing:.5px;color:#e2e8d8}
.free-crop-dialog button{border:0;font:12px var(--sans);color:#bccbb0;background:transparent;border-radius:6px;padding:10px 12px;min-height:40px}
.free-crop-dialog .free-crop-done{color:#d8e7c9;background:#526744}
.free-crop-surface{position:relative;flex:1;min-height:0;overflow:hidden;touch-action:none;margin:18px 24px}
.free-crop-image{display:block;max-width:100%;max-height:100%;opacity:0}
.free-crop-image.cropper-hidden{opacity:1}
.free-crop-dialog .cropper-container img{opacity:1}
.free-crop-dialog .cropper-container{width:100%!important;height:100%!important}
.free-crop-dialog .cropper-view-box{outline-color:#c0d3ac}
.free-crop-dialog .cropper-line,.free-crop-dialog .cropper-point{background:#c2d5ad}
.free-crop-dialog .cropper-point{width:13px;height:13px;opacity:.95}
.free-crop-dialog .cropper-point.point-e{right:-6px}.free-crop-dialog .cropper-point.point-w{left:-6px}.free-crop-dialog .cropper-point.point-n{top:-6px}.free-crop-dialog .cropper-point.point-s{bottom:-6px}
.free-crop-dialog .cropper-point.point-ne{right:-6px;top:-6px}.free-crop-dialog .cropper-point.point-nw{left:-6px;top:-6px}.free-crop-dialog .cropper-point.point-se{right:-6px;bottom:-6px;width:15px;height:15px}.free-crop-dialog .cropper-point.point-sw{left:-6px;bottom:-6px}
.free-crop-dialog footer{flex:none;padding:10px 20px calc(12px + env(safe-area-inset-bottom));text-align:center;background:#2c3328}
.free-crop-ratios{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}
.free-crop-ratios button{min-width:45px;font-size:11px;padding:8px}
.free-crop-ratios button[aria-pressed=true]{background:#7588663d;color:#daebc9}
.free-crop-hint,.free-crop-status{font:10px/1.8 var(--sans);color:#9cae90;margin:8px 0 0}
.free-crop-status{min-height:1.8em;color:#809175}
.mobile-keyboard-toolbar{display:none}
.mobile-add-button{display:none}
.scrap-piece,.scrap-piece img,.scrap-sticker-art{touch-action:pan-y pinch-zoom}
.scrap-drag,.scrap-resize{touch-action:none}
.export-scene .scrap-text,.export-scene .scrap-caption{overflow:hidden!important;scrollbar-width:none}
@media(max-width:760px){
 .note-actions .mobile-add-button{display:grid;place-items:center;font-size:23px;min-width:32px;width:32px;height:36px;padding:0}
 .mobile-keyboard-toolbar #mobileInsertContent{font-size:23px;min-width:39px;line-height:1}
 .page-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:#252c2060}
 .photo-toolbar,.sticker-mini-toolbar,.page-layer-tools,.selection-toolbar,.compact-inspector{backdrop-filter:none;-webkit-backdrop-filter:none}
 .page-preview-open .note-scene{top:var(--visual-top,0);bottom:auto;height:var(--visual-height,100dvh);max-height:var(--visual-height,100dvh)}
 .page-preview-open .note-scroll{min-height:0;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;touch-action:pan-y pinch-zoom}
 .image-resize{width:26px;height:26px;right:-11px;bottom:-11px;border-radius:8px}
 .page-layer-resize{width:25px;height:25px}
 .sticker-resize-handle,.sticker-rotate-handle{min-width:27px;min-height:27px}
 .photo-toolbar button,.page-layer-tools button,.sticker-mini-toolbar button{min-width:34px;min-height:34px}
 .photo-toolbar,.sticker-mini-toolbar,.page-layer-tools{gap:5px;padding:6px 8px}
 .sticker-mini-toolbar{height:auto;min-width:0}
 .photo-toolbar .media-drag-handle,.sticker-move-handle,.page-layer-tools button:first-child{background:#e9efdf55;color:#82996c}
 .note-scene input:not([type=range]):not([type=checkbox]):not([type=file]):not([type=color]),.note-scene textarea,.workspace-dialog input,.font-try-input{font-size:16px}
 .mobile-keyboard-open.page-preview-open .note-topbar{height:calc(40px + env(safe-area-inset-top));min-height:calc(40px + env(safe-area-inset-top));gap:8px}
 .mobile-keyboard-open .note-actions>button:not(.page-expand),.mobile-keyboard-open .note-actions .save-state{display:none!important}
 .mobile-keyboard-open .note-paper>.document-toolbar,.mobile-keyboard-open .writing-hint{display:none!important}
 .mobile-keyboard-open .mobile-keyboard-toolbar{display:flex;align-items:center;gap:6px;padding:3px 12px;flex:none;height:44px;background:#fafbf5;border-top:1px solid #e1e7d7}
 .mobile-keyboard-toolbar>span{flex:1}
 .mobile-keyboard-toolbar button{min-width:35px;height:30px;background:transparent;font:13px var(--sans);color:#8ca078;border-radius:5px;padding:3px 9px}
 .mobile-keyboard-toolbar #dismissMobileKeyboard{font-size:11px}
 .mobile-keyboard-open .workspace-dialog[open]{position:fixed;top:calc(var(--visual-top,0px) + 8px);bottom:auto;margin:0 auto;max-height:calc(var(--visual-height,100dvh) - 16px)}
 .free-crop-dialog>header{padding-top:calc(8px + env(safe-area-inset-top));padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));min-height:calc(54px + env(safe-area-inset-top))}
 .free-crop-surface{margin:14px 18px}
 .free-crop-dialog footer{padding-left:9px;padding-right:9px}
 .free-crop-ratios{gap:4px}
 .free-crop-hint{font-size:10px}
 .free-crop-dialog .cropper-point{width:19px;height:19px;opacity:1;border-radius:3px}
 .free-crop-dialog .cropper-point.point-se{width:21px;height:21px}
}
