/* Layout: one-handed phone app. Thumb-zone tab bar at bottom, one primary action per screen, numbers are the heroes. */
:root{
  --bg:#FFFFFF; --surface:#FAF6F1; --ink:#2E211A; --muted:#76655A; --line:#E8DFD4;
  --accent:#5A3825; --accent-ink:#FFFFFF; --accent-soft:#EFE4D9;
  --heat:#A8461F; --heat-soft:#F8E6DA; --up:#56662B;
  --font-body:'Noto Sans TC',-apple-system,'PingFang TC',sans-serif;
  --font-num:-apple-system,'SF Pro Text','Helvetica Neue',sans-serif;
  --r:16px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#1B1411; --surface:#261C17; --ink:#F3EAE0; --muted:#A99A8C; --line:#3A2D25;
  --accent:#D9B08C; --accent-ink:#2A1A10; --accent-soft:#3A2B21;
  --heat:#EE8F63; --heat-soft:#3A241A; --up:#B4C77A; color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#1B1411; --surface:#261C17; --ink:#F3EAE0; --muted:#A99A8C; --line:#3A2D25;
  --accent:#D9B08C; --accent-ink:#2A1A10; --accent-soft:#3A2B21;
  --heat:#EE8F63; --heat-soft:#3A241A; --up:#B4C77A; color-scheme:dark}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--font-body);font-size:16px;line-height:1.45}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.num{font-family:var(--font-num);font-variant-numeric:tabular-nums}

.app{max-width:430px;height:100%;margin:0 auto;display:flex;flex-direction:column;background:var(--bg);position:relative}
@media (min-width:500px){.app{border-left:1px solid var(--line);border-right:1px solid var(--line)}}
.screen{flex:1;min-height:0;overflow-y:auto;padding:20px 16px 28px;display:none}
.screen.on{display:block}
.top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;min-height:44px}
h1{font-size:28px;font-weight:700;margin:0;letter-spacing:-.01em;text-wrap:balance}
h2{font-size:13px;font-weight:500;color:var(--muted);letter-spacing:.08em;margin:28px 0 10px}
.field{width:100%;height:52px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:17px;padding:0 14px}
.back{height:44px;display:flex;align-items:center;gap:4px;color:var(--muted);font-size:15px;margin-left:-8px;padding-right:12px}

/* tab bar */
.tabs{display:flex;border-top:1px solid var(--line);background:var(--surface);padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px))}
.tab{flex:1;height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;color:var(--muted)}
.tab svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.tab.on{color:var(--accent);font-weight:700}
.tabs{position:relative}
.tab.cam{justify-content:flex-end;color:var(--accent);font-weight:700}
.tab.cam .disc{width:60px;height:60px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;margin-top:-36px;margin-bottom:2px;border:5px solid var(--bg);box-shadow:0 6px 16px rgba(0,0,0,.22)}
.tab.cam .disc svg{stroke:var(--accent-ink);width:28px;height:28px;stroke-width:2.2}

