/* 原生預覽幾何維持固定尺寸，外層響應式排版不縮放數學平面。 */
:root{font-family:system-ui,sans-serif;color:#182c3b;background:#f4f3ee;line-height:1.6}*{box-sizing:border-box}body{margin:0}header{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;padding:1rem 3%;background:#fff;border-bottom:1px solid #657683}header button{margin-left:auto}a{color:#164d75}main{max-width:1180px;margin:auto;padding:2rem 1.5rem}.eyebrow{font-size:.8rem;font-weight:750;letter-spacing:.15em;color:#405564}h1{font-size:clamp(2rem,5vw,3.5rem);line-height:1.15;margin:.5rem 0 1rem}h2{font-size:1.05rem;margin:0 0 1rem}.intro{max-width:50rem;font-size:1.1rem}.layout{display:grid;grid-template-columns:minmax(250px,1fr) minmax(0,2fr);gap:1.5rem;align-items:start}section{background:#fff;border:1px solid #8997a0;border-radius:16px;padding:1.25rem;margin:1.5rem 0}.layout section{margin:0}.field{margin-bottom:1.2rem}label{display:block;font-weight:700}input,button,textarea{font:inherit;color:inherit}input,textarea{width:100%;border:1px solid #536977;border-radius:7px;background:#fff;padding:.6rem}small{display:block;color:#405564}button{border:1px solid #536977;background:#fff;border-radius:7px;padding:.55rem .8rem;cursor:pointer;min-height:44px}#generate{background:#164d75;color:#fff;border-color:#164d75}button:hover{background:#e4edf3}#generate:hover{background:#103952}.buttons,.examples{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid #762395;outline-offset:3px}.error{color:#a02028;font-weight:650}input[aria-invalid=true]{border:2px solid #a02028}#status{font-weight:650}#diagram{display:block;width:100%;max-width:560px;height:auto;min-height:180px;overflow:visible;background:#f7fafc;border:1px solid #8997a0}.window{fill:none;stroke:#526370;stroke-dasharray:1 3;stroke-width:1}.baseline{fill:none;stroke:#526370;stroke-dasharray:5 3;stroke-width:1}.projection{fill:#d6e6f3;fill-opacity:.55;stroke:#164d75;stroke-width:1.5}.vertex{fill:#164d75}.origin{fill:none;stroke:#752491;stroke-width:1.5}.perspective-origin{fill:none;stroke:#9a2828;stroke-width:1.5}.label{font-size:9px;fill:#182c3b;font-weight:700}.table-region{overflow:auto;max-width:100%}table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}th,td{text-align:left;padding:.6rem;border-bottom:1px solid #bbc4ca;white-space:nowrap}th{background:#edf2f6}textarea{min-height:16rem;white-space:pre;font-family:ui-monospace,monospace;font-size:.85rem}footer{padding:1rem;text-align:center;font-size:.8rem}#bounds{overflow-wrap:anywhere}[hidden]{display:none!important}
/* 對應規格逐層固定幾何；不得把frame邊框帶入座標或對祖先加transform/filter。 */
.preview-frame{position:relative;width:220px;height:140px;padding:0;border:0;overflow:hidden;outline:1px dotted #526370;background:#eef2f5;margin:1rem 0}
.perspective-parent{position:absolute;left:10px;top:10px;width:200px;height:120px;padding:0;border:0;perspective:500px}
.projected-rectangle{position:absolute;left:0;top:0;box-sizing:border-box;width:200px;height:120px;padding:0;border:0;transform-box:border-box;transform-origin:50% 50% 0px;backface-visibility:visible;background:#d1e3f1}
.corner-anchor{position:absolute;width:0;height:0;padding:0;border:0}.p0{left:0;top:0}.p1{left:200px;top:0}.p2{left:200px;top:120px}.p3{left:0;top:120px}.corner-anchor:before{content:'';position:absolute;left:-3px;top:-3px;width:6px;height:6px;background:#164d75;border-radius:50%}.corner-anchor b{position:absolute;font-size:11px;color:#182c3b;white-space:nowrap}.p0 b,.p3 b{left:5px}.p1 b,.p2 b{right:5px}.p0 b,.p1 b{top:4px}.p2 b,.p3 b{bottom:4px}.face-title{position:absolute;left:60px;top:48px;font-size:12px;font-weight:700;color:#182c3b}
@media(max-width:720px){main{padding:1rem .75rem}.layout{display:block}.layout section{margin:1rem 0}section{padding:1rem}header{padding:.75rem}h1{font-size:2.2rem}}
