:root{--bg:#f5f4ef;--surface:#fff;--surface-2:#efeee8;--ink:#15201e;--ink-2:#4c5a57;--muted:#74807d;--line:#dcdcd3;--accent:#0d7a6b;--accent-ink:#fff;--accent-soft:#d8efe9;--intact:#3fae52;--cracked:#e8a317;--fragmented:#e0463a;--partial:#9aa09e;--pore:#d63fd6;--error-bg:#fdecea;--error-ink:#9b2a20;--radius:14px;--shadow:0 1px 2px #141e1c0d, 0 6px 24px #141e1c0f;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased;font-family:IBM Plex Sans,system-ui,-apple-system,sans-serif}@media (prefers-color-scheme:dark){:root{--bg:#0d1312;--surface:#151d1c;--surface-2:#1c2625;--ink:#e7eeec;--ink-2:#b3c0bd;--muted:#82918e;--line:#2a3634;--accent:#43c9b0;--accent-ink:#062320;--accent-soft:#163a34;--error-bg:#3a1b18;--error-ink:#ffb3aa;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}body{background:var(--bg);min-width:320px;margin:0}h1,h2{letter-spacing:-.02em;line-height:1.15}a{color:var(--accent);text-decoration:none}button,input,select{font:inherit;color:inherit}.mono,td,.stat-value,.mini-value{font-variant-numeric:tabular-nums;font-family:IBM Plex Mono,ui-monospace,monospace}.muted{color:var(--muted)}.small{font-size:.85rem}.shell{flex-direction:column;max-width:1240px;min-height:100vh;margin:0 auto;padding:0 24px;display:flex}main{flex:1;padding:8px 0 48px}.topbar{justify-content:space-between;align-items:center;gap:16px;padding:20px 0;display:flex}.brand{color:var(--ink);align-items:center;gap:10px;font-size:1.15rem;font-weight:700;display:flex}.topbar nav{flex-wrap:wrap;align-items:center;gap:4px;display:flex}.topbar nav a{color:var(--ink-2);border-radius:999px;padding:8px 14px;font-weight:500}.topbar nav a.active{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}.topbar nav a.sheet-link{color:var(--accent)}footer{color:var(--muted);border-top:1px solid var(--line);padding:24px 0 32px;font-size:.8rem}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.primary,.button{background:var(--accent);color:var(--accent-ink);cursor:pointer;white-space:nowrap;border:none;border-radius:10px;justify-content:center;align-items:center;gap:8px;padding:11px 18px;font-weight:600;display:inline-flex}.primary{width:100%;margin-top:8px;padding:14px;font-size:1rem}.primary:disabled{opacity:.45;cursor:not-allowed}.button.ghost{color:var(--ink);border:1px solid var(--line);background:0 0}.link-button{color:var(--accent);cursor:pointer;background:0 0;border:none;padding:4px 0;font-weight:500}.segmented{background:var(--surface-2);border-radius:10px;flex-wrap:wrap;gap:2px;padding:3px;display:inline-flex}.segmented button{cursor:pointer;color:var(--ink-2);background:0 0;border:none;border-radius:8px;padding:8px 14px;font-weight:500}.upload-card .segmented{grid-template-columns:1fr 1fr;width:100%;display:grid}.segmented.small button{padding:5px 12px;font-size:.85rem}.segmented button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0000001f}.error{background:var(--error-bg);color:var(--error-ink);border-radius:10px;margin:12px 0;padding:12px 14px;font-size:.92rem}.analyze{grid-template-columns:minmax(0,1fr) minmax(0,480px);grid-template-areas:"hero upload""how upload";align-items:start;gap:24px 48px;padding-top:24px;display:grid}.hero{grid-area:hero}.upload-card{grid-area:upload}.how{grid-area:how}.eyebrow{color:var(--accent);text-transform:uppercase;letter-spacing:.08em;margin:0 0 12px;font-size:.85rem;font-weight:600}.hero h1{margin:0 0 16px;font-size:clamp(2rem,4.5vw,3.2rem)}.lede{color:var(--ink-2);max-width:560px;margin:0;font-size:1.1rem;line-height:1.6}.how h2{color:var(--muted);margin:8px 0 12px;font-size:1rem;font-weight:600}.how-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;display:grid}.how-grid div{border:1px solid var(--line);color:var(--ink-2);border-radius:12px;flex-direction:column;gap:4px;padding:14px;font-size:.88rem;line-height:1.4;display:flex}.how-grid b{color:var(--ink);font-size:.95rem}.dropzone{border:2px dashed var(--line);text-align:center;cursor:pointer;border-radius:12px;margin-bottom:20px;padding:32px 16px;transition:border-color .15s,background .15s}.dropzone:hover,.dropzone.dragging,.dropzone:focus-visible{border-color:var(--accent);background:var(--accent-soft);outline:none}.dropzone.has-file{border-style:solid;border-color:var(--accent)}.drop-icon{color:var(--accent);margin-bottom:8px}.file-name{word-break:break-all;margin-bottom:4px;font-weight:600}.field{flex-direction:column;gap:6px;margin-bottom:14px;display:flex}.field label{font-size:.88rem;font-weight:600}.field p{margin:0}.field input:not([type=file]),.field select{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:10px 12px}.field.attention input{border-color:var(--cracked);box-shadow:0 0 0 3px color-mix(in srgb, var(--cracked) 25%, transparent)}.advanced{border-top:1px solid var(--line);margin-top:10px;padding-top:14px}.steps{flex-direction:column;gap:6px;margin:16px 0 0;padding:0;font-size:.9rem;list-style:none;display:flex}.steps li{color:var(--muted);padding-left:24px;position:relative}.steps li:before{content:"";background:var(--line);border-radius:50%;width:8px;height:8px;position:absolute;top:6px;left:4px}.steps li.done{color:var(--ink-2)}.steps li.done:before{background:var(--accent)}.steps li.active{color:var(--ink);font-weight:600}.steps li.active:before{background:var(--accent);animation:1s ease-in-out infinite pulse}@keyframes pulse{50%{opacity:.5;transform:scale(1.6)}}.result-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px;display:flex}.filename{word-break:break-all;margin:6px 0 4px;font-size:1.6rem}.downloads{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.badge{border-radius:999px;padding:6px 12px;font-size:.82rem;font-weight:600}.badge.ok{background:var(--accent-soft);color:var(--accent)}.badge.wait{background:var(--surface-2);color:var(--ink-2)}.badge.bad{background:var(--error-bg);color:var(--error-ink)}.result-grid{grid-template-columns:minmax(0,1fr) 340px;align-items:start;gap:20px;margin-bottom:20px;display:grid}.viewer{padding:12px}.viewer-bar{justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;display:flex}.viewer-tools{align-items:center;gap:14px;display:flex}.check{color:var(--ink-2);cursor:pointer;align-items:center;gap:6px;display:inline-flex}.check input{accent-color:var(--accent)}.hint{margin:10px 2px 0}.stage-frame{background:#000;border-radius:8px;width:100%;position:relative;overflow:hidden}.stage{transform-origin:0 0;transition:transform .45s cubic-bezier(.2,.7,.2,1);position:absolute;inset:0}.stage img{-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.stage svg{width:100%;height:100%;position:absolute;inset:0}.outlines .fr{fill:#fff0;stroke-width:2px;cursor:pointer;pointer-events:all;transition:stroke-opacity .3s,fill .15s}.outlines .fr:hover{fill:#ffffff24}.outlines.has-focus .fr{stroke-opacity:.22}.outlines.has-focus .fr:hover{stroke-opacity:.7;fill:#ffffff14}.outlines .fr.is-selected{stroke-opacity:0}.fr.intact,.fr-focus.intact{stroke:var(--intact)}.fr.cracked,.fr-focus.cracked{stroke:var(--cracked)}.fr.fragmented,.fr-focus.fragmented{stroke:var(--fragmented)}.fr.partial,.fr-focus.partial{stroke:var(--partial)}.outlines .dim{fill:#000;opacity:0;pointer-events:none;transition:opacity .3s}.outlines.has-focus .dim{opacity:.68}.outlines .fr-focus{fill:#ffffff0a;stroke-width:3px;cursor:pointer;filter:drop-shadow(0 0 3px #ffffffd9)drop-shadow(0 0 8px #fff6);animation:.35s ease-out focus-in}@keyframes focus-in{0%{stroke-opacity:0}}.outlines .pores circle{fill:none;stroke:var(--pore);stroke-width:1px;opacity:.55;pointer-events:none}.outlines .pores.focused circle{opacity:1;stroke-width:1.5px}.focus-card{border-left:4px solid var(--partial);animation:.25s ease-out card-in}.focus-card.intact{border-left-color:var(--intact)}.focus-card.cracked{border-left-color:var(--cracked)}.focus-card.fragmented{border-left-color:var(--fragmented)}@keyframes card-in{0%{opacity:0;transform:translateY(-6px)}}.focus-head{justify-content:space-between;align-items:flex-start;gap:8px;display:flex}.focus-title{font-size:1.3rem;font-weight:600}.focus-nav{gap:4px;display:flex}.focus-nav button{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:8px;width:30px;height:30px;font-size:.95rem;line-height:1}.focus-nav button:hover{border-color:var(--accent);color:var(--accent)}.damage-pill{color:#fff;background:var(--partial);border-radius:999px;margin:10px 0 12px;padding:3px 10px;font-size:.8rem;font-weight:600;display:inline-block}.damage-pill.intact{background:var(--intact)}.damage-pill.cracked{background:var(--cracked);color:#2a1d00}.damage-pill.fragmented{background:var(--fragmented)}.focus-grid{grid-template-columns:1fr 1fr;gap:10px 14px;margin:0 0 10px;display:grid}.focus-grid dt{text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-size:.72rem;font-weight:600}.focus-grid dd{margin:2px 0 0;font-family:IBM Plex Mono,ui-monospace,monospace;font-size:.95rem}.focus-grid dd small{color:var(--muted);font-size:.72rem}.focus-card p{margin:0}img.sem{background:#000;border-radius:8px;width:100%;display:block}.legend,.bar-legend{color:var(--ink-2);flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:.82rem;display:flex}.sw{vertical-align:-1px;border-radius:3px;width:10px;height:10px;margin-right:6px;display:inline-block}.sw.intact,.bar .intact{background:var(--intact)}.sw.cracked,.bar .cracked{background:var(--cracked)}.sw.fragmented,.bar .fragmented{background:var(--fragmented)}.sw.partial,.bar .partial{background:var(--partial)}.sw.pore{background:var(--pore);border-radius:50%}.stats{flex-direction:column;gap:14px;display:flex}.stats .card{padding:16px}.stat-label{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:4px;font-size:.78rem;font-weight:600}.stat-value{font-size:2.6rem;font-weight:500;line-height:1.1}.stat-value.md{align-items:baseline;gap:8px;font-family:IBM Plex Sans,system-ui,sans-serif;font-size:1.5rem;font-weight:600;display:flex}.conf{color:var(--accent);font-family:IBM Plex Mono,monospace;font-size:.9rem;font-weight:500}.bar{background:var(--surface-2);border-radius:999px;gap:2px;height:10px;margin-top:14px;display:flex;overflow:hidden}.bar span{flex-basis:0}.bar-legend b{color:var(--ink);font-family:IBM Plex Mono,monospace;font-weight:500}.probs{flex-direction:column;gap:6px;margin-top:12px;display:flex}.prob{grid-template-columns:100px 1fr 40px;align-items:center;gap:8px;font-size:.82rem;display:grid}.prob .mono{text-align:right}.prob-track{background:var(--surface-2);border-radius:999px;height:6px;overflow:hidden}.prob-fill{background:var(--accent);border-radius:999px;height:100%}.mini-grid{grid-template-columns:1fr 1fr;gap:14px;display:grid}.mini-value{font-size:1.15rem}.mini-value small{color:var(--muted);font-size:.75rem}.notes{color:var(--ink-2);flex-direction:column;gap:6px;font-size:.84rem;line-height:1.45;display:flex}.tabs{border-bottom:1px solid var(--line);gap:4px;margin:-4px 0 14px;display:flex}.tabs button{color:var(--muted);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;margin-bottom:-1px;padding:10px 14px;font-weight:600}.tabs button.on{color:var(--ink);border-bottom-color:var(--accent)}.count{background:var(--surface-2);border-radius:999px;margin-left:4px;padding:1px 7px;font-family:IBM Plex Mono,monospace;font-size:.8rem;font-weight:400}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.84rem}th{text-align:left;color:var(--ink-2);border-bottom:1px solid var(--line);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;padding:8px 10px;font-weight:600}th.sorted{color:var(--accent)}td{border-bottom:1px solid var(--line);white-space:nowrap;padding:7px 10px}tbody tr:hover{background:var(--surface-2)}tbody tr.clickable{cursor:pointer}tbody tr.selected,tbody tr.selected:hover{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}td.dmg:before{content:"";border-radius:50%;width:8px;height:8px;margin-right:6px;display:inline-block}td.dmg-intact:before{background:var(--intact)}td.dmg-cracked:before{background:var(--cracked)}td.dmg-fragmented:before{background:var(--fragmented)}td.dmg-partial:before{background:var(--partial)}.pager{justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;display:flex}.pager button{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:8px;padding:6px 12px}.pager button:disabled{opacity:.4;cursor:default}.history-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;margin:16px 0 20px;display:flex}.history-head h1{margin:0 0 4px}.history-head p{margin:0}.run-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;display:grid}.run-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);color:var(--ink);box-shadow:var(--shadow);transition:transform .15s,border-color .15s;overflow:hidden}.run-card:hover{border-color:var(--accent);transform:translateY(-2px)}.run-card img{aspect-ratio:4/3;object-fit:cover;background:#000;width:100%;display:block}.run-meta{flex-direction:column;gap:3px;padding:12px 14px;display:flex}.run-name{white-space:nowrap;text-overflow:ellipsis;font-weight:600;overflow:hidden}.empty{text-align:center;padding:48px 20px}@media (width<=900px){.analyze{grid-template-columns:1fr;grid-template-areas:"hero""upload""how";padding-top:8px}.result-grid{grid-template-columns:1fr}}@media (width<=560px){.shell{padding:0 16px}.topbar{flex-direction:column;align-items:flex-start}.stat-value{font-size:2rem}}
