/* ---------- Tipografías (alojadas en el propio servidor) ---------- */

:root {
  /* Propuesta 05 · Negro y marfil */
  --bg: #0E0D0C;
  --surface: #171614;
  --surface-2: #211F1C;
  --ink: #F3EEE6;
  --muted: #A29C93;
  --line: #34312C;
  --ivory: #F3EEE6;
  --ivory-2: #E6DFD3;
  --black: #0E0D0C;
  --accent: #F3EEE6;          /* color claro de la sucursal (tarjetas y pestañas) */
  --on-accent: #0E0D0C;
  --brand: #F3EEE6;
  --on-brand: #0E0D0C;
  --danger: #E08A7E;
  --radius: 10px;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }

.caps { text-transform: uppercase; letter-spacing: .22em; font-size: 11px; font-weight: 500; }
.serif { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--ivory); border-radius: 8px;
  background: transparent; color: var(--ink); font-weight: 500; text-decoration: none;
  transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn.solid, .btn.primary { background: var(--ivory); border-color: var(--ivory); color: var(--black); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.btn.ghost { border-color: transparent; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon { width: 20px; height: 20px; flex: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ivory); color: var(--black);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
  box-shadow: 0 8px 24px rgba(29, 35, 33, .2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; display: inline-block; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Logotipo de texto (se usa si no se subió un logo) */
.wordmark { display: inline-flex; flex-direction: column; align-items: center; color: var(--ink); line-height: 1; }
.wordmark .arc { width: 150px; height: 30px; overflow: visible; margin-bottom: -2px; }
.wordmark .arc text { font: 600 9.5px var(--font-body); letter-spacing: .2em; fill: currentColor; text-transform: uppercase; }
.wordmark .name { font: 800 52px/0.9 var(--font-body); letter-spacing: .02em; }
.wordmark.small .arc { width: 92px; height: 18px; }
.wordmark.small .arc text { font-size: 6.5px; }
.wordmark.small .name { font-size: 30px; }
.brand-logo { max-height: 96px; width: auto; object-fit: contain; }
.brand-logo.small { max-height: 48px; }

/* Ilustraciones de líneas */
.art { color: var(--ink); pointer-events: none; }
.art .wine-fill { fill: none; stroke: currentColor; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
[hidden] { display: none !important; }

body { min-height: 100dvh; }
body.no-scroll { overflow: hidden; }
#app { max-width: 560px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.icon.tiny { width: 13px; height: 13px; vertical-align: -1px; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); }

/* ---------- 01 · Sucursales ---------- */
.picker { min-height: 100dvh; padding: max(48px, calc(env(safe-area-inset-top) + 28px)) 24px 0; display: flex; flex-direction: column; overflow: hidden; }
.picker-logo { display: flex; justify-content: center; align-items: center; min-height: 110px; color: var(--ivory); }
.picker .wordmark { color: var(--ivory); }
.picker .wordmark .name { font-size: 60px; }
.picker .wordmark .arc { width: 170px; height: 34px; }
.picker-title { margin: 34px 0 30px; font-size: 44px; line-height: 1; font-weight: 500; color: var(--ivory); letter-spacing: -.015em; }
.picker-label { margin: 0 0 14px; font-size: 11px; font-weight: 600; letter-spacing: .3em; }
.branch-list { display: grid; gap: 12px; }
.branch-card {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center;
  min-height: 60px; padding: 0 22px; border-radius: 8px;
  background: var(--c); color: var(--on-c); text-decoration: none;
  transition: transform .1s ease, opacity .15s;
}
.branch-card:active { transform: scale(.985); opacity: .9; }
.bc-num { font-size: 17px; font-weight: 600; letter-spacing: .08em; }
.bc-name { font-size: 17px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-arrow { width: 24px; height: 24px; }
.picker-art { margin: 28px -24px 0 -10px; color: var(--ivory); opacity: .9; }
.picker-art .art { width: 100%; max-width: 420px; height: auto; display: block; color: var(--ivory); }
.skeleton { height: 60px; border-radius: 8px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 02 · Menú ---------- */
.menu-page { padding: 0 16px; }
.m-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 4px 10px; }
.m-logo { text-decoration: none; display: flex; align-items: center; min-height: 48px; color: var(--ivory); }
.m-logo .wordmark { color: var(--ivory); }
.m-logo .wordmark.small .name { font-size: 32px; }
.branch-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 2px; border: 0; background: none; color: var(--ink); text-align: left; }
.bp-pin { width: 22px; height: 22px; color: var(--accent); }
.bp-text { display: flex; flex-direction: column; line-height: 1.2; }
.bp-name { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.bp-change { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bp-change .icon { width: 14px; height: 14px; }

.hero {
  position: relative; margin: 0 -16px; min-height: 270px; display: flex; align-items: flex-end;
  padding: 0 20px 22px; overflow: hidden;
  background: radial-gradient(120% 90% at 80% 20%, #2A2622 0%, #151412 55%, var(--bg) 100%) center / cover no-repeat;
}
.hero.has-photo { background-size: cover; background-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,13,12,0) 30%, rgba(14,13,12,.55) 65%, var(--bg) 100%); pointer-events: none; }
.hero-art { position: absolute; right: 18px; top: 34px; width: 180px; color: var(--ivory); opacity: .22; }
.hero-art .art { width: 100%; height: auto; }
.headline { position: relative; z-index: 1; margin: 0; max-width: 330px; font-size: 56px; line-height: .95; font-weight: 500; color: var(--ivory); letter-spacing: -.015em; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.headline:empty { display: none; }

.search {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  height: 46px; padding: 0 16px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.search .icon { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--ivory); }

.sticky-bar {
  position: sticky; top: 0; z-index: 10; margin: 0 -16px; padding: 14px 16px 0;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.sticky-bar.stuck { padding-top: max(10px, env(safe-area-inset-top)); }
.mini-name { display: none; margin-bottom: 10px; font-size: 11px; font-weight: 600; color: var(--accent); }
.sticky-bar.stuck .mini-name { display: block; }
.cat-tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button {
  flex: none; min-width: 90px; min-height: 42px; padding: 0 18px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px;
}
.cat-tabs.fit button { flex: 1; min-width: 0; }
.cat-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.sub-tabs { border-bottom: 1px solid var(--line); }
.seg { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; position: relative; min-height: 40px; padding: 0 2px; border: 0; background: none; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

.offline-banner { margin: 10px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--ivory); color: var(--black); font-size: 14px; display: flex; gap: 8px; align-items: center; }

.content { min-height: 40dvh; }
.cat-desc { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.product-list { display: flex; flex-direction: column; }
.product {
  display: flex; gap: 14px; align-items: flex-start; width: 100%;
  padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--ink);
}
.p-img { width: 64px; height: 64px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.p-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-cat { font-size: 9.5px; color: var(--muted); margin-bottom: 3px; }
.p-name { font-size: 17px; line-height: 1.25; font-weight: 600; }
.p-desc { margin-top: 3px; font-size: 14px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-side { flex: none; padding-top: 1px; }
.amount { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product.sold-out .p-name, .product.sold-out .p-desc { opacity: .6; }
.product.sold-out .p-img { filter: grayscale(1); opacity: .5; }
.badge-soldout { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ivory); color: var(--ivory); font-size: 13px; white-space: nowrap; }
.results-count { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.empty { padding: 40px 8px; text-align: center; color: var(--muted); }
.menu-loading { min-height: 70dvh; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: var(--muted); padding: 24px; text-align: center; }

/* ---------- Pie ---------- */
.m-footer { padding: 28px 0 calc(16px + env(safe-area-inset-bottom)); }
.info-card { border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 10px; }
.info-card .caps { margin: 0; font-size: 10px; }
.info-card h2 { margin: 2px 0 12px; font-size: 32px; line-height: 1; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.info-list .icon { color: var(--muted); margin-top: 1px; width: 18px; height: 18px; }
.info-list a { text-decoration-color: var(--muted); }
.pre { white-space: pre-line; }
.info-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.info-links .btn { min-height: 42px; border-radius: 999px; border-color: var(--line); }
.info-links .icon { width: 18px; height: 18px; }
.staff-row {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; padding: 0 4px;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 15px;
  --lock-hole: var(--bg);
}
.staff-row .icon:first-child { width: 20px; height: 20px; }
.staff-row span { flex: 1; text-align: left; max-width: 220px; }
.staff-row .chev, .sheet-link .chev { color: var(--muted); width: 18px; height: 18px; }

/* ---------- Hojas inferiores ---------- */
.m-sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.m-sheet { position: relative; width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.sheet-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(14, 13, 12, .75); color: var(--ivory); }
.detail-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-art { display: flex; justify-content: center; padding: 34px 0 6px; color: var(--ivory); }
.detail-art .art { height: 92px; width: auto; }
.detail-body { padding: 22px 20px 4px; }
.detail-body .caps { margin: 0 0 4px; font-size: 10px; }
.detail-body h2 { margin: 0 0 10px; font-size: 38px; line-height: 1; padding-right: 40px; }
.detail-desc { margin: 0 0 14px; font-size: 16px; color: var(--muted); }
.detail-price { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.sheet-links { margin-top: 18px; border-top: 1px solid var(--line); }
.sheet-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); background: none; text-decoration: none; color: var(--ink); font-size: 15px; text-align: left; }
.sheet-link span { flex: 1; }
.switch-list { display: grid; gap: 8px; margin: 6px 0 8px; }
.switch-item { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.switch-item .serif { flex: 1; font-size: 26px; }
.switch-item.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.switch-item.current .muted { color: inherit; opacity: .7; }
.switch-item .caps { font-size: 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }

@media (max-width: 360px) {
  .picker-title { font-size: 38px; }
  .headline { font-size: 42px; }
}

body { min-height: 100dvh; }
body.no-scroll { overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.block { width: 100%; }
.icon.inline { width: 16px; height: 16px; vertical-align: -3px; }
.icon.flip { transform: scaleX(-1); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }

.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-decoration: none; }
.icon-btn:active { background: var(--surface-2); }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 14px; padding: 10px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: var(--black); }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 14px; font-weight: 500; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea, .code-input input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink);
  font-size: 16px; outline: none;
}
.field select option { background: var(--surface); }
.field textarea { resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus, .code-input input:focus { border-color: var(--ivory); }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding-left: 14px; font-weight: 500; color: var(--muted); }
.money-input:focus-within { border-color: var(--ivory); }
.money-input input { border: 0 !important; box-shadow: none !important; font-weight: 600; font-size: 18px !important; color: var(--ink); background: transparent !important; }
.form-msg { margin: 0 0 12px; font-size: 14px; font-weight: 500; }
.form-msg:empty { display: none; }
.form-msg.error { color: var(--black); background: var(--danger); padding: 10px 12px; border-radius: 8px; }
.form-msg.ok { color: var(--black); background: var(--ivory); padding: 10px 12px; border-radius: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-between p { margin: 2px 0 0; }

/* Interruptor marfil */
.switch { position: relative; display: inline-flex; flex: none; width: 48px; height: 44px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: #3A3732; transition: background .15s; position: relative; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #CFC9BF; transition: transform .18s ease, background .15s; }
.switch input:checked + .track { background: var(--ivory); }
.switch input:checked + .track::after { transform: translateX(20px); background: var(--black); }
.switch input:focus-visible + .track { outline: 2px solid var(--ivory); outline-offset: 2px; }

/* ---------- 03 · Acceso privado ---------- */
.login { min-height: 100dvh; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; }
.login-top { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--ivory); color: var(--black); padding: max(60px, calc(env(safe-area-inset-top) + 40px)) 24px 30px; --lock-hole: var(--ivory); }
.lock-badge { width: 64px; height: 64px; display: grid; place-items: center; color: var(--black); }
.lock-badge .icon { width: 54px; height: 54px; stroke-width: 2.2; }
.login h1 { margin: 18px 0 14px; font-size: 50px; line-height: .96; font-weight: 500; color: var(--black); }
.login-sub { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .3em; }
.login-branch { position: relative; display: inline-flex; align-items: center; }
.login-branch select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; padding: 8px 22px 8px 6px; min-height: 40px; color: var(--black); text-align: center; }
.login-branch select option { color: #000; }
.login-branch .icon { position: absolute; right: 0; width: 15px; height: 15px; pointer-events: none; }
.login-main { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 24px 0; }
#login-form { width: 100%; }
.code-label { margin: 0 0 16px; font-size: 15px; }
.code-boxes { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; }
.code-boxes .box {
  width: 42px; height: 54px; border: 1.5px solid var(--ivory); border-radius: 6px; background: transparent; color: var(--ivory);
  text-align: center; font-size: 22px; font-weight: 600; outline: none; padding: 0; caret-color: var(--ivory);
}
.code-boxes .box:focus { background: var(--surface-2); box-shadow: 0 0 0 3px rgba(243, 238, 230, .18); }
.code-boxes.error .box { border-color: var(--danger); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.login .btn.solid { min-height: 52px; border-radius: 6px; font-size: 17px; font-weight: 600; letter-spacing: .06em; }
.login .form-msg { text-align: left; }
.back-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px; color: var(--ink); font-size: 15px; text-decoration: none; }
.back-link span { text-decoration: underline; text-underline-offset: 4px; }
.back-link .icon { width: 18px; height: 18px; }
.login .link-btn { margin-top: 0; }
.login-art { margin: 0 -8px; color: var(--ivory); }
.login-art .art { width: 100%; height: auto; display: block; color: var(--ivory); }

/* ---------- 04 · Edición en vivo ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ivory); color: var(--black); padding: max(14px, calc(env(safe-area-inset-top) + 8px)) 18px 12px; }
.tb-row { display: flex; align-items: center; gap: 8px; max-width: 760px; margin: 0 auto; }
.tb-title { flex: 1; min-width: 0; margin: 0; font-size: 38px; line-height: 1.05; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-row.sub { gap: 10px; min-height: 34px; margin-top: 2px; }
.branch-switch { position: relative; display: inline-flex; align-items: center; }
.branch-switch select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; padding: 6px 20px 6px 0; min-height: 34px; color: var(--black); max-width: 46vw; }
.branch-switch select option { color: #000; }
.branch-switch .icon { position: absolute; right: 0; width: 14px; height: 14px; pointer-events: none; }
.branch-caps { font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; }
.role-chip { font-size: 11px; color: #5D5850; border: 1px solid #CFC7BA; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.logout-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: #5D5850; font-size: 13px; min-height: 34px; padding: 0 2px; text-decoration: none; }
.logout-btn:first-of-type { margin-left: auto; }
.logout-btn .icon { width: 16px; height: 16px; }

.save-status { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 2px; font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 44vw; overflow: hidden; flex: none; color: var(--black); }
.save-status span { overflow: hidden; text-overflow: ellipsis; }
.save-status .icon { width: 17px; height: 17px; }
.save-status.saving { color: #5D5850; }
.save-status.error, .save-status.offline { background: var(--black); color: var(--ivory); padding: 0 12px; border-radius: 999px; }

.queue-banner { display: flex; gap: 10px; align-items: flex-start; max-width: 760px; margin: 10px auto 0; padding: 12px 14px; background: var(--black); color: var(--ivory); font-size: 14px; border-radius: 8px; }

.view { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
.loading { padding: 60px 0; display: flex; gap: 10px; justify-content: center; color: var(--muted); }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.add-row .btn { min-height: 46px; border-radius: 6px; font-size: 15px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 4px; }
.order-row .btn { min-height: 36px; border-radius: 999px; flex: none; border-color: var(--line); }
.order-row .btn.primary { border-color: var(--ivory); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state .art { width: 90px; margin: 0 auto 6px; color: var(--ivory); }

.cat-list { display: flex; flex-direction: column; }
.cat-card { border-bottom: 1px solid var(--line); }
.cat-card.sub { border-bottom: 0; }
.cat-card.inactive > .cat-head .cat-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.cat-head { display: flex; align-items: center; gap: 6px; padding: 14px 0 8px; min-height: 64px; }
.cat-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 0; text-align: left; min-height: 48px; color: var(--ink); }
.caret { width: 16px; height: 16px; transition: transform .15s; transform: rotate(180deg); color: var(--muted); flex: none; }
.cat-toggle[aria-expanded="false"] .caret { transform: rotate(0deg); }
.cat-name { font-size: 40px; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-sub { flex: none; min-height: 38px; border-radius: 6px; font-size: 13px; padding: 0 12px; }
.add-sub .icon { width: 16px; height: 16px; }
/* Subcategoría: título con subrayado, como una pestaña */
.cat-card.sub > .cat-head { padding: 8px 0 0; min-height: 52px; border-bottom: 1px solid var(--line); }
.cat-card.sub .cat-toggle { flex: 0 1 auto; padding: 8px 2px 10px; border-bottom: 2px solid var(--ink); margin-bottom: -1px; border-radius: 0; min-height: 0; }
.cat-card.sub .cat-name { font: 400 16px/1.2 var(--font-body); letter-spacing: 0; }
.cat-card.sub .caret { width: 14px; height: 14px; }
.cat-card.sub > .cat-head .icon-btn { margin-left: auto; }
.chip { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid var(--line); color: var(--muted); }
.cat-body { padding: 0 0 10px; }
.sub-list { display: flex; flex-direction: column; gap: 8px; }

.prod-list { display: flex; flex-direction: column; min-height: 4px; }
.prod-row {
  display: grid; grid-template-columns: 26px 1fr auto 40px; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); background: var(--bg);
}
.prod-row .grip { grid-row: 1 / 3; }
.prod-row .prod-name { grid-column: 2; grid-row: 1; }
.prod-row .price-box { grid-column: 2; grid-row: 2; }
.prod-row .avail { grid-column: 3; grid-row: 1 / 3; }
.prod-row .pencil { grid-column: 4; grid-row: 1 / 3; }
.prod-row .move { grid-column: 3 / 5; grid-row: 1 / 3; }
.grip { width: 26px; height: 44px; display: grid; place-items: center; color: var(--muted); cursor: grab; touch-action: none; }
.grip .icon { width: 18px; height: 18px; }
.prod-name { min-width: 0; display: flex; border: 0; background: none; padding: 0 0 8px; text-align: left; color: var(--ink); }
.pn { font-size: 16px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-row.off .pn { color: var(--muted); }
.price-box { display: inline-flex; align-items: center; gap: 6px; width: 112px; height: 40px; padding: 0 12px; border: 1px solid #5A564F; border-radius: 6px; background: transparent; font-size: 16px; }
.price-box:focus-within { border-color: var(--ivory); background: var(--surface); }
.price-box input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; padding: 0; }
.avail { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.na { font-size: 12.5px; color: var(--muted); white-space: nowrap; text-align: center; }
.icon-btn.pencil { width: 40px; color: var(--ink); }
.icon-btn.pencil .icon { width: 20px; height: 20px; }
.move { display: flex; gap: 6px; justify-content: flex-end; }
.move .icon-btn { border: 1px solid var(--line); }
.add-here { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 4px; min-height: 40px; padding: 0 2px; border: 0; background: none; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--muted); }
.add-here .icon { width: 16px; height: 16px; }
.drag-ghost { opacity: .3; }
.drag-chosen { background: var(--surface-2); }
.sortable-fallback { opacity: .95 !important; }

.live-card { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; padding: 18px 16px; border-radius: 8px; border: 1.5px solid var(--ivory); font-size: 13px; line-height: 1.4; text-align: left; }
.live-card strong { font-weight: 500; font-size: 16px; }
.live-ic { width: 26px; height: 26px; flex: none; display: grid; place-items: center; }
.live-ic .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.live-card.warn { background: var(--ivory); color: var(--black); justify-content: flex-start; }

/* ---------- Otras pestañas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px 4px; margin-bottom: 12px; }
.card h2 { margin: 0 0 14px; font-size: 32px; line-height: 1; }
.card h3 { margin: 0; font-size: 26px; }
.card > p { margin-top: 0; }
.brand-card { padding-bottom: 16px; }
.brand-card > p.muted { margin: -6px 0 16px; }
.sticky-save { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 8px 0; background: linear-gradient(transparent, var(--bg) 30%); margin-bottom: 12px; }
.logo-edit, .photo-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.logo-preview, .photo-preview { width: 80px; height: 80px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font: 500 30px var(--font-display); }
.brand-preview { min-width: 110px; min-height: 80px; flex: none; display: grid; place-items: center; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); color: var(--ivory); }
.brand-preview .wordmark { color: var(--ivory); }
.hero-edit { height: 120px; border-radius: 8px; border: 1px dashed var(--line); overflow: hidden; display: grid; place-items: center; background: var(--bg); }
.hero-edit img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.logo-preview img, .photo-preview img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.photo-btns { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.swatch.sel { box-shadow: 0 0 0 3px var(--ivory); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#F3EEE6, #E6D3B3, #C7A9A4, #A9B7C6, #B9C7B8, #F3EEE6); cursor: pointer; }
.swatch.custom input { position: absolute; inset: -8px; width: 60px; height: 60px; opacity: 0; cursor: pointer; }

.qr-card { text-align: center; padding-bottom: 18px; }
.qr-box { display: inline-block; padding: 14px; background: #fff; border-radius: 10px; margin: 8px 0; }
.qr-box img { width: 240px; height: 240px; image-rendering: pixelated; }
.qr-url { font-size: 14px; color: var(--muted); word-break: break-all; }
.qr-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 6px 0 14px; }
.check-row { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; min-height: 44px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ivory); }

.code-form { padding-bottom: 16px; }
.code-form > p.muted { margin: 4px 0 12px; }
.code-input { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.code-input input { flex: 1; min-width: 0; letter-spacing: .3em; font-weight: 600; text-transform: uppercase; }

/* ---------- Barra de pestañas ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button { flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 54px; justify-content: center; border: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 500; border-radius: 8px; }
.tabbar button[aria-current="page"] { color: var(--black); background: var(--ivory); }
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ---------- Hoja inferior (editor) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { width: 100%; max-width: 600px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0; animation: up .22s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 18px; border-bottom: 1px solid var(--line); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px 6px 20px; }
.sheet-head h2 { margin: 0; font-size: 34px; }
.sheet-body { overflow-y: auto; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.availability, .toggle-row { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; background: var(--bg); }
.radio-group { border: 0; padding: 10px 0 0; margin: 10px 0 0; border-top: 1px solid var(--line); opacity: .6; transition: opacity .15s; }
.radio-group.emph { opacity: 1; }
.radio-group legend { font-size: 14px; font-weight: 500; padding: 0; }
.radio-group label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.radio-group input { width: 20px; height: 20px; accent-color: var(--ivory); flex: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }

.confirm-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .65); display: grid; place-items: center; padding: 20px; animation: fade .12s ease; }
.confirm { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 18px 16px; }
.confirm-msg { margin: 0 0 6px; font: 500 28px/1.1 var(--font-display); }
.confirm .muted { margin: 0 0 16px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (max-width: 360px) {
  .price-box { width: 96px; }
  .code-boxes .box { width: 38px; }
  .cat-name { font-size: 32px; }
}

/* ---------- Impresión del QR ---------- */
@media print {
  .topbar, .tabbar, .queue-banner, .qr-actions, .check-row, .card:not(.qr-card), .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .qr-card { border: 0; background: #fff; color: #000; }
  .qr-box img { width: 9cm; height: 9cm; }
}

/* ---- Ajustes de la versión publicada ---- */
button.branch-card { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.m-logo { border: 0; background: none; padding: 0; cursor: pointer; }
.staff-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; cursor: pointer; }
.picker-staff { margin: 6px 0 28px; border-top: 0; color: var(--muted); }
.staff-gate { padding: 40px 24px 12px; text-align: center; --lock-hole: var(--surface); }
.staff-gate h2 { margin: 12px 0 10px; font-size: 38px; line-height: 1; }
.staff-gate p { margin: 0 auto 12px; max-width: 34ch; }
.gate-lock .icon { width: 46px; height: 46px; }
.selectable { user-select: text; -webkit-user-select: text; }
.saving-veil { display: none; position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .25); cursor: progress; }
.is-saving .saving-veil { display: block; }
.save-status.pending { color: #5D5850; }
.live-card[onclick], .live-card.warn { cursor: pointer; }
.lock-btn { display: grid; place-items: center; width: 48px; height: 48px; margin: 8px auto 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); opacity: .6; cursor: pointer; --lock-hole: var(--bg); }
.lock-btn .icon { width: 18px; height: 18px; }
.hero.has-logo { flex-direction: column; align-items: center; justify-content: flex-end; gap: 22px; min-height: 0; padding-top: 18px; text-align: center; }
.hero.has-logo::after { background: linear-gradient(180deg, rgba(14,13,12,0) 55%, var(--bg) 100%); }
.hero-logo { position: relative; z-index: 1; width: auto; max-width: min(240px, 62vw); max-height: 230px; object-fit: contain; }
.hero.has-logo .headline { max-width: none; font-size: 46px; }
.hero.has-photo { min-height: 360px; }
.branch-list { margin-bottom: 8px; }
.picker-staff, .picker .lock-btn { margin-top: 28px; }
button.back-link { background: none; border: 0; font: inherit; cursor: pointer; }
.login-top .lock-badge .icon { --lock-hole: var(--ivory); }
.picker-logo { justify-content: flex-start; }
.picker-logo .brand-logo { width: min(250px, 64vw); height: auto; max-height: none; }
.m-logo .brand-logo.small { height: 30px; width: auto; max-height: none; }
#lg-prev { background: var(--bg); }
#lg-prev img { object-fit: contain; background: transparent; padding: 8px; }
.hero.has-photo::after { background: linear-gradient(180deg, rgba(14,13,12,.15) 0%, rgba(14,13,12,0) 30%, rgba(14,13,12,.5) 68%, var(--bg) 100%); }
.lock-btn:hover, .lock-btn:focus-visible { opacity: 1; color: var(--ink); }

.qr-dl-hint { font-size: 13px; }

.excel-row { display: flex; gap: 10px; margin-top: 12px; }
.excel-row .btn { flex: 1; border-color: var(--line); }
.xl-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.xl-list li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }

/* Pie compacto con los datos del local */
.info-mini { display: flex; align-items: center; gap: 12px; padding: 14px 0 6px; border-top: 1px solid var(--line); }
.im-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.45; }
.im-text p { margin: 0; overflow-wrap: anywhere; }
.im-text a { color: var(--ink); text-decoration-color: var(--muted); }
.im-name { font-size: 10.5px; font-weight: 600; letter-spacing: .22em; margin-bottom: 3px !important; }
.im-links { display: flex; gap: 6px; flex: none; }
.im-ic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.im-ic .icon { width: 18px; height: 18px; }
.m-footer { padding-top: 22px; }
.m-footer .lock-btn { margin-top: 2px; }
/* Descripción en el panel */
.prod-name { flex-direction: column; align-items: flex-start; gap: 3px; padding-bottom: 8px; }
.prod-name .pn { border: 0; background: none; padding: 0; text-align: left; color: inherit; font-size: 16px; font-weight: 600; line-height: 1.25; }
.prod-name .pd { border: 0; background: none; padding: 2px 0; text-align: left; color: var(--muted); font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 26px; }
.prod-name .pd.empty { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

.cat-card:not(.sub) > .cat-head .cat-name { font-size: 30px; }

/* ---------- Vegano / Vegetariano ---------- */
:root { --veg: #A9C79A; }
.diet { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-top: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--veg) 55%, transparent); color: var(--veg); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; }
.diet .icon { width: 12px; height: 12px; }
.diet.big { margin: 2px 0 10px; font-size: 12px; padding: 3px 10px 3px 8px; }
.diet.big .icon { width: 14px; height: 14px; }
.product.sold-out .diet { opacity: .6; }
.diet-filter { display: flex; gap: 8px; margin-top: 10px; }
.diet-filter[hidden] { display: none; }
.diet-filter .df { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.diet-filter .df .icon { width: 15px; height: 15px; color: var(--veg); }
.diet-filter .df[aria-pressed="true"] { background: var(--veg); border-color: var(--veg); color: #10140E; }
.diet-filter .df[aria-pressed="true"] .icon { color: #10140E; }
.prod-name .pdiet { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line); background: none; border-radius: 999px; padding: 2px 9px 2px 7px; margin-top: 2px; color: var(--muted); font: inherit; font-size: 12px; min-height: 26px; cursor: pointer; }
.prod-name .pdiet .icon { width: 13px; height: 13px; }
.prod-name .pdiet.vegetariano, .prod-name .pdiet.vegano { border: 1px solid color-mix(in srgb, var(--veg) 60%, transparent); color: var(--veg); }
.prod-name .pdiet.vegano { background: color-mix(in srgb, var(--veg) 16%, transparent); }
.diet-pick { border: 0; padding: 0; margin: 0 0 16px; }
.diet-pick legend { font-size: 14px; margin-bottom: 8px; padding: 0; }
.diet-pick legend em { color: var(--muted); font-style: normal; }
.diet-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.diet-pick legend { width: 100%; }
.diet-pick label { position: relative; }
.diet-pick input { position: absolute; opacity: 0; pointer-events: none; }
.diet-pick span { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.diet-pick span .icon { width: 14px; height: 14px; color: var(--veg); }
.diet-pick input:checked + span { border-color: var(--veg); background: color-mix(in srgb, var(--veg) 18%, transparent); color: var(--ink); }
.diet-pick input:focus-visible + span { outline: 2px solid var(--ivory); outline-offset: 2px; }

/* ---------- Usuarios ---------- */
.user-field { display: block; width: 100%; max-width: 330px; margin: 0 auto 18px; }
.user-field .code-label { display: block; margin-bottom: 10px; }
.user-input { width: 100%; height: 50px; border: 1.5px solid var(--ivory); border-radius: 6px; background: transparent; color: var(--ivory); font: inherit; font-size: 18px; text-align: center; outline: none; padding: 0 12px; text-transform: lowercase; }
.user-input:focus { background: var(--surface-2); box-shadow: 0 0 0 3px rgba(243, 238, 230, .18); }
.user-input::placeholder { color: var(--muted); text-transform: none; }
.topbar .who { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.topbar .who b { color: inherit; font-weight: 600; }
.tabbar button { min-width: 0; }
.u-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 16px; }
.u-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.u-row > .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.u-av { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.u-av .icon { width: 18px; height: 18px; }
.u-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.u-text em { font-style: normal; font-size: 13px; }
.u-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.u-tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.u-tag.admin { border-color: var(--ivory); color: var(--ink); }
.u-tag.none { border-style: dashed; }
.u-branches { border: 0; padding: 0; margin: 16px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.u-branches legend { font-size: 14px; margin-bottom: 8px; padding: 0; }
.u-check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 16px; }
.u-check input { width: 20px; height: 20px; accent-color: var(--ivory); }
.u-check:has(input:disabled) { opacity: .6; }
.branch-switch select:disabled { opacity: 1; color: inherit; }
.branch-switch:has(select:disabled) .icon { display: none; }

/* ---------- Inicio del local: Carta · Reservas · Eventos ---------- */
.home-label { margin: 24px 4px 12px; font-size: 11px; letter-spacing: .28em; color: var(--muted); }
.home-list { display: flex; flex-direction: column; gap: 10px; }
.home-card {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px;
  width: 100%; min-height: 76px; padding: 12px 20px; border-radius: 8px; text-align: left; font: inherit; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line); transition: transform .1s ease, opacity .15s;
}
.home-card:first-child { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.home-card:active { transform: scale(.985); opacity: .9; }
.hc-num { font-size: 15px; font-weight: 600; letter-spacing: .08em; opacity: .7; }
.hc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hc-title { font-size: 17px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.hc-sub { font-size: 13px; opacity: .72; }
.hc-ic { width: 24px; height: 24px; }
.home-page .m-footer { margin-top: 18px; }
.back-home { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.back-home .icon { width: 16px; height: 16px; }
.req form { margin-top: 16px; }
.req h2 { margin-bottom: 6px; }
.req-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req .btn.solid { min-height: 52px; gap: 8px; }
.req .btn .icon { width: 20px; height: 20px; }
.req-note { text-align: center; margin: 10px 0 6px; }
.req input[type=date], .req input[type=time] { min-height: 48px; color-scheme: dark; }
.home-opt { margin: 6px 0 10px; }
.picker-back { align-self: flex-start; margin: 4px 0 -10px; }
.picker.start .home-list { margin-bottom: 4px; }
.picker.start .picker-title { margin-bottom: 26px; }

/* ---------- Editor de la pantalla de inicio ---------- */
.st-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 14px; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.st-row.off .st-text { opacity: .55; }
.st-move { display: flex; flex-direction: column; }
.st-move .icon-btn { width: 36px; height: 30px; min-height: 0; }
.st-move .icon-btn[disabled] { opacity: .25; }
.st-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; border: 0; background: none; padding: 6px 0; text-align: left; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; }
.st-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-warn { font-style: normal; color: var(--danger); }
.st-help { margin: -6px 0 14px; }
.st-f[hidden] { display: none; }
.st-sub { margin: 22px 0 4px; font-size: 18px; font-weight: 600; }
.branch-switch[hidden] { display: none; }
.u-check em { font-style: normal; font-size: 13px; }

/* ---------- Clave con letras ---------- */
.pass-wrap { position: relative; display: block; }
.pass-wrap .pass-input { padding-right: 52px; text-transform: none; letter-spacing: .04em; }
.pass-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pass-eye .icon { width: 20px; height: 20px; }
.pass-wrap.error .pass-input { border-color: var(--danger); animation: shake .3s; }

/* ---------- Carta en módulos (sin arrastrar) ---------- */
.cat-tabs:not([hidden]) { display: flex; align-items: center; gap: 12px; overflow: visible; padding-bottom: 12px; }
.sec-back { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.sec-back .icon { width: 16px; height: 16px; }
.sec-title { margin: 0; min-width: 0; font-size: 13px; letter-spacing: .2em; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-back.bottom { display: flex; margin: 26px auto 8px; padding: 0 20px 0 16px; min-height: 46px; }
.mod-label { margin: 18px 2px 12px; font-size: 11px; letter-spacing: .28em; color: var(--muted); }
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 8px; }
.mod {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 104px; padding: 16px 14px 14px; border-radius: 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; transition: transform .1s ease, border-color .15s;
}
.mod:active { transform: scale(.98); border-color: var(--accent); }
.mod-name { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.25; overflow-wrap: anywhere; }
.mod-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mod-count { font-size: 12.5px; color: var(--muted); }
.mod-ic { width: 18px; height: 18px; color: var(--accent); flex: none; }
.mod-grid .mod:only-child, .mod-grid .mod:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 84px; }
@media (min-width: 640px) { .mod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mod-grid .mod:last-child:nth-child(odd) { grid-column: auto; } }
.sub-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.sub-index button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.sub-index button:active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.sub-block { scroll-margin-top: 120px; }
.sub-h { margin: 26px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--accent); font-size: 12.5px; letter-spacing: .24em; font-weight: 600; color: var(--accent); }
.sec-title, .sub-h { font-family: inherit; }

/* Más contraste en los módulos de secciones */
.mod { background: var(--ivory); border-color: var(--ivory); color: var(--black); }
.mod .mod-count { color: rgba(14, 13, 12, .62); }
.mod .mod-ic { color: var(--black); }
.mod:active { border-color: var(--ivory); opacity: .9; }
.diet-filter.in-section { margin: 14px 0 0; }

/* =====================================================================
   MARCA COWI (manual de marca) — capa común a todas las pantallas
   Tipografías: Ogg Roman → Instrument Serif · Pluto Sans → Montserrat · Segma → Inter
   Paleta: negro #000 · crema #f2f0ed · verdes #355251 #92a6a2 #bdd5ce · turquesas #86bec7 #d5e5ec
           bordó #53252f · terracota #b76630
   Lectura cómoda para adultos: letra más grande, más contraste, botones amplios.
   ===================================================================== */
:root {
  --bg: #000000;
  --surface: #121212;
  --surface-2: #1c1c1c;
  --ink: #f2f0ed;
  --muted: #c9c4bc;          /* textos secundarios con contraste alto */
  --line: #3a3835;
  --ivory: #f2f0ed;
  --ivory-2: #e4dfd6;
  --black: #000000;
  --accent: #f2f0ed;
  --on-accent: #000000;
  --brand: #f2f0ed;
  --on-brand: #000000;
  --cowi-teal-dark: #355251;
  --cowi-sage: #92a6a2;
  --cowi-mint: #bdd5ce;
  --cowi-teal: #86bec7;
  --cowi-sky: #d5e5ec;
  --cowi-wine: #53252f;
  --cowi-terra: #b76630;
  --veg: #bdd5ce;
  --danger: #e8a092;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", Georgia, serif;
  --font-label: "Montserrat", "Inter", system-ui, sans-serif;
}
body { font-size: 17px; line-height: 1.5; }

/* Títulos: Ogg (serif, minúscula o tipo frase, variable única) */
h1, h2, h3, .serif { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.headline { font-weight: 400; font-size: 58px; line-height: .98; letter-spacing: -.005em; }
.picker-title { font-weight: 400; font-size: 46px; line-height: 1.02; letter-spacing: -.005em; }
.detail-body h2 { font-weight: 400; font-size: 40px; line-height: 1.02; }

/* Subtítulos y rótulos: Pluto Sans Bold en mayúsculas espaciadas */
.caps, .mod-name, .hc-title, .sec-title, .sub-h, .bp-name, .im-name, .p-cat, .home-label, .mod-label,
.picker-label, .diet, .badge-soldout, .results-count, .tb-title.caps {
  font-family: var(--font-label);
}
.caps { font-weight: 700; letter-spacing: .2em; font-size: 12px; }
.picker-label, .home-label, .mod-label { font-size: 12px; letter-spacing: .26em; color: var(--muted); }

/* Pantalla de inicio */
.home-card { min-height: 84px; padding: 14px 20px; }
.hc-num { font-family: var(--font-label); font-size: 14px; font-weight: 700; }
.hc-title { font-size: 16px; font-weight: 800; letter-spacing: .16em; }
.hc-sub { font-size: 15px; opacity: .85; }

/* Secciones en módulos */
.mod { min-height: 112px; padding: 18px 16px 16px; border-radius: 12px; }
.mod-name { font-size: 16px; font-weight: 800; letter-spacing: .14em; }
.mod .mod-count { font-size: 14px; color: rgba(0, 0, 0, .66); }
.mod-ic { width: 20px; height: 20px; }

/* Barra fija dentro de una sección */
.sticky-bar { background: color-mix(in srgb, #000 95%, transparent); }
.sec-back { min-height: 46px; font-size: 16px; padding: 0 16px 0 12px; }
.sec-title { font-size: 14px; font-weight: 800; letter-spacing: .18em; color: var(--ink); }
.sec-back.bottom { min-height: 52px; font-size: 16px; }

/* Índice de subsecciones */
.sub-index { gap: 10px; }
.sub-index button { min-height: 44px; padding: 0 16px; font-size: 15px; }
.sub-index button:active { background: var(--cowi-terra); border-color: var(--cowi-terra); color: #fff; }

/* Títulos de subsección: crema con línea terracota */
.sub-h { margin-top: 30px; font-size: 14px; font-weight: 800; letter-spacing: .2em; color: var(--ink); border-bottom: 2px solid var(--cowi-terra); padding-bottom: 10px; }
.cat-desc { font-size: 16px; color: var(--muted); }

/* Productos: lectura cómoda */
.product { padding: 18px 0; gap: 16px; }
.p-name { font-size: 18.5px; line-height: 1.3; font-weight: 600; }
.p-desc { margin-top: 5px; font-size: 16px; line-height: 1.45; color: var(--muted); -webkit-line-clamp: 3; }
.p-cat { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--cowi-sage); }
.amount { font-size: 18.5px; font-weight: 700; }
.p-img { width: 72px; height: 72px; border-radius: 8px; }
.badge-soldout { height: 30px; padding: 0 12px; border: 0; background: var(--cowi-wine); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.product.sold-out .p-name, .product.sold-out .p-desc { opacity: .6; }

/* Vegano / vegetariano en verde de la marca */
.diet { color: var(--veg); border-color: color-mix(in srgb, var(--veg) 60%, transparent); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; }
.diet-filter .df { min-height: 44px; height: auto; font-size: 15px; }
.diet-filter .df[aria-pressed="true"] { background: var(--veg); border-color: var(--veg); color: #000; }

/* Buscador */
.search input { font-size: 17px; }
.results-count { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Ventanas (ficha del producto, elegir sucursal) */
.m-sheet { background: #0d0d0d; border-color: var(--line); }
.detail-body .caps { font-size: 11px; color: var(--muted); }
.detail-body p { font-size: 17px; line-height: 1.55; }
.detail-price { font-family: var(--font-body); font-size: 24px; font-weight: 700; }
.switch-item { min-height: 62px; }
.switch-item .serif { font-size: 28px; }

/* Pie con datos del local */
.im-name { font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.info-mini p { font-size: 15px; }

/* Botones generales */
.btn { min-height: 50px; font-weight: 600; }
.diet-filter.in-section .df { border-color: color-mix(in srgb, var(--veg) 55%, transparent); color: var(--ink); }
.diet-filter.in-section { padding-bottom: 6px; }
.topbar .who { color: #5a5650; font-size: 13px; }
/* Módulos de sección más compactos */
.mod-grid { gap: 8px; }
.mod { min-height: 84px; padding: 13px 14px 12px; gap: 10px; }
.mod-grid .mod:only-child, .mod-grid .mod:last-child:nth-child(odd) { min-height: 64px; }
/* Secciones en lista: una debajo de otra, tono sobrio */
.mod-grid, .mod-grid { grid-template-columns: 1fr !important; gap: 8px; }
.mod-grid .mod, .mod-grid .mod:only-child, .mod-grid .mod:last-child:nth-child(odd) {
  grid-column: auto; min-height: 60px; padding: 14px 16px 14px 18px;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px;
  background: #141312; border: 1px solid #2c2a27; color: var(--ink); border-radius: 12px; text-align: left;
}
.mod-grid .mod .mod-name { font-size: 15px; letter-spacing: .12em; }
.mod-grid .mod .mod-foot { flex: none; gap: 10px; }
.mod-grid .mod .mod-count { font-size: 14px; color: var(--muted); }
.mod-grid .mod .mod-ic { color: #b76630; width: 18px; height: 18px; }
.mod-grid .mod:active { background: #1d1b19; border-color: #3a3835; opacity: 1; }
/* Botones rectangulares, como las secciones */
.sub-index button, .diet-filter .df { border-radius: 10px; background: #141312; border-color: #2c2a27; }
.diet-filter.in-section .df { border-color: color-mix(in srgb, var(--veg) 45%, #2c2a27); }
.diet-filter .df[aria-pressed="true"] { background: var(--veg); border-color: var(--veg); }
.sub-index button:active { background: var(--cowi-terra); border-color: var(--cowi-terra); }
.diet, .badge-soldout { border-radius: 6px; }
/* Hojita junto al nombre para platos veganos / vegetarianos */
.p-name .leaf-mark { display: inline-flex; vertical-align: -0.12em; margin-left: 7px; color: var(--veg); }
.p-name .leaf-mark .icon { width: 1em; height: 1em; }
.diet-filter.in-section { display: none !important; }
/* Horario de categorías (panel) */
.hours-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.hours-box .toggle-row { margin: 0; padding: 0; border: 0; }
.hours-fields { margin-top: 12px; }
.hours-fields[hidden] { display: none; }
.hours-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hours-times input[type="time"] { width: 100%; min-height: 46px; font: inherit; font-size: 17px; }
.hours-days { border: 0; padding: 0; margin: 8px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.hours-days legend { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.hours-days label { position: relative; }
.hours-days input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hours-days span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; }
.hours-days input:checked + span { background: var(--ink); color: #000; border-color: var(--ink); font-weight: 600; }
.hours-days input:focus-visible + span { outline: 2px solid var(--cowi-terra); outline-offset: 2px; }
.hours-times { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hours-times .field, .hours-times input[type="time"] { min-width: 0; max-width: 100%; box-sizing: border-box; }
.hours-box .toggle-row { background: transparent; }
.cat-head .chip .icon.tiny { width: 13px; height: 13px; vertical-align: -2px; }
.cat-hours { display: flex; align-items: center; gap: 6px; margin: -2px 0 10px; font-size: 13.5px; color: var(--cowi-terra, #b76630); }
.cat-hours .icon { width: 15px; height: 15px; flex: none; }
/* Foto de portada más baja */
.hero, .hero.has-photo { min-height: 210px; padding-bottom: 16px; }
.hero .headline, .hero.has-logo .headline { font-size: 44px; }
.mod-grid .mod .mod-count { display: none; }

/* ===== Tipografías del manual =====
   Si se suben los archivos con licencia web a la carpeta /fonts, se usan automáticamente.
   Mientras tanto se ven las alternativas gratuitas parecidas. */
@font-face { font-family: "Ogg"; src: local("Ogg Roman"), local("Ogg-Roman"), url("fonts/Ogg-Roman.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pluto Sans"; src: local("Pluto Sans Bold"), local("PlutoSans-Bold"), url("fonts/PlutoSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Pluto Sans"; src: local("Pluto Sans Heavy"), local("PlutoSans-Heavy"), url("fonts/PlutoSans-Heavy.woff2") format("woff2"); font-weight: 800 900; font-style: normal; font-display: swap; }
:root {
  --font-display: "Ogg", "Instrument Serif", "Times New Roman", Georgia, serif;
  --font-label: "Pluto Sans", "Montserrat", "Inter", system-ui, sans-serif;
}
@font-face { font-family: "Pluto Sans"; src: local("Pluto Sans Light"), local("PlutoSans-Light"), url("fonts/PlutoSans-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Segma"; src: local("Segma Light"), local("Segma-Light"), url("fonts/Segma-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Segma"; src: local("Segma Regular"), local("Segma-Regular"), local("Segma"), url("fonts/Segma-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Segma"; src: local("Segma Medium"), local("Segma-Medium"), url("fonts/Segma-Medium.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }
:root { --font-body: "Segma", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.menu-page .hero .headline { max-width: 5.2em; }
/* Letras blancas (no crema) para máxima lectura */
:root { --ink: #ffffff; --ivory: #ffffff; --accent: #ffffff; --brand: #ffffff; --muted: #d9d9d9; }
/* Tamaño del logo (se ajusta en Marca y QR) */
.m-logo .brand-logo.small { height: var(--logo-h, 36px); width: auto; max-height: none; }
.m-logo .wordmark.small .name { font-size: var(--logo-h, 36px); }
.picker-logo .brand-logo { width: min(var(--logo-w, 200px), 86vw); }
.size-field span { display: flex; justify-content: space-between; align-items: baseline; }
.size-field output { font-weight: 600; }
.size-field input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--cowi-terra, #b76630); }
/* Inicio compacto: todo a la vista sin bajar */
.picker.start { padding-top: max(22px, calc(env(safe-area-inset-top) + 14px)); }
.picker.start .picker-logo { min-height: 0; }
.picker.start .picker-title { margin: 18px 0 16px; font-size: 38px; line-height: 1; }
.picker.start .picker-label { margin-bottom: 10px; }
.picker.start .home-list { gap: 8px; }
.picker.start .home-card { min-height: 70px; padding: 11px 18px; }
.picker.start .picker-staff, .picker.start .lock-btn { margin-top: 16px; }
@media (max-height: 700px) {
  .picker.start .picker-title { font-size: 32px; margin: 12px 0 12px; }
  .picker.start .home-card { min-height: 62px; padding: 9px 16px; }
}
.menu-page .back-home { margin-bottom: 14px; }
/* Secciones y subsecciones: negras con borde; al tocar o elegir, colores invertidos */
.mod-grid .mod, .mod-grid .mod:only-child, .mod-grid .mod:last-child:nth-child(odd),
.sub-index button {
  background: #000; color: #fff; border: 1px solid #5a5a5a;
  transition: background-color .15s, color .15s, border-color .15s;
}
.mod-grid .mod .mod-ic { color: #fff; }
.mod-grid .mod:active, .sub-index button:active, .sub-index button[aria-pressed="true"] {
  background: #fff; color: #000; border-color: #fff;
}
.mod-grid .mod:active .mod-name, .mod-grid .mod:active .mod-ic { color: #000; }
@media (hover: hover) {
  .mod-grid .mod:hover, .sub-index button:hover { background: #fff; color: #000; border-color: #fff; }
  .mod-grid .mod:hover .mod-name, .mod-grid .mod:hover .mod-ic { color: #000; }
}

/* Inicio: sin frase, logo centrado y opciones con margen a los lados */
.picker.start .picker-title { display: none; }
.picker.start { justify-content: center; padding-bottom: 24px; }
.picker.start .picker-logo { justify-content: center; margin: 0 0 26px; }
.picker.start .picker-label { text-align: center; }
.picker.start .home-list { margin-left: 14px; margin-right: 14px; }
.picker.start .start-logo { width: min(var(--logo-w, 120px), 60vw); height: auto; display: block; }
/* Carta sin logo: volver a la izquierda, sucursal a la derecha */
.m-top-nologo { align-items: center; padding-bottom: 6px; }
.m-top-nologo .back-home { margin: 0; padding: 10px 2px; min-height: 44px; font-size: 15px; color: var(--ink); }
.m-top-nologo .back-home .icon { width: 18px; height: 18px; }
.menu-page .back-home { margin-bottom: 0; }
.m-top-nologo .back-home { white-space: nowrap; text-align: left; flex: none; font-size: 16px; font-weight: 500; }
.menu-page .mod-label { margin-top: 10px; }

/* ===== Carta en blanco con la textura de papel del manual (solo vistas del cliente) ===== */
body.cliente {
  --bg: #fafaf8; --surface: #ffffff; --ink: #000; --ivory: #000; --accent: #000; --on-accent: #fff; --brand: #000;
  --muted: #3d3d3d; --line: #cfcfcf; --black: #fff; --veg: #355251;
  background: #fafaf8; color: #000;
}
html:has(body.cliente) { background: #fafaf8; }
body.cliente::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: #fafaf8 url("texturas/tex-claro.jpg") 0 0 / 450px auto repeat;
}
body.cliente .picker, body.cliente .menu-page { background: transparent; }
body.cliente .sticky-bar { background: rgba(250, 250, 248, .93); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.cliente .picker.start .start-logo { filter: invert(1); }
/* Opciones del inicio: la primera negra, el resto blancas con borde negro */
body.cliente .home-card { background: rgba(255, 255, 255, .55); color: #000; border-color: #000; }
body.cliente .home-card .hc-sub { color: #3d3d3d; }
body.cliente .home-card .hc-num { color: #555; }
body.cliente .home-card:first-child { background: #000; color: #fff; border-color: #000; }
body.cliente .home-card:first-child .hc-sub, body.cliente .home-card:first-child .hc-num { color: #d9d9d9; }
/* Secciones y subsecciones: blancas con borde negro; al tocar o elegir, negras */
body.cliente .mod-grid .mod, body.cliente .mod-grid .mod:only-child, body.cliente .mod-grid .mod:last-child:nth-child(odd),
body.cliente .sub-index button { background: rgba(255, 255, 255, .55); color: #000; border-color: #000; }
body.cliente .mod-grid .mod .mod-ic { color: #000; }
body.cliente .mod-grid .mod:active, body.cliente .sub-index button:active, body.cliente .sub-index button[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }
body.cliente .mod-grid .mod:active .mod-name, body.cliente .mod-grid .mod:active .mod-ic { color: #fff; }
@media (hover: hover) {
  body.cliente .mod-grid .mod:hover, body.cliente .sub-index button:hover { background: #000; color: #fff; border-color: #000; }
  body.cliente .mod-grid .mod:hover .mod-name, body.cliente .mod-grid .mod:hover .mod-ic { color: #fff; }
}
body.cliente .p-desc { color: #3d3d3d; }
body.cliente .p-name .leaf-mark { color: #355251; }
body.cliente .m-sheet { background: #fff; color: #000; }
body.cliente .sheet-close { background: rgba(0, 0, 0, .06); color: #000; }
body.cliente .m-sheet-back { background: rgba(0, 0, 0, .35); }
body.cliente .lock-btn { color: #9a9a9a; }

/* ===== Diseño carta (referencia del cliente): crema #f2f0ed y negro ===== */
body.cliente { --bg: #f2f0ed; --surface: #f7f6f3; --muted: #4a4a4a; --line: #d9d6d0; --font-heading: "Source Serif 4", "Times New Roman", Georgia, serif; background: #f2f0ed; }
html:has(body.cliente) { background: #f2f0ed; }
body.cliente::before { background: #f2f0ed url("texturas/tex-claro.jpg") 0 0 / 450px auto repeat; background-blend-mode: multiply; }
body.cliente .sticky-bar { background: rgba(242, 240, 237, .94); }
body.cliente .mini-name { display: none !important; }

/* Títulos grandes en serif negrita */
.big-heading { margin: 18px 0 22px; font-family: var(--font-heading, Georgia, serif); font-weight: 700; font-size: 40px; line-height: 1.05; letter-spacing: -.025em; color: var(--ink); }
@media (max-width: 360px) { .big-heading { font-size: 34px; } }

/* Lista de secciones: número | NOMBRE → con líneas finas */
body.cliente .mod-grid.mod-list { gap: 0; }
body.cliente .mod-list .mod, body.cliente .mod-list .mod:only-child, body.cliente .mod-list .mod:last-child:nth-child(odd) {
  display: flex; align-items: center; gap: 0; min-height: 66px; padding: 0 4px; margin: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: #000; text-align: left;
}
body.cliente .mod-list .mod-num { flex: none; width: 46px; font-family: var(--font-label); font-weight: 700; font-size: 15px; letter-spacing: .06em; color: #6b6b6b; }
body.cliente .mod-list .mod-name { flex: 1; min-width: 0; padding-left: 16px; border-left: 2px solid #000; line-height: 1.6; font-size: 16px; font-weight: 800; letter-spacing: .16em; color: #000; }
body.cliente .mod-list .mod-foot { flex: none; margin-left: 12px; }
body.cliente .mod-list .mod .mod-ic { width: 22px; height: 22px; color: #000; }
body.cliente .mod-list .mod:active, body.cliente .mod-list .mod:hover { background: #000; color: #fff; border-bottom-color: #000; }
body.cliente .mod-list .mod:active .mod-name, body.cliente .mod-list .mod:hover .mod-name { color: #fff; border-left-color: #fff; }
body.cliente .mod-list .mod:active .mod-num, body.cliente .mod-list .mod:hover .mod-num,
body.cliente .mod-list .mod:active .mod-ic, body.cliente .mod-list .mod:hover .mod-ic { color: #fff; }
@media (hover: none) { body.cliente .mod-list .mod:hover:not(:active) { background: transparent; color: #000; border-bottom-color: var(--line); }
  body.cliente .mod-list .mod:hover:not(:active) .mod-name { color: #000; border-left-color: #000; }
  body.cliente .mod-list .mod:hover:not(:active) .mod-num { color: #6b6b6b; }
  body.cliente .mod-list .mod:hover:not(:active) .mod-ic { color: #000; } }

/* Sección abierta: arriba "‹ Secciones" y la sucursal; título grande */
.menu-page.in-section .m-top { display: none; }
.sec-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
body.cliente .cat-tabs { display: block; }
body.cliente .sec-back { border: 0; padding: 0 2px; min-height: 44px; background: transparent; font-size: 16px; color: #000; }
.sec-branch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; letter-spacing: .14em; color: #000; }
.sec-branch .icon { width: 20px; height: 20px; }
.sec-heading { margin: 8px 0 4px; font-size: 44px; }
.sticky-bar.stuck .sec-heading { font-size: 26px; margin: 2px 0 2px; }
.sticky-bar.stuck .sec-top { min-height: 0; }

/* Subsecciones: rectángulos con borde negro, la elegida en negro */
body.cliente .sub-index { gap: 10px; margin: 14px 0 6px; }
body.cliente .sub-index button { min-height: 44px; padding: 0 16px; border-radius: 9px; border: 1.5px solid #000; background: transparent; color: #000; font-size: 16px; font-weight: 500; }
body.cliente .sub-index button[aria-pressed="true"] { background: #000; color: #fff; font-weight: 700; }

/* Subtítulo de subsección con línea negra */
body.cliente .sub-h { margin-top: 26px; padding-bottom: 12px; border-bottom: 2px solid #000; font-size: 16px; letter-spacing: .2em; font-weight: 800; color: #000; }

/* Productos */
body.cliente .product { padding: 18px 0; border-bottom: 1px solid var(--line); }
body.cliente .p-name { font-size: 18px; font-weight: 700; line-height: 1.3; color: #000; }
body.cliente .p-desc { margin-top: 6px; font-size: 16px; line-height: 1.45; color: #222; }
body.cliente .amount { font-size: 18px; font-weight: 800; color: #000; }
body.cliente .p-name .leaf-mark { color: #000; }

/* Portada (inicio) con la misma paleta */
body.cliente .home-card { background: transparent; border: 1.5px solid #000; color: #000; }
body.cliente .home-card:first-child { background: #000; color: #fff; }
body.cliente .picker-label { color: #4a4a4a; }
body.cliente .sub-index { gap: 8px; }
body.cliente .sub-index button { min-height: 42px; padding: 0 13px; font-size: 15px; letter-spacing: -.01em; }
body.cliente .m-sheet { background: #f7f6f3; }
.picker.start .picker-label { display: none; }
/* Pie de la carta: logo COWI horizontal alineado con los íconos */
.info-mini { align-items: center; }
.im-logo { display: flex; align-items: center; }
.im-logo .logo-h { height: var(--logo-h, 30px); width: auto; display: block; color: var(--ink); }
/* Panel con la misma paleta: crema y negro */
body.cliente .topbar { background: rgba(242, 240, 237, .96); color: #000; --black: #000; border-bottom: 1px solid var(--line); }
body.cliente .topbar .who { color: #4a4a4a; }
body.cliente .topbar h1, body.cliente .sheet h2, body.cliente .sheet-title, body.cliente .cat-name {
  font-family: var(--font-heading, Georgia, serif); font-weight: 700; letter-spacing: -.02em;
}
body.cliente .tabbar { background: rgba(242, 240, 237, .97); border-top: 1px solid var(--line); }
body.cliente .topbar { background: #f2f0ed; }
body.cliente .card h2, body.cliente .panel h2, body.cliente .settings h2 { font-family: var(--font-heading, Georgia, serif); font-weight: 700; letter-spacing: -.02em; }
body.cliente .size-field input[type="range"] { accent-color: #000; }
/* Inicio: todas las opciones iguales; al tocar, colores invertidos */
body.cliente .home-card, body.cliente .home-card:first-child { background: transparent; color: #000; border: 1.5px solid #000; }
body.cliente .home-card .hc-sub, body.cliente .home-card:first-child .hc-sub { color: #4a4a4a; }
body.cliente .home-card .hc-num, body.cliente .home-card:first-child .hc-num { color: #6b6b6b; }
body.cliente .home-card .hc-arrow, body.cliente .home-card:first-child .hc-arrow, body.cliente .home-card .icon { color: #000; }
body.cliente .home-card:active { background: #000; color: #fff; }
body.cliente .home-card:active .hc-sub, body.cliente .home-card:active .hc-num, body.cliente .home-card:active .icon { color: #fff; }
@media (hover: hover) {
  body.cliente .home-card:hover { background: #000; color: #fff; }
  body.cliente .home-card:hover .hc-sub, body.cliente .home-card:hover .hc-num, body.cliente .home-card:hover .icon { color: #fff; }
}
/* Textura de fondo elegida (papel con salpicado), sobre crema */
body.cliente::before { background: #f2f0ed url("texturas/tex-fondo.jpg") center / cover no-repeat; background-blend-mode: multiply; }
body.cliente { background: transparent !important; }
body.cliente .picker, body.cliente .menu-page, body.cliente .editor, body.cliente main { background: transparent; }
body.cliente .sticky-bar { background: transparent; }
body.cliente .sticky-bar.stuck { background: rgba(242, 240, 237, .95); }

/* ===== Inicio con colores y textura invertidos: negro con salpicado claro ===== */
html:has(body.inicio) { background: #000; }
body.cliente.inicio { --ink: #fff; --muted: #c9c9c9; --line: #3a3a3a; color: #fff; }
body.cliente.inicio::before { background: #000 url("texturas/tex-fondo-negro.jpg") center / cover no-repeat; background-blend-mode: screen; }
body.cliente.inicio .picker.start .start-logo { filter: none; }
body.cliente.inicio .home-card, body.cliente.inicio .home-card:first-child { background: transparent; color: #fff; border-color: #fff; }
body.cliente.inicio .home-card .hc-sub, body.cliente.inicio .home-card:first-child .hc-sub { color: #cfcfcf; }
body.cliente.inicio .home-card .hc-num, body.cliente.inicio .home-card:first-child .hc-num { color: #9a9a9a; }
body.cliente.inicio .home-card .icon { color: #fff; }
body.cliente.inicio .home-card:active { background: #fff; color: #000; }
body.cliente.inicio .home-card:active .hc-sub, body.cliente.inicio .home-card:active .hc-num, body.cliente.inicio .home-card:active .icon { color: #000; }
@media (hover: hover) {
  body.cliente.inicio .home-card:hover { background: #fff; color: #000; }
  body.cliente.inicio .home-card:hover .hc-sub, body.cliente.inicio .home-card:hover .hc-num, body.cliente.inicio .home-card:hover .icon { color: #000; }
}
body.cliente.inicio .lock-btn { color: #666; }
/* La hoja para elegir sucursal se abre sobre el inicio: que mantenga el estilo claro */
body.cliente.inicio .m-sheet { --ink: #000; --muted: #4a4a4a; --line: #d9d6d0; color: #000; }
