/* Worker screen. Mobile first, one primary action per screen; light and dark share the tokens below. */
@font-face{font-family:"SUIT Variable";font-weight:100 900;font-style:normal;font-display:swap;
 src:url("/fonts/SUIT-Variable.woff2") format("woff2-variations"),url("/fonts/SUIT-Variable.woff2") format("woff2")}
:root{
 color-scheme:light;
 --accent:#d70034;--accent-press:#b3002b;--accent-text:#d70034;--accent-weak:#fdecf0;--on-accent:#fff;
 --bg:#fff;--bg-soft:#f3f4f6;--bg-strong:#e4e7eb;--text:#191f28;--text-2:#4e5968;--text-3:#68717d;
 --ok:#0a7f46;--ok-weak:#e6f5ec;--warn:#a85500;--warn-weak:#fff3e2;--bad:#d70034;--bad-weak:#fdecf0;
 --sheet:#fff;--scrim:rgba(17,18,20,.45);--toast:#191f28;--toast-text:#fff;--hmi:#2b3038;--hmi-line:#5b6574;
 --card-line:#e5e8eb;--mark:rgba(215,0,52,.18);
 --r:16px;--pad:24px;--max:560px;
 --font:"SUIT Variable","SUIT",-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic","Noto Sans KR",Roboto,sans-serif;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
 color-scheme:dark;
 --accent-press:#ee1a50;--accent-text:#ff6a8a;--accent-weak:#3b1520;
 --bg:#111214;--bg-soft:#1d1f23;--bg-strong:#2c2f35;--text:#f1f3f5;--text-2:#c4cad1;--text-3:#9ba3ad;
 --ok:#45d08f;--ok-weak:#13301f;--warn:#ffb54d;--warn-weak:#33260f;--bad:#ff6a8a;--bad-weak:#3b1520;
 --sheet:#1d1f23;--scrim:rgba(0,0,0,.6);--card-line:#2c2f35;--mark:rgba(255,106,138,.3);--toast:#f1f3f5;--toast-text:#111214;--hmi:#2c2f35;--hmi-line:#6b7686;
}}
:root[data-theme="dark"]{
 color-scheme:dark;
 --accent-press:#ee1a50;--accent-text:#ff6a8a;--accent-weak:#3b1520;
 --bg:#111214;--bg-soft:#1d1f23;--bg-strong:#2c2f35;--text:#f1f3f5;--text-2:#c4cad1;--text-3:#9ba3ad;
 --ok:#45d08f;--ok-weak:#13301f;--warn:#ffb54d;--warn-weak:#33260f;--bad:#ff6a8a;--bad-weak:#3b1520;
 --sheet:#1d1f23;--scrim:rgba(0,0,0,.6);--card-line:#2c2f35;--mark:rgba(255,106,138,.3);--toast:#f1f3f5;--toast-text:#111214;--hmi:#2c2f35;--hmi-line:#6b7686;
}

