*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}body{color:#514d44;background:radial-gradient(ellipse at 12% 15%,#fffef7 0,transparent 55%),linear-gradient(150deg,#eae7dd,#e2e1d9);font:14px/1.5 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.38;cursor:default}[hidden]{display:none!important}svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.glass{background:linear-gradient(135deg,#ffffffe0,#ffffff66);border:1px solid #ffffffdd;box-shadow:0 5px 20px #51483a0a;backdrop-filter:blur(22px) saturate(1.1)}.editor{height:100dvh;max-width:960px;margin:auto;display:grid;grid-template-rows:64px 56px minmax(100px,1fr) 188px 100px;padding:env(safe-area-inset-top,0px) 18px env(safe-area-inset-bottom,0px);gap:0;position:relative}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.topbar h1{font-size:16px;font-weight:500;letter-spacing:2px;margin:0}.icon-button{width:44px;height:44px;border-radius:15px;padding:10px}.icon-button svg{width:24px;height:24px}.next-button{height:42px;padding:0 14px;border-radius:16px;font-size:13px}.next-button span{margin-left:4px}.feedback{text-align:center;align-self:center;min-width:0}.feedback p{margin:0;font-size:11px;line-height:1.4}.feedback #status{max-height:32px;overflow:auto}.feedback #stats{color:#878175;font-size:10px;margin-top:3px}.source-menu{position:absolute;z-index:30;left:18px;top:62px;border-radius:18px;padding:8px;display:grid;gap:3px}.source-menu button{border:0;background:transparent;text-align:left;padding:12px 22px;border-radius:10px}.source-menu button:hover{background:#e4dfd2}.preview{position:relative;min-height:0;display:flex;align-items:center;justify-content:center;padding:18px 8px 44px;overflow:hidden}.stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;border-radius:0}.stage canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:0;box-shadow:0 6px 22px #3a332f20}#sourceStage{touch-action:none}#handles{position:absolute;overflow:visible;touch-action:none}#handles circle{fill:#fffc;stroke:#99825d;stroke-width:2;cursor:grab}#handles polygon{fill:none;stroke:#a68d68;stroke-width:1.5;stroke-dasharray:5 4;pointer-events:none}#empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#958b7b;pointer-events:none}#empty svg{width:46px;height:46px;opacity:.6}#empty p{font-size:18px;letter-spacing:2px;margin:18px 0 8px}#empty span{font-size:12px}.compare{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);border-radius:18px;padding:5px 14px;font-size:11px}.compare[aria-pressed=true]{background:#7b715e;color:white}#source:not([width]),#result:not([width]){display:none}.adjustments{border-radius:22px;padding:14px 16px;min-height:0;overflow:hidden}.tab-panel{height:100%;overflow:auto;scrollbar-width:thin}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;font-size:12px}.panel-heading>span{color:#807666}.tab-panel button{border:1px solid #cfc7b966;background:#fff7;border-radius:12px;font-size:11px;padding:6px 10px;min-height:30px}.tab-panel label{display:block;font-size:12px;margin:3px 0}.tab-panel output{float:right;font-variant-numeric:tabular-nums;color:#8b7961}.slider-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px 18px}input[type=range]{display:block;width:100%;margin:3px 0;height:25px;accent-color:#8b7a5e}input[type=checkbox]{accent-color:#8b7a5e;vertical-align:middle}small{display:block;font-size:10px;line-height:1.5;color:#918877;margin-top:7px}.check-row{display:flex;gap:12px;flex-wrap:wrap}.action-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.action-row span{font-size:9px;color:#8a8276}.ratio{display:flex!important;gap:8px;align-items:center}.ratio select,.ratio input{max-width:155px;font-size:12px;border:1px solid #d7cfbf;border-radius:9px;background:#fff8;padding:4px}#customRatio{width:70px}.dock{display:flex;justify-content:space-around;align-items:center;gap:4px}.dock button{border:0;background:none;padding:0;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:58px;font-size:11px}.tab-icon{width:58px;height:58px;border-radius:19px;display:grid;place-items:center;color:#827764}.tab-icon svg{width:26px;height:26px}.dock button[aria-selected=true] .tab-icon{background:linear-gradient(140deg,#b4a68e,#8c7d64);color:#fff;border-color:#cbbd9f;box-shadow:0 5px 16px #64533b25}.dock button[aria-selected=true]{color:#63563f}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #8c7957;outline-offset:3px}.export-dialog{border:1px solid white;border-radius:20px;background:#f4f1e9;color:#4e493f;width:min(92vw,650px);max-height:90vh;overflow:auto;padding:20px}.export-dialog::backdrop{background:#302b2455}.export-dialog img{display:block;max-width:100%;max-height:60vh;margin:auto;border-radius:0}.export-dialog footer{display:flex;justify-content:space-between;margin-top:14px}.export-dialog button,.export-dialog a{border:1px solid #d5cdbc;padding:8px 14px;border-radius:12px;background:white;text-decoration:none;color:inherit}.export-dialog h2{font-size:17px}.export-dialog p{font-size:12px}@media(max-height:700px){.editor{grid-template-rows:56px 48px minmax(80px,1fr) 164px 88px;padding-left:14px;padding-right:14px}.adjustments{padding:10px 14px}.preview{padding-top:8px;padding-bottom:37px}.tab-icon{width:58px;height:58px;border-radius:19px}.dock button{min-width:58px}.slider-grid input[type=range]{height:22px}}@media(prefers-reduced-transparency:reduce){.glass{background:#f3f0e7;backdrop-filter:none}}
#empty{pointer-events:auto}#empty>span{font-size:11px}.entry-actions{display:flex;gap:30px;margin:28px 0 16px}.entry-actions button{width:80px;height:80px;border-radius:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.entry-actions svg{width:28px!important;height:28px!important;opacity:1!important}.entry-actions span{font-size:12px}#entrySample{border:0;background:none;font-size:11px;color:#8e8270;padding:10px}#empty>a{font-size:11px;color:#8e8270;text-decoration:none;margin-top:10px}body:not(.has-photo) .adjustments,body:not(.has-photo) .dock,body:not(.has-photo) .compare{visibility:hidden}body:not(.has-photo) .editor{grid-template-rows:64px 56px minmax(100px,1fr) 0 30px}body:not(.has-photo) #startFraming{visibility:hidden}
html[data-pending-artwork="loading"] #empty{display:none!important}
@media(max-height:480px){.editor{grid-template-rows:48px 36px minmax(50px,1fr) 118px 78px}.adjustments{padding:6px 12px;border-radius:16px}.preview{padding:4px 8px 24px}.compare{bottom:1px;padding:2px 12px}.dock button{gap:2px}.tab-panel small{margin-top:2px}.topbar .icon-button{height:38px;width:38px;padding:7px}}
/* Shared mounting-page wall and floating optical glass — engine-09. */
body{background:#e9e6df url('https://yizhuangbiao.com/device-tests/release-85/framing/assets/scene/owner-ai-white-wall-20260903/white-wall-real-texture-v2.png') center/cover fixed no-repeat;color:#615c53;-webkit-font-smoothing:antialiased}
.glass{background:linear-gradient(145deg,rgba(255,255,255,.43),rgba(248,245,237,.13) 52%,rgba(221,218,208,.23));border:1px solid rgba(255,255,255,.78);-webkit-backdrop-filter:blur(14px) saturate(1.12);backdrop-filter:blur(14px) saturate(1.12);box-shadow:inset 0 1px 2px #ffffffd9,inset 0 -2px 3px #584a351a,0 2px 3px #332b2124,0 6px 9px #332b2130;transition:background .2s ease,box-shadow .2s ease,color .2s ease}
.topbar{padding:0 2px}.icon-button{border-radius:50%;color:#827b6d}.next-button{border-radius:22px;color:#6d665a}.entry-actions button{border-radius:25px}.entry-actions svg{stroke-width:1.35}.feedback{padding:7px 13px;border-radius:12px;background:linear-gradient(175deg,#f6f6ee66,#c7c9bb30);border:1px solid #ffffff7a;box-shadow:inset 0 1px 4px #514c4220,inset 0 -1px 1px #fff9,0 1px 0 #fff7;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);color:#626558;min-height:46px;display:flex;flex-direction:column;justify-content:center}.feedback #status{letter-spacing:.2px;color:#626458;text-shadow:0 1px 0 #fff9}.feedback #stats{font-variant-numeric:tabular-nums;color:#868a7c;letter-spacing:.35px}.adjustments{background:linear-gradient(145deg,#ffffff35,#f8f5ed16 60%,#dad7cd22);border-color:#ffffff8f;box-shadow:inset 0 1px 1px #ffffffba,inset 0 -1px 2px #74634a10,0 8px 22px #433a2e0c}.tab-icon{color:#827765;background:linear-gradient(145deg,#ffffff70,#f8f5ed22 52%,#dddad03b);border-radius:19px}.tab-icon svg{stroke-width:1.4;filter:drop-shadow(0 1px 0 #fff9)}.dock button[aria-selected=true] .tab-icon{background:linear-gradient(145deg,#ffffff91,#f8f5ed42 52%,#cdd3d43b);color:#575e60;border-color:#ffffffed;box-shadow:inset 0 1px 2px #fff,inset 0 -2px 3px #584a351a,0 2px 3px #332b2124,0 7px 12px #332b2130}.dock button[aria-selected=true]{color:#535d60}.dock button[aria-selected=true] .tab-icon::after{content:'';position:absolute;width:15px;height:2px;background:#839897;border-radius:2px;bottom:7px;box-shadow:0 1px 1px #fff8}.tab-icon{position:relative}.dock button{color:#746e62}.compare[aria-pressed=true]{background:#ffffffa1;color:#4e5f62;box-shadow:inset 0 1px 2px white,0 3px 9px #37372b24}.tab-panel button{background:linear-gradient(145deg,#ffffff55,#ffffff1c);border-color:#ffffff90;box-shadow:inset 0 1px 1px #fff8,0 2px 5px #5347340a}.tab-panel output{color:#737a76}.panel-heading>span{color:#7a766c}input[type=checkbox]{accent-color:#007aff}
input[type=range]{appearance:none;-webkit-appearance:none;height:28px;background:transparent;cursor:pointer;outline:none;--range-progress:50%;margin:3px 0}
input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:5px;background:linear-gradient(to right,#007aff 0 var(--range-progress),#78788033 var(--range-progress) 100%);box-shadow:inset 0 1px 1px #22222208}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:linear-gradient(#fff,#fcfcfc);border:.5px solid #00000008;margin-top:-9px;box-shadow:0 1px 3px #00000026,0 3px 7px #00000012;transition:box-shadow .15s ease}
input[type=range]:active::-webkit-slider-thumb{box-shadow:0 1px 4px #00000026,0 0 0 5px #007aff14}
input[type=range]::-moz-range-track{height:4px;border-radius:5px;background:#78788033}input[type=range]::-moz-range-progress{height:4px;border-radius:5px;background:#007aff}input[type=range]::-moz-range-thumb{width:22px;height:22px;border:0;border-radius:50%;background:white;box-shadow:0 1px 4px #0003}
@media(prefers-reduced-motion:reduce){.glass,input[type=range]::-webkit-slider-thumb{transition:none}}@media(prefers-reduced-transparency:reduce){.glass,.feedback,.adjustments{background:#eeece3;backdrop-filter:none;-webkit-backdrop-filter:none}}

/* engine-14: plain status text follows the adjustment labels. */
.feedback{background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;padding:4px 8px;color:inherit}
.feedback #status{font:inherit;font-size:12px;line-height:1.5;max-height:36px;letter-spacing:normal;color:inherit;text-shadow:none}
.feedback #stats{font-size:10px;line-height:1.5;letter-spacing:normal;color:#918877;margin-top:2px}

/* engine-15: two-line automatic adjustment status. */
.feedback #status{white-space:pre-line}

/* engine-16: keep the framing action at the upper right. */
.topbar{justify-content:flex-end}

/* engine-17: controls appear only after selecting a tab. */
.topbar{justify-content:space-between}body:not(.has-photo) #cameraMenu{visibility:hidden}
body.has-photo:not(.panel-open) .editor{grid-template-rows:64px 56px minmax(100px,1fr) 0 100px}
body[data-active-tab="tone"] .editor{grid-template-rows:64px 56px minmax(100px,1fr) 116px 100px}
#tab-tone{touch-action:none;user-select:none;-webkit-user-select:none}
#tab-tone .tab-icon{transition:transform .16s ease,box-shadow .16s ease}
#tab-tone[aria-selected="true"] .tab-icon{transform:scale(1.08)}#tab-tone.scrubbing .tab-icon{transform:scale(1.18);box-shadow:inset 0 1px 2px #fff,0 9px 20px #332b2140}
@media(max-height:700px){body.has-photo:not(.panel-open) .editor{grid-template-rows:56px 48px minmax(80px,1fr) 0 88px}body[data-active-tab="tone"] .editor{grid-template-rows:56px 48px minmax(80px,1fr) 110px 88px}}
@media(max-height:480px){body.has-photo:not(.panel-open) .editor{grid-template-rows:48px 36px minmax(50px,1fr) 0 78px}body[data-active-tab="tone"] .editor{grid-template-rows:48px 36px minmax(50px,1fr) 100px 78px}}
@media(prefers-reduced-motion:reduce){#tab-tone .tab-icon{transition:none}}
/* Keep the dock in its own row when the controls are hidden. */
.topbar{grid-row:1}.feedback{grid-row:2}.preview{grid-row:3}.adjustments{grid-row:4}.dock{grid-row:5}

/* engine-18: full-edge touch targets and visible midpoint grips. */
#handles .edge-hit{stroke:transparent;pointer-events:stroke;cursor:grab}#handles .edge-grip{stroke:#fff;stroke-linecap:round;filter:drop-shadow(0 1px 1px #69563e);pointer-events:stroke;cursor:grab}#handles .edge-grip:focus-visible{stroke:#55514c;outline:none}#handles [data-edge="0"],#handles [data-edge="2"]{cursor:ns-resize}#handles [data-edge="1"],#handles [data-edge="3"]{cursor:ew-resize}
/* More visible crop outline on both white paper and dark ink. */
#handles polygon{stroke:#77736d;stroke-width:2;vector-effect:non-scaling-stroke;stroke-dasharray:none;filter:drop-shadow(0 0 1px #fff)}
#handles circle{stroke:#77736d;stroke-width:2;vector-effect:non-scaling-stroke;fill:#fffffff2}
#handles .edge-grip{stroke:#77736d;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 1px 1px #ffffffcc)}

/* engine-20: explicit crop completion. */
.crop-actions{display:flex;gap:6px;align-items:center}#finishCrop{color:#514d44;border-color:#aaa59b;background:#ffffffb0;font-weight:500}#sourceStage{touch-action:none}

.crop-scope{display:flex;gap:5px;margin:8px 0}.crop-scope button{flex:1}.crop-scope button[aria-pressed=true]{background:#fff9;border-color:#969087;color:#514d44}.crop-actions{flex-wrap:wrap;justify-content:flex-end}

/* engine-22: inspection pan/zoom; output pixels remain unchanged. */
.preview{touch-action:none}.stage{transform-origin:center;will-change:transform}body.has-photo .preview{cursor:grab}.preview.panning{cursor:grabbing}#resetView{position:absolute;right:8px;top:8px;z-index:5;border-radius:15px;padding:5px 10px;font-size:11px}.compare{z-index:5}

/* engine-24: symmetric viewing area and a centered reset action. */
.preview{padding:40px 24px}#resetView{left:50%;right:auto;transform:translateX(-50%);white-space:nowrap}
@media(max-height:480px){.preview{padding:32px 24px}}

/* engine-26: always reachable recovery from an incorrect crop. */
#panel-crop .panel-heading{align-items:flex-start;gap:5px}#panel-crop .panel-heading>span{white-space:nowrap;padding-top:5px}.crop-actions{gap:4px}#panel-crop .crop-actions button{padding:5px 7px}#applyDetectedCrop{margin-top:3px}

body[data-active-tab="crop"] .editor{grid-template-rows:64px 56px minmax(100px,1fr) 208px 100px}
@media(max-height:700px){body[data-active-tab="crop"] .editor{grid-template-rows:56px 48px minmax(80px,1fr) 200px 88px}}
@media(max-height:480px){body[data-active-tab="crop"] .editor{grid-template-rows:48px 36px minmax(50px,1fr) 150px 78px}}

/* adjust137: iOS Photos-style full-screen editor with a compact floating control tray. */
.editor,.editor:has(.tab-panel:not([hidden])){grid-template-rows:64px minmax(0,1fr) 92px!important;padding:env(safe-area-inset-top,0px) 12px env(safe-area-inset-bottom,0px)!important}
.topbar{grid-row:1!important;z-index:20}.preview{grid-row:2!important;padding:10px 4px 22px!important}.dock{grid-row:3!important;z-index:20;align-self:stretch}
.feedback{position:fixed!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.feedback.is-alert{width:auto!important;height:auto!important;left:50%!important;bottom:calc(104px + env(safe-area-inset-bottom,0px))!important;transform:translateX(-50%);clip:auto!important;white-space:normal!important;overflow:visible!important;margin:0!important;z-index:50;padding:9px 14px!important;max-width:min(82vw,520px);border-radius:14px!important;background:#242424d9!important;color:#fff!important;box-shadow:0 8px 24px #0004!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;text-align:center}
.feedback.is-alert #status{color:#fff!important;font-size:12px!important}.feedback.is-alert #stats{display:none}
.adjustments{position:absolute!important;grid-row:auto!important;left:14px;right:14px;bottom:calc(92px + env(safe-area-inset-bottom,0px));z-index:18;min-height:0!important;max-height:min(31vh,210px);height:auto!important;padding:12px 14px!important;border-radius:20px!important;overflow:auto!important;background:linear-gradient(145deg,#f7f5efed,#ece9e0e0)!important;border:1px solid #ffffffde!important;box-shadow:0 10px 32px #30291f36,inset 0 1px 1px #fff!important;backdrop-filter:blur(28px) saturate(1.08)!important;-webkit-backdrop-filter:blur(28px) saturate(1.08)!important}
.tab-panel{height:auto!important;overflow:visible!important}.tab-panel label{font-size:12px;margin:0}.tab-panel output{font-size:11px}.tab-panel button{min-height:30px;padding:5px 9px;white-space:nowrap}.primary-action{color:#fff!important;background:#75664f!important;border-color:#75664f!important}
.crop-actions,.check-row,.action-row,.more-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.crop-actions{justify-content:center;margin-bottom:8px}.crop-actions button{flex:1}.crop-scope{margin:5px 0 2px}.crop-scope button{padding:4px 6px;min-height:27px}.panel-switch,.more-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.more-head{font-size:10px;color:#81796c}.more-head button{margin-left:auto}
.slider-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.action-row{margin-top:6px}.action-row #repairInfo{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ios-switch{display:inline-flex!important}.ios-switch>input{position:absolute;opacity:0;pointer-events:none}.ios-switch>span{width:42px;height:24px;border-radius:999px;background:#aaa7a0;display:block;position:relative;transition:.18s}.ios-switch>span::after{content:'';position:absolute;width:20px;height:20px;left:2px;top:2px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0004;transition:.18s}.ios-switch>input:checked+span{background:#8b7a5e}.ios-switch>input:checked+span::after{transform:translateX(18px)}
.dock{margin:0 -12px;padding:7px 8px 5px;background:linear-gradient(180deg,#eeeae1bd,#e8e4dbc9);border-top:1px solid #fff9;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}.dock button{gap:2px;min-width:52px}.tab-icon{width:50px;height:50px;border-radius:17px}.tab-icon svg{width:23px;height:23px}.dock button[aria-selected=true] .tab-icon{transform:translateY(-3px) scale(1.04)!important}.dock button[aria-selected=true] .tab-icon::after{bottom:5px}
#compare{bottom:8px}.stage canvas{max-height:100%;max-width:100%}
body:not(.has-photo) .editor{grid-template-rows:64px minmax(0,1fr) 24px!important}body:not(.has-photo) .preview{grid-row:2!important}
@media(max-width:430px){.editor{grid-template-rows:58px minmax(0,1fr) 84px!important}.adjustments{left:9px;right:9px;bottom:calc(84px + env(safe-area-inset-bottom,0px));max-height:min(32vh,205px);padding:10px 11px}.dock{grid-row:3!important}.tab-icon{width:48px;height:48px}.dock button{min-width:50px;font-size:10px}.preview{padding:6px 0 18px!important}.slider-grid{gap:6px}.action-row{gap:5px}.tab-panel button{font-size:10px;padding:5px 7px}}
@media(max-height:650px){.editor{grid-template-rows:52px minmax(0,1fr) 76px!important}.adjustments{bottom:calc(76px + env(safe-area-inset-bottom,0px));max-height:34vh}.tab-icon{width:44px;height:44px}.dock{padding-top:4px}.preview{padding-top:2px!important;padding-bottom:10px!important}}

/* photo139: readable analysis, rectangular handles and thirds. */
.feedback{position:absolute!important;top:66px;left:50%;transform:translateX(-50%);width:max-content!important;max-width:85%;height:auto!important;clip:auto!important;margin:0!important;white-space:normal!important;z-index:4;pointer-events:none;overflow:visible!important}
.feedback #stats{display:none}.feedback #status{font-size:11px;color:#675f53;max-height:none;background:#f3f0e6de;border-radius:12px;padding:4px 10px}
#handles .crop-mask{fill:#0006;stroke:none;pointer-events:none}#handles polygon{stroke:#fff;stroke-width:1.5;filter:drop-shadow(0 1px 1px #0008)}
#handles .crop-grid{stroke:#fff9;stroke-width:1;vector-effect:non-scaling-stroke;pointer-events:none}
#handles .crop-corner{stroke:#fff;stroke-width:4;vector-effect:non-scaling-stroke;fill:none;pointer-events:none;filter:drop-shadow(0 1px 2px #000a)}
#handles .corner-hit{fill:transparent;stroke:none;pointer-events:all}#handles .corner-hit:focus{stroke:#007aff;stroke-width:2}
.geometry-tools{display:flex;gap:8px;justify-content:center;margin:8px 0}.geometry-tools [aria-pressed=true]{background:#d8e6f4;color:#17518c}
body[data-active-tab=crop] .adjustments{max-height:40vh}body[data-active-tab=crop] .preview{padding-bottom:250px!important}
@media(max-height:650px){body[data-active-tab=crop] .preview{padding-bottom:180px!important}}

.feedback{position:fixed!important;top:70px!important;bottom:auto!important}.feedback.is-alert{top:70px!important;bottom:auto!important}
/* crop142: two rows, one shared ruler; drag the image border for individual edges. */
body[data-active-tab=crop] .adjustments{padding:8px 12px!important;max-height:none!important;overflow:visible!important}
#panel-crop.compact-crop{height:auto;overflow:visible}.crop-toolbar{display:grid;grid-template-columns:minmax(90px,1.25fr) repeat(3,minmax(44px,1fr));gap:7px;align-items:center}
.crop-toolbar select{appearance:auto;border:0;border-radius:12px;background:#e5e8e5;color:#56635e;font-size:12px;min-width:0;width:100%;height:36px;padding:0 6px}.crop-toolbar button{height:36px;min-height:36px;white-space:nowrap;font-size:12px;padding:4px 8px}
.crop-ruler-row{display:flex;align-items:center;gap:10px;height:42px}.crop-ruler-row input{flex:1;min-width:0;width:0;margin:0}.crop-ruler-row output{flex:0 0 40px;text-align:right;font-size:12px;font-variant-numeric:tabular-nums}
body[data-active-tab=crop] .preview{padding-bottom:108px!important}

/* 143: three orientation icons share the existing first row. */
.crop-toolbar{grid-template-columns:minmax(62px,1.5fr) repeat(3,32px) repeat(3,minmax(30px,1fr));gap:3px}.crop-toolbar button{padding:3px 1px;font-size:11px}.crop-toolbar #flipArtwork,.crop-toolbar #rotateLeft,.crop-toolbar #rotateRight{font-size:23px}.crop-toolbar select{font-size:11px;padding:0 2px}

/* 144: independent crop tabs and fixed-pointer moving rulers. */
.crop-toolbar{display:flex;overflow-x:auto;gap:5px;scrollbar-width:none;touch-action:pan-x;scroll-snap-type:x proximity;padding-bottom:3px}.crop-toolbar::-webkit-scrollbar{display:none}.crop-toolbar>*{flex:none}.crop-toolbar select[hidden]{display:none}.crop-mode-tabs{display:flex;gap:5px}.crop-toolbar button{min-width:42px;height:36px;padding:4px 9px;font-size:12px;scroll-snap-align:start}.crop-mode-tabs button[aria-selected=true]{background:#d9e6eb;color:#315b70;box-shadow:inset 0 0 0 1px #b5cbd5}.crop-toolbar svg{width:23px;height:23px;display:block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.crop-toolbar #finishCrop{position:sticky;right:0;box-shadow:-5px 0 9px #eeeae2}
.moving-ruler{position:relative;height:48px;width:100%;min-width:0;overflow:hidden;touch-action:none;user-select:none;cursor:ew-resize;outline-offset:-2px;border-radius:8px}.moving-ruler:focus-visible{outline:2px solid #9e7d44}.moving-ruler-line{position:absolute;left:0;right:0;top:25px;height:1px;background:#8a81764d}.moving-ruler-track{position:absolute;left:50%;top:0;width:0;height:100%;pointer-events:none}.moving-ruler-tick{position:absolute;top:19px;width:1px;height:12px;background:#8a81765c}.moving-ruler-tick.major{top:15px;height:20px;background:#8a817694}.moving-ruler-tick b{position:absolute;top:21px;left:0;transform:translateX(-50%);font:9px system-ui;color:#81786c;white-space:nowrap}.moving-ruler-pointer{position:absolute;left:50%;top:6px;width:3px;height:32px;transform:translateX(-50%);background:#a97c32;border-radius:2px;pointer-events:none;box-shadow:0 0 0 3px #f3f0e9b0}.crop-ruler-row{grid-template-columns:minmax(0,1fr) 36px}.crop-ruler-row .moving-ruler{height:48px}.ruler-source{display:none!important}

/* 147: crop handles start away from iOS system edge gestures. */
body[data-active-tab=crop] .preview{padding-left:32px!important;padding-right:32px!important;padding-top:28px!important;padding-bottom:120px!important}
button,nav,svg,canvas,.preview,.usage-guide,.framing-info-display{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}input,textarea,[contenteditable=true]{-webkit-user-select:text;user-select:text}html,body{overscroll-behavior:none}

#handles .detected-outline{stroke:#bf8733;stroke-width:2;stroke-dasharray:6 4;vector-effect:non-scaling-stroke;pointer-events:none;fill:none}.crop-toolbar #applyDetectedCrop{min-width:56px}

.repair-brush-preview{position:fixed;z-index:10000;pointer-events:none;transform:translate(-50%,-50%);border:2px solid #b18b40;border-radius:50%;background:rgba(255,209,98,.18);box-shadow:0 0 0 1px #fff,inset 0 0 0 1px #fff;box-sizing:border-box}.repair-brush-preview[hidden]{display:none}.repair-help{font-size:12px;line-height:1.5;margin:6px 0;color:#6e6659}

#panel-repair .repair-toolbar{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;overflow-x:auto;max-width:100%;padding:2px 0 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch}#panel-repair .repair-toolbar::-webkit-scrollbar{display:none}#panel-repair .repair-toolbar>label,#panel-repair .repair-toolbar>button{flex:0 0 auto;white-space:nowrap;margin:0;font-size:13px}#panel-repair .repair-toolbar>label{display:flex;align-items:center;gap:4px}#panel-repair .repair-toolbar>button{padding:8px 10px;min-height:40px}#panel-repair #repairInfo{font-size:12px;margin-top:5px}
/* switch160: gesture-only page switching keeps both top actions fully tappable. */
.topbar{display:flex;gap:8px}.topbar>.page-swipe-hint{align-self:stretch;flex:1;min-width:0;display:grid;place-items:center;touch-action:pan-y;color:#8a8276;font-size:10px;letter-spacing:.04em;white-space:nowrap;-webkit-user-select:none;user-select:none}.topbar>.page-swipe-hint.is-swiping{color:#655846}.topbar>.next-button{white-space:nowrap;flex:none}@media(max-width:360px){.topbar{gap:4px}.topbar>.next-button{padding-left:10px;padding-right:10px;font-size:12px}.topbar>.page-swipe-hint{font-size:9px;letter-spacing:0}}
/* unity172 production: shared entry/adjustment visual language. */
.topbar{min-height:64px;gap:7px}.topbar-side{display:flex;align-items:center;gap:7px;flex:0 0 auto}.topbar-side-right{justify-content:flex-end}.topbar>.page-swipe-hint{font-size:13px;font-weight:500;letter-spacing:.08em;color:#6d675d;text-align:center;animation:entry-swipe-breathe 10s ease-in-out infinite;min-width:0}.topbar>.page-swipe-hint::before{content:'↔';margin-right:5px;color:#8a9d99;font-size:15px}@keyframes entry-swipe-breathe{0%,12%,32%,100%{opacity:.18}18%,27%{opacity:.94}}@media(prefers-reduced-motion:reduce){.topbar>.page-swipe-hint{animation:none;opacity:.85}}.round-tab,.icon-button{width:44px;height:44px;min-width:44px;padding:0;border-radius:50%;display:grid;place-items:center;color:#686257;background:linear-gradient(145deg,rgba(255,255,255,.64),rgba(230,235,233,.28));border:1px solid rgba(255,255,255,.86);box-shadow:inset 0 1px 1px #fff,inset 0 -4px 10px rgba(89,98,96,.05),0 5px 14px rgba(61,68,66,.13);-webkit-backdrop-filter:blur(16px) saturate(1.08);backdrop-filter:blur(16px) saturate(1.08)}.round-tab{font-size:0}.round-tab::before{font:400 22px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.round-tab#resetView::before{content:'↺'}.round-tab#compare::before{content:'◐';font-size:20px}.round-tab#compare[aria-pressed=true]::before{content:'◑'}.round-tab:disabled{visibility:hidden}.icon-button svg{width:23px;height:23px;stroke-width:1.35}.next-button{height:44px;border-radius:22px;padding:0 14px;color:#5f5860}.next-button:not(:disabled):active,.round-tab:not(:disabled):active,.icon-button:active{transform:scale(.96)}#resetView.round-tab{border-radius:50%!important;width:44px;height:44px;min-width:44px;padding:0}body:not(.has-photo) .topbar-side-left{visibility:hidden}body:not(.has-photo) .topbar>.page-swipe-hint{font-size:14px}.preview{background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(244,241,234,.14));border-radius:26px}.entry-actions{gap:18px}.entry-actions button{width:70px;height:70px;border-radius:50%;color:#686257;background:linear-gradient(145deg,rgba(255,255,255,.64),rgba(230,235,233,.28));border:1px solid rgba(255,255,255,.86);box-shadow:inset 0 1px 1px #fff,inset 0 -4px 10px rgba(89,98,96,.05),0 5px 14px rgba(61,68,66,.13)}.entry-actions svg{width:25px!important;height:25px!important}.entry-actions span{font-size:11px;color:#635e55}.dock{background:linear-gradient(180deg,rgba(238,234,225,.78),rgba(232,228,219,.86));border-top:1px solid rgba(255,255,255,.9)}.tab-icon{width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,rgba(255,255,255,.62),rgba(230,235,233,.28));border:1px solid rgba(255,255,255,.86);box-shadow:inset 0 1px 1px #fff,inset 0 -4px 10px rgba(89,98,96,.05),0 5px 14px rgba(61,68,66,.13)}.dock button[aria-selected=true] .tab-icon{background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(218,231,226,.55));color:#536b67;border-color:#8aa39b}.dock button[aria-selected=true]{color:#536b67}@media(max-width:430px){.topbar{gap:5px}.topbar-side{gap:5px}.round-tab,.icon-button{width:40px;height:40px;min-width:40px}.next-button{height:40px;padding:0 10px;font-size:12px}.topbar>.page-swipe-hint{font-size:12px;letter-spacing:.03em}.topbar>.page-swipe-hint::before{font-size:13px;margin-right:2px}.tab-icon{width:50px;height:50px}#resetView.round-tab{width:40px;height:40px;min-width:40px}}

/* unity173: reserve a dedicated, centered hint line on narrow phones. */
@media(max-width:430px){body.has-photo .topbar{display:grid;grid-template-columns:94px minmax(0,1fr) 176px;min-height:94px;padding-bottom:30px;align-items:start}body.has-photo .topbar-side{padding-top:5px;position:relative;z-index:2}body.has-photo .topbar-side-left{grid-column:1}body.has-photo .topbar-side-right{grid-column:3}body.has-photo .topbar>.page-swipe-hint{position:absolute;top:52px;left:0;right:0;width:100%;font-size:13px;white-space:nowrap;z-index:1;justify-self:center}body.has-photo .source-menu{top:58px}body.has-photo .editor{grid-template-rows:94px minmax(0,1fr) 84px!important}}
/* unity173b: reset belongs to the left top control group, never over the picture. */
.topbar #resetView{position:static!important;top:auto!important;left:auto!important;right:auto!important;transform:none!important}

/* unity174: one calm command row; navigation and status each own a separate line. */
@media(max-width:430px){body.has-photo .topbar{display:flex!important;min-height:54px!important;height:54px!important;padding:5px 14px 0!important;justify-content:space-between!important}body.has-photo .topbar-side{display:flex!important;padding:0!important;gap:6px!important}body.has-photo .topbar>.page-swipe-hint{position:absolute!important;top:58px!important;left:50%!important;right:auto!important;width:max-content!important;max-width:calc(100vw - 28px)!important;height:24px!important;transform:translateX(-50%)!important;font-size:12px!important;line-height:24px!important;white-space:nowrap!important;z-index:3!important}body.has-photo .editor{grid-template-rows:54px minmax(0,1fr) 84px!important}body.has-photo.has-status-message .page-swipe-hint{visibility:hidden!important;animation-play-state:paused!important}.feedback{top:84px!important;z-index:4!important}.topbar #startFraming{width:40px!important;min-width:40px!important;padding:0!important;font-size:0!important;border-radius:50%!important}.topbar #startFraming span{display:none}.topbar #startFraming::before{content:'→';font-size:24px;line-height:1}.topbar .round-tab,.topbar .icon-button{width:40px!important;height:40px!important;min-width:40px!important}.topbar .topbar-side-left{order:0}.topbar .topbar-side-right{order:1}}

/* unity175: four equal text tabs, no ambiguous pictograms. */
.top-text-tab{width:44px;height:44px;min-width:44px;padding:0;border-radius:14px;display:grid;place-items:center;font-size:12px;font-weight:600;letter-spacing:.02em;color:#5d574d;background:linear-gradient(145deg,rgba(255,255,255,.72),rgba(229,224,214,.36));border:1px solid rgba(255,255,255,.9);box-shadow:inset 0 1px 1px #fff,0 4px 12px rgba(61,68,66,.12);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.top-text-tab:disabled{visibility:hidden}.top-text-tab:active{transform:scale(.96)}@media(max-width:430px){.topbar .top-text-tab{width:40px!important;height:40px!important;min-width:40px!important;border-radius:13px!important;font-size:12px!important}.topbar #startFraming{font-size:12px!important}.topbar #startFraming::before{content:none!important}}
/* unity176: every page-switch instruction uses the physical screen centre. */
.topbar{position:relative}.topbar>.page-swipe-hint{position:absolute!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:max-content!important;max-width:calc(100vw - 28px)!important;text-align:center!important;justify-content:center!important;white-space:nowrap!important;z-index:5!important}
@media(max-width:430px){.topbar>.page-swipe-hint{top:58px!important;height:24px!important;line-height:24px!important;font-size:12px!important}body:not(.has-photo) .topbar{min-height:84px!important}body.has-photo.has-status-message .page-swipe-hint{visibility:visible!important;animation-play-state:running!important}.feedback{top:88px!important}}

/* unity177: navigation belongs in the clear centre between the two command groups.
   It never shares a vertical lane with the recognition/status message. */
@media(max-width:430px){
  body.has-photo .topbar{height:54px!important;min-height:54px!important;padding-top:5px!important}
  body.has-photo .topbar>.page-swipe-hint{top:10px!important;height:34px!important;line-height:34px!important;font-size:12px!important;z-index:1!important;pointer-events:none!important}
  body.has-photo .topbar-side{position:relative!important;z-index:2!important}
  body.has-photo .feedback{top:62px!important;z-index:6!important}
  body:not(.has-photo) .topbar>.page-swipe-hint{top:15px!important;height:34px!important;line-height:34px!important;font-size:14px!important}
}

/* edge180: visible single-edge trim choices within the compact crop panel. */
.crop-scope-tabs{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;padding:3px 0 2px}.crop-scope-tabs[hidden]{display:none}.crop-scope-tabs::-webkit-scrollbar{display:none}.crop-scope-tabs button{flex:1 0 42px;min-height:36px;border:1px solid #d6d0c4;border-radius:10px;background:#ffffff80;color:#615a50;font-size:12px;scroll-snap-align:start}.crop-scope-tabs button[aria-pressed=true]{background:#d9e6eb;color:#315b70;border-color:#b5cbd5}

/* layout184: all four adjustment commands use one text-tab silhouette. */
.topbar #resetView.top-text-tab,.topbar #cameraMenu.top-text-tab,.topbar #compare.top-text-tab,.topbar #startFraming.top-text-tab{width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;border-radius:14px!important;font-size:12px!important;line-height:1!important;display:grid!important;place-items:center!important}
.topbar #resetView.top-text-tab[hidden]{display:none!important}
.topbar #startFraming.top-text-tab::before,.topbar #compare.top-text-tab::before,.topbar #resetView.top-text-tab::before{content:none!important;display:none!important}
@media(max-width:430px){.topbar #resetView.top-text-tab,.topbar #cameraMenu.top-text-tab,.topbar #compare.top-text-tab,.topbar #startFraming.top-text-tab{width:40px!important;min-width:40px!important;height:40px!important;border-radius:13px!important;font-size:12px!important}}

/* layout184: keep the page cue centered at every viewport width. */
.topbar>.page-swipe-hint{top:10px!important;height:34px!important;line-height:34px!important}
body:not(.has-photo) .topbar>.page-swipe-hint{top:15px!important}
