:root{--ink:#292d29;--muted:#747b72;--line:#e7e9e3;--accent:#ad382b;--accent-pale:#f9eeeb;--surface:#fff;--shadow:0 12px 30px #38483109}
*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;font-size:14px}button,input{font:inherit}button{border:0;background:transparent;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:not-allowed;color:#91978e}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:4px}button:active:not(:disabled){transform:scale(.96)}[hidden]{display:none!important}svg{display:block}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.header{height:84px;padding:0 32px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:1px solid #eef0ea;background:#ffffffeb;backdrop-filter:blur(20px);position:relative;z-index:25}.brand{display:flex;gap:11px;align-items:center;font-size:16px;font-weight:600;letter-spacing:.06em}.brand>svg{width:27px;height:27px;color:var(--accent)}.modes{display:flex;padding:5px;border:1px solid var(--line);border-radius:30px;background:#f5f6f3;box-shadow:inset 0 1px 3px #26302006}.modes button{padding:9px 28px;border-radius:24px;font-size:13px;line-height:20px}.modes .selected{background:linear-gradient(#bc4a3c,#a63629);color:white;box-shadow:inset 0 1px 1px #fff5,0 3px 7px #8e34232b}.account{justify-self:end;display:flex;align-items:center;gap:10px;font-size:13px;padding:7px 9px;border-radius:24px}.account:hover{background:#f6f7f3}.account svg{width:14px}.avatar{width:32px;height:32px;display:grid;place-items:center;background:linear-gradient(#fff,#eef1e9);border:1px solid #e3e7dd;border-radius:50%;box-shadow:0 2px 4px #22331c0a;font-size:12px}
.layout{display:flex;gap:24px;padding:26px 24px 28px;min-height:calc(100svh - 84px);align-items:flex-start}.rail{position:sticky;top:26px;flex-shrink:0;width:88px;display:grid;gap:8px;padding:8px;background:linear-gradient(145deg,#fff,#f8f9f6);border:1px solid var(--line);border-radius:25px;box-shadow:var(--shadow)}.rail button{min-height:78px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:11px;font-weight:500;color:var(--muted);border:1px solid transparent;position:relative}.rail .nav-icon{display:grid;place-items:center;width:28px;height:26px}.rail svg{width:22px;height:22px}.rail button:hover{background:#fff;box-shadow:0 2px 5px #15211507}.rail .selected{background:linear-gradient(145deg,#fff,#f8e9e4);border-color:#ecd8d0;color:var(--accent);box-shadow:inset 0 1px 0 #fff,0 3px 6px #8c4e3710}.rail .selected .nav-icon{filter:drop-shadow(0 2px 1px #ba48351a)}
.workspace{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;border-radius:28px;background:radial-gradient(ellipse at center,#fafbf8,white 69%)}.canvas-head{height:30px;width:100%;display:flex;align-items:center;justify-content:space-between;padding:0 16px;font-size:11px;color:var(--muted)}.canvas-head strong{font-weight:500;margin-left:11px;font-size:13px;color:var(--ink)}.canvas-wrap{width:min(100%,calc(100svh - 180px));max-width:820px;min-width:300px;aspect-ratio:1;position:relative}.luopan{height:100%;width:100%;overflow:visible;transform-origin:center}.center-action{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:14px;white-space:nowrap}.center-action small{font-size:11px;color:var(--muted)}.primary{display:flex;justify-content:center;align-items:center;gap:10px;min-height:46px;padding:12px 22px;border:1px solid #9f3327;border-radius:15px;color:#fff;background:linear-gradient(165deg,#c14f40,#ab3528);box-shadow:inset 0 1px 1px #fff5,0 4px 0 #8c2d2120,0 8px 18px #a536231a;font-weight:500;font-size:13px}.primary:hover{background:linear-gradient(165deg,#c35040,#9d2d22);box-shadow:inset 0 1px 1px #fff5,0 5px 18px #a5362329}.upload-button{min-height:54px;padding:11px 21px 11px 13px;border-radius:19px;font-size:14px}.upload-icon{display:grid;place-items:center;width:29px;height:29px;border:1px solid #ffffff32;border-radius:9px;background:#ffffff12}.upload-icon svg{width:18px;height:18px}.canvas-controls{display:flex;align-items:center;flex-direction:column;gap:14px;margin:8px 0 0;position:relative;z-index:3}.toolbar{display:flex;align-items:center;gap:3px;border:1px solid #e3e6de;border-radius:18px;padding:5px;background:linear-gradient(#fff,#f9faf7);box-shadow:inset 0 1px 0 #fff,0 3px 0 #f1f3ee,0 10px 25px #29382109}.toolbar button{min-height:36px;min-width:36px;display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 9px;border-radius:12px;font-size:12px;color:#586152}.toolbar button:hover,.toolbar button[aria-expanded=true]{background:#edf0e9}.toolbar .chevron{width:12px;height:12px}.toolbar svg{width:18px;height:18px}.sep,.file-action i{height:17px;width:1px;background:var(--line);margin:0 5px}.popover-anchor{position:relative}.layers-pop{position:absolute;left:0;bottom:54px;width:236px;padding:14px 20px;border-radius:20px;border:1px solid var(--line);background:#fffffff5;backdrop-filter:blur(20px);box-shadow:0 14px 40px #2733241c}.layers-pop h3{margin:5px 0 10px;font-size:13px}.layer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 0;font-size:13px}.toggle{position:relative!important;min-width:38px!important;width:38px!important;height:22px!important;min-height:22px!important;padding:0!important;border:1px solid #a23729;border-radius:20px!important;background:var(--accent)!important;box-shadow:inset 0 1px 2px #571b251a}.toggle:after{content:'';position:absolute;width:16px;height:16px;border-radius:50%;top:2px;left:18px;background:#fff;box-shadow:0 1px 3px #26312226;transition:left .2s}.toggle[aria-checked=false]{background:#dfe4d9!important;border-color:#d5dccd}.toggle[aria-checked=false]:after{left:2px}.file-action{display:flex;align-items:center;gap:9px;padding:3px 6px;background:#fff;border-radius:14px;border:1px solid var(--line);font-size:12px}.file-action>span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.file-action button{min-height:34px;padding:6px 10px;border-radius:8px}.file-action button:hover{background:#f4f6f0}.danger{color:var(--accent)}
.inspector{flex-shrink:0;width:310px;border:1px solid #e4e7de;border-radius:25px;padding:24px;background:linear-gradient(145deg,#fff,#fcfdfb);box-shadow:inset 0 1px 1px #fff,var(--shadow);position:relative}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.panel-heading h2{font-size:18px;letter-spacing:.02em;font-weight:600;margin:0}.icon-button{min-width:32px;min-height:32px;display:grid;place-items:center;border-radius:10px;color:var(--muted)}.icon-button:hover{background:#eff2eb}.icon-button svg{width:17px;height:17px}.section{padding:22px 0 0;margin-top:22px;border-top:1px solid var(--line)}.section h3{font-size:13px;font-weight:500;margin:0 0 13px}.subtle{font-size:12px;color:var(--muted);line-height:1.6;margin:8px 0 0}.field-label{font-size:12px;color:#5d6558;display:block;margin:0 0 9px}.input-wrap{display:flex;align-items:center;gap:6px;border:1px solid #dbe1d4;border-radius:13px;background:#fbfcf9;padding:0 15px;box-shadow:inset 0 2px 3px #1c301c04}.input{border:0;background:none;font-size:23px;font-variant-numeric:tabular-nums;width:100%;min-width:0;color:var(--ink);padding:13px 0;outline:none}.input-wrap:focus-within{outline:2px solid #ad382b38;border-color:var(--accent)}.input:focus-visible{outline:none}.input-wrap>span{color:var(--muted)}.inspector>.primary{width:100%;margin-top:24px}.neutral-button{display:flex;align-items:center;justify-content:center;min-height:42px;padding:10px 16px;border-radius:13px;border:1px solid #dfe5d7;background:linear-gradient(#fff,#f3f6ef);color:#4b5941;font-size:12px;font-weight:500;box-shadow:inset 0 1px 1px #fff,0 2px 3px #394e2406}.neutral-button:hover{background:#eef2e8}.inspector>.neutral-button{width:100%;margin-top:14px}.empty-result{text-align:center;padding:12px 0 20px}.result-symbol{display:grid;place-items:center;width:62px;height:68px;border-radius:19px;margin:5px auto 22px;background:linear-gradient(145deg,#fff,#f5e9e4);color:#ae5240;border:1px solid #eadbd5;box-shadow:inset 0 1px 1px #fff,0 6px 14px #6d3c2910}.result-symbol svg{width:29px;height:33px;fill:none;stroke:currentColor;stroke-width:1.4}.empty-result h3{font-size:15px;font-weight:500;margin:0 0 11px}.empty-result p{font-size:12px;line-height:1.9;color:var(--muted);margin:0}.detail-code{display:flex;align-items:center;gap:16px;padding:3px 0 16px}.detail-code svg{width:44px}.detail-code b{font-size:30px;font-weight:500;font-variant-numeric:tabular-nums}.detail-code small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.data-row{display:flex;justify-content:space-between;gap:15px;font-size:13px;line-height:1.7;padding:10px 0}.data-row span{color:var(--muted)}.data-row b{font-weight:500}.palace-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:8px}.palace-grid button{padding:10px 4px;border-radius:11px;border:1px solid var(--line);font-size:14px;background:#fff}.palace-grid small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.palace-grid button:hover,.palace-grid .selected{background:#fbefeb;border-color:#e7c7bd;color:var(--accent)}
.collection{flex:1;min-width:0;padding:14px 24px}.collection h2{font-size:24px;font-weight:500;margin:0 0 30px}.collection .empty-result{padding:90px 0}.record{display:flex;align-items:center;gap:18px;padding:18px 0;border-bottom:1px solid var(--line);text-align:left;width:100%}.record img{width:60px;height:60px;border:1px solid var(--line);border-radius:12px;object-fit:contain;background:#fff}.record>span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record strong{font-size:14px;font-weight:500}.record small{display:block;font-size:12px;color:var(--muted);margin-top:7px}.record svg{width:18px}.record:hover{background:#fbfcf8}.account-pop{position:absolute;right:24px;top:76px;z-index:30;background:#fff;padding:22px;width:270px;border:1px solid var(--line);border-radius:22px;box-shadow:0 12px 40px #2b33231a}.account-pop p{font-size:12px;line-height:1.8;color:var(--muted)}.account-pop a{display:flex;justify-content:space-between;color:var(--accent);font-size:13px;text-decoration:none;padding-top:12px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);padding:13px 20px;background:#2e3829;color:white;border-radius:14px;box-shadow:0 8px 25px #25301f20;font-size:13px;z-index:60;text-align:center}text{font-family:'PingFang SC','Microsoft YaHei',sans-serif;text-anchor:middle;dominant-baseline:middle}
@media(max-width:1100px){.layout{gap:15px;padding:22px 17px}.header{padding:0 22px}.rail{width:78px;padding:6px}.rail button{min-height:74px;font-size:10px}.inspector{width:270px;padding:20px}.canvas-wrap{min-width:0}.canvas-head{padding:0 7px}.canvas-head strong{margin-left:7px}.canvas-head{font-size:10px}.canvas-head strong{font-size:12px}.upload-button{padding:10px 14px;min-height:48px;font-size:13px}.upload-icon{display:none}.center-action small{font-size:10px}}
@media(max-width:750px){.header{height:68px;position:sticky;top:0;padding:0 16px;grid-template-columns:1fr auto 1fr}.brand{font-size:12px;gap:6px;letter-spacing:0}.brand>svg{width:21px;height:21px}.modes{padding:3px}.modes button{padding:7px 16px;font-size:12px}.account{padding:0;gap:0}.account>span:not(.avatar),.account>svg{display:none}.avatar{width:32px;height:32px}.layout{display:flex;flex-direction:column;gap:16px;padding:10px 14px 28px;min-height:calc(100svh - 68px)}.rail{position:sticky;top:78px;z-index:20;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:5px;border-radius:20px;gap:5px;background:#ffffffed;backdrop-filter:blur(18px);box-shadow:0 5px 15px #2e3d2108}.rail button{min-height:47px;flex-direction:row;gap:7px;padding:8px 5px;border-radius:14px;font-size:12px;white-space:nowrap}.rail .nav-icon{width:20px;height:20px}.rail svg{width:19px;height:19px}.workspace{width:100%}.canvas-head{height:28px;padding:0 5px}.canvas-wrap{width:100%;max-width:580px;min-width:0}.canvas-controls{margin-top:12px}.center-action{gap:9px}.upload-button{border-radius:16px;min-height:43px;padding:9px 13px;font-size:12px}.center-action small{font-size:9px}.toolbar button{min-height:38px;min-width:38px;font-size:12px}.inspector{width:100%;margin-top:3px;padding:22px;border-radius:23px;scroll-margin-top:152px}.inspector>.primary{min-height:47px}.collection{width:100%;padding:14px 3px;scroll-margin-top:150px}.collection h2{font-size:21px}.collection .empty-result{padding:60px 0}.panel-heading{margin-bottom:20px}.empty-result{padding:7px 0 14px}.section{margin-top:18px;padding-top:18px}.data-row{padding:9px 0}.layers-pop{left:0;bottom:54px}.file-action>span{max-width:150px}.account-pop{right:14px;top:62px}.palace-grid button{padding:12px 4px}}
@media(max-width:365px){.header{padding:0 12px}.modes button{padding:7px 13px}.brand{font-size:11px}.layout{padding-left:10px;padding-right:10px}.rail button{font-size:11px;gap:5px}.rail svg{width:17px}.center-action small{display:none}}
@media(prefers-reduced-motion:no-preference){button{transition:background .2s,box-shadow .2s,transform .2s cubic-bezier(.2,.8,.3,1),border-color .2s,color .2s}.inspector:not([hidden]),.collection:not([hidden]),.layers-pop:not([hidden]){animation:appear .25s ease-out}.luopan{transition:transform .25s ease-out}@keyframes appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}
#motionButton{font-size:11px;white-space:nowrap}.outer-ring,.palace-ring,.branch-ring{transform-origin:400px 400px}dialog{border:1px solid #ffffffba;background:linear-gradient(145deg,#fff,#fbfcf8);border-radius:28px;padding:27px;width:min(440px,calc(100vw - 32px));color:var(--ink);box-shadow:0 30px 90px #172b2b2b;max-height:calc(100svh - 40px);overflow-y:auto}dialog::backdrop{background:#1a251d35;backdrop-filter:blur(8px)}.analysis-file{display:flex;align-items:center;gap:16px;padding:16px;border-radius:17px;border:1px solid var(--line);background:#fff}.analysis-file img{width:76px;height:76px;object-fit:contain;flex-shrink:0;background:#f6f8f2;border-radius:10px}.analysis-file>div{min-width:0}.analysis-file strong{display:block;font-size:14px;font-weight:500;overflow-wrap:anywhere}.analysis-file span{display:block;font-size:12px;color:var(--muted);margin-top:10px}.confirmation-copy{font-size:13px;line-height:1.8;color:var(--muted);margin:22px 0}.dialog-actions{display:flex;gap:12px;margin-top:26px}.dialog-actions>button{flex:1;min-height:46px}.form-error{font-size:12px;line-height:1.7;color:#a4382b;margin:15px 0 0;padding:12px 14px;background:#fcf1ee;border-radius:12px}.inspector .primary svg{width:15px;height:15px}
@media(prefers-reduced-motion:no-preference){.luopan.is-idle .outer-ring{animation:turn 120s linear infinite}.luopan.is-idle .palace-ring{animation:turn 90s linear infinite reverse}.luopan.is-idle .branch-ring{animation:turn 60s linear infinite}dialog[open]{animation:appear .22s ease-out}@keyframes turn{to{transform:rotate(360deg)}}}
@media(max-width:750px){dialog{padding:22px;border-radius:24px}.toolbar{gap:1px}.toolbar button{padding:7px}.toolbar .sep{margin:0 3px}#motionButton{font-size:10px}.analysis-file img{width:63px;height:63px}}

.canvas-head{justify-content:flex-end}

/* Navigation and canvas tools share one container. */
.rail{z-index:22}.rail-tools{border-top:1px solid var(--line);margin-top:3px;padding-top:8px;min-width:0}.rail-tools .toolbar{display:flex;flex-direction:column;gap:2px;padding:0;background:none;border:0;border-radius:0;box-shadow:none}.rail-tools .popover-anchor{width:100%}.rail-tools #layersButton{width:100%;min-height:65px;flex-direction:column;gap:8px;font-size:11px;border:1px solid transparent}.rail-tools #layersButton:hover,.rail-tools #layersButton[aria-expanded=true]{background:#f0f2ec;border-color:#e2e6dc}.rail-tools #layersButton>svg:first-child{width:22px;height:22px}.rail-tools #layersButton .chevron{display:none}.rail-zoom{display:grid;grid-template-columns:20px minmax(25px,1fr) 20px;width:100%;align-items:center}.rail .rail-zoom button{padding:3px 0;min-height:35px;min-width:0;width:100%;font-size:10px;gap:0;border:0;flex-direction:row;border-radius:9px}.rail .rail-zoom svg{width:15px;height:15px}.rail-tools .layers-pop{left:calc(100% + 20px);top:0;bottom:auto;width:236px}.rail .layers-pop .toggle{min-width:38px!important;padding:0!important}
@media(max-width:750px){.rail-tools{grid-column:1/-1;margin:2px 3px 0;padding:5px 4px 0}.rail-tools .toolbar{flex-direction:row;justify-content:space-between;gap:16px}.rail-tools .popover-anchor{width:auto}.rail-tools #layersButton{min-height:37px;flex-direction:row;padding:7px 12px;font-size:12px;gap:8px;border-radius:11px}.rail-tools #layersButton>svg:first-child{width:18px;height:18px}.rail-tools #layersButton .chevron{display:block;width:12px;height:12px;transform:rotate(180deg)}.rail-zoom{width:132px;grid-template-columns:37px 1fr 37px}.rail .rail-zoom button{min-height:37px;font-size:12px}.rail .rail-zoom svg{width:17px;height:17px}.rail-tools .layers-pop{left:0;top:calc(100% + 15px);bottom:auto;max-width:calc(100vw - 48px)}.inspector,.collection{scroll-margin-top:200px}}
/* Align the space switch with the luopan's south/north axis. */
.header .brand{grid-column:1}.header .account{grid-column:3}.header .modes{position:absolute;left:var(--mode-center,50%);top:50%;transform:translate(-50%,-50%)}

.scale-anchor{position:relative;width:100%}.rail-tools #sizeButton{width:100%;min-height:65px;flex-direction:column;gap:8px;font-size:11px;border:1px solid transparent}.rail-tools #sizeButton>svg{width:21px;height:21px}.rail-tools #sizeButton:hover,.rail-tools #sizeButton[aria-expanded=true]{background:#f0f2ec;border-color:#e2e6dc}.scale-pop{position:absolute;left:calc(100% + 20px);top:10px;width:164px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:0 12px 30px #23321c17}.scale-pop .rail-zoom{grid-template-columns:40px 1fr 40px}.rail .scale-pop button{font-size:12px;min-height:38px}.rail .scale-pop svg{width:17px;height:17px}
@media(max-width:750px){.rail-tools .toolbar{display:grid;grid-template-columns:1fr 1fr;gap:5px}.rail-tools .popover-anchor{width:100%}.rail-tools #layersButton,.rail-tools #sizeButton{min-height:39px;flex-direction:row;justify-content:center;gap:8px;width:100%;font-size:12px;padding:7px 12px;border-radius:11px}.rail-tools #sizeButton>svg{width:18px;height:18px}.scale-pop{left:auto;right:0;top:calc(100% + 15px);width:164px}.scale-pop .rail-zoom{width:100%}}

#analyzeImage{min-height:45px;margin-top:2px}#analyzeImage svg{width:16px;height:16px}



.center-action #analyzeImage{margin:0;min-height:48px;white-space:nowrap}@media(max-width:750px){.center-action #analyzeImage{min-height:43px;padding:10px 13px;font-size:12px;gap:6px}.center-action #analyzeImage svg{width:13px;height:13px}}
/* Four peer navigation entries, without a navigation/tool divider. */
.rail-tools,.rail-tools .toolbar{display:contents}.rail-tools{border:0;padding:0;margin:0}.rail-tools #layersButton,.rail-tools #sizeButton{min-height:78px;font-size:11px;border-radius:18px}.rail-tools #layersButton .chevron{display:none}
@media(max-width:1100px){.rail-tools #layersButton,.rail-tools #sizeButton{min-height:74px;font-size:10px}}
@media(max-width:750px){.rail-tools #layersButton,.rail-tools #sizeButton{min-height:47px;font-size:12px;border-radius:14px;padding:8px 5px}.rail-tools #layersButton>svg:first-child,.rail-tools #sizeButton>svg{width:19px;height:19px}}
@property --analysis-edge{syntax:'<angle>';initial-value:0deg;inherits:false}
.center-action .motion-cta{position:relative;isolation:isolate;overflow:hidden;border:2px solid transparent;border-radius:18px;background:linear-gradient(145deg,#c34d3c,#a12f24) padding-box,conic-gradient(from var(--analysis-edge),#9b3025 0deg,#e79987 65deg,#fff6ec 92deg,#bb5946 122deg,#992c23 190deg,#f2bdac 264deg,#fff8f1 282deg,#9b3025 320deg) border-box;box-shadow:inset 0 1px 0 #fff3,0 5px 0 #852b2118,0 12px 28px #a33b2826;transform:perspective(650px) rotateX(var(--analysis-rx,0deg)) rotateY(var(--analysis-ry,0deg));transition:transform .22s ease-out,box-shadow .25s ease-out;will-change:auto}
.motion-cta .action-label,.motion-cta .upload-icon,.motion-cta>svg{position:relative;z-index:2}.motion-cta:before{content:'';position:absolute;z-index:1;inset:-45% auto -45% -70%;width:45%;background:linear-gradient(100deg,transparent,#fff2 32%,#fff5 49%,#fff1 65%,transparent);transform:skewX(-18deg);pointer-events:none;opacity:0}.motion-cta:after{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at var(--analysis-light-x,50%) var(--analysis-light-y,30%),#fff3,transparent 68%);opacity:0;transition:opacity .22s}
@media(hover:hover){.center-action .motion-cta:hover{box-shadow:inset 0 1px 0 #fff4,0 7px 0 #852b2114,0 16px 36px #aa3e2938}.motion-cta:hover:after{opacity:1}}
.center-action .motion-cta:active{transform:perspective(650px) translateY(2px) scale(.965);box-shadow:inset 0 2px 5px #6b201e20,0 2px 0 #852b211a,0 5px 14px #a33b2820;transition-duration:.08s}
@media(prefers-reduced-motion:no-preference){.motion-cta{animation:analysis-edge-flow 3.6s linear infinite,analysis-glow 4s ease-in-out infinite}.motion-cta:before{animation:analysis-sheen 3.6s ease-in-out infinite}.motion-cta>svg{animation:analysis-arrow 2.8s ease-in-out infinite}@keyframes analysis-edge-flow{to{--analysis-edge:360deg}}@keyframes analysis-sheen{0%{left:-70%;opacity:0}8%{opacity:.9}35%,100%{left:135%;opacity:0}}@keyframes analysis-glow{0%,100%{box-shadow:inset 0 1px 0 #fff3,0 5px 0 #852b2118,0 10px 25px #a33b2822}50%{box-shadow:inset 0 1px 0 #fff4,0 5px 0 #852b2118,0 13px 32px #bc4a353b}}@keyframes analysis-arrow{0%,65%,100%{transform:translateX(0)}78%{transform:translateX(4px)}90%{transform:translateX(1px)}}}
@media(prefers-reduced-motion:reduce){.center-action .motion-cta{animation:none;transform:none;transition:none}.motion-cta:before{display:none}.motion-cta>svg{animation:none}}

/* Fit the whole compass to the space below navigation, including its directions. */
.layout{height:calc(100dvh - 84px);min-height:0;padding-top:16px;padding-bottom:24px}
.workspace{height:100%;min-height:0;position:relative;container-type:size;justify-content:center;padding-bottom:44px}
.canvas-head:has(>#angleReadout[hidden]){display:none}
.canvas-wrap{width:min(100cqw,100cqh,900px);min-width:0;max-width:none;flex-shrink:0}
.canvas-controls{position:absolute;bottom:0;left:0;right:0;margin:0;min-height:36px;justify-content:center}
.rail .scale-pop .fit-window{width:100%;min-height:34px;margin-top:5px;border-radius:10px;background:#f5f6f2;color:var(--accent);font-size:12px;flex-direction:row}
.rail .scale-pop .fit-window:hover{background:#f9eeeb}
@media(max-width:750px){.layout{height:calc(100dvh - 68px);min-height:0;gap:12px;padding-top:10px;padding-bottom:24px}.rail{flex-shrink:0}.workspace{height:auto;min-height:0;flex:1}.canvas-wrap{width:min(100cqw,100cqh,580px);min-width:0;max-width:none}.canvas-controls{margin:0}}

/* Keep the tool rail and compass together as one centered working area. */
@media(min-width:751px){
  .header{height:64px}
  .header .modes{padding:4px}
  .header .modes button{padding:7px 25px}
  .account-pop{top:58px}
  .layout{height:calc(100dvh - 64px);padding:16px 24px 24px;margin-inline:auto;max-width:1120px;align-items:center}
  .layout:has(>.workspace:not([hidden])):has(>.inspector[hidden]){width:min(100%,calc(min(900px,100dvh - 148px) + 168px));gap:40px}
  .layout:has(>.workspace[hidden]){align-items:flex-start}
  .layout:has(>.workspace[hidden]) .rail{align-self:flex-start;margin-bottom:0}
  .rail{position:relative;top:auto;width:80px;padding:7px;gap:6px;align-self:center;margin-bottom:44px;border-radius:24px}
  .rail>button,.rail-tools #layersButton,.rail-tools #sizeButton{min-height:64px;font-size:11px;border-radius:17px}
  .rail-tools .layers-pop{top:auto;bottom:0;left:calc(100% + 16px)}
  .scale-pop{top:auto;bottom:0;left:calc(100% + 16px)}
}

@media(max-width:750px){
  .workspace{justify-content:flex-start}
  .canvas-controls{top:calc(min(100cqw,100cqh,580px) + 8px);bottom:auto}
}

/* Mobile dock component: four equal touch targets above the safe area. */
@media(max-width:750px){
  .header{height:60px;padding:0 16px;background:#fffffffa}
  .header .brand{font-size:13px;gap:6px;white-space:nowrap}
  .header .brand>svg{width:22px;height:22px;flex-shrink:0}
  .header .modes{padding:3px;box-shadow:inset 0 1px 2px #26302004}
  .header .modes button{padding:7px 13px;font-size:12px}
  .account-pop{top:54px}
  .layout{height:calc(100dvh - 60px);gap:0;padding:12px 8px calc(104px + env(safe-area-inset-bottom));}
  .mobile-dock{position:fixed;top:auto;bottom:calc(12px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:calc(100% - 32px);max-width:420px;height:72px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:7px 6px;border:1px solid #e8ebe5;border-radius:24px;background:#fffffff0;box-shadow:0 8px 32px #2630240c,0 1px 3px #26302405;backdrop-filter:blur(22px);z-index:24}
  .mobile-dock>button,.mobile-dock .rail-tools #layersButton,.mobile-dock .rail-tools #sizeButton{width:100%;min-height:56px;height:56px;padding:3px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:0;border-radius:16px;background:transparent;box-shadow:none;color:#727b6e;font-size:11px;line-height:16px;font-weight:500}
  .mobile-dock .nav-icon{display:grid;width:24px;height:24px;place-items:center;position:relative;z-index:1;filter:none}
  .mobile-dock svg,.mobile-dock .rail-tools #layersButton>svg:first-child,.mobile-dock .rail-tools #sizeButton>svg{width:22px;height:22px;position:relative;z-index:1}
  .mobile-dock .rail-tools .popover-anchor,.mobile-dock .rail-tools .scale-anchor{width:100%;min-width:0;align-self:center;justify-self:stretch}
  .mobile-dock .tool-label{display:block}
  .mobile-dock>button:hover,.mobile-dock .rail-tools #layersButton:hover,.mobile-dock .rail-tools #sizeButton:hover{background:#f7f8f4;box-shadow:none}
  .mobile-dock>button[aria-current=page],.mobile-dock .rail-tools #layersButton[aria-expanded=true],.mobile-dock .rail-tools #sizeButton[aria-expanded=true]{color:var(--accent);background:transparent;font-weight:600;border:0}
  .mobile-dock>button[aria-current=page]::before{content:'';position:absolute;top:2px;left:calc(50% - 23px);width:46px;height:29px;background:#fbefeb;border-radius:11px}
  .rail .popover-anchor,.rail .scale-anchor{position:static}
  .rail-tools .layers-pop{left:auto;right:0;top:calc(100% + 10px);bottom:auto;width:min(280px,calc(100vw - 32px));padding:14px 20px}
  .rail .layer{min-height:48px;padding:12px 0}
  .scale-pop{left:auto;right:0;top:calc(100% + 10px);bottom:auto;width:184px}
  .rail .scale-pop .rail-zoom button{min-height:44px}
  .workspace{border-radius:0;background:transparent;justify-content:center;padding-bottom:48px}
  .canvas-controls{top:calc((100% - 48px + min(100cqw,100cqh,580px))/2 + 8px);bottom:auto}
  .canvas-wrap{width:min(100cqw,100cqh,580px)}
  .luopan .mountain-label{font-size:27px;font-weight:500}
  .luopan .palace-hit>text{font-size:24px;font-weight:500}
  .luopan .palace-hit>g{stroke-width:3.5px}
  .luopan .branch-ring text{font-size:18px;font-weight:500}
  .luopan .degree-label{font-size:13px}
  .luopan .direction-label{font-size:18px;font-weight:500}
  .center-action .upload-button{min-height:46px;padding:11px 17px;font-size:13px;border-radius:17px}
  .center-action #analyzeImage{min-height:46px;padding:11px 14px;font-size:13px}
  .file-action{border-radius:14px;padding:3px}
  .file-action button{min-height:40px;padding:8px 16px}
}

/* Reference details: tactile tab feedback and on-demand touch sheets. */
.mobile-tools{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:600px;max-height:70dvh;padding:10px 24px max(26px,env(safe-area-inset-bottom));border-radius:28px 28px 0 0;border:1px solid #fff;background:#fffffff7;backdrop-filter:blur(24px);box-shadow:0 -14px 60px #172b2b1a;overflow-y:auto}
.mobile-tools::backdrop{background:#222c2724;backdrop-filter:blur(2px)}
.sheet-handle{width:34px;height:4px;margin:0 auto 16px;border-radius:4px;background:#d5d9d2}
.sheet-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.sheet-heading h2{margin:0;font-size:20px;font-weight:600;letter-spacing:.02em}
.sheet-heading .icon-button{width:40px;height:40px;min-width:40px;border-radius:50%;background:#f2f4ef}
.sheet-layers{padding:0 2px}
.sheet-layers .layer{padding:16px 0;min-height:60px;font-size:15px}
.sheet-layers .toggle{width:48px!important;min-width:48px!important;height:44px!important;min-height:44px!important;border:0!important;background:transparent!important;flex-shrink:0;box-shadow:none!important}
.sheet-layers .toggle::before{content:'';position:absolute;inset:10px 0;border-radius:24px;background:var(--accent);transition:background .2s}
.sheet-layers .toggle::after{width:20px;height:20px;top:12px;left:26px;box-shadow:0 1px 3px #26312226}
.sheet-layers .toggle[aria-checked=false]::before{background:#dfe4d9}
.sheet-layers .toggle[aria-checked=false]::after{left:2px}
.sheet-zoom-stepper{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:6px 0 10px}
.sheet-zoom-stepper button{width:48px;height:48px;display:grid;place-items:center;background:#f4f5f1;border-radius:16px}
.sheet-zoom-stepper output{font-size:32px;font-weight:500;font-variant-numeric:tabular-nums;color:var(--ink)}
.sheet-zoom input{display:block;width:100%;height:44px;margin:8px 0 20px;accent-color:var(--accent);cursor:pointer}
.sheet-fit{width:100%;min-height:48px;border:1px solid #ecd8d0;border-radius:16px;background:#fbf2ef;color:var(--accent);font-size:14px;font-weight:500}
@media(max-width:750px){
  .rail button:active:not(:disabled){transform:scale(.94)}
}
@media(prefers-reduced-motion:no-preference){
  .mobile-dock>button[aria-current=page]::before{animation:nav-mark-enter .22s ease-out}
  @keyframes nav-mark-enter{from{transform:scaleX(.4);opacity:0}to{transform:scaleX(1);opacity:1}}
  .mobile-tools[open]{animation:tool-sheet-enter .3s cubic-bezier(.2,.8,.2,1)}
  .mobile-tools[open]::backdrop{animation:tool-backdrop-enter .2s ease-out}
  @keyframes tool-sheet-enter{from{transform:translateY(100%);opacity:.7}to{transform:translateY(0);opacity:1}}
  @keyframes tool-backdrop-enter{from{opacity:0}to{opacity:1}}
}