*{box-sizing:border-box;margin:0}
[hidden]{display:none!important}
html,body{height:100%}
html{background:var(--bg);-webkit-text-size-adjust:100%}
/* word-level wrapping for Korean; sentences are put on their own line in app.js */
body{overflow:hidden;font:17px/1.6 var(--font);letter-spacing:-.01em;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;word-break:keep-all;overflow-wrap:break-word}
h1,h2,.title,.sheet-title{text-wrap:balance}
p,small{text-wrap:pretty}
button,input{font:inherit;color:inherit;letter-spacing:inherit}
button{background:none;border:0;padding:0;cursor:pointer;text-align:inherit}
img{display:block;max-width:100%}
ul{list-style:none;padding:0}
:focus-visible{outline:3px solid var(--accent-text);outline-offset:2px}
h1[tabindex="-1"]:focus{outline:none}
.sr-only{position:absolute!important;top:0;left:0;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;opacity:0;pointer-events:none}
.ic{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* App shell: the page never scrolls; only the content between the bar and the actions does, and only when it has to.
   clip, not hidden: the sliding step must not widen the mobile layout viewport. */
.app{position:fixed;top:0;left:0;right:0;max-width:var(--max);height:100vh;height:100dvh;height:var(--vvh,100dvh);margin:0 auto;transform:translateY(var(--vvt,0px));display:flex;flex-direction:column;overflow-x:clip}
.bar{flex:none;display:flex;align-items:center;justify-content:space-between;min-height:60px;padding:env(safe-area-inset-top) 12px 0}
.bar-left{display:flex;align-items:center;gap:2px;min-width:0}
.bar-logo{height:44px;padding:0 8px;display:grid;place-items:center;border-radius:12px}
.bar-logo img{height:20px;width:auto}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) :is(.bar-logo img,.cb-dellics){filter:invert(1) hue-rotate(180deg)}:root:not([data-theme="light"]) .on-light{display:none}:root:not([data-theme="light"]) .on-dark{display:block}}
:root[data-theme="dark"] :is(.bar-logo img,.cb-dellics){filter:invert(1) hue-rotate(180deg)}:root[data-theme="dark"] .on-light{display:none}:root[data-theme="dark"] .on-dark{display:block}
.bar-btn{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;color:var(--text)}
.bar-btn .ic{width:26px;height:26px}
.avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--bg-soft);color:var(--text-2);font-weight:700;font-size:16px}
.avatar.lg{width:56px;height:56px;font-size:22px}
.body{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;padding:8px var(--pad) 32px;scroll-padding:24px 0}
.body>*{flex-shrink:0}
.cta{position:relative;flex:none;display:flex;flex-wrap:wrap;gap:8px;padding:12px 20px calc(16px + env(safe-area-inset-bottom));background:var(--bg)}
.cta-hint{flex-basis:100%;font-size:14px;color:var(--text-3)}
.cta .search{flex-basis:100%;margin:0}
.cta::before{content:"";position:absolute;left:0;right:0;top:-24px;height:24px;background:linear-gradient(to top,var(--bg),transparent);pointer-events:none}
.boot,.loading{flex:1;display:grid;place-items:center}
.spinner{width:32px;height:32px;border-radius:50%;border:3px solid var(--bg-strong);border-top-color:var(--accent);animation:spin .8s linear infinite,fade-in .2s .25s both}
.center{flex:1;display:flex;flex-direction:column;justify-content:center;padding:24px 0}

.btn{flex:1;min-width:0;min-height:56px;padding:0 12px;border-radius:var(--r);display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:17px;font-weight:700;text-align:center;white-space:nowrap;transition:transform .1s,background-color .15s,opacity .15s}
.btn:active{transform:scale(.98)}
.btn.primary{flex:1.6;background:var(--accent);color:var(--on-accent)}
.btn.primary:active{background:var(--accent-press)}
.btn.secondary{background:var(--bg-soft);color:var(--text)}
.btn.text{min-height:48px;color:var(--text-2);font-weight:600}
.btn.small{min-height:44px;font-size:15px;padding:0 4px}
.btn.small .ic{width:18px;height:18px}
.btn.block{flex-basis:100%;width:100%}
.btn[disabled]{opacity:.38;cursor:default;transform:none}
@media (hover:hover){.btn.secondary:hover{background:var(--bg-strong)}.btn.text:hover{color:var(--text)}}

