:root{
  --navy:#0f1b2d; --ink:#0f1b2d; --muted:#4b5563; --line:#e6e3dc;
  --need-red:#c45c4e;
  --bg:#f6f5f1; --card:#ffffff; --sand:#efece5; --ok:#1f7a4d; --err:#b42318;
  --r:18px; --ease:cubic-bezier(.2,.8,.2,1);
  --sat:env(safe-area-inset-top,0px); --sab:env(safe-area-inset-bottom,0px);
  --sal:env(safe-area-inset-left,0px); --sar:env(safe-area-inset-right,0px);
  --dock-h:96px; /* overwritten by JS with the measured dock height */
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg);
  /* keyboard focus / scrollIntoView never lands a field under the bottom dock */
  scroll-padding-top:16px;scroll-padding-bottom:calc(var(--dock-h) + 16px)}
/* Fields scrolled into view (focus, error jumps) stop above the fixed estimate bar. */
input,select,textarea,button,.field{scroll-margin-bottom:calc(var(--dock-h) + 16px)}
body{margin:0;min-height:100vh;min-height:100dvh;background:var(--bg);color:var(--ink);overflow-x:clip;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Inter","Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}

/* Header: normal flow. It scrolls away with the page instead of floating over it. */
.top{position:relative;z-index:1;padding:max(calc(var(--sat) + 16px), 20px) calc(var(--sar) + 20px) 0 calc(var(--sal) + 20px);max-width:720px;margin:0 auto}
.top-row{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:34px}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.mark{flex:none;background:var(--navy);color:#fff;font-weight:700;letter-spacing:.08em;font-size:12px;padding:7px 9px;border-radius:9px}
.brand-name{font-weight:600;font-size:15px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.steps-label{flex:none;font-size:13px;color:var(--muted);white-space:nowrap}
.progress{display:block;height:4px;border-radius:4px;background:var(--line);overflow:hidden;margin-top:16px}
.progress i{display:block;height:100%;width:0;border-radius:4px;background:var(--navy);transition:width .45s var(--ease)}
@media (prefers-reduced-motion:reduce){.progress i{transition:none}}

.app{max-width:720px;margin:0 auto;padding:26px calc(var(--sar) + 20px) calc(var(--dock-h) + var(--kb-h, 0px) + 28px) calc(var(--sal) + 20px)}
.app.no-dock{padding-bottom:calc(var(--sab) + 32px)}
.view.enter{animation:in .38s var(--ease)}
@keyframes in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.view.enter{animation:none}}
h1{font-size:clamp(28px,7.6vw,42px);line-height:1.1;letter-spacing:-.03em;font-weight:650;margin:0 0 8px}
.sub{color:var(--muted);font-size:16px;line-height:1.45;margin:0 0 22px}
h2{font-size:19px;letter-spacing:-.01em;margin:28px 0 10px;font-weight:600}
.sec-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:28px 0 10px}
.sec-head h2{margin:0}

