:root {
  color-scheme: light;
  --brand: rgb(251, 160, 50);
  --brand-hover: rgb(240, 145, 30);
  --brand-soft: #fff4e5;
  --brand-dark: #8a5310;
  --ink: #2b2b2b;
  --text: #525252;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --bg: #f5f7fa;
  --ok: #1c871e;
  --ok-soft: #e9f6e9;
  --err: #b90000;
  --err-soft: #fdecec;
  --tool: #1f2933;
  --radius: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "Open Sans", Verdana, Helvetica, sans-serif; }
h1, h2, h3 { font-family: Montserrat, "Open Sans", sans-serif; color: var(--ink); line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }

/* Review chrome: not part of the customer experience */
.proto-banner { background: var(--tool); color: #fff; padding: 8px 16px; font-size: .85rem; text-align: center; }
.proto-banner strong { color: var(--brand); }
.proto-banner a { color: #fff; font-weight: 700; }
.review { background: #fff; border-bottom: 1px solid var(--line); }
.review-inner { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.steps { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.steps button { border: 0; background: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-size: .85rem; font-weight: 600; min-height: 36px; }
.steps button:hover { background: var(--bg); }
.steps button[aria-current="step"] { background: var(--tool); color: #fff; }
.tools { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; align-items: center; }
.tools label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; min-height: 32px; }
.tool-btn { border: 1px solid #bdbdbd; background: #fff; color: var(--ink); border-radius: 6px; min-height: 32px; padding: 2px 10px; font-size: .85rem; }
.stage-wrap { padding: 16px; }
.stage { max-width: 1120px; margin: 0 auto; container-type: inline-size; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); border-radius: var(--radius); overflow: clip; }
.stage.phone { max-width: 390px; border: 8px solid var(--tool); border-radius: 26px; }
.note { max-width: 1120px; margin: 12px auto 0; background: #fff; border: 1px dashed #b8c2cc; border-radius: var(--radius); padding: 12px 16px; font-size: .9rem; }
.note h2 { font-size: .9rem; margin-bottom: 4px; }
.note ul { margin: 0; padding-left: 18px; }
.note .open { color: var(--brand-dark); font-weight: 700; }
.stage.phone + .note { max-width: 390px; }
.hide-notes .note { display: none; }

/* Shop look */
.shop-head { display: flex; align-items: center; gap: 24px; padding: 12px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shop-head img { height: 44px; width: auto; display: block; }
.shop-nav { font-size: .9rem; font-weight: 600; color: var(--ink); }
.page { padding: 24px; }
.narrow { max-width: 720px; margin: 0 auto; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.product { display: grid; gap: 28px; grid-template-columns: 1fr; }
@container (min-width: 720px) { .product { grid-template-columns: 1fr 1.15fr; } }
.product-img { background: var(--bg); border-radius: var(--radius); min-height: 260px; display: grid; place-items: center; padding: 24px; }
.product-img svg { width: min(280px, 100%); height: auto; }
.meta { font-size: .85rem; color: var(--muted); margin: 6px 0 14px; }
.field { margin: 16px 0; border: 0; padding: 0; }
.field legend, .field-label { font-weight: 700; color: var(--ink); display: block; margin-bottom: 6px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid #bdbdbd; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 6px; min-height: 44px; }
.chip[aria-pressed="true"] { border-color: var(--brand-dark); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-dark); font-weight: 700; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 44px; height: 44px; border: 1px solid #bdbdbd; background: #fff; border-radius: 6px; font-size: 1.2rem; color: var(--ink); }
.qty output { min-width: 56px; text-align: center; font-weight: 700; color: var(--ink); }
.help { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.price { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.price small { font-size: .8rem; font-weight: 400; color: var(--muted); display: block; line-height: 1.4; }
.tier-table { border-collapse: collapse; margin-top: 10px; font-size: .9rem; color: var(--ink); }
.tier-table th, .tier-table td { border: 1px solid var(--line); padding: 4px 12px; text-align: left; }
.tier-table th { background: var(--bg); font-weight: 600; }
.hint { display: flex; gap: 12px; background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 12px 14px; border-radius: 0 6px 6px 0; margin: 16px 0; color: var(--ink); }
.hint svg { flex: none; width: 24px; height: 24px; margin-top: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; background: var(--brand); color: #1d1405; font-weight: 700; padding: 12px 22px; border-radius: 6px; min-height: 48px; text-decoration: none; }
.btn:hover { background: var(--brand-hover); }
.btn[disabled] { background: #e4e4e4; color: #6a6a6a; cursor: not-allowed; }
.btn.big { font-size: 1.15rem; min-height: 60px; padding: 14px 24px; width: 100%; }
.btn.ghost { background: #fff; border: 1px solid #bdbdbd; color: var(--ink); }
.btn.ghost:hover { background: var(--bg); }
.btn svg { width: 24px; height: 24px; flex: none; }
.w-full { width: 100%; }
.link-btn { border: 0; background: none; color: var(--brand-dark); font-weight: 700; padding: 4px 0; min-height: 32px; text-decoration: underline; }

/* Category cards (Variante A entry) */
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@container (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card h3 { font-size: 1rem; margin-bottom: 4px; }
.callout { margin: 20px 0; border: 2px solid var(--brand); border-radius: var(--radius); padding: 20px; background: var(--brand-soft); }
.callout h2 { margin-bottom: 6px; }
.callout p { color: var(--ink); margin-bottom: 14px; }

/* Upload */
.upload-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.upload-head img { height: 40px; width: auto; display: block; }
.upload-head span { font-size: .9rem; color: var(--ink); font-weight: 600; }
.upload { padding: 20px; }
.upload h1 { margin-bottom: 4px; }
.total { position: sticky; top: 0; background: #fff; padding: 12px 0; z-index: 5; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.total-line { font-weight: 700; color: var(--ink); font-size: 1.05rem; margin-bottom: 6px; }
.bar { height: 12px; background: #e8e8e8; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .2s; }
.drop { border: 2px dashed #bdbdbd; border-radius: var(--radius); padding: 16px; text-align: center; margin-bottom: 14px; }
.drop.over { border-color: var(--brand-dark); background: var(--brand-soft); }
.drop-sub { font-size: .95rem; color: var(--muted); margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 14px; }
.grid:empty { display: none; }
.tile { position: relative; border-radius: 6px; overflow: hidden; background: #eee; aspect-ratio: 4 / 3; border: 0; padding: 0; display: block; width: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .55; transition: opacity .2s; }
.tile.done img { opacity: 1; }
.tile .tbar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 6px; background: rgba(255,255,255,.75); border-radius: 3px; overflow: hidden; }
.tile .tbar i { display: block; height: 100%; width: 0; background: var(--ok); }
.tile.done .tbar { display: none; }
.tile .rm { position: absolute; top: 3px; right: 3px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 1.1rem; line-height: 1; }
.msg { margin-top: 12px; padding: 10px 12px; border-radius: 6px; font-size: .95rem; background: var(--err-soft); color: var(--err); }
.demo { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); padding-top: 10px; border-top: 1px dashed #b8c2cc; }
.demo button { border: 1px solid #b8c2cc; background: #fff; border-radius: 6px; padding: 6px 10px; min-height: 36px; color: var(--tool); font-size: .85rem; }
.helpline { font-size: .95rem; color: var(--muted); margin-top: 16px; }
.helpline a { color: var(--brand-dark); font-weight: 700; }
.keep-open { background: var(--bg); border-radius: 6px; padding: 10px 12px; font-size: .95rem; color: var(--ink); margin-top: 12px; }
.batch-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.big-count { font-size: 1.3rem; font-weight: 700; color: var(--ink); }

/* Variante A: assign */
.assign { display: grid; gap: 20px; grid-template-columns: 1fr; }
@container (min-width: 860px) { .assign { grid-template-columns: 1.45fr 1fr; align-items: start; } .assign-side { position: sticky; top: 12px; } }
.assign .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); max-height: 560px; overflow: auto; padding: 3px; margin-top: 10px; }
.sel-tile { position: relative; cursor: pointer; }
.sel-tile[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--brand-dark); }
.sel-tile .sel-mark { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.92); border: 2px solid #777; display: grid; place-items: center; color: transparent; }
.sel-tile[aria-pressed="true"] .sel-mark { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.sel-mark svg { width: 14px; height: 14px; }
.badge { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(20,20,20,.74); color: #fff; font-size: .72rem; line-height: 1.25; padding: 3px 5px; text-align: left; }
.sel-bar { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; color: var(--ink); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.panel h2 { font-size: 1rem; }
.panel .field { margin: 12px 0; }
.panel .chip { padding: 6px 10px; min-height: 40px; font-size: .92rem; }
.mixed-note { font-size: .85rem; color: var(--brand-dark); }
.sum-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sum-table td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.sum-table td:last-child { text-align: right; white-space: nowrap; padding-left: 10px; }
.sum-sub { display: block; color: var(--muted); font-size: .85rem; }
.sum-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; color: var(--ink); margin-top: 10px; }

/* Cart */
.cart-line { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cart-line h3 { font-size: 1rem; }
.cart-sub { font-size: .9rem; color: var(--muted); }
.cart-code { display: inline-block; margin-top: 4px; font-size: .85rem; color: var(--ink); background: var(--bg); border-radius: 4px; padding: 2px 8px; }
.cart-price { text-align: right; color: var(--ink); font-weight: 700; white-space: nowrap; }
.cart-price small { display: block; font-weight: 400; color: var(--muted); }
.totals { margin: 16px 0 0 auto; max-width: 340px; color: var(--ink); }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.totals .sum { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.totals small { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 20px; }

/* Thanks */
.success-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin-bottom: 12px; }
.success-icon svg { width: 28px; height: 28px; }
.finished { background: var(--ok-soft); border: 2px solid var(--ok); border-radius: var(--radius); padding: 18px; margin: 16px 0; color: var(--ink); }
.finished h2 { color: var(--ok); margin-bottom: 4px; }

/* Lab */
.order-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .95rem; }
.order-table th, .order-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.order-table th { font-weight: 600; color: var(--muted); }
.code { font: 700 .95rem ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.pos { border: 1px solid var(--ok); background: #fbfefb; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.pos-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.pos-count { font-weight: 700; color: var(--ok); }
.zip { background: #fafafa; border: 1px solid var(--line); border-radius: 6px; padding: 12px; font: .85rem/1.6 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; color: var(--ink); }
.empty { padding: 32px 20px; text-align: center; }
.empty p { margin-bottom: 14px; }

@container (max-width: 480px) {
  .btn.big { font-size: 1.02rem; padding: 12px; gap: 8px; }
  .drop { padding: 10px; }
  .drop-desktop { display: none; }
  .page, .upload { padding: 16px; }
  .shop-head { padding: 10px 16px; }
  .stage .steps { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
