:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f3f3f3;background:#050505;font-synthesis:none;--bg: #050505;--surface: #151515;--raised: #202020;--accent: #dedede;--muted: #969696;--line: #ffffff16;--ring: #343434;color-scheme:dark}*{box-sizing:border-box}html[data-theme=sage]{--bg: #040c08;--surface: #101d15;--raised: #1d3023;--accent: #afd5a9;--ring: #254330}html[data-theme=violet]{--bg: #0c060f;--surface: #1b1320;--raised: #2c1f34;--accent: #c29bdd;--ring: #442951}body{margin:0;background:var(--bg);transition:background .25s}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button,input,select{touch-action:manipulation}button{min-height:44px}svg{flex-shrink:0}h1,h2,h3,p{margin:0}h1{font-size:27px;letter-spacing:-.8px}h2{font-size:19px;letter-spacing:-.4px}h3{font-size:16px;margin:22px 0 12px}p{line-height:1.6}.app{max-width:480px;margin:auto;padding:max(28px,env(safe-area-inset-top)) 22px calc(112px + env(safe-area-inset-bottom));min-height:100dvh}header{display:flex;align-items:center;justify-content:space-between;position:relative;height:70px}.brand{text-align:left;padding:0;display:flex;flex-direction:column;gap:5px}.brand>span{font-size:29px;letter-spacing:4px;font-weight:300;line-height:1;color:var(--accent);font-family:Arial,sans-serif;transform:scaleY(.75);transform-origin:left bottom}.brand small{font-size:13px;color:#c5c5c5;font-weight:400}.icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border-radius:50%}.add{height:49px;width:49px;background:linear-gradient(140deg,var(--raised),var(--surface));border:1px solid var(--line);color:var(--accent)}main{animation:enter .2s ease}.ring-section{position:relative;height:242px;margin:10px auto 4px;width:242px}.ring{width:100%;height:100%;overflow:visible}.ring circle{fill:none;stroke-width:17}.ring-track{stroke:var(--ring)}.ring-fill{stroke:var(--accent);stroke-linecap:round;transition:stroke-dasharray .65s,stroke .3s}.ring-label{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px}.ring-label strong{font-size:35px;letter-spacing:-1.4px}.ring-label strong span{font-size:23px;letter-spacing:-.5px;font-weight:500}.ring-label>span{font-size:13px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);margin:5px 0 32px}.metrics button{display:flex;flex-direction:column;align-items:center;gap:4px;position:relative;padding:7px 0}.metrics button+button:before{content:"";position:absolute;left:0;top:20px;height:48px;width:1px;background:var(--line)}.metrics svg{width:23px;height:23px;stroke-width:1.4;color:#ccc;margin-bottom:3px}.metrics strong{font-size:18px}.metrics span{font-size:12px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin:22px 0 15px;gap:12px}.section-heading>button{display:flex;align-items:center;gap:3px;font-size:12px;color:#c9c9c9;padding:0}.carousel{display:flex;overflow-x:auto;gap:9px;margin:0 -5px;padding:0 5px 8px;scroll-snap-type:x mandatory;scrollbar-width:none}.carousel::-webkit-scrollbar{display:none}.spool-card{min-width:0;text-align:left;padding:9px 11px 12px;background:linear-gradient(145deg,var(--raised),var(--surface) 68%);border:1px solid var(--line);border-radius:18px;display:flex;flex-direction:column;gap:3px;overflow:hidden;scroll-snap-align:start;transition:background .25s;flex:0 0 calc((100% - 18px) / 3)}.spool-card .spool-art{width:calc(100% + 16px);height:90px;margin:-3px -8px 0}.spool-card span,.spool-card strong{font-size:12px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.spool-card strong{font-weight:550}.progress-row{display:flex;align-items:center;gap:7px;margin-top:10px;width:100%}.track{height:8px;background:#ffffff16;border-radius:20px;flex:1;overflow:hidden}.track i{display:block;height:100%;background:var(--accent);border-radius:20px;transition:width .5s}.progress-row small{font-size:10px;white-space:nowrap}.dots{display:flex;justify-content:center;gap:7px;margin:13px}.dots i{width:7px;height:7px;border-radius:50%;background:var(--accent);opacity:.2}.dots i:first-child{opacity:1}nav{position:fixed;bottom:0;left:50%;transform:translate(-50%);width:min(100%,480px);padding:12px 16px max(16px,env(safe-area-inset-bottom));background:var(--surface);border-radius:24px 24px 0 0;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(3,1fr);z-index:10}nav button{display:flex;flex-direction:column;align-items:center;gap:6px;color:#b7b7b7;font-size:11px;padding:0}nav button.active{color:var(--accent)}nav button.active svg{fill:var(--accent);stroke:var(--surface)}.empty{padding:23px 8px;text-align:center;color:var(--muted)}.empty>.spool-art{height:110px;width:160px;opacity:.7}.empty>svg:not(.spool-art){color:var(--accent)}.empty h3{color:#f3f3f3;margin:10px 0;font-size:17px}.empty p{font-size:13px;max-width:280px;margin:auto auto 20px}.primary,.secondary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;border-radius:13px;padding:14px 15px;font-weight:600;font-size:14px;margin-top:20px;background:var(--accent);color:var(--bg);min-height:49px}.secondary{background:var(--raised);color:inherit;margin-top:10px}.empty .primary{max-width:260px;margin:18px auto 0}.menu-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;cursor:default}.action-menu{position:absolute;right:0;top:68px;z-index:21;width:220px;background:var(--raised);border:1px solid var(--line);padding:7px;border-radius:17px;box-shadow:0 15px 60px #0009;animation:enter .15s}.action-menu button{width:100%;display:flex;align-items:center;gap:13px;text-align:left;padding:12px;font-size:14px}.action-menu svg{width:18px;color:var(--accent)}.intro{color:var(--muted);font-size:14px;margin:10px 0 24px}.search,input,select{width:100%;border:1px solid var(--line);border-radius:11px;background:var(--surface);padding:13px;color:inherit;min-height:46px;font-size:16px}.search{font-size:13px}.segmented{display:flex;background:var(--surface);padding:4px;border-radius:12px;margin:16px 0 20px;gap:4px}.segmented button{flex:1;font-size:13px;border-radius:9px;min-height:36px;color:var(--muted)}.segmented .selected{background:var(--raised);color:var(--accent)}.inventory-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.inventory-grid .spool-art{height:130px}.inventory-grid .spool-card{padding:12px 16px}.inventory-grid .spool-card span,.inventory-grid .spool-card strong{font-size:14px}.project-group{margin-top:28px}.project-group h2{font-size:15px;margin-bottom:12px}.project-group h2 small{color:var(--muted);font-size:12px;margin-left:5px}.project-row{width:100%;padding:17px 12px;background:var(--surface);border-radius:14px;display:flex;gap:12px;align-items:center;margin-bottom:9px;text-align:left}.color-dot{height:28px;width:8px;border-radius:5px;box-shadow:inset 0 0 0 1px #fff2}.project-row>div{flex:1;min-width:0}.project-row strong{font-size:14px;display:block;overflow-wrap:anywhere}.project-row small{font-size:11px;color:var(--muted);display:block;margin-top:6px}.project-row>span:last-child{display:flex;align-items:center;gap:4px;font-size:12px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#000a;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:40;display:flex;align-items:flex-end;justify-content:center}.sheet{width:min(100%,480px);max-height:92dvh;overflow:auto;overscroll-behavior:contain;border-radius:26px 26px 0 0;background:var(--bg);border:1px solid var(--line);padding:10px 22px calc(24px + env(safe-area-inset-bottom));animation:slide .2s ease}.sheet-handle{width:34px;height:4px;border-radius:3px;background:#ffffff35;margin:0 auto 12px}.sheet-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:10px}.sheet-heading h2{overflow-wrap:anywhere}.sheet-heading button{background:var(--surface)}form{display:flex;flex-direction:column;gap:15px}label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#bcbcbc}input,select{color:#f3f3f3}input[type=color]{padding:5px}.form-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-pair label{min-width:0}.calculation{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:13px;margin:8px 0}.calculation>div{display:flex;justify-content:space-between;gap:12px;font-size:13px}.calculation span{color:var(--muted)}.calculation strong{text-align:right;font-weight:500}.help{font-size:12px;color:var(--muted);line-height:1.7}.warning{font-size:12px;color:#dfbb86;line-height:1.6}.available{display:flex;align-items:center;gap:7px;color:var(--accent);font-size:12px}.large.spool-art{width:100%;height:210px}.detail-sub{text-align:center;color:var(--muted);font-size:13px;margin:5px 0 12px}.detail-weight{text-align:center;font-size:30px;font-weight:600;margin-bottom:24px;letter-spacing:-1px}.detail-weight small{font-size:14px;color:var(--muted);margin-left:8px;letter-spacing:0}.button-grid{display:flex;gap:8px;margin:16px 0}.button-grid button{flex:1;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 5px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px}.button-grid svg{width:16px;height:16px}.danger{color:#e79b95}.history{display:flex;align-items:center;justify-content:space-between;padding:13px 0;gap:12px;border-bottom:1px solid var(--line);font-size:13px;width:100%;text-align:left}.history small{display:block;color:var(--muted);font-size:11px;margin-top:5px}.notice{display:flex;align-items:flex-start;gap:14px;background:var(--surface);padding:16px;border-radius:14px;margin:10px 0;font-size:13px}.notice svg{color:var(--accent);margin-top:4px}.themes{display:flex;flex-direction:column;gap:8px}.themes button{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid transparent;border-radius:12px;padding:14px;font-size:13px}.themes button.selected{border-color:var(--accent)}.themes i{width:16px;height:16px;border-radius:50%}.themes svg{margin-left:auto}.settings-row{display:flex;align-items:center;flex-direction:row;gap:12px;padding:15px;width:100%;border-bottom:1px solid var(--line);font-size:14px;color:inherit;cursor:pointer;min-height:50px}.settings-row svg{width:18px;color:var(--accent)}.upload input{display:none}footer{display:flex;gap:16px;align-items:center;margin-top:30px;padding-top:20px;border-top:1px solid var(--line)}footer img{width:60px;border-radius:14px}footer span{font-size:11px;line-height:1.7;color:var(--muted)}.error,.global-error{background:#461b1b;padding:14px;border-radius:12px;font-size:13px;line-height:1.6;margin-top:15px}.global-error{position:fixed;bottom:100px;left:20px;right:20px;z-index:60}.toast{position:fixed;bottom:calc(100px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%);display:flex;align-items:center;gap:10px;background:var(--raised);padding:13px 20px;border:1px solid var(--line);border-radius:30px;z-index:60;font-size:13px;box-shadow:0 5px 30px #0008}@keyframes enter{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes slide{0%{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1}}@media(min-width:700px){.app{border-inline:1px solid var(--line);padding-top:32px}.modal-backdrop{align-items:center}.sheet{border-radius:26px;max-height:90dvh}nav{border-inline:1px solid var(--line)}}@media(max-width:360px){.app{padding-inline:16px}.spool-card{padding-inline:8px}.progress-row{gap:4px}.ring-section{height:220px;width:220px}.metrics{margin-bottom:20px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}input[aria-invalid=true]{border-color:#c78179}.field-error{color:#dfaaa1;font-size:11px;line-height:1.5}
