:root{color:#111;--settings-surface:#1c1c1e;--settings-border:#ffffff1a;--settings-text:#ffffffeb;--settings-muted:#ffffff8c;--settings-accent:#0a84ff;background:#1a1a1a;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.4}*,:before,:after{box-sizing:border-box}html,body,#root{height:100%;margin:0;overflow:hidden}.app{height:100%}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.grid-wrap{touch-action:none;width:100%;height:100%;position:relative}.app-version-badge{z-index:2;letter-spacing:.04em;color:#ffffffb8;-webkit-backdrop-filter:blur(8px);pointer-events:none;-webkit-user-select:none;user-select:none;background:#00000061;border:1px solid #ffffff1f;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:600;position:absolute;top:10px;right:12px}.grid-canvas{cursor:grab;touch-action:none;width:100%;height:100%;display:block}.grid-toolbar{z-index:2;pointer-events:auto;flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:calc(100% - 24px);display:flex;position:absolute;bottom:12px;right:12px}.grid-settings-btn{color:#eee;cursor:pointer;-webkit-backdrop-filter:blur(12px)saturate(1.1);background:#1414146b;border:1px solid #ffffff52;border-radius:50%;justify-content:center;align-items:center;width:52px;min-width:52px;height:52px;min-height:52px;padding:0;font-size:15px;display:inline-flex;box-shadow:0 2px 12px #00000040}.grid-settings-gear{flex-shrink:0;display:block}.grid-settings-btn:hover{background:#323232eb}.modal-backdrop{z-index:100;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.modal-backdrop--blur{-webkit-backdrop-filter:blur(18px);background:#0000006b}.modal{--modal-radius:22px;border-radius:var(--modal-radius);width:100%;max-width:420px;max-height:90vh;overflow-y:auto;box-shadow:0 2px 8px #0000001f,0 8px 28px #0003,0 20px 56px #00000047}.modal-wide{max-width:min(540px,100%)}.settings-page--dark{background:var(--settings-surface);color:var(--settings-text);border:1px solid var(--settings-border)}.settings-page{flex-direction:column;max-height:min(92vh,900px);padding:0;display:flex;overflow:hidden}.settings-header{border-bottom:1px solid var(--settings-border);flex-shrink:0;justify-content:space-between;align-items:center;padding:16px 18px;display:flex}.settings-header h2{color:var(--settings-text);margin:0;font-size:1.2rem;font-weight:600}.settings-close{cursor:pointer;width:40px;height:40px;color:var(--settings-text);background:#ffffff14;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-size:24px;line-height:1;display:inline-flex}.settings-close:hover{background:#ffffff24}.settings-body{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;scrollbar-gutter:stable;scrollbar-color:#ffffff47 #0003;flex:1;padding:16px 18px 22px;overflow-y:auto}.settings-page--dark .settings-body::-webkit-scrollbar{width:10px}.settings-page--dark .settings-body::-webkit-scrollbar-track{background:#0003;border-radius:8px}.settings-page--dark .settings-body::-webkit-scrollbar-thumb{background:#ffffff40 padding-box content-box;border:2px solid #0000;border-radius:8px}.settings-page--dark .settings-body::-webkit-scrollbar-thumb:hover{background:#ffffff61 padding-box content-box}.settings-section{margin-bottom:22px}.settings-section h3{letter-spacing:.02em;text-transform:uppercase;color:var(--settings-muted);align-items:center;gap:10px;margin:0 0 8px;font-size:.82rem;font-weight:600;display:flex}.settings-section-icon{opacity:.9;color:var(--settings-text);flex-shrink:0}.settings-section-heading-text{min-width:0}.settings-subh{letter-spacing:.02em;text-transform:uppercase;color:var(--settings-muted);margin:18px 0 6px;font-size:.82rem;font-weight:600}.settings-section-heading[title] .settings-section-heading-text{cursor:help;text-underline-offset:4px;-webkit-text-decoration:underline dotted #fff3;text-decoration:underline dotted #fff3}.settings-hint{color:var(--settings-muted);margin:0 0 12px;font-size:.88rem;line-height:1.45}.row{flex-wrap:wrap;gap:12px 18px;margin-bottom:8px;display:flex}.row--dark label{color:var(--settings-text);font-size:.92rem}.row.toggles{flex-direction:column;gap:8px}.row.toggles label{color:var(--settings-text);font-size:.92rem}.btn-primary{background:var(--settings-accent);color:#fff;cursor:pointer;border:none;border-radius:10px;padding:10px 16px;font-size:14px;font-weight:500}.btn-primary:hover{filter:brightness(1.08)}.btn-ghost{border:1px solid var(--settings-border);color:var(--settings-text);cursor:pointer;background:#ffffff0f;border-radius:8px;margin-top:10px;padding:8px 12px;font-size:13px}.btn-ghost:hover{background:#ffffff1a}.preview-label--dark{border:1px solid var(--settings-border);border-radius:10px;margin:8px 0 0;padding:10px 14px;font-size:13px}.theme-carousel-host{margin:0;position:relative}.theme-carousel{scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;-ms-overflow-style:none;gap:8px;padding:6px 8px 8px;scroll-padding:0 12px;display:flex;overflow-x:auto}.theme-carousel:before,.theme-carousel:after{content:"";pointer-events:none;scroll-snap-align:none;flex:0 0 max(0px,50% - 42px);min-width:0}.theme-carousel::-webkit-scrollbar{display:none}.theme-carousel-card{scroll-snap-align:center;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:10px;flex-direction:column;flex:0 0 80px;align-items:stretch;gap:6px;width:80px;padding:0;transition:transform .32s cubic-bezier(.2,.85,.3,1);display:flex}@media (width>=420px){.theme-carousel-card{flex:0 0 88px;width:88px}}.theme-carousel-card--selected{z-index:1;transform:scale(1.05)}.theme-carousel-card--selected .theme-preview-thumb{outline:2px solid var(--settings-accent);outline-offset:2px}.theme-preview-thumb{aspect-ratio:1;border-radius:10px;width:100%;overflow:hidden;box-shadow:inset 0 0 0 1px #ffffff14}.theme-preview-surface{background-color:var(--tp-bg);background-image:linear-gradient(var(--tp-mm) .4px, transparent .4px), linear-gradient(90deg, var(--tp-mm) .4px, transparent .4px), linear-gradient(var(--tp-cm) 1px, transparent 1px), linear-gradient(90deg, var(--tp-cm) 1px, transparent 1px);background-size:8px 8px,8px 8px,32px 32px,32px 32px;border-radius:10px;width:100%;height:100%}.theme-carousel-dots{flex-wrap:wrap;justify-content:center;gap:6px 8px;max-width:100%;padding:4px 8px 0;display:flex}.theme-carousel-foot{justify-content:center;margin-top:8px;display:flex}.theme-customize-btn{text-align:center;justify-content:center;width:100%;max-width:320px}.theme-carousel-dot{cursor:pointer;background:#ffffff38;border:none;border-radius:50%;flex-shrink:0;width:6px;height:6px;padding:0;transition:background .15s,transform .15s}.theme-carousel-dot:hover{background:#fff6}.theme-carousel-dot--active{background:var(--settings-accent);transform:scale(1.2)}.theme-preview-name{color:var(--settings-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:11px;line-height:1.25;display:-webkit-box;overflow:hidden}.theme-carousel-card--selected .theme-preview-name{color:var(--settings-text)}.grid-settings-panel{background:0 0;border:none;flex-direction:column;gap:10px;padding:0;display:flex}.grid-settings-card,.settings-tile{--card-radius:16px;border-radius:var(--card-radius);border:1px solid var(--settings-border);background:#00000052;padding:12px 14px;box-shadow:0 1px 3px #00000026,0 6px 20px #0000001f}.settings-tile .origin-square-picker,.settings-tile .ruler-square-picker{justify-content:center}.settings-tile .calib-ruler-wrap{align-items:center;width:100%}.settings-tile .btn-ghost{align-self:flex-start;margin-top:8px}.theme-tile{padding:10px 10px 12px}.grid-settings-block{text-align:left;flex-direction:column;align-items:flex-start;width:100%;display:flex}.grid-settings-block--row{text-align:left;flex-direction:row;justify-content:space-between;align-items:center;gap:12px}.grid-settings-block-left{flex-direction:column;flex:1;align-items:flex-start;gap:8px;min-width:0;display:flex}.grid-settings-block-preview{flex-shrink:0;align-self:center}.grid-style-preview{background:var(--gp-bg,#333);border-radius:12px;width:64px;height:64px;overflow:hidden;box-shadow:inset 0 0 0 1px #ffffff1a}.grid-style-preview--lines{background-color:var(--gp-bg,#1a1a2e);background-image:linear-gradient(var(--gp-mm) .4px, transparent .4px), linear-gradient(90deg, var(--gp-mm) .4px, transparent .4px), linear-gradient(var(--gp-cm) 1px, transparent 1px), linear-gradient(90deg, var(--gp-cm) 1px, transparent 1px);background-size:8px 8px,8px 8px,32px 32px,32px 32px}.grid-style-preview--dots{background-color:var(--gp-bg,#1a1a2e);background-image:radial-gradient(circle, var(--gp-cm) .55px, transparent .65px);background-position:0 0;background-size:7px 7px}.grid-settings-block-title{color:var(--settings-muted);text-transform:uppercase;letter-spacing:.06em;text-align:left;width:100%;margin:0;font-size:.72rem;font-weight:600}.grid-settings-block--switches{flex-direction:column;align-items:stretch;gap:14px;width:100%;display:flex}.grid-settings-card .ios-segment{background:#ffffff14;border-radius:10px;justify-content:flex-start;align-self:flex-start;gap:2px;width:100%;max-width:320px;margin:0;padding:3px;display:flex}.ios-segment-btn{color:#fff9;cursor:pointer;background:0 0;border:none;border-radius:8px;flex:1;padding:9px 12px;font-size:14px;font-weight:500;transition:background .15s,color .15s}.ios-segment-btn:hover{color:#ffffffe0}.ios-segment-btn--active{color:#fff;background:#ffffff24;box-shadow:0 1px 3px #0003}.ios-switch-row{justify-content:space-between;align-items:center;gap:12px;min-height:36px;display:flex}.ios-switch-row-label{color:var(--settings-text);flex:1;font-size:14px;line-height:1.4}.ios-switch{cursor:pointer;background:#ffffff24;border:none;border-radius:16px;flex-shrink:0;width:51px;height:31px;transition:background .2s;position:relative}.ios-switch[aria-checked=true]{background:#34c759}.ios-switch:after{content:"";background:#fff;border-radius:50%;width:27px;height:27px;transition:transform .2s cubic-bezier(.2,.8,.2,1);position:absolute;top:2px;left:2px;box-shadow:0 2px 6px #00000040}.ios-switch[aria-checked=true]:after{transform:translate(20px)}.ios-switch:focus-visible{outline:2px solid var(--settings-accent);outline-offset:3px}.ios-segment-btn:focus-visible{outline:2px solid var(--settings-accent);outline-offset:1px}.origin-square-picker{justify-content:center;padding:8px 0;display:flex}.origin-square-frame{border:2px solid #ffffff38;border-radius:8px;width:132px;height:132px;margin:8px 0;position:relative}.origin-square-frame:before,.origin-square-frame:after{content:"";pointer-events:none;z-index:0;background:#ffffff1f;position:absolute}.origin-square-frame:before{width:1px;top:8px;bottom:8px;left:50%;transform:translate(-50%)}.origin-square-frame:after{height:1px;top:50%;left:8px;right:8px;transform:translateY(-50%)}.origin-radio{z-index:1;cursor:pointer;justify-content:center;align-items:center;width:28px;height:28px;margin:0;display:flex;position:absolute}.origin-radio input{opacity:0;width:0;height:0;position:absolute}.origin-radio-dot{background:#00000059;border:2px solid #ffffff59;border-radius:50%;width:22px;height:22px;transition:border-color .15s,background .15s,box-shadow .15s}.origin-radio input:focus-visible+.origin-radio-dot{box-shadow:0 0 0 3px #0a84ff73}.origin-radio input:checked+.origin-radio-dot{border-color:var(--settings-accent);background:#0a84ff59;box-shadow:0 0 0 2px #0a84ff40}.origin-radio--topLeft{top:0;left:0;transform:translate(-50%,-50%)}.origin-radio--topRight{top:0;right:0;transform:translate(50%,-50%)}.origin-radio--bottomLeft{bottom:0;left:0;transform:translate(-50%,50%)}.origin-radio--bottomRight{bottom:0;right:0;transform:translate(50%,50%)}.origin-radio--center{top:50%;left:50%;transform:translate(-50%,-50%)}.ruler-square-picker{justify-content:center;padding:8px 0;display:flex}.ruler-square-frame{border:2px dashed #ffffff2e;border-radius:8px;width:132px;height:132px;margin:8px 0;position:relative}.ruler-edge{cursor:pointer;justify-content:center;align-items:center;display:flex;position:absolute}.ruler-edge input{opacity:0;width:0;height:0;position:absolute}.ruler-edge-tick{letter-spacing:.04em;text-transform:uppercase;min-width:28px;color:var(--settings-muted);background:#00000040;border:1px solid #fff3;border-radius:6px;padding:4px 8px;font-size:10px;font-weight:600}.ruler-edge input:checked+.ruler-edge-tick{color:#fff;border-color:var(--settings-accent);background:#0a84ff59}.ruler-edge--top{top:0;left:50%;transform:translate(-50%,-50%)}.ruler-edge--bottom{bottom:0;left:50%;transform:translate(-50%,50%)}.ruler-edge--left{top:50%;left:0;transform:translate(-50%,-50%)}.ruler-edge--right{top:50%;right:0;transform:translate(50%,-50%)}.calib-ruler-wrap{flex-direction:column;align-items:center;margin:12px 0 8px;display:flex}.calib-ruler-wrap--plain .calib-ruler{box-shadow:none;background:0 0;border:none;border-radius:0}.calib-ruler{box-sizing:border-box;height:44px;position:relative}.calib-ruler-line{background:var(--settings-accent);border-radius:1px;height:2px;position:absolute;bottom:6px;left:0;right:0}.calib-tick--mm,.calib-tick--half,.calib-tick--cm{position:absolute;bottom:6px;transform:translate(-50%)}.calib-tick--mm{pointer-events:none;width:0;height:0;overflow:visible}.calib-tick--mm:before{content:"";background:var(--settings-accent);opacity:.45;border-radius:.5px;width:1px;height:5px;position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.calib-tick--half:before{content:"";background:var(--settings-accent);opacity:.75;border-radius:.5px;width:1.5px;height:10px;position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.calib-tick--cm{color:var(--settings-accent);font-size:11px;font-weight:600}.calib-tick--cm:before{content:"";background:var(--settings-accent);border-radius:1px;width:2px;height:14px;position:absolute;bottom:100%;left:50%;transform:translate(-50%)}.calib-caption{color:var(--settings-muted);margin:10px 0 0;font-size:12px}.calib-slider-label{color:var(--settings-text);flex-direction:column;gap:10px;margin-top:4px;font-size:.9rem;font-weight:600;display:flex}.calib-slider-label input[type=range]{width:100%;accent-color:var(--settings-accent)}.file-input-hidden{opacity:0;pointer-events:none;width:0;height:0;position:absolute}.app-toast{z-index:200;color:#eee;text-align:center;border:1px solid var(--settings-border);background:#1e1e1ef2;border-radius:10px;max-width:min(90vw,400px);padding:10px 16px;font-size:13px;position:fixed;bottom:20px;left:50%;transform:translate(-50%);box-shadow:0 4px 24px #00000073}.row--actions{flex-flow:wrap;justify-content:flex-start;gap:10px;margin-top:0}.row--actions .btn-ghost{min-width:120px}.view-toggles{flex-direction:column;gap:4px;margin:4px 0 12px;display:flex}.view-reset-wrap{justify-content:center;width:100%;margin-top:10px;display:flex}.view-reset{width:auto;min-width:220px;max-width:360px;margin:0}.export-tile{flex-direction:column;gap:10px;min-width:0;display:flex}.export-main-row{-webkit-overflow-scrolling:touch;flex-flow:row;align-items:center;gap:12px;width:100%;min-width:0;padding-bottom:2px;display:flex;overflow:auto visible}.export-block{flex-direction:column;gap:10px;margin-top:6px;display:flex}.export-label{color:var(--settings-muted);flex-direction:column;gap:6px;font-size:.86rem;display:flex}.export-label.export-label--inline,label.export-label.export-label--inline{flex-direction:row;flex:1 1 0;align-items:center;gap:10px;min-width:0;margin:0}.export-inline-label{color:var(--settings-muted);white-space:nowrap;flex-shrink:0;font-size:.86rem;font-weight:500;line-height:1.2}.export-label.export-label--inline .export-select,label.export-label--inline .export-select{flex:auto;min-width:0;max-width:100%;height:36px;line-height:1.2}.export-label input[type=number],.export-select{border:1px solid var(--settings-border);color:var(--settings-text);background:#0000004d;border-radius:8px;padding:8px 10px;font-size:14px}.row--export-custom{flex-wrap:wrap;align-items:flex-end;gap:10px 14px;display:flex}.export-unit{background:#ffffff14;border-radius:8px;gap:2px;padding:2px;display:flex}.export-unit .ios-segment-btn{padding:6px 12px;font-size:13px}.export-main-row .export-run{white-space:nowrap;flex:none;height:36px;padding-left:14px;padding-right:14px}.export-hint{margin:0;font-size:.8rem}.bmc-block{justify-content:center;align-items:center;margin-top:8px;display:flex}.bmc-wrap{flex-direction:column;justify-content:center;align-items:center;gap:10px;min-height:44px;display:flex}.bmc-script-host{flex-wrap:wrap;justify-content:center;gap:8px;width:100%;min-height:0;display:flex}.bmc-styled-link{border:1px solid var(--settings-border);color:var(--settings-text);background:#ffffff14;border-radius:999px;justify-content:center;align-items:center;gap:8px;padding:10px 18px;font-size:14px;font-weight:600;text-decoration:none;display:inline-flex}.bmc-styled-link:hover{background:#ffffff1f}.bmc-emoji{font-size:1.1rem;line-height:1}.modal--customize{max-width:min(400px,100%);max-height:85vh;overflow:hidden}.modal--customize-layout{flex-direction:column;max-height:min(86vh,700px);display:flex}.customize-body{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.customize-form-scroll{flex-direction:column;flex:1;gap:12px;min-height:0;padding:12px 18px 10px;display:flex;overflow-y:auto}.customize-color-row{grid-template-columns:minmax(24px,1fr) 40px 1fr;align-items:center;gap:10px 12px;min-width:0;display:grid}.customize-line-preview{background:#888;border-radius:2px;min-width:0;height:3px;display:block}.customize-swatch{appearance:none;cursor:pointer;box-sizing:border-box;background:#333;border:2px solid #ffffff59;border-radius:50%;width:40px;min-width:40px;height:40px;min-height:40px;padding:0}.customize-swatch::-webkit-color-swatch-wrapper{padding:0}.customize-swatch::-webkit-color-swatch{border:none;border-radius:50%}.customize-swatch:focus-visible{outline:2px solid var(--settings-accent);outline-offset:2px}.customize-color-label{color:var(--settings-muted);min-width:0;font-size:.86rem}.customize-label{color:var(--settings-muted);flex-direction:column;gap:6px;font-size:.86rem;display:flex}.customize-label input[type=number]{border:1px solid var(--settings-border);color:var(--settings-text);background:#0000004d;border-radius:8px;padding:8px 10px}.customize-actions-bar{border-top:1px solid var(--settings-border);background:var(--settings-surface);z-index:1;flex-shrink:0;gap:10px;margin:0;padding:12px 18px 16px;display:flex;position:sticky;bottom:0;box-shadow:0 -8px 20px #00000059}.customize-action-btn{border-radius:10px;flex:1 1 0;justify-content:center;align-items:center;min-width:0;min-height:48px;font-size:15px;font-weight:600;display:flex}
