:root{--md-ref-typeface:"Roboto Flex", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;--md-sys-typescale-display-small:400 2.25rem/2.75rem var(--md-ref-typeface);--md-sys-typescale-headline-medium:400 1.75rem/2.25rem var(--md-ref-typeface);--md-sys-typescale-headline-small:400 1.5rem/2rem var(--md-ref-typeface);--md-sys-typescale-title-large:400 1.375rem/1.75rem var(--md-ref-typeface);--md-sys-typescale-title-medium:500 1rem/1.5rem var(--md-ref-typeface);--md-sys-typescale-title-small:500 .875rem/1.25rem var(--md-ref-typeface);--md-sys-typescale-body-large:400 1rem/1.5rem var(--md-ref-typeface);--md-sys-typescale-body-medium:400 .875rem/1.25rem var(--md-ref-typeface);--md-sys-typescale-body-small:400 .75rem/1rem var(--md-ref-typeface);--md-sys-typescale-label-large:500 .875rem/1.25rem var(--md-ref-typeface);--md-sys-typescale-label-medium:500 .75rem/1rem var(--md-ref-typeface);--md-sys-typescale-label-small:500 .6875rem/1rem var(--md-ref-typeface);--md-sys-shape-corner-extra-small:4px;--md-sys-shape-corner-small:8px;--md-sys-shape-corner-medium:12px;--md-sys-shape-corner-large:16px;--md-sys-shape-corner-extra-large:28px;--md-sys-shape-corner-full:999px;--md-sys-motion-easing-standard:cubic-bezier(.2, 0, 0, 1);--md-sys-motion-easing-emphasized-decelerate:cubic-bezier(.05, .7, .1, 1);--md-sys-motion-easing-emphasized-accelerate:cubic-bezier(.3, 0, .8, .15);--md-sys-motion-duration-short:.15s;--md-sys-motion-duration-medium:.3s;--md-sys-motion-duration-long:.45s;--md-sys-elevation-0:none;--md-sys-elevation-1:0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent), 0 1px 3px 1px color-mix(in srgb, var(--md-sys-color-shadow) 15%, transparent);--md-sys-elevation-2:0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent), 0 2px 6px 2px color-mix(in srgb, var(--md-sys-color-shadow) 15%, transparent);--md-sys-elevation-3:0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent), 0 4px 8px 3px color-mix(in srgb, var(--md-sys-color-shadow) 15%, transparent);--md-sys-state-hover:.08;--md-sys-state-focus:.1;--md-sys-state-pressed:.1;--md-sys-state-dragged:.16;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--nav-bar-height:80px;--top-bar-height:64px}@media (prefers-reduced-motion:reduce){:root{--md-sys-motion-duration-short:0s;--md-sys-motion-duration-medium:0s;--md-sys-motion-duration-long:0s}}*,:before,:after{box-sizing:border-box}html,body{height:100%;margin:0}body{font:var(--md-sys-typescale-body-large);background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);overscroll-behavior:none}#app{min-height:100%}.page{padding:var(--space-2) var(--space-4) calc(var(--nav-bar-height) + var(--safe-bottom) + 96px);max-width:720px;margin:0 auto}.page h2{font:var(--md-sys-typescale-title-medium);color:var(--md-sys-color-on-surface-variant);margin:var(--space-5) 0 var(--space-3)}.page p{margin:0 0 var(--space-3)}.muted{color:var(--md-sys-color-on-surface-variant);font:var(--md-sys-typescale-body-medium)}.empty{text-align:center;padding:var(--space-6) var(--space-4);color:var(--md-sys-color-on-surface-variant)}.empty .ink{width:96px;height:96px;margin:0 auto var(--space-4);color:var(--md-sys-color-outline)}.row{gap:var(--space-3);flex-wrap:wrap;align-items:center;display:flex}.field{gap:var(--space-1);margin:var(--space-3) 0;flex-direction:column;display:flex}.field input[type=text]{height:56px;padding:0 var(--space-4);font:var(--md-sys-typescale-body-large);color:inherit;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-extra-small);background:0 0}.field input[type=text]:focus{outline:2px solid var(--md-sys-color-primary);outline-offset:-2px;border-color:#0000}.field label{font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}[hidden]{display:none!important}.field input[type=text]{width:100%;min-width:0}.state{-webkit-tap-highlight-color:transparent;position:relative;overflow:hidden}.state:before{content:"";opacity:0;border-radius:inherit;transition:opacity var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);pointer-events:none;background:currentColor;position:absolute;inset:0}@media (hover:hover){.state:hover:before{opacity:var(--md-sys-state-hover)}}.state:focus-visible:before{opacity:var(--md-sys-state-focus)}.state:active:before{opacity:var(--md-sys-state-pressed)}:focus-visible{outline:2px solid var(--md-sys-color-primary);outline-offset:2px}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0;padding:0}.top-bar{z-index:10;align-items:center;gap:var(--space-2);min-height:calc(var(--top-bar-height) + var(--safe-top));padding:var(--safe-top) var(--space-4) 0;background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);display:flex;position:sticky;top:0}.top-bar h1{font:var(--md-sys-typescale-title-large);flex:1;margin:0}.nav-bar{z-index:20;height:calc(var(--nav-bar-height) + var(--safe-bottom));padding:var(--space-3) var(--space-2) calc(var(--space-4) + var(--safe-bottom));box-sizing:border-box;background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface-variant);justify-content:space-around;display:flex;position:fixed;bottom:0;left:0;right:0}.nav-item{align-items:center;gap:var(--space-1);font:var(--md-sys-typescale-label-medium);border-radius:var(--md-sys-shape-corner-large);flex-direction:column;flex:1;display:flex}.nav-item .pill{border-radius:var(--md-sys-shape-corner-full);width:64px;height:32px;transition:background var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);place-items:center;display:grid}.nav-item[aria-current=page]{color:var(--md-sys-color-on-surface)}.nav-item[aria-current=page] .pill{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}.fab{right:var(--space-4);z-index:15;bottom:calc(var(--nav-bar-height) + var(--safe-bottom) + var(--space-4));align-items:center;gap:var(--space-3);height:56px;padding:0 var(--space-4);border-radius:var(--md-sys-shape-corner-large);background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);box-shadow:var(--md-sys-elevation-3);font:var(--md-sys-typescale-label-large);display:inline-flex;position:fixed}.btn-text,.btn-filled,.btn-tonal,.btn-outlined{justify-content:center;align-items:center;gap:var(--space-2);height:40px;padding:0 var(--space-4);border-radius:var(--md-sys-shape-corner-full);font:var(--md-sys-typescale-label-large);display:inline-flex}.btn-text{color:var(--md-sys-color-primary);padding:0 var(--space-3)}.btn-filled{background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}.btn-tonal{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}.btn-outlined{border:1px solid var(--md-sys-color-outline);color:var(--md-sys-color-primary)}.chip{align-items:center;gap:var(--space-2);height:32px;padding:0 var(--space-3);border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-small);font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-on-surface-variant);display:inline-flex}.chip[aria-pressed=true],.chip[aria-checked=true]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);border-color:#0000}.card{background:var(--md-sys-color-surface-container-low);border-radius:var(--md-sys-shape-corner-large);padding:var(--space-4)}.card.outlined{background:var(--md-sys-color-surface);border:1px solid var(--md-sys-color-outline-variant)}.scrim{z-index:40;background:color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent);position:fixed;inset:0}.dialog{z-index:41;box-sizing:border-box;width:min(100vw - 48px,560px);padding:var(--space-5);background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface);border-radius:var(--md-sys-shape-corner-extra-large);box-shadow:var(--md-sys-elevation-3);position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.dialog h2{font:var(--md-sys-typescale-headline-small);margin:0 0 var(--space-4)}.dialog .actions{justify-content:flex-end;gap:var(--space-2);margin-top:var(--space-5);display:flex}.sheet{z-index:41;box-sizing:border-box;max-height:80vh;padding:var(--space-2) var(--space-4) calc(var(--space-5) + var(--safe-bottom));background:var(--md-sys-color-surface-container-low);border-radius:var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0;box-shadow:var(--md-sys-elevation-3);animation:sheet-in var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized-decelerate);position:fixed;bottom:0;left:0;right:0;overflow:auto}.sheet .handle{width:32px;height:4px;margin:var(--space-2) auto var(--space-4);background:var(--md-sys-color-outline);border-radius:2px}@keyframes sheet-in{0%{transform:translateY(100%)}}.snackbar{z-index:50;left:var(--space-4);right:var(--space-4);bottom:calc(var(--nav-bar-height) + var(--safe-bottom) + var(--space-4));justify-content:space-between;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);border-radius:var(--md-sys-shape-corner-extra-small);background:var(--md-sys-color-inverse-surface);color:var(--md-sys-color-inverse-on-surface);font:var(--md-sys-typescale-body-medium);box-shadow:var(--md-sys-elevation-3);display:flex;position:fixed}.snackbar .btn-text{color:var(--md-sys-color-inverse-primary)}.segmented{border:1px solid var(--md-sys-color-outline);border-radius:var(--md-sys-shape-corner-full);display:inline-flex;overflow:hidden}.segmented button{height:40px;padding:0 var(--space-4);font:var(--md-sys-typescale-label-large)}.segmented button+button{border-left:1px solid var(--md-sys-color-outline)}.segmented button[aria-pressed=true]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}.swatches{gap:var(--space-3);flex-wrap:wrap;display:flex}.swatch{border-radius:var(--md-sys-shape-corner-full);border:2px solid var(--md-sys-color-outline-variant);width:48px;height:48px}.swatch[aria-pressed=true]{border-color:var(--md-sys-color-on-surface);box-shadow:0 0 0 2px var(--md-sys-color-surface) inset}.icon{display:block}.nav-item,.top-bar a{color:inherit;text-decoration:none}.sheet.persistent{z-index:30;max-height:46vh;padding-bottom:calc(var(--space-4) + var(--safe-bottom))}.sheet h3{font:var(--md-sys-typescale-title-medium);margin:0 0 var(--space-3)}.sheet .grid2{gap:var(--space-2);grid-template-columns:repeat(3,1fr);display:grid}.sheet .grid2 .field{margin:var(--space-1) 0}.sheet .field input{min-width:0;height:44px}.sheet .toolrow{gap:var(--space-2);margin:var(--space-3) 0;flex-wrap:wrap;display:flex}.icon-btn{border-radius:var(--md-sys-shape-corner-full);width:40px;height:40px;color:var(--md-sys-color-on-surface-variant);place-items:center;display:inline-grid}.icon-btn:disabled{opacity:.38;cursor:default}.icon-btn[aria-pressed=true]{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}.chip-row{gap:var(--space-2);margin:var(--space-2) 0;flex-wrap:wrap;display:flex}.chip{cursor:pointer}.chip.danger{color:var(--md-sys-color-error);border-color:var(--md-sys-color-error)}.hint{font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant);margin:var(--space-2) 0}.warn{color:var(--md-sys-color-error)}.list-item{align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);border-radius:var(--md-sys-shape-corner-medium);text-align:left;width:100%;display:flex}.list-item .grow{flex:1;min-width:0}.list-item .sub{font:var(--md-sys-typescale-body-medium);color:var(--md-sys-color-on-surface-variant)}.color-dot{border:1px solid var(--md-sys-color-outline-variant);border-radius:50%;flex:none;width:28px;height:28px}.swatch.small{width:36px;height:36px}.editor{background:var(--md-sys-color-surface);z-index:5;flex-direction:column;display:flex;position:fixed;inset:0}.editor-bar{align-items:center;gap:var(--space-1);padding:var(--safe-top) var(--space-2) 0 var(--space-2);min-height:calc(56px + var(--safe-top));display:flex}.editor-bar .title{min-width:0;font:var(--md-sys-typescale-title-medium);text-overflow:ellipsis;white-space:nowrap;text-align:left;border-radius:var(--md-sys-shape-corner-small);flex:1;padding:8px;overflow:hidden}.subbar{gap:var(--space-2);padding:var(--space-1) var(--space-3) var(--space-2);scrollbar-width:none;align-items:center;display:flex;overflow-x:auto}.subbar::-webkit-scrollbar{display:none}.subbar .chip{flex:none}.subbar .sep{background:var(--md-sys-color-outline-variant);flex:none;width:1px;height:20px}.stage{background:var(--md-sys-color-surface-container);flex:1;min-height:0;position:relative;overflow:hidden}.stage canvas{display:block;position:absolute;inset:0}.stage .overlay-btn{top:var(--space-2);right:var(--space-2);background:var(--md-sys-color-surface);box-shadow:var(--md-sys-elevation-1);position:absolute}.stage .hint-pill{left:var(--space-2);bottom:var(--space-2);border-radius:var(--md-sys-shape-corner-full);background:color-mix(in srgb, var(--md-sys-color-surface) 88%, transparent);max-width:calc(100% - 140px);font:var(--md-sys-typescale-label-medium);color:var(--md-sys-color-on-surface-variant);pointer-events:none;padding:6px 12px;position:absolute}.stage .fab{right:var(--space-3);bottom:var(--space-3);position:absolute}.dock{flex:none}.sheet.docked{max-height:44vh;box-shadow:0 -1px 0 var(--md-sys-color-outline-variant);border-radius:var(--md-sys-shape-corner-large) var(--md-sys-shape-corner-large) 0 0;padding-bottom:var(--space-3);animation:none;position:static}.sheet.docked .handle{margin:0 auto var(--space-2)}.toolbar{background:var(--md-sys-color-surface-container);padding:var(--space-2) var(--space-1) calc(var(--space-2) + var(--safe-bottom));flex:none;justify-content:space-around;display:flex}.tool{border-radius:var(--md-sys-shape-corner-large);font:var(--md-sys-typescale-label-small);color:var(--md-sys-color-on-surface-variant);flex-direction:column;flex:1;align-items:center;gap:2px;padding:4px 0;display:flex}.tool .pill{border-radius:var(--md-sys-shape-corner-full);place-items:center;width:56px;height:28px;display:grid}.tool[aria-pressed=true]{color:var(--md-sys-color-on-surface)}.tool[aria-pressed=true] .pill{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container)}.tool:disabled{opacity:.38}.template-grid{gap:var(--space-2);grid-template-columns:repeat(3,1fr);display:grid}.template-grid button{padding:var(--space-3) var(--space-1);border-radius:var(--md-sys-shape-corner-medium);background:var(--md-sys-color-surface-container);font:var(--md-sys-typescale-label-large);flex-direction:column;align-items:center;gap:4px;display:flex}.template-grid .sub{font:var(--md-sys-typescale-body-small);color:var(--md-sys-color-on-surface-variant)}.sheet .field input[type=text]{height:44px}.sheet .field.inline{align-items:center;gap:var(--space-3);flex-direction:row}.sheet summary{cursor:pointer;padding:var(--space-2) 0;font:var(--md-sys-typescale-label-large);color:var(--md-sys-color-primary)}details[hidden]{display:none}.bar{border-radius:var(--md-sys-shape-corner-full);background:var(--md-sys-color-surface-container-highest);height:10px;margin:var(--space-3) 0;overflow:hidden}.bar-fill{background:var(--md-sys-color-primary);border-radius:inherit;height:100%;transition:width var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard)}.bar-fill.over{background:var(--md-sys-color-error)}.card .sub{font:var(--md-sys-typescale-body-medium)}a.hint{color:var(--md-sys-color-primary)}.measure-canvas{border-radius:var(--md-sys-shape-corner-medium,12px);background:var(--md-sys-color-surface-container);touch-action:manipulation;max-width:100%;margin:8px 0;display:block}.measure-result{font:var(--md-sys-typescale-title-medium);color:var(--md-sys-color-on-surface)}.assistant-preview{max-width:100%;margin:12px 0;display:block}.sheet-body{max-height:85vh;padding:0 16px 16px;overflow:auto}.sheet-body select{background:var(--md-sys-color-surface-container-highest);width:100%;min-height:48px;color:var(--md-sys-color-on-surface);border:1px solid var(--md-sys-color-outline);border-radius:8px;padding:0 12px}.dims-row{grid-template-columns:repeat(3,1fr);gap:8px;display:grid}.dims-row input{width:100%;min-width:0}.ar-overlay{z-index:100;pointer-events:none;flex-direction:column;justify-content:space-between;display:flex;position:fixed;inset:0}.ar-overlay>*{pointer-events:auto}.ar-info{background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface);font:var(--md-sys-typescale-body-medium);border-radius:16px;margin:12px;padding:10px 14px}.ar-actions{flex-wrap:wrap;justify-content:center;gap:8px;margin:12px;display:flex}