.choices{display:grid;gap:10px}
.choice{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:var(--card);border:1.5px solid transparent;border-radius:var(--r);padding:16px;cursor:pointer;font:inherit;color:inherit;box-shadow:0 1px 2px rgba(15,27,45,.05);transition:border-color .2s var(--ease),box-shadow .2s var(--ease)}
.choice.on{border-color:var(--navy);box-shadow:0 0 0 3px rgba(15,27,45,.08)}
.choice .ico{flex:none;width:44px;height:44px;border-radius:13px;background:var(--sand);display:grid;place-items:center;color:var(--ink)}
.choice .ico svg{width:30px;height:30px;display:block;overflow:visible}
.choice.on .ico{background:var(--navy);color:#fff}
.choice .txt{min-width:0;flex:1}
.choice b{display:block;font-size:17px;font-weight:600;letter-spacing:-.01em}
.choice span.svc-sub{display:block;color:#3264AE;font-size:15px;font-weight:600;letter-spacing:.02em;line-height:1.3;margin-top:2px}
.choice.on span.svc-sub{color:#295699}
.choice span.d{display:block;color:var(--muted);font-size:14px;line-height:1.35;margin-top:2px}
.choice .from{flex:none;color:var(--muted);font-size:13px;white-space:nowrap;align-self:flex-start;margin-top:2px}

.card{background:var(--card);border-radius:var(--r);padding:18px;box-shadow:0 1px 2px rgba(15,27,45,.05);margin-bottom:12px}
.row{display:grid;gap:12px;grid-template-columns:1fr 1fr}
.row > *{min-width:0}
.row3{display:grid;gap:10px;grid-template-columns:1fr 1fr 1fr}
.row3 > *{min-width:0}
.row.addr3{grid-template-columns:minmax(0,1fr) 64px 86px;gap:10px}
@media(max-width:520px){.row:not(.keep){grid-template-columns:1fr}}
@media(max-width:430px){.row.keep.kind-row{grid-template-columns:1fr}}
select{text-overflow:ellipsis}

label.f{display:block;font-size:14px;color:var(--muted);margin:0 0 6px;font-weight:500}
.field{margin-bottom:12px}
input[type=text],input[type=email],input[type=tel],input[type=number],input[type=date],select,textarea{display:block;width:100%;min-width:0;font:inherit;font-size:17px;color:var(--ink);background:var(--bg);border:1.5px solid transparent;border-radius:12px;padding:13px 14px;min-height:44px;outline:none;transition:border .2s,background .2s,box-shadow .25s var(--ease);-webkit-appearance:none;appearance:none;margin:0}
select{background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 20px) 55%,calc(100% - 15px) 55%;background-size:5px 5px;background-repeat:no-repeat;padding-right:34px}
textarea{min-height:84px;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--navy);background:#fff}
.req{color:var(--muted);font-weight:600;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid var(--line);font-size:16px;cursor:pointer}
.toggle.first{border-top:0;padding-top:0}
.toggle small{display:block;color:var(--muted);font-size:13px;line-height:1.35;margin-top:2px}
.sw{position:relative;width:51px;height:31px;flex:none}
.sw input{position:absolute;opacity:0;width:0;height:0}
.sw i{position:absolute;inset:0;background:#d9d6cf;border-radius:31px;transition:.25s var(--ease)}
.sw i:before{content:"";position:absolute;width:27px;height:27px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:.25s var(--ease)}
.sw input:checked+i{background:var(--navy)}
.sw input:checked+i:before{transform:translateX(20px)}
.seg{display:flex;background:var(--bg);border-radius:12px;padding:4px;gap:4px}
.seg button{flex:1;min-width:0;min-height:44px;border:0;background:transparent;font:inherit;font-size:16px;padding:11px 8px;border-radius:9px;cursor:pointer;color:var(--muted);white-space:normal;line-height:1.25;overflow-wrap:anywhere}
.seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 4px rgba(0,0,0,.08);font-weight:600}
.seg.stack{flex-direction:column}
.seg.wrap{flex-wrap:wrap}
.seg.wrap button{flex:1 1 28%;white-space:normal;overflow:visible;text-overflow:unset;line-height:1.25}
.seg.stack button{white-space:normal;overflow:visible;text-overflow:unset;text-align:left;padding:11px 12px}
.item-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.item-head b{font-size:16px}
.item-actions{display:flex;gap:14px}
.link{background:none;border:0;color:var(--navy);font:inherit;font-size:16px;font-weight:600;cursor:pointer;padding:10px 0;min-height:44px;display:inline-flex;align-items:center}
.link.muted{color:var(--muted);font-weight:500}
.add{width:100%;border:1.5px dashed #cfcac0;background:transparent;border-radius:var(--r);padding:16px;font:inherit;font-weight:600;color:var(--navy);cursor:pointer}
.photos{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.photos img{width:56px;height:56px;object-fit:cover;border-radius:10px}
.upload{display:inline-flex;align-items:center;gap:8px;background:var(--bg);border-radius:12px;padding:11px 14px;min-height:44px;font-size:16px;cursor:pointer}
.upload input{display:none}
.note{font-size:14px;color:var(--muted);background:var(--sand);border-radius:12px;padding:12px 14px;line-height:1.45;margin:12px 0}
.mini{font-size:13px;color:var(--muted);line-height:1.4;margin:6px 0 0}
.sub-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:18px 0 10px;padding-top:14px;border-top:1px solid var(--line);font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--navy)}
.pill-btn{flex:none;border:1.5px solid var(--line);background:#fff;border-radius:999px;padding:10px 14px;min-height:44px;font:inherit;font-size:16px;font-weight:600;color:var(--navy);cursor:pointer;text-transform:none;letter-spacing:0}
.pill-btn.on{background:var(--navy);border-color:var(--navy);color:#fff}

.region{display:inline-flex;align-items:center;gap:8px;max-width:100%;background:var(--navy);color:#fff;border-radius:999px;padding:8px 14px;font-size:14px;font-weight:600;margin-bottom:14px}
.days{display:grid;grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:10px}
.day{background:var(--card);border:1.5px solid transparent;border-radius:16px;padding:14px 8px;min-height:44px;text-align:center;cursor:pointer;font:inherit;color:inherit;box-shadow:0 1px 2px rgba(15,27,45,.05);transition:border-color .2s var(--ease),box-shadow .2s var(--ease);min-width:0}
.day .dw{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}
.day .dd{font-size:20px;font-weight:650;letter-spacing:-.02em;margin-top:3px}
.day .rg{font-size:11px;line-height:1.25;color:var(--muted);margin-top:4px}
.day.on{border-color:var(--navy);box-shadow:0 0 0 3px rgba(15,27,45,.08)}
.day.rush .rg{color:#9a6b00}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1.5px solid var(--line);background:#fff;border-radius:999px;padding:10px 14px;min-height:44px;font:inherit;font-size:16px;cursor:pointer;color:var(--ink)}
.chip.on{background:var(--navy);border-color:var(--navy);color:#fff}
.promise{display:flex;gap:14px;align-items:center;background:var(--navy);color:#fff;border-radius:var(--r);padding:16px 18px;margin:18px 0 12px}
.promise .pi{flex:none;width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.14);display:grid;place-items:center;font-size:18px}
.promise b{display:block;font-size:17px;letter-spacing:-.01em}
.promise span{display:block;font-size:14px;opacity:.8;margin-top:2px}
.promise.quote{background:#fff4d6;color:#5c4400}
.promise.quote .pi{background:rgba(92,68,0,.1)}

.sum-row{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-top:1px solid var(--line);font-size:15px}
.sum-row:first-child{border-top:0}
.sum-row > span:first-child{color:var(--muted);flex:1;min-width:0;overflow-wrap:anywhere}
.sum-row > span:last-child{flex:0 1 auto;max-width:64%;min-width:0;text-align:right;overflow-wrap:anywhere}
.sum-row > span:only-child{max-width:none}
/* Price amounts never wrap (e.g. "$75" must not split to "$7" / "5"); the label wraps instead. */
.sum-row > .amt, .total > .amt, .total > span:last-child, .price-card .sum-row > span:last-child, .plan .sum-row > span:last-child{
  flex:0 0 auto;flex-shrink:0;min-width:auto;max-width:none;white-space:nowrap;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:normal}
.total > span:first-child{flex:1;min-width:0}
.edit{background:none;border:0;padding:0 0 0 8px;font:inherit;font-size:14px;font-weight:600;color:var(--navy);cursor:pointer}
.total{display:flex;justify-content:space-between;align-items:baseline;padding-top:12px;margin-top:6px;border-top:1.5px solid var(--ink);font-size:21px;font-weight:650}
.plan{margin-top:12px;background:var(--sand);border-radius:12px;padding:4px 14px}
.plan-head{font-size:12px;font-weight:600;color:var(--navy);padding:9px 0 2px;text-transform:uppercase;letter-spacing:.06em}
.plan .sum-row{border-color:#ddd8cd}
.err{color:var(--err);font-size:14px;margin-top:10px;min-height:1em}
.err:empty{display:none}

.wallets{display:grid;gap:10px}
.wallet{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:50px;border-radius:12px;border:0;font:inherit;font-size:18px;font-weight:600;cursor:pointer;background:#000;color:#fff;letter-spacing:-.01em}
.wallet.gpay{background:#fff;color:#1f1f1f;border:1.5px solid #dadce0}
.wallet .g{font-weight:700;background:conic-gradient(#ea4335 0 25%,#fbbc05 0 50%,#34a853 0 75%,#4285f4 0);-webkit-background-clip:text;background-clip:text;color:transparent}
.or{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;margin:16px 0}
.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}
.badge{display:inline-block;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;background:#fff4d6;color:#7a5a00;border-radius:6px;padding:4px 8px;margin-bottom:12px}
.cardnum{letter-spacing:.06em}

/* Bottom dock: fixed, sized by its own content + home-indicator inset. Page padding uses its measured height. */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:10;display:flex;flex-direction:column;gap:8px;
  padding:12px calc(var(--sar) + 16px) calc(12px + var(--sab)) calc(var(--sal) + 20px);
  background:rgba(255,255,255,.94);-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px);border-top:1px solid var(--line)}
.dock-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%}
.need-line{display:flex;align-items:center;width:100%;margin:0;padding:8px 0;min-height:44px;border:0;background:none;font:inherit;font-size:15px;line-height:1.4;color:var(--muted);text-align:left;cursor:pointer}
.need-line[hidden]{display:none!important}
.estimate{min-width:0}
.est-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.1em;white-space:nowrap}
.est-total{font-size:22px;font-weight:650;letter-spacing:-.02em;white-space:nowrap;font-variant-numeric:tabular-nums}
.est-note{font-size:12px;line-height:1.3;color:var(--muted);margin:-4px 0 0;width:100%}
.est-note[hidden]{display:none}
/* Never truncate a price: long values step down instead (a cut-off price is a wrong price). */
.est-total.long{font-size:18px}
.est-total.xlong{font-size:15px}
.upload-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:110px;z-index:60;max-width:min(92vw,420px);background:var(--ink,#111);color:#fff;border-radius:12px;padding:12px 16px;font-size:15px;line-height:1.35;box-shadow:0 6px 24px rgba(0,0,0,.2)}
.upload-toast[hidden]{display:none}
.dock-actions{display:flex;gap:6px;flex:none}
.btn{font:inherit;font-size:17px;font-weight:600;border-radius:14px;padding:14px 22px;border:0;cursor:pointer;transition:transform .15s var(--ease),opacity .2s;white-space:nowrap}
.btn:active{transform:scale(.97)}
.btn.primary{background:var(--navy);color:#fff;min-width:132px}
.btn.primary[disabled],.btn.primary.is-wait{opacity:.4;cursor:pointer}
.btn.primary[disabled]{cursor:not-allowed}
.btn.back{background:transparent;color:var(--ink);padding:14px 12px}
.btn.ghost{background:transparent;color:var(--ink)}
.btn.full{width:100%}
@media(max-width:380px){.btn{padding:14px 16px}.btn.primary{min-width:112px}.btn.back{padding:14px 8px}.est-total{font-size:20px}}

.done{text-align:center;padding-top:8px}
.check{width:76px;height:76px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;margin:0 auto 18px;font-size:36px;animation:pop .6s var(--ease)}
@keyframes pop{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.08)}100%{transform:scale(1);opacity:1}}
.muted{color:var(--muted)}
.hide{display:none!important}
.req-line{color:var(--ink,#0f1b2d);font-weight:600;margin:6px 0 4px}
[hidden]{display:none!important}
/* Exact logo file from californiaartdelivery.com (1023×928 JPG), unmodified: square corners, no filters, aspect ratio kept. */
.logo{display:block;width:80px;height:auto;flex:none;border-radius:0;filter:none}
/* Booking header: logo exactly centered; step label on the right without pushing the logo off-center. */
#top .top-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px}
#top .brand{grid-column:2;justify-self:center}
#top .steps-label{grid-column:3;justify-self:end;text-align:right}

/* Required-field cue: 2px solid underline on the bottom edge only — never a red box.
   Missing = brand red; when filled, the bar animates to green in ~250ms. */
.field.need > input, .field.need > select, .field.need > textarea, .field.need .seg,
.photos.need .upload, .choices.need, .days.need, .chips.need, [data-reqblock].need,
.field.need-ok > input, .field.need-ok > select, .field.need-ok > textarea, .field.need-ok .seg,
.photos.need-ok .upload, .choices.need-ok, .days.need-ok, .chips.need-ok, [data-reqblock].need-ok{
  transition:box-shadow .25s var(--ease);
}
.field.need > input, .field.need > select, .field.need > textarea, .field.need .seg,
.photos.need .upload, .choices.need, .days.need, .chips.need, [data-reqblock].need{
  box-shadow:inset 0 -2px 0 var(--need-red);
}
.field.need-ok > input, .field.need-ok > select, .field.need-ok > textarea, .field.need-ok .seg,
.photos.need-ok .upload, .choices.need-ok, .days.need-ok, .chips.need-ok, [data-reqblock].need-ok{
  box-shadow:inset 0 -2px 0 var(--ok);
}
.field.need > label.f::after, .field.need label.f::after{
  content:""; display:inline-block; width:6px; height:6px; margin-left:7px; border-radius:50%;
  background:var(--need-red); vertical-align:middle;
}
.field.need-ok > label.f::after, .field.need-ok label.f::after{
  content:""; display:inline-block; width:7px; height:4px; margin-left:7px; border:solid var(--ok); border-width:0 0 1.6px 1.6px;
  background:transparent; border-radius:0; transform:rotate(-45deg) translateY(-1px);
}
@keyframes needPulse{
  0%,100%{box-shadow:inset 0 -2px 0 var(--need-red)}
  40%{box-shadow:inset 0 -2px 0 var(--need-red), 0 6px 0 0 rgba(196,92,78,.18)}
}
.pulse-need > input, .pulse-need > select, .pulse-need > textarea, .pulse-need .seg,
.choices.pulse-need, .days.pulse-need, .chips.pulse-need, .photos.pulse-need .upload, [data-reqblock].pulse-need{
  animation:needPulse .85s var(--ease);
}
@media (prefers-reduced-motion:reduce){
  .field.need > input, .field.need-ok > input, .field.need > select, .field.need-ok > select,
  .field.need > textarea, .field.need-ok > textarea, .field.need .seg, .field.need-ok .seg,
  .photos.need .upload, .choices.need, .days.need, .chips.need, [data-reqblock].need,
  .photos.need-ok .upload, .choices.need-ok, .days.need-ok, .chips.need-ok, [data-reqblock].need-ok{transition:none}
  .pulse-need > input, .pulse-need > select, .pulse-need > textarea, .pulse-need .seg,
  .choices.pulse-need, .days.pulse-need, .chips.pulse-need, .photos.pulse-need .upload, [data-reqblock].pulse-need{animation:none}
}

.req-msg{margin:8px 0 0;font-size:14px;line-height:1.4;color:var(--need-red)}
.choice{min-height:44px}

.member-ok{color:var(--ok);font-size:14px;line-height:1.4;margin:8px 0 0}
.member-pitch{font-size:14px;line-height:1.45;margin:8px 0 4px}

.when-h1 b{font-weight:700;letter-spacing:.04em}
.pickup-chip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 10px;padding:12px 16px;background:var(--sand,#f4f3ef);border-radius:14px;font-size:15px;line-height:1.35}
.pickup-chip b{font-weight:650;margin-right:.35em}
.time-reassure{margin:12px 0 4px;padding:14px 16px;background:var(--sand,#f4f3ef);border-radius:14px;font-size:14px;line-height:1.5;color:var(--ink)}
.time-reassure p{margin:0}
.route-hint{margin-top:10px}
h2 .opt{font-weight:500;color:var(--muted);letter-spacing:0;text-transform:none;font-size:14px}
.linkbtn{background:none;border:0;padding:10px 4px;margin:6px 0 2px;font:inherit;font-size:15px;color:var(--ink,#0f1b2d);text-decoration:underline;cursor:pointer;min-height:44px}

/* Small steps: one short screen at a time */
.panel[hidden]{display:none!important}
.piece-tag{margin:-2px 0 12px;font-size:15px;font-weight:600;color:var(--muted);overflow-wrap:anywhere}
.card > .sub-head.first{margin-top:0;padding-top:0;border-top:0}
.promise .edit{flex:none;margin-left:auto;color:#fff;text-decoration:underline;opacity:.92}
.promise.quote .edit{color:#5c4400}
h2 .edit{font-size:14px;margin-left:4px;vertical-align:baseline}
.edit{min-height:36px}
.sum-row .edit{min-height:0;padding-top:4px;padding-bottom:4px}
.panel h1{margin-top:2px}
.panel > .card:last-child{margin-bottom:6px}

/* One entry = one piece: piece list (Edit · Duplicate · Remove), duplicate dialog, Quick edit pieces */
.pc-list{padding:6px 18px}
.pc{padding:12px 0;border-bottom:1px solid var(--line,#e6e1d8)}
.pc:last-child{border-bottom:0}
.pc.incomplete{background:linear-gradient(90deg,rgba(176,106,0,.07),transparent)}
.pc-main{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline}
.pc-title{font-size:16px;flex:1 1 100%;overflow-wrap:anywhere}
.pc-facts{flex:1 1 100%;font-size:14px;overflow-wrap:anywhere}
.pc-actions{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px;margin-top:2px}
.pc-actions .edit{padding-left:0;font-size:16px;min-height:44px}
.pc-actions .link{font-size:16px}
.pc-actions .dot{color:var(--muted);padding:0 2px}
.tag{display:inline-block;font-size:12px;font-weight:700;border-radius:999px;padding:3px 9px;letter-spacing:.2px}
.tag.warn{background:#fff1d6;color:#7a4b00}
.tag.bad{background:#fde4e1;color:#9b2217}
.warn-line{color:#7a4b00}
.warn-line .link{font-size:14px;min-height:0;padding:0 0 0 4px;text-decoration:underline}
.pc-confirm{margin-top:8px;padding:12px;border-radius:12px;background:#fde4e1;color:#5c1a12;display:grid;gap:10px;font-weight:600;overflow-wrap:anywhere}
.pc-confirm-btns,.pc-dup-btns{display:flex;gap:8px;flex-wrap:wrap}
.btn.danger{background:#b3261e}
.pc-dup{margin-top:8px;padding:14px;border-radius:12px;background:#f3efe6;display:grid;gap:10px}
.pc-dup input[type=number]{width:100%;font-size:16px}
details.quick{margin:14px 0;background:var(--card);border-radius:var(--r);box-shadow:0 1px 2px rgba(15,27,45,.05)}
details.quick>summary{cursor:pointer;font-weight:700;padding:16px 18px;min-height:48px;list-style:none;display:flex;align-items:center;justify-content:space-between}
details.quick>summary::after{content:"＋";font-weight:600}
details.quick[open]>summary::after{content:"–"}
details.quick>summary::-webkit-details-marker{display:none}
.qlist{padding:0 12px 12px;display:grid;gap:8px}
details.qrow{border:1px solid var(--line,#e6e1d8);border-radius:12px;background:#fff}
details.qrow>summary{cursor:pointer;padding:12px 14px;display:grid;gap:2px;list-style:none;min-height:48px}
details.qrow>summary b{font-size:15px;overflow-wrap:anywhere}
details.qrow>summary .muted{font-size:13px;overflow-wrap:anywhere}
details.qrow>summary::-webkit-details-marker{display:none}
.qbody{padding:0 14px 14px;display:grid;gap:6px}
.qweight{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.piece-review-note{display:block}
.piece-review-note .mini{display:block;margin:0}
/* Confirm copied declared values (Dot): list screen and final review */
.val-confirm{border:2px solid #e0a800;background:#fffaf0}
.val-confirm h2{margin:0 0 6px}
.vc-list{display:grid;gap:8px;margin:10px 0}
.vc-row{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between;padding:8px 0;border-top:1px solid var(--line)}
.vc-row:first-child{border-top:0}
.vc-btns{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.vc-all{width:100%;margin-top:4px}
.vc-fine{margin:8px 0 0}
/* Confirmation: collapsible piece list */
.your-pieces{padding:0}
.your-pieces>summary{list-style:none;cursor:pointer;padding:16px 18px;font-weight:700;display:flex;justify-content:space-between;align-items:center;min-height:48px}
.your-pieces>summary::-webkit-details-marker{display:none}
.your-pieces>summary::after{content:"+";font-size:22px;line-height:1}
.your-pieces[open]>summary::after{content:"–"}
.yp-list{padding:0 18px 10px}
/* Long lists: finished pieces collapse to one short row */
.pc.compact{padding:6px 0}
.pc.compact .pc-main{flex-wrap:nowrap;align-items:baseline;gap:8px}
.pc.compact .pc-title{flex:1 1 auto;min-width:0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc.compact .pc-facts{display:none}
.pc-val{flex:none;font-size:14px;font-variant-numeric:tabular-nums}
.pc:not(.compact) .pc-val{display:none}
.pc.compact .pc-actions .edit,.pc.compact .pc-actions .link{min-height:40px;font-size:15px}
.pc-summary{margin:0 0 8px}
/* Short screens (phone with the keyboard open): a slimmer bottom bar so fields keep their room */
@media (max-height:480px){
  .dock{gap:2px;padding-top:6px;padding-bottom:calc(6px + var(--sab))}
  .est-label,.est-note{display:none}
  .est-total{font-size:18px}
  .need-line{min-height:32px;padding:2px 0;font-size:14px}
}