/* type and rhythm */
.title{margin-top:20px;font-size:26px;line-height:1.4;font-weight:700;letter-spacing:-.025em}
.lead{margin-top:10px;font-size:17px;color:var(--text-2)}
.hello{margin-top:12px;font-size:16px;font-weight:600;color:var(--text-2)}
.crumb{margin-top:12px;font-size:15px;font-weight:600;color:var(--text-3)}
.h2{margin:48px 0 12px;font-size:19px;font-weight:700;letter-spacing:-.02em}
.section-label{margin:48px 0 8px;font-size:15px;font-weight:600;color:var(--text-3)}
.field-label{margin:28px 0 12px;font-size:15px;font-weight:600;color:var(--text-3)}
.footnote{margin-top:20px;font-size:15px;color:var(--text-3)}
.empty{margin:40px 0;text-align:center;color:var(--text-3)}
.others-entry{display:flex;flex-wrap:wrap;gap:8px;margin-top:28px;padding-top:20px;border-top:1px solid var(--card-line)}
.others-entry .cta-hint{text-align:center}
/* notices: an icon and plain text, never text on a tinted box */
.hint{margin-top:28px;display:flex;gap:10px;align-items:flex-start;font-size:15px;color:var(--text-2)}
.hint .ic{width:20px;height:20px;margin-top:2px;color:var(--warn)}