/* primitives */
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
.chips.wrap{flex-wrap:wrap;overflow:visible}
.chip{flex:none;height:44px;padding:0 16px;border-radius:22px;border:1px solid var(--line);background:var(--surface);font-size:15px;display:inline-flex;align-items:center;gap:6px}
.chip.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:500}
.chip.add{border-style:dashed;color:var(--muted)}
.btn{height:56px;border-radius:var(--r);background:var(--accent);color:var(--accent-ink);font-size:17px;font-weight:700;width:100%;display:flex;align-items:center;justify-content:center;gap:8px}
.btn.ghost{background:var(--surface);color:var(--ink);border:1px solid var(--line);font-weight:500}
.card{background:var(--surface);border-radius:var(--r);border:1px solid var(--line)}
.ph{background:linear-gradient(135deg,#E6D9C8,#C9B499);display:grid;place-items:center;color:rgba(0,0,0,.35);font-size:12px;border-radius:12px}
.ph.b{background:linear-gradient(135deg,#D8BFA0,#A98259)}
.ph.c{background:linear-gradient(135deg,#E8D0BD,#C49574)}
.ph.d{background:linear-gradient(135deg,#D3D1B0,#A19E72)}
.sticky{position:sticky;bottom:-28px;margin:20px -16px -28px;padding:12px 16px 16px;background:linear-gradient(transparent,var(--bg) 30%)}

/* recipe list */
.search{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);color:var(--muted);margin-bottom:12px}
.search svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8}
.row{display:flex;gap:14px;padding:12px;align-items:center;width:100%;text-align:left;margin-bottom:10px}
.row .ph{width:68px;height:68px;flex:none}
.row .t{font-weight:700;font-size:17px}
.row .m{font-size:13px;color:var(--muted)}
.row .r{margin-left:auto;text-align:right;font-size:13px;color:var(--muted);flex:none}
.dots{display:inline-flex;gap:3px}
.dots i{width:8px;height:8px;border-radius:50%;background:var(--line)}
.dots i.f{background:var(--accent)}

/* scaler */
.scaler{padding:16px}
.scaler .lbl{font-size:12px;color:var(--muted);margin-bottom:6px}
.from{display:flex;align-items:center;justify-content:space-between;padding-bottom:14px;border-bottom:1px solid var(--line);margin-bottom:14px}
.from b{font-size:18px}
.stepper{display:flex;align-items:center;gap:6px;flex:none}
.stepper button{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);font-size:22px;display:grid;place-items:center}
.stepper output{min-width:44px;text-align:center;font-size:24px;font-weight:700}
.factor{display:flex;align-items:baseline;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.factor .big{font-size:34px;font-weight:700;color:var(--accent);line-height:1}
.factor span{font-size:13px;color:var(--muted)}
.ing{display:flex;align-items:baseline;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line);gap:12px}
.ing:last-child{border:0}
.ing .n{font-size:17px}
.ing .a{font-size:20px;font-weight:700;text-align:right;line-height:1.15}
.ing .a .u{font-size:13px;font-weight:400;margin-left:2px;color:var(--muted)}
.ing .a small{display:block;font-size:12px;color:var(--muted);font-weight:400}
.ing .a em{display:block;font-style:normal;font-size:13px;font-weight:400;color:var(--heat);margin-top:2px}
.photo-src{display:flex;align-items:center;gap:12px;padding:10px;width:100%;text-align:left;font-size:14px;color:var(--muted)}
.photo-src .ph{width:44px;height:56px;flex:none}


.ingw{border-bottom:1px solid var(--line)}
.ingw:last-child{border:0}
.ingw .ing{width:100%;text-align:left;border:0;min-height:60px}
.ingw.open{background:var(--accent-soft);margin:0 -16px;padding:0 16px;border-radius:12px}
.edit-p{display:flex;flex-direction:column;gap:12px;padding:0 0 16px}
.edit-p input{height:48px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:17px;padding:0 12px}
.edit-p .stepper{justify-content:center;gap:18px}
.edit-p .stepper output{font-size:32px;min-width:90px}
.edit-p .pair .btn{height:48px;font-size:15px}
.addrow{width:100%;height:56px;color:var(--accent);font-weight:700;font-size:16px}
.iedit{display:flex;flex-direction:column;gap:8px;padding:0 0 12px}
.iedit .ien{height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:16px;padding:0 10px}
.ierow{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ierow .aw{display:flex;align-items:center;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:0 8px;gap:2px}
.ierow .amt2{width:64px;border:0;background:none;color:var(--ink);font:inherit;font-size:20px;font-weight:700;text-align:right;padding:0;min-width:0}
.ierow .amt2:focus{outline:none}
.ierow .aw:focus-within{outline:2px solid var(--accent);outline-offset:1px}
.ierow .au{font-size:13px;color:var(--muted)}
.iacts{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.lnk{font-size:13px;color:var(--accent);padding:4px 2px;min-height:28px}
.lnk.del{color:var(--heat)}
.lnk:disabled{opacity:.35}


.ing3{display:grid;grid-template-columns:minmax(0,1fr) 80px 104px;gap:8px;align-items:start;width:100%;text-align:left;padding:14px 0;min-height:60px}
.ing3 .n{font-size:17px;padding-top:1px}
.ing3 .o{font-size:20px;color:var(--muted);text-align:right;line-height:1.15}
.ing3 .a{font-size:20px;font-weight:700;text-align:right;line-height:1.15}
.ing3 .a em{display:block;font-style:normal;font-size:13px;font-weight:400;color:var(--heat)}
.ing3 .a small{display:block;font-size:12px;font-weight:400;color:var(--muted)}
.ing3 .a small.adj{color:var(--heat)}
.ing3 .u{font-size:13px;font-weight:400;margin-left:2px;color:var(--muted)}
.ing3.hd{padding:12px 0 6px;min-height:0;font-size:12px;color:var(--muted);letter-spacing:.06em;border-bottom:1px solid var(--line)}
.ing3.hd div{padding:0}
.ing3.hd div:nth-child(n+2){text-align:right}
.ingw .ing3{border:0}


.stw{position:relative}
.stw .stage{padding-left:48px}
.grip{position:absolute;left:0;top:0;width:48px;height:68px;display:grid;place-items:center;touch-action:none;cursor:grab;z-index:1}
.grip svg{width:22px;height:22px;fill:var(--muted)}
.stw.drag{background:var(--accent-soft);box-shadow:0 6px 18px rgba(0,0,0,.18);z-index:2}

/* oven stages */
.stage{display:flex;align-items:center;gap:14px;padding:14px 16px}
.stw+.stw,#queue .stage+.stage{border-top:1px solid var(--line)}
.stw.open{background:var(--accent-soft)}
.stw .addrow{width:100%}
.sted{display:flex;justify-content:space-around;gap:8px;padding:0 12px 4px}
.sted .sg{display:flex;flex-direction:column;align-items:center;gap:2px}
.sted .sl{font-size:11px;color:var(--muted)}
.stepper.sm{gap:4px}
.stepper.sm button{width:36px;height:36px;font-size:20px}
.stepper.sm output{min-width:46px;font-size:20px}
.stdel{display:block;margin:0 auto;padding:6px 16px 10px;font-size:13px;color:var(--heat)}
.stdel:disabled{opacity:.35}
.temp{font-size:24px;font-weight:700;color:var(--heat);line-height:1}
.temp small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:4px}
.dur{margin-left:auto;font-size:22px;font-weight:700}
.dur small{font-size:13px;font-weight:400;color:var(--muted)}

/* bake mode */
.clock{padding:28px 16px;text-align:center}
.clock .st{font-size:13px;color:var(--muted)}
.clock .tt{font-size:64px;font-weight:700;color:var(--heat);line-height:1.1;margin:6px 0 0}
.clock .tt small{font-size:20px;font-weight:500}
.clock .time{font-size:88px;font-weight:700;line-height:1;margin:12px 0 22px;letter-spacing:-.02em}
.bar{height:8px;border-radius:4px;background:var(--line);overflow:hidden;margin:0 8px 22px}
.bar i{display:block;height:100%;width:0;background:var(--heat);transition:width .5s}
.pair{display:flex;gap:10px}
.pair .btn{flex:1}
.check{display:flex;align-items:center;gap:14px;min-height:60px;width:100%;text-align:left;border-bottom:1px solid var(--line);font-size:19px}
.check .bx{width:28px;height:28px;border-radius:50%;border:2px solid var(--line);flex:none;display:grid;place-items:center}
.check.done{color:var(--muted);text-decoration:line-through}
.check.done .bx{background:var(--accent);border-color:var(--accent)}
.check.done .bx::after{content:"";width:8px;height:13px;border:solid var(--accent-ink);border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translate(-1px,-1px)}
.check .g{margin-left:auto;font-weight:700;font-size:21px}
.seg{display:flex;background:var(--line);border-radius:12px;padding:3px;margin-bottom:16px}
.seg button{flex:1;height:42px;border-radius:10px;font-size:15px;color:var(--muted)}
.seg button.on{background:var(--surface);color:var(--ink);font-weight:700}

/* result log */
.shot{width:100%;aspect-ratio:4/3;border-radius:var(--r);border:1.5px dashed var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--muted);background:var(--surface)}
.shot.has{border:0;background:linear-gradient(135deg,#D8B98F,#B5895A);color:rgba(0,0,0,.4)}
.shot svg{width:36px;height:36px;stroke:currentColor;fill:none;stroke-width:1.5}
.stars{display:flex;gap:6px}
.stars button{width:52px;height:52px;border-radius:50%;border:1px solid var(--line);background:var(--surface);font-size:20px;color:var(--muted)}
.stars button.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700}
textarea{width:100%;min-height:96px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;padding:14px;resize:none;margin-top:10px}
.diff{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;font-size:15px}
.diff+.diff{border-top:1px solid var(--line)}

/* journal */
.entry{padding:12px;margin-bottom:12px}
.entry .ph{width:100%;aspect-ratio:16/10;margin-bottom:12px}
.entry .hd{display:flex;justify-content:space-between;align-items:baseline}
.entry .hd b{font-size:17px}
.entry .hd span{font-size:13px;color:var(--muted)}
.tag{display:inline-block;font-size:13px;padding:3px 10px;border-radius:12px;background:var(--accent-soft);color:var(--accent);margin:8px 6px 0 0}
.next{margin-top:10px;padding:10px 12px;border-radius:12px;background:var(--heat-soft);font-size:14px}
.next b{color:var(--heat);font-size:12px;display:block;letter-spacing:.06em}

/* add / review */
.steps{display:flex;gap:6px;margin-bottom:20px}
.steps i{flex:1;height:4px;border-radius:2px;background:var(--line)}
.steps i.on{background:var(--accent)}
.viewfinder{aspect-ratio:3/4;border-radius:var(--r);background:#2A1E18;display:flex;align-items:flex-end;justify-content:center;padding:18px;color:#D9CFC4;position:relative;overflow:hidden}
.viewfinder::before{content:"";position:absolute;inset:36px 28px 90px;border:2px solid rgba(255,255,255,.55);border-radius:10px}
.viewfinder p{position:relative;margin:0;font-size:14px;text-align:center}
.shutter{width:76px;height:76px;border-radius:50%;border:4px solid var(--ink);display:grid;place-items:center;margin:20px auto 12px}
.shutter i{width:56px;height:56px;border-radius:50%;background:var(--ink)}
.hint{font-size:13px;color:var(--muted);text-align:center}
.edit{width:100%;text-align:left;display:flex;justify-content:space-between;align-items:center;min-height:52px;border-bottom:1px solid var(--line);font-size:17px}
.edit span:last-child{font-weight:700}
.warn{background:var(--heat-soft);color:var(--heat);border-radius:12px;padding:10px 12px;font-size:14px;margin-bottom:12px}


/* recipe accordion + dated logs */
.rc{margin-bottom:10px;overflow:hidden}
.rc .row{margin:0;border-radius:0}
.rc .chev{margin-left:auto;width:20px;height:20px;stroke:var(--muted);fill:none;stroke-width:2;transition:transform .2s;flex:none}
.rc.open .chev{transform:rotate(180deg)}
.rc .body{display:none;border-top:1px solid var(--line);padding:14px 12px 12px}
.rc.open .body{display:block}
.rc .acts{display:flex;gap:8px;margin-bottom:6px}
.rc .acts .btn{height:48px;font-size:15px}
.dl{font-size:12px;color:var(--muted);letter-spacing:.08em;margin:16px 4px 6px}
.logrow{width:100%;display:flex;align-items:center;gap:12px;min-height:56px;padding:0 4px;border-top:1px solid var(--line);text-align:left}
.logrow .dd{font-size:20px;font-weight:700}
.logrow{padding:6px 4px}
.logrow .ddw{display:flex;flex-direction:column;line-height:1.2;min-width:72px}
.logrow .ddw .pn{font-size:12px}
.logrow small{color:var(--muted);font-size:13px}
.rt{margin-left:auto;font-weight:700;font-size:17px}
.chev2{margin-left:4px;width:18px;height:18px;stroke:var(--muted);fill:none;stroke-width:2}
.log:first-of-type{border-top:0}
.log>button{width:100%;display:flex;align-items:center;gap:12px;min-height:72px;padding:8px 4px;text-align:left}
.log .d{width:48px;flex:none;font-size:15px;font-weight:700;line-height:1.2}
.log .d small{display:block;font-size:12px;font-weight:400;color:var(--muted)}
.log .ph{width:52px;height:52px;flex:none}
.log .mid{min-width:0;flex:1;font-size:14px}
.log .mid .m{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.log .det{display:none;padding:0 4px 14px}
.log.open .det{display:block}
.log .det .big{aspect-ratio:16/10;margin-bottom:10px}
.log .oven{font-size:13px;color:var(--heat);margin-bottom:2px}


.tagadd{display:flex;gap:8px;margin-top:10px}
.tagadd input{flex:1;min-width:0;height:44px;border-radius:22px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:15px;padding:0 16px}
.tagadd .chip{padding:0 20px}


.cmp{display:grid;grid-template-columns:minmax(0,1fr) 62px 62px 70px;gap:6px;align-items:start;padding:12px 0;border-top:1px solid var(--line)}
.cmp.hd{border-top:0;padding:12px 0 6px;font-size:12px;color:var(--muted);letter-spacing:.04em;border-bottom:1px solid var(--line)}
.cmp>div:nth-child(n+2){text-align:right}
.cmp .n{font-size:16px}
.cmp .o{font-size:16px;color:var(--muted)}
.cmp .a{font-size:16px;font-weight:700}
.cmp .u{font-size:11px;font-weight:400;margin-left:1px;color:var(--muted)}
.cmp .st{line-height:1.3;font-size:14px}
.cmp .ch{font-size:12px;line-height:1.5;color:var(--muted)}
.cmp .pc{font-weight:700;font-size:15px}
.cmp .ch .pc{font-size:12px}
.pc.up{color:var(--up)}.pc.dn{color:var(--heat)}.pc.z{color:var(--muted);font-weight:400}


.stars{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.stars button{width:100%;height:auto;aspect-ratio:1}
.rlbl{margin-top:10px;font-size:15px;color:var(--muted);min-height:24px}
.rlbl b{font-size:22px}
.rbig{display:flex;align-items:baseline;gap:8px}
.rbig b{font-size:56px;line-height:1}
.rbig span{font-size:18px;color:var(--muted)}
.rbig em{font-style:normal;font-size:20px;font-weight:700;margin-left:auto}
.rbar{display:grid;grid-template-columns:repeat(10,1fr);gap:4px;margin-top:10px}
.rbar i{height:10px;border-radius:5px;background:var(--line)}


.aing{display:grid;grid-template-columns:minmax(0,1fr) 92px 44px;gap:8px;align-items:center;padding:8px 0;border-top:1px solid var(--line)}
.aing:first-child{border-top:0}
.aing input{height:48px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:17px;padding:0 12px;width:100%;min-width:0}
.aing .gw{position:relative}
.aing .gv{text-align:right;padding-right:26px;font-weight:700}
.aing .gv.q{border-color:var(--heat);background:var(--heat-soft)}
.aing .u{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:13px;color:var(--muted);pointer-events:none}
.aing .x{width:44px;height:44px;font-size:24px;color:var(--muted);border-radius:50%}
.aing .qn{grid-column:1/-1;font-size:12px;color:var(--heat);margin-top:-2px}


.sr{flex:1;min-width:0;display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:8px}
.sr .sn{font-size:13px;color:var(--muted)}
.sr .st{font-size:24px;font-weight:700;color:var(--heat);line-height:1.05}
.sr .st small,.sr .sd small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:3px}
.sr .sd{font-size:20px;font-weight:700;text-align:right;line-height:1.05}
.stage .sr{width:100%}
#logOven .stage+.stage,#orStages .stage+.stage{border-top:1px solid var(--line)}


.edit-p .stepper .amt{width:110px;height:56px;text-align:center;font-size:32px;font-weight:700;border-radius:12px;padding:0 24px 0 6px}
.edit-p .stepper .amt-u{margin-left:-34px;margin-right:14px;font-size:14px;color:var(--muted);pointer-events:none;width:20px}


.rdots{display:flex;align-items:center;flex-wrap:wrap}
.rdots button{width:28px;height:36px;display:grid;place-items:center}
.rdots i{width:13px;height:13px;border-radius:50%;border:1.5px solid var(--muted);transition:background .15s,border-color .15s}
.rdots button.f i{background:var(--accent);border-color:var(--accent)}
.rdots .rv{margin-left:8px;font-size:15px;color:var(--muted)}
.rt.pend{font-weight:500;font-size:13px;color:var(--muted)}
.vc{border-top:1px solid var(--line);margin:0 -12px}
.vrow{width:100%;display:flex;align-items:center;gap:10px;min-height:60px;padding:8px 12px;text-align:left}
.vrow .vt{font-weight:700;font-size:16px}
.vrow .m{font-size:12px;color:var(--muted)}
.vrow .chev{margin-left:auto;width:18px;height:18px;stroke:var(--muted);fill:none;stroke-width:2;transition:transform .2s;flex:none}
.vc.open .vrow .chev{transform:rotate(180deg)}
.vbody{display:none;padding:0 12px 12px}
.vc.open .vbody{display:block}
.vc .acts .btn{height:44px;font-size:14px}


.delbtn{width:100%;height:44px;margin-top:16px;border-radius:12px;color:var(--heat);font-size:14px;border:1px solid var(--line)}
.delbox{margin-top:16px;padding:12px;border-radius:12px;background:var(--heat-soft);font-size:14px;display:flex;flex-direction:column;gap:12px}
.delbox .btn{height:44px;font-size:15px}
.btn.dangerb{background:var(--heat);color:#fff}

/* pans */
.pan{display:flex;align-items:center;gap:14px;padding:14px 16px}
.pan+.pan{border-top:1px solid var(--line)}
.shape{width:44px;height:44px;border:2px solid var(--ink);flex:none}
.shape.round{border-radius:50%}.shape.sq{border-radius:4px}.shape.rect{border-radius:4px;height:32px;width:48px}.shape.loaf{border-radius:4px;height:28px;width:52px}
.pan .t{font-weight:700;font-size:17px}.pan .m{font-size:13px;color:var(--muted)}
.pan .stepper{margin-left:auto}
.note{font-size:13px;color:var(--muted);padding:0 4px;margin-top:10px}
.h2u{display:flex;align-items:center;justify-content:space-between;gap:8px}
.utog{display:inline-flex;flex:none;background:var(--line);border-radius:10px;padding:2px;letter-spacing:0}
.utog button{min-width:44px;height:32px;border-radius:8px;font-size:14px;color:var(--muted)}
.utog button.on{background:var(--surface);color:var(--ink);font-weight:700}
.pfrow{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.pfrow label{width:72px;flex:none;font-size:15px}
.pfrow label small{display:block;font-size:11px;color:var(--muted)}
.pfrow .field{height:48px;min-width:0;flex:1}
.pfrow span{color:var(--muted);font-size:14px}
.pan .hed{display:flex;align-items:center;gap:6px;margin-top:4px}
.pan .hed .field{width:72px;height:40px;font-size:15px;padding:0 8px}
.pan .hed .chip{height:40px;padding:0 14px}
.pan .hed span{font-size:13px;color:var(--muted)}
.pan .hbtn{display:block;font-size:13px;color:var(--accent);margin-top:2px;min-height:28px;text-align:left}
.pan .hbtn.none{color:var(--muted);text-decoration:underline}

/* ---- 真實 app 補充 ---- */
.ph img,.shot img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.ph{overflow:hidden}
.shot.has{background:var(--surface);overflow:hidden;padding:0;position:relative}
.shot.has img{position:absolute;inset:0;border-radius:var(--r)}
.shot.has span{position:absolute;bottom:8px;left:0;right:0;font-size:12px;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.thumbs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px}
.thumbs .tb{position:relative;flex:none;width:76px;height:96px;border-radius:10px;overflow:hidden;border:1px solid var(--line);padding:0}
.thumbs .tb img{width:100%;height:100%;object-fit:cover}
.thumbs .tb .x{position:absolute;top:2px;right:2px;width:24px;height:24px;border-radius:12px;background:rgba(0,0,0,.55);color:#fff;font-size:16px;line-height:24px;text-align:center}
.pickbtn{display:flex;gap:10px;margin-top:8px}
.pickbtn .btn{flex:1}
.viewer{position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center}
.viewer img{max-width:100%;max-height:82%;object-fit:contain}
.viewer button{margin-top:16px;color:#fff;font-size:16px;padding:10px 24px}
.toast{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:12px;font-size:14px;z-index:60;max-width:88%}
input[type=file]{display:none}
.search input{flex:1;min-width:0;border:0;background:none;font:inherit;color:var(--ink);height:100%}
.search input:focus{outline:none}
.sheet{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:55;display:flex;align-items:flex-end}
.sheet .in{width:100%;max-width:430px;margin:0 auto;background:var(--bg);border-radius:20px 20px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:10px}
.cin{width:76px;height:44px;text-align:center;font-size:24px;font-weight:700;border:0;background:none;color:var(--ink);padding:0;border-radius:10px}
.cin:focus{background:var(--surface);outline:2px solid var(--accent)}
input[type=date].field{-webkit-appearance:none;appearance:none;display:block;width:100%;min-width:100%;max-width:100%;text-align:left;line-height:52px}
input[type=date].field::-webkit-date-and-time-value{text-align:left}
.stw.open{border-radius:12px;margin:2px 6px 6px}
.stw.open+.stw,.stw+.stw.open{border-top-color:transparent}
.eggt{font-size:13px;margin:2px 0 0;grid-column:1/-1}
.pn.src{max-width:9.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.logrow{display:grid;grid-template-columns:78px minmax(0,1fr) auto 16px;column-gap:10px;align-items:center;min-height:60px;padding:8px 4px}
.logrow .lc1,.logrow .lc2{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.25}
.logrow .lc1 small{font-size:12px;color:var(--muted)}
.logrow .nth{font-size:14px;color:var(--ink)}
.logrow .lc2 .src{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.logrow .rt{text-align:right;white-space:nowrap}
.logrow .lc2 .src{font-size:13px;color:var(--muted)}
.mdots{display:grid;grid-template-columns:repeat(5,7px);gap:4px 4px;justify-content:end}
.mdots i{width:7px;height:7px;border-radius:50%;border:1.2px solid var(--muted);box-sizing:border-box}
.mdots i.f{background:var(--accent);border-color:var(--accent)}
.mdots{display:flex;gap:3px;align-items:center}
.mdots i{width:6px;height:6px;flex:none}
.logrow{grid-template-columns:70px minmax(0,1fr) auto 14px;column-gap:8px}
/* 評分：5 顆點，可半顆 */
.rdots button{width:44px;height:44px}
.rdots i{width:22px;height:22px;border-width:2px}
.rdots button.h i{background:linear-gradient(90deg,var(--accent) 50%,transparent 50%);border-color:var(--accent)}
.mdots i{width:10px;height:10px}
.mdots i.h{background:linear-gradient(90deg,var(--accent) 50%,transparent 50%);border-color:var(--accent)}
.mdots{gap:4px}
.logrow{grid-template-columns:minmax(0,1fr) auto 14px}
.logrow .lc1{text-align:left}
.logrow .lc1 small{font-size:12.5px;color:var(--muted);overflow-wrap:anywhere}
.iconbtn{width:44px;height:44px;margin-right:-8px;display:grid;place-items:center;border-radius:50%;color:var(--muted)}
.iconbtn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.iconbtn:active{background:var(--accent-soft)}
.rdots button:disabled{opacity:1;cursor:default}
.cico{width:48px;height:48px;border-radius:14px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex:none}
.cico-svg{width:28px;height:28px}
.row .cico{width:52px;height:52px}
.cico-img{width:46px;height:auto;mix-blend-mode:multiply;display:block}
.cico .cico-svg{width:40px;height:40px}
.cico{width:52px;height:52px}
.icopick{display:flex;gap:8px;flex-wrap:wrap}
.icopick button{width:60px;height:60px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--accent);display:grid;place-items:center}
.icopick button.on{border:2px solid var(--accent);background:var(--accent-soft)}
.icopick svg{width:38px;height:38px}.icopick img{width:44px;mix-blend-mode:multiply}
.catrow{display:flex;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid var(--line);min-height:64px}
.catrow:first-child{border-top:0}
.catrow .cico{width:44px;height:44px;border-radius:12px}
.catrow .cico .cico-svg{width:32px;height:32px}.catrow .cico-img{width:38px}
.catrow .nm{flex:1;font-size:17px;min-width:0}
.catrow .nm small{display:block;font-size:12px;color:var(--muted)}
.catedit{padding:12px 14px;border-top:1px solid var(--line)}
.catedit .btns{display:flex;gap:8px;margin-top:12px;align-items:center}
.cloud h3{margin:0 0 4px;font-size:17px}
.cloud p{margin:0 0 12px;font-size:14px;color:var(--muted)}
.cloud .st{display:flex;align-items:center;gap:8px;font-size:14px;margin-bottom:12px}
.cloud .dot{width:10px;height:10px;border-radius:50%;background:var(--up);flex:none}
.cloud .dot.warn{background:var(--heat)}.cloud .dot.off{background:var(--muted)}
.cloud .field{margin-bottom:8px}
.cloud .row2{display:flex;gap:8px;margin-top:6px}
.cloud .lnkrow{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:10px}
.cloud .err{color:var(--heat);font-size:13px;margin:0 0 8px}
.linkbox{font-family:ui-monospace,Menlo,monospace;font-size:12px;word-break:break-all;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:8px;user-select:all}
.cico-img{width:auto;height:auto;max-width:46px;max-height:42px;object-fit:contain}
.catrow .cico-img{max-width:38px;max-height:34px}
.icopick img{max-width:48px;max-height:44px}
.unit h3,.bk h3{margin:0 0 4px;font-size:16px}
.unit p,.bk p{margin:0 0 10px;font-size:13px;color:var(--muted)}
.urow{display:grid;grid-template-columns:minmax(0,1fr) 92px 40px;gap:8px;align-items:center;padding:6px 0;border-top:1px solid var(--line)}
.urow:first-of-type{border-top:0}
.urow input{height:44px;border-radius:12px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:16px;padding:0 10px;width:100%;min-width:0}
.urow .gw{position:relative}.urow .gw input{text-align:right;padding-right:34px;font-weight:700}
.urow .gw span{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--muted)}
.urow .x{width:40px;height:40px;font-size:22px;color:var(--muted);border-radius:50%}
.egg{display:flex;align-items:center;gap:10px;margin:6px 0 14px}
.egg input{width:84px;height:44px;border-radius:12px;border:1px solid var(--line);background:var(--bg);color:var(--ink);font:inherit;font-size:16px;padding:0 10px;text-align:right}
.trow{display:flex;align-items:center;gap:10px;padding:12px 14px;border-top:1px solid var(--line)}
.trow:first-child{border-top:0}
.trow .nm{flex:1;min-width:0;font-size:16px}
.trow .nm small{display:block;font-size:12px;color:var(--muted)}
.trow .btn{width:auto;height:40px;padding:0 16px;font-size:14px}
.acc{border:1px solid var(--line);border-radius:var(--r);background:var(--surface);margin-bottom:10px;overflow:hidden}
.acc>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:60px;padding:0 16px;cursor:pointer;-webkit-user-select:none;user-select:none}
.acc>summary::-webkit-details-marker{display:none}
.acc .at{font-size:17px;font-weight:700}
.acc .hint{margin-left:auto;font-size:13px;color:var(--muted);text-align:right;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acc>summary .chev2{margin-left:0;flex:none;transition:transform .15s}
.acc[open]>summary .chev2{transform:rotate(90deg)}
.acc[open]>summary{border-bottom:1px solid var(--line)}
.accbody{padding:14px 12px 16px}
.accbody>.card{background:var(--bg)}
.accbody #cloudCard{background:transparent;border:0;padding:4px!important}
.accbody #unitCard,.accbody #backupCard{background:transparent;border:0;padding:4px!important}
/* 模具列：矮一點，不放數量 */
.pan{padding:9px 14px;gap:12px}
.pan .shape{transform:scale(.8);margin:-4px}
.pan .pbody{flex:1;min-width:0}
.pan .t{font-size:16px;line-height:1.3}
.pan .t .m{font-weight:400}
.pan .pact{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.pan .pact .hbtn{margin-top:0;min-height:30px;display:inline-block}
.pan .pact .lnk{min-height:30px;font-size:13px;margin:0}
.pan{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px}
.pan .shape{justify-self:center;margin:0}
.pan .pact .m{font-size:12.5px;color:var(--muted)}
#micBtn.rec{background:var(--heat)}
#micBtn.rec svg{animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.35}}
#voiceBtn svg{flex:none}