/* lists: thin gray cards; the chosen one is outlined in the accent */
/* minmax(0,1fr): a card never grows past the screen because of one long spec line (it is cut with an ellipsis instead) */
.list{margin-top:32px;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.section-label + .list,.search + .list{margin-top:16px}
.section-label.op{margin-top:28px}  /* 공정 headers between the equipment of one line */
.crumb + .title + .search,.crumb + .title + section .section-label.op{margin-top:24px}
.row,.banner{width:100%;min-height:80px;display:flex;align-items:center;gap:16px;padding:16px 18px;border-radius:18px;background:var(--bg);box-shadow:inset 0 0 0 1px var(--card-line);text-align:left;transition:box-shadow .15s,background-color .15s}
.row:active,.banner:active,.row[aria-current="true"],.banner[aria-current="true"]{box-shadow:inset 0 0 0 2px var(--accent)}
@media (hover:hover){.row:hover,.banner:hover{background:var(--bg-soft)}}
.row-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.row-main b{font-size:18px;font-weight:700;line-height:1.4}
.row-main small{font-size:15px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-side{font-size:15px;color:var(--text-3);white-space:nowrap}
.chev{width:20px;height:20px;color:var(--text-3)}
.tno{flex:none;min-width:52px;height:52px;padding:0 6px;border-radius:14px;display:grid;place-items:center;background:var(--bg-soft);font-weight:800;font-size:17px;letter-spacing:-.02em}
/* status: colored text only */
.pill,.state{flex:none;font-size:15px;font-weight:700;white-space:nowrap;color:var(--text-2)}
.pill.ok,.state.ok{color:var(--ok)}.pill.warn,.state.warn{color:var(--warn)}.pill.bad,.state.bad{color:var(--bad)}.pill.muted,.state.muted{color:var(--text-3)}
.search{display:flex;align-items:center;gap:10px;height:52px;margin:8px 0 12px;padding:0 16px;border-radius:var(--r);background:var(--bg-soft);color:var(--text-3)}
.search input{flex:1;min-width:0;height:100%;border:0;background:transparent;outline:0;color:var(--text);font-size:17px}
.search:focus-within{outline:2px solid var(--accent-text)}
.lead + .search,.title + .search{margin-top:32px}
/* history: period chips (scroll sideways on narrow phones) + search */
.filters{display:flex;gap:8px;margin:28px calc(var(--pad)*-1) 0;padding:2px var(--pad);overflow-x:auto;scrollbar-width:none}
.filters::-webkit-scrollbar{display:none}
.filters .chip{flex:none;min-height:44px;padding:0 14px;font-size:15px}
.chip[aria-pressed="true"],.date-chip.on{background:var(--accent);color:var(--on-accent)}
.date-chip{position:relative;display:inline-flex;align-items:center;cursor:pointer}
.date-chip input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.filters + .search{margin-top:16px}
.day-label{margin-top:12px;font-size:14px;font-weight:700;color:var(--text-3)}
.list .day-label:first-child{margin-top:0}
.banner{margin-top:32px}
.banner-icon{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--accent-weak);color:var(--accent-text)}
.banner-icon .ic{width:22px;height:22px}
.banner-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.banner-main b{font-size:17px;line-height:1.4}
.banner-main small{font-size:15px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* login: logo and line centred, the whole group in the middle of the screen */
.login .login-logo{width:72px;height:auto;margin:0 auto}  /* 72 px is the logo's own width; a larger source file would stay sharp */
.login .title{margin-top:24px;text-align:center;font-size:24px}
.login-sub{margin-top:10px;text-align:center;font-size:14px;color:var(--text-3)}
.cobrand{flex-basis:100%;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:10px;font-size:13px;color:var(--text-3)}
.cobrand .cb-dellics{height:18px;width:auto}
.cobrand .cb-4inlab{height:15px;width:auto}
.on-dark{display:none}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .login-logo{filter:invert(1) hue-rotate(180deg)}}
:root[data-theme="dark"] .login-logo{filter:invert(1) hue-rotate(180deg)}
/* forms */
.form{margin-top:40px;display:grid;gap:24px}
.input-wrap{position:relative;display:block}
.input-wrap input{width:100%;padding-right:56px}
.reveal{position:absolute;top:4px;right:4px;width:48px;height:48px;display:grid;place-items:center;border-radius:12px;color:var(--text-3)}
.reveal[aria-pressed="true"]{color:var(--text)}
.field{display:grid;gap:10px}
.field span{font-size:15px;font-weight:600;color:var(--text-2)}
.field input{height:56px;padding:0 16px;border:0;border-radius:var(--r);background:var(--bg-soft);font-size:18px;outline:2px solid transparent;transition:outline-color .15s,background-color .15s}
.field input:focus{outline-color:var(--accent-text);background:var(--bg)}
.form-msg{font-size:15px;font-weight:600}
.form-msg.error{color:var(--bad)}.form-msg.info{color:var(--ok)}

/* capture */
.target{width:100%;margin-top:16px;display:flex;align-items:center;gap:12px;padding:12px 16px 12px 12px;border-radius:var(--r);background:var(--bg-soft);text-align:left}
.target .tno{min-width:44px;height:44px;border-radius:12px;background:var(--bg);font-size:15px}
.target-main{flex:1;min-width:0;display:flex;flex-direction:column}
.target-main b{font-size:16px}
.target-main small{font-size:14px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.target-change{font-size:15px;font-weight:700;color:var(--accent-text)}
.target + .title{margin-top:36px}
.guide{display:block;width:100%;max-width:320px;margin:auto;padding:32px 0 8px;color:var(--text-3)}
.g-corner{fill:none;stroke:var(--accent);stroke-width:4;stroke-linecap:round}
.g-hmi{fill:var(--hmi)}.g-row{fill:none;stroke:var(--accent);stroke-width:3}
.g-sticker{fill:var(--bg);stroke:var(--text-3);stroke-width:2}
.g-line{stroke:var(--hmi-line);stroke-width:5;stroke-linecap:round}
.g-sticker + .g-line{stroke:var(--text-3);stroke-width:4}
.g-text{fill:var(--text-3);font:600 13px var(--font)}
.tips{margin-top:12px;display:grid;gap:12px;color:var(--text-2);font-size:16px}
.tips li{display:flex;gap:10px;align-items:flex-start}
.tips .ic{width:20px;height:20px;margin-top:2px;color:var(--ok);stroke-width:2.6}

/* AI reading, then a short "done" mark before the result */
.reading{align-items:center;text-align:center}
.reading-photo{position:relative;width:184px;height:184px;border-radius:36px;overflow:hidden;background:var(--bg-soft)}
.reading-photo img{width:100%;height:100%;object-fit:cover;opacity:.75;transition:opacity .3s}
.scan{position:absolute;left:0;right:0;top:0;height:45%;background:linear-gradient(to bottom,transparent,rgba(215,0,52,.42),transparent);animation:scan 1.9s ease-in-out infinite}
.reading .title{margin-top:40px;font-size:32px}
.reading .lead{min-height:54px}
.reading .btn{margin-top:16px}
.reading-done{position:absolute;inset:0;display:grid;place-items:center;opacity:0}
.reading-done span{width:80px;height:80px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--on-accent);transform:scale(.6)}
.reading-done .ic{width:42px;height:42px;stroke-width:2.8;stroke-dasharray:24;stroke-dashoffset:24}
.reading.finished .scan{display:none}
.reading.finished .reading-photo img{opacity:.3}
.reading.finished .reading-done{opacity:1;transition:opacity .15s}
.reading.finished .reading-done span{animation:pop-in .4s cubic-bezier(.2,.9,.3,1.3) forwards}
.reading.finished .reading-done .ic{animation:draw .4s .18s ease-out forwards}

/* result */
.verdict{margin-top:32px;animation:rise .36s cubic-bezier(.2,.8,.2,1) both}
.verdict .title{margin-top:0}
/* half highlighter (greeting name, verdict); accent by default, the result's color on a verdict; it sweeps in once */
.mark{padding:0 2px;background:linear-gradient(to top,var(--mark) 40%,transparent 40%) no-repeat 0 0/0 100%;
 -webkit-box-decoration-break:clone;box-decoration-break:clone;animation:mark-in .5s .3s cubic-bezier(.2,.8,.2,1) forwards}
.verdict.muted{--mark:transparent}
.verdict.ok{--mark:rgba(10,127,70,.2)}.verdict.warn{--mark:rgba(255,166,0,.34)}.verdict.bad{--mark:rgba(215,0,52,.2)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .verdict.ok{--mark:rgba(69,208,143,.3)}:root:not([data-theme="light"]) .verdict.warn{--mark:rgba(255,181,77,.32)}:root:not([data-theme="light"]) .verdict.bad{--mark:rgba(255,106,138,.32)}}
:root[data-theme="dark"] .verdict.ok{--mark:rgba(69,208,143,.3)}:root[data-theme="dark"] .verdict.warn{--mark:rgba(255,181,77,.32)}:root[data-theme="dark"] .verdict.bad{--mark:rgba(255,106,138,.32)}
@keyframes mark-in{to{background-size:100% 100%}}
.photo{position:relative;display:block;width:100%;margin-top:36px;border-radius:var(--r);overflow:hidden;background:var(--bg-soft)}
.boxed{position:relative;width:100%;height:min(52dvh,420px)}
.boxed img,.boxed svg{position:absolute;inset:0;width:100%;height:100%}
.boxed img{object-fit:contain}
.boxed rect{fill:none}
.box-sticker rect{stroke:#ef8c18}.box-hmi rect{stroke:#04af82}
.boxed text{font-family:var(--font);font-weight:800;paint-order:stroke;stroke:rgba(0,0,0,.7)}
.box-sticker text{fill:#ffb54d}.box-hmi text{fill:#41e0b0}
.photo-zoom{position:absolute;right:10px;bottom:10px;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.55);color:#fff}
.photo-zoom .ic{width:20px;height:20px}
.evidence{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.shot{position:relative;aspect-ratio:4/3;border-radius:var(--r);overflow:hidden;background:var(--bg-soft);display:grid;place-items:center}
.shot img{width:100%;height:100%;object-fit:contain}
.shot span{position:absolute;left:8px;top:8px;padding:3px 8px;border-radius:8px;background:rgba(0,0,0,.6);color:#fff;font-size:13px;font-weight:700}
.img-error{padding:12px;text-align:center;font-size:14px;color:var(--text-3)}
.compare li{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 0}
.compare .k{flex:none;width:92px;font-size:15px;color:var(--text-3)}
.compare .v{flex:1;min-width:0;font-size:17px;font-weight:700}
.compare .v small{display:block;font-size:14px;font-weight:500;color:var(--text-3)}
.none{color:var(--text-3)}
.fix-hint{margin-top:12px;font-size:15px;color:var(--text-3)}
.fix-hint + .fix-hint{margin-top:0}
.link{display:inline-block;padding:10px 2px;color:var(--accent-text);font-weight:700;text-decoration:underline;text-underline-offset:4px}
/* target sheet on the result: tools grouped by equipment, search on top */
.sheet .search{margin:20px 0 0}
.sheet [data-group] .field-label{margin:24px 0 10px}
.sheet [data-group] .list{margin-top:0}
/* move sheet: the candidate tools, the chosen one outlined */
.move-options{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.row[aria-checked="true"]{box-shadow:inset 0 0 0 2px var(--accent)}
/* correction sheet: values that cannot be changed are shown frozen, not as boxes */
.frozen{display:flex;align-items:center;gap:10px;min-height:44px;color:var(--text-3)}
.frozen span{flex:none;width:92px;font-size:15px;font-weight:600}
.frozen b{flex:1;font-size:18px;color:var(--text-2)}
.frozen .ic{width:18px;height:18px}
.manual{margin-top:8px}
.manual .h2{display:flex;align-items:center;gap:10px}
.manual .h2 .ic{color:var(--warn)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:48px;padding:0 18px;border-radius:999px;background:var(--bg-soft);font-size:16px;font-weight:600;transition:background-color .15s,color .15s}
.chip[aria-checked="true"]{background:var(--accent);color:var(--on-accent)}
.manual .field{margin-top:20px}
.check{position:relative;margin-top:28px;display:flex;align-items:flex-start;gap:12px;min-height:48px;font-size:16px;font-weight:600;cursor:pointer}
.check input{position:absolute;opacity:0;width:28px;height:28px;margin:0}
.check .box{flex:none;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:var(--bg);box-shadow:inset 0 0 0 2px var(--text-3);color:transparent;transition:background-color .15s}
.check .box .ic{width:20px;height:20px;stroke-width:3}
.check input:checked + .box{background:var(--accent);box-shadow:none;color:var(--on-accent)}
.check input:focus-visible + .box{outline:3px solid var(--accent-text);outline-offset:2px}

/* done, empty, error */
.done{align-items:center;text-align:center}
.done-mark{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;background:var(--ok-weak);color:var(--ok);animation:pop-in .4s cubic-bezier(.2,.9,.3,1.3) both}
.done-mark .ic{width:50px;height:50px;stroke-width:2.6;stroke-dasharray:24;stroke-dashoffset:24;animation:draw .45s .2s ease-out forwards}
.done .title{margin-top:32px}
.state-icon{width:60px;height:60px;border-radius:50%;display:grid;place-items:center;background:var(--bg-soft);color:var(--text-2)}
.state-icon.bad{background:var(--bad-weak);color:var(--bad)}
.state-icon .ic{width:30px;height:30px}
.state-screen .title{margin-top:24px}

/* sheet, viewer, toast */
.scrim{position:fixed;inset:0;z-index:20;background:var(--scrim);animation:fade-in .2s both}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:21;max-width:var(--max);max-height:90dvh;overflow:auto;margin:0 auto;padding:8px 24px calc(24px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:var(--sheet);animation:sheet-up .28s cubic-bezier(.2,.8,.2,1) both}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .sheet{--bg-soft:#2c2f35;--bg-strong:#3a3e45}}
:root[data-theme="dark"] .sheet{--bg-soft:#2c2f35;--bg-strong:#3a3e45}
.grab{display:block;width:40px;height:5px;margin:4px auto 20px;border-radius:3px;background:var(--bg-strong)}
.me{display:flex;align-items:center;gap:14px}
.me div{display:flex;flex-direction:column}
.me b{font-size:20px}.me small{font-size:15px;color:var(--text-3)}
.menu{margin:24px -24px 0}
.menu button{width:100%;min-height:60px;display:flex;align-items:center;gap:14px;padding:0 24px;font-size:17px;font-weight:600}
.menu button span{flex:1}
.menu .ic:first-child{color:var(--text-2)}
@media (hover:hover){.menu button:hover{background:var(--bg-soft)}}
.segmented{display:flex;gap:4px;padding:4px;border-radius:var(--r);background:var(--bg-soft)}
.segmented button{flex:1;min-height:44px;border-radius:12px;font-size:15px;font-weight:600;color:var(--text-2);text-align:center}
.segmented [aria-checked="true"]{background:var(--sheet);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.sheet .btn.block{margin-top:32px}
.sheet-title{font-size:21px;line-height:1.45;font-weight:700;letter-spacing:-.02em}
.sheet .desc{margin-top:8px;color:var(--text-2)}
.summary{margin-top:20px}
.summary div{display:flex;gap:12px;padding:12px 0}
.summary dt{flex:none;width:92px;font-size:15px;color:var(--text-3)}
.summary dd{flex:1;min-width:0;margin:0;font-size:17px;font-weight:700}
.summary dd small{display:block;font-size:14px;font-weight:500;color:var(--text-3)}
/* the decision buttons stay reachable on short screens while the sheet scrolls */
.sheet:has(.sheet-actions){padding-bottom:0}
.sheet-actions{position:sticky;bottom:0;display:flex;gap:8px;margin:16px -24px 0;padding:12px 24px calc(16px + env(safe-area-inset-bottom));background:var(--sheet)}
.sheet #sheetMsg{margin-top:12px}
.fix-form{margin-top:24px;display:grid;gap:20px}
.fix-hint{font-size:14px;color:var(--text-3)}
.fix-hint.off{color:var(--warn);font-weight:600}
.fixed-values{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:15px;color:var(--text-2)}
.fixed-values .btn{flex:none}
[data-fix]{text-transform:uppercase}
.viewer{position:fixed;inset:0;z-index:25;display:flex;align-items:center;justify-content:center;background:#000;animation:fade-in .2s both}
.viewer img{max-width:100%;max-height:100%;object-fit:contain}
.viewer .boxed{height:100%}
.viewer>button{position:absolute;top:calc(12px + env(safe-area-inset-top));right:12px;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.18);color:#fff}
#toast{position:fixed;left:50%;bottom:calc(140px + env(safe-area-inset-bottom));z-index:30;max-width:calc(100% - 40px);padding:12px 18px;border-radius:14px;background:var(--toast);color:var(--toast-text);font-size:15px;font-weight:600;text-align:center;opacity:0;pointer-events:none;transform:translate(-50%,12px);transition:opacity .2s,transform .2s}
#toast.show{opacity:1;transform:translate(-50%,0)}

/* motion: step changes, list arrival and progress only */
.enter-fwd{animation:in-fwd .3s cubic-bezier(.2,.8,.2,1) both}
.enter-back{animation:in-back .3s cubic-bezier(.2,.8,.2,1) both}
.enter-fade{animation:fade-in .3s both}
.rise{animation:rise .36s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 45ms + 80ms)}
@keyframes in-fwd{from{opacity:0;transform:translateX(28px)}}
@keyframes in-back{from{opacity:0;transform:translateX(-28px)}}
@keyframes rise{from{opacity:0;transform:translateY(10px)}}
@keyframes fade-in{from{opacity:0}}
@keyframes sheet-up{from{transform:translateY(100%)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes scan{0%{transform:translateY(-100%)}100%{transform:translateY(222%)}}
@keyframes pop-in{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes draw{to{stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){
 *,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
 .scan{animation:none;top:0;height:100%;opacity:.35}
}

/* larger phones, tablets, desktop: same single column, more air */
@media (min-width:600px){:root{--pad:32px}.title{font-size:28px}.reading .title{font-size:34px}}
@media (min-width:1024px){:root{--max:620px}.bar{min-height:72px}.boxed{height:min(56dvh,500px)}}
